/**
 * Weather-X Professional Weather System
 * Main Stylesheet - Fixed and Optimized Version
 * Version: 2.1 - Comprehensive fixes applied
 */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    --border-color: #334155;
    --card-bg: #1e293b;
    --input-bg: #334155;
    --hover-bg: #475569;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-logo {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.access-indicator {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.access-real {
    background: var(--success-color);
    color: white;
}

.access-demo {
    background: var(--warning-color);
    color: white;
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    flex: 1;
    max-width: none;
}

.hero-logo {
    width: auto;
    max-width: 350px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.hero-logo-img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.hero-content h1 {
    margin-bottom: 0;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Search Form */
.search-form {
    display: flex;
    width: 100%;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #374151;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Dropdown improvements */
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* New layout for aligned weather and stats */
.main-content.aligned-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.weather-stats-row {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

/* New stats column to hold both Grid Stats and Apply Weather cards */
.stats-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Make both cards in stats column the same size */
.stats-column .sidebar-card {
    flex: 1;
    min-height: 0; /* Allow flex to work properly */
}

/* Fix alignment by removing top margin from weather preview in the aligned layout */
.weather-stats-row .home-weather-preview {
    margin-top: 0 !important;
}

/* Remove margin from bordered-frame in aligned layout */
.weather-stats-row .bordered-frame {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Update alignment rules for the new structure */
.weather-stats-row .weather-grid,
.weather-stats-row .stats-column {
    margin-top: 0 !important;
    align-self: start !important;
}

.forecast-full-width {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

.sidebar.remaining-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Responsive adjustments for new layout */
@media (max-width: 1024px) {
    .weather-stats-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-column {
        gap: 1rem;
    }
}

.content-area {
    min-height: 400px;
}

/* Weather Grid */
.weather-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Weather Cards */
.weather-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.current-weather {
    grid-column: 1 / -1;
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.weather-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.location-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.location-name i {
    color: var(--accent-color);
}

.weather-actions {
    display: flex;
    gap: 0.5rem;
}

.temp-toggle {
    background: var(--surface-light);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    align-self: flex-start;
    min-width: 40px;
    text-align: center;
}

.temp-toggle:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

/* Temperature toggle button */
.temp-toggle-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.temp-toggle-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.temp-toggle-btn:active {
    transform: scale(0.95);
}

.weather-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.weather-icon {
    font-size: 4rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

.weather-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.temperature {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin: 0;
}

.weather-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
}

.feels-like {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
}

/* Home weather preview adjustments */
.home-weather-card .weather-main {
    gap: 0.75rem;
}

.home-weather-card .weather-icon {
    font-size: 3rem;
}

.home-weather-card .temperature {
    font-size: 2.5rem;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.detail-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.detail-item span:first-of-type {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.detail-item span:last-of-type {
    color: var(--text-primary);
    font-weight: 600;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Large Weather Display */
.weather-icon-large {
    font-size: 6rem;
    text-align: center;
}

.weather-icon-large i {
    color: var(--accent-color);
}

.weather-temp-large {
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin: 1rem 0;
}

.weather-desc-large {
    font-size: 1.2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Weather Details Grid */
.weather-details-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
}

.detail-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: left;
    width: 100%;
}

.detail-icon {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: left;
}

/* Color coding for different stat values */
.humidity-value {
    color: #3b82f6; /* Blue for humidity */
}

.wind-value {
    color: #10b981; /* Green for wind */
}

.pressure-value {
    color: #f59e0b; /* Orange for pressure */
}

.visibility-value {
    color: #8b5cf6; /* Purple for visibility */
}

.uv-value {
    color: #ef4444; /* Red for UV index */
}

.update-value {
    color: #6b7280; /* Gray for last update */
}

.detail-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    text-align: left;
}



/* Forecast Section */
.forecast-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-top: 2rem;
    width: 100%;
    flex: 1 1 100%;
}

.forecast-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.forecast-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
}

.forecast-day {
    background: var(--surface) !important;
    padding: 1.25rem !important;
    border-radius: 12px !important;
    text-align: center !important;
    border: 1px solid var(--border) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    min-width: 0 !important;
}

.forecast-day:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.forecast-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forecast-icon {
    font-size: 2.5rem;
    margin: 0.75rem 0;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.forecast-condition {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.5rem 0;
    text-transform: capitalize;
    line-height: 1.2;
}

.forecast-temp {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0.75rem 0;
    letter-spacing: 0.5px;
}

.forecast-details {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    gap: 0.5rem;
}

.forecast-details span {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive adjustments for forecast */
@media (max-width: 768px) {
    .forecast-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .forecast-day {
        padding: 1rem;
    }
    
    .forecast-icon {
        font-size: 2rem;
        margin: 0.5rem 0;
    }
    
    .forecast-details {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }
    
    .forecast-details span {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .forecast-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .forecast-section {
        padding: 1rem;
    }
}

/* Legacy forecast styles for backward compatibility */
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.forecast-item {
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.2s ease;
}

.forecast-item:hover {
    transform: translateY(-2px);
}

.temp-high {
    color: var(--text-primary);
    font-weight: 600;
}

.temp-low {
    color: var(--text-muted);
}

.forecast-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Navigation */
.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: var(--surface-light);
    color: var(--text-primary);
    border-color: var(--border);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.dropdown-item i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.sidebar-card h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* System Status */
.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.system-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.system-details .status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.system-details .status-item:last-child {
    border-bottom: none;
}

.system-details .status-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.system-details .status-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: var(--success-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Apply Section */
.apply-section {
    text-align: center;
}

.apply-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.apply-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 100%;
    margin-bottom: 1rem;
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.apply-btn:active {
    transform: translateY(0);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--surface);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-primary);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

button[type="submit"]:hover {
    background: var(--primary-dark);
}

/* Loading and Error States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-container {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: var(--error-color);
}

.error-container i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.error-container p {
    margin: 0;
    font-size: 0.9rem;
}

/* Home Weather Preview */
.home-weather-preview {
    margin-top: 2rem;
}

.home-weather-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: center;
}

.bordered-frame {
    border: 3px solid var(--primary-color);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.weather-main-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.main-weather-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.weather-icon-large {
    font-size: 4rem;
    color: var(--primary-color);
}

.weather-emoji-large {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-align: center;
}

.weather-main-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.temperature-large {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    text-align: left;
}

.condition-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-transform: capitalize;
    text-align: left;
}

.city-name-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.5rem;
    text-align: left;
}

.weather-stats-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Region Statistics */
.region-stats {
    margin-top: 1rem;
}

.region-stats .stat-item {
    padding: 0.75rem 0;
}

.region-stats .stat-label {
    font-size: 0.85rem;
}

.region-stats .stat-value {
    font-size: 0.9rem;
}

/* Footer Styles - Original Clean Format */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-img {
    height: 32px;
    width: auto;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.footer-list {
    list-style: none;
    padding: 0;
}

.footer-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-list i {
    color: var(--success-color);
    font-size: 0.8rem;
}

.status-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
}

.status-indicator.online {
    background: var(--success-color);
    box-shadow: 0 0 4px var(--success-color);
}

.status-value {
    color: var(--text-primary);
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links i {
    font-size: 0.8rem;
}

.footer-copyright {
    text-align: right;
}

.footer-copyright p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

.footer-version {
    font-weight: 500;
    color: var(--text-secondary);
}

/* Remove the simple footer styles I added earlier */
.footer-simple {
    display: none;
}

/* Home Content Grid */
.home-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.home-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.home-card h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-card h3 i {
    color: var(--accent-color);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.feature-list li i {
    color: var(--success-color);
    font-size: 0.9rem;
}

.status-list {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.status-list .status-item {
    display: table-row;
}

.status-list .status-item:first-child {
    background: var(--surface-light);
    font-weight: 600;
}

.status-list .status-item:first-child::before,
.status-list .status-item:first-child::after {
    display: table-cell;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.status-list .status-item:first-child::before {
    content: "System Status";
    border-right: 1px solid var(--border);
}

.status-list .status-item:first-child::after {
    content: "All systems operational";
    color: var(--success-color);
}

.status-list .status-item:not(:first-child) {
    display: table-row;
}

.status-list .status-item:not(:first-child)::before,
.status-list .status-item:not(:first-child)::after {
    display: table-cell;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.status-list .status-item:not(:first-child)::before {
    border-right: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 500;
}

.status-list .status-item:not(:first-child)::after {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.status-list .status-item:nth-child(2)::before {
    content: "Active Controllers:";
}

.status-list .status-item:nth-child(2)::after {
    content: "0";
}

.status-list .status-item:nth-child(3)::before {
    content: "Weather Components:";
}

.status-list .status-item:nth-child(3)::after {
    content: "3";
}

.status-list .status-item:nth-child(4)::before {
    content: "Last Update:";
}

.status-list .status-item:nth-child(4)::after {
    content: "--:--";
}

.status-list .status-item:last-child::before,
.status-list .status-item:last-child::after {
    border-bottom: none;
}

.home-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.home-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Responsive adjustments for home grid */
@media (max-width: 768px) {
    .home-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
    
    .home-card {
        padding: 1.5rem;
    }
    
    .weather-main-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .main-weather-display {
        justify-content: center;
    }
    
    .weather-main-info {
        text-align: center;
    }
    
    .weather-stats-row {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .weather-stats-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Responsive adjustments for home grid */
@media (max-width: 768px) {
    .home-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
    
    .home-card {
        padding: 1.5rem;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-logo {
        max-width: 500px;
    }
    
    .hero-content {
        max-width: 400px;
    }
    
    .weather-main {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .weather-icon {
        font-size: 3rem;
    }
    
    .temperature {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-logo {
        max-width: 400px;
    }
    
    .hero-content {
        max-width: 300px;
    }
    
    .search-form {
        border-radius: 25px;
    }
    
    .search-input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 0.75rem 1rem;
    }
    
    .footer {
        padding: 1.5rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Animation utilities */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Contact Details */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.contact-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-value a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-note {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.contact-note p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.contact-note i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Standalone Contact Details Page */
.contact-details-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-details-page h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.contact-details-page .contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-details-page .contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.contact-details-page .contact-item i {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-details-page .contact-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.contact-details-page .contact-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.2rem;
}

.contact-details-page .contact-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details-page .contact-value a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-details-page .contact-note {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.contact-details-page .contact-note p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Footer Contact Styles */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-grid .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.contact-grid .contact-item i {
    color: var(--primary-color);
    font-size: 1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-grid .contact-note {
    background: none;
    border: none;
    padding: 0.5rem 0 0 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.contact-grid .contact-note small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.contact-grid .contact-note i {
    margin-right: 0.5rem;
}

/* Enhanced Icon Support and Fallbacks */
.fas, .far, .fab, .fa, .wi {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', 'Font Awesome 5 Free', 'Font Awesome 5 Pro', Arial, sans-serif;
    font-weight: 900;
    font-style: normal;
    display: inline-block;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-width: 1em;
    text-align: center;
}

/* Specific icon fallbacks with Unicode symbols */
.fa-envelope::before { content: "✉"; }
.fa-user::before { content: "👤"; }
.fa-clock::before { content: "🕐"; }
.fa-address-book::before { content: "📇"; }
.fa-star::before { content: "⭐"; }
.fa-check::before { content: "✓"; }
.fa-home::before { content: "🏠"; }
.fa-map-marked-alt::before { content: "📍"; }
.fa-cog::before { content: "⚙"; }
.fa-tools::before { content: "🔧"; }
.fa-info-circle::before { content: "ℹ"; }

/* Ensure icons are visible and properly sized */
.contact-item i,
.footer-list i,
.nav-links i,
h4 i {
    display: inline-block;
    width: 1.2em;
    text-align: center;
    margin-right: 0.5em;
    font-size: 1em;
    line-height: 1;
}

/* Force icon display for critical elements */
.contact-item i::before,
.footer-list i::before,
h4 i::before {
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.visible { display: block !important; }