/* Color Palette Variables - Melbourne Mobility Insights */
:root {
    --primary-dark: #113F67;     /* Dark Navy Blue - Primary text, headers */
    --primary-medium: #34699A;   /* Medium Blue - Buttons, accents */
    --primary-light: #58A0C8;    /* Light Blue - Links, highlights */
    --text-primary: #113F67;     /* Dark navy for main text */
    --text-secondary: #34699A;   /* Medium blue for secondary text */
    --text-muted: #6b7280;       /* Gray for muted text */
    --background-white: #ffffff;
    --background-light: #f8fafc;
    --background-section: #f9fafb;
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-white);
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 10px rgba(17, 63, 103, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: var(--primary-medium);
}

.nav-logo i {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--primary-medium);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #374151;
    margin: 3px 0;
    transition: 0.3s;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 50%, var(--primary-light) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    animation: slideInLeft 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image {
    animation: slideInRight 1s ease-out;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-medium);
    color: white;
    box-shadow: 0 4px 6px rgba(52, 105, 154, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(17, 63, 103, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-medium);
    border: 2px solid var(--primary-medium);
}

.btn-secondary:hover {
    background: var(--primary-medium);
    color: white;
    transform: translateY(-2px);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--background-section);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.7;
}

.about-list {
    list-style: none;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.about-list i {
    color: var(--primary-light);
    font-size: 1.1rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 35px 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 160px;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-medium);
    margin-bottom: 15px;
    line-height: 1;
}

.stat-label {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Services Section */
.services {
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--background-white);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(17, 63, 103, 0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    cursor: pointer;
    position: relative;
}

/* Coming soon styles removed - both services are now active */

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(17, 63, 103, 0.15);
    border-color: var(--primary-light);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-medium), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.service-card ul {
    list-style: none;
    text-align: left;
}

.service-card li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.service-card li::before {
    content: '•';
    color: var(--primary-light);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: #f9fafb;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.2rem;
}

.contact-details h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.contact-details p {
    color: #6b7280;
    line-height: 1.6;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

/* Footer Row Layout */
.footer-content-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Data Sources Section */
.footer-data-sources {
    margin-bottom: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(55, 65, 81, 0.3);
}

.footer-data-sources h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
}

.data-sources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-logo i {
    font-size: 28px;
}

.footer-section p {
    color: #9ca3af;
    margin-bottom: 24px;
    line-height: 1.6;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #2563eb;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid white;
    padding-top: 20px;
    text-align: center;
    color: #9ca3af;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Services Page Styles */
.services-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 50%, var(--primary-light) 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.services-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.services-hero-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.analytics-dashboard {
    padding: 80px 0;
    background: var(--background-section);
}

.dashboard-header {
    text-align: center;
    margin-bottom: 60px;
}

.dashboard-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.dashboard-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.analytics-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 20px;    /* Reduced space from header */
    margin-bottom: 30px; /* Reduced space to chart */
    padding: 20px 30px;  /* Reduced vertical padding */
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.control-select {
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    background: white;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2334699A' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    min-width: 180px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.control-select:focus {
    outline: none;
    border-color: var(--primary-medium);
    box-shadow: 0 0 0 3px rgba(52, 105, 154, 0.1);
}

.control-select:hover {
    border-color: var(--primary-light);
    background-color: rgba(52, 105, 154, 0.02);
}

.analytics-content {
    display: block;
    margin-bottom: 40px;
}

.chart-container {
    background: var(--background-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(17, 63, 103, 0.08);
    border: 1px solid var(--border-light);
    margin-bottom: 40px;
    min-height: 550px; /* Reduced from 600px to 550px for better viewport fit */
}

/* Removed chart-header styles - no longer needed */

.loading-spinner {
    display: none;
    align-items: center;
    gap: 10px;
    color: #6b7280;
}

.loading-spinner i {
    color: #2563eb;
}

#ownershipChart {
    height: 500px !important;
    width: 100% !important;
}

#populationChart {
    height: 500px !important;
    width: 100% !important;
}

/* Original analysis-panel kept for compatibility */
.analysis-panel {
    background: var(--background-white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(17, 63, 103, 0.08);
    border: 1px solid var(--border-light);
    height: fit-content;
}

/* New analysis panel positioned below chart */
.analysis-panel-bottom {
    background: var(--background-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(17, 63, 103, 0.08);
    border: 1px solid var(--border-light);
    margin-bottom: 40px;
}

.analysis-content-bottom {
    display: block;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.analysis-panel h3,
.analysis-panel-bottom h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 25px;
}

.analysis-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.analysis-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.analysis-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-section h4 i {
    color: var(--primary-light);
    margin-right: 8px;
}

.analysis-section h4 {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
    background: rgba(52, 105, 154, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(52, 105, 154, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(52, 105, 154, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-weight: 700;
    color: var(--primary-medium);
    font-size: 1.8rem;
    line-height: 1.2;
}

.insights-list {
    list-style: none;
    padding: 0;
}

.insights-list li {
    padding: 10px 0;
    border-left: 3px solid #2563eb;
    padding-left: 15px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    color: #374151;
    line-height: 1.5;
}

.data-source {
    background: #f0f9ff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
}

.data-source strong {
    color: #0c4a6e;
}

.data-source small {
    color: #64748b;
}



.error-message, .no-data-message {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
    color: #6b7280;
    margin: 20px 0;
    transition: opacity 0.3s ease;
}

.error-message i, .no-data-message i {
    font-size: 1.2rem;
    margin-right: 8px;
    vertical-align: middle;
}

.no-data-message i {
    color: #6b7280;
}

/* Chart Citation Styles */
.chart-citation {
    text-align: left;
    padding: 10px 20px;
    margin-top: 15px;
    background-color: rgba(52, 105, 154, 0.05);
    border-radius: 6px;
    border-left: 3px solid var(--primary-light);
}

.chart-citation small {
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
    line-height: 1.4;
}

.nav-link.active {
    color: var(--primary-medium);
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        flex-direction: row;
        justify-content: space-between;
    }

    .stat-item {
        padding: 25px 20px;
        min-height: 140px;
    }

    .stat-number {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    /* Statistical Summary responsive */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content-row {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .data-sources-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .social-links {
        justify-content: center;
    }
    
    .services-hero-content h1 {
        font-size: 2rem;
    }
    
    .analytics-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .analytics-content {
        margin-bottom: 30px;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .chart-container {
        padding: 20px;
        min-height: 350px; /* Reduced mobile height for better viewport fit */
    }
    
    #ownershipChart, #populationChart {
        height: 400px !important; /* Smaller height for mobile */
    }
}

/* Data Sources Section */
.data-sources {
    margin-top: 16px;
}

.data-source {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 8px;
    border-left: 3px solid var(--primary-medium);
}

.data-source strong {
    color: #ffffff;
    font-size: 14px;
}

.data-source small {
    color: #d1d5db;
    font-size: 12px;
    line-height: 1.4;
    display: block;
    margin: 6px 0;
}

.data-source a {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.data-source a:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .about-stats {
        flex-direction: column;
    }

    .contact-form {
        padding: 30px 20px;
    }
}