/* Hero Section Responsive - Modern Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3.4rem;
    }

    .hero-title::after {
        width: 100px;
        height: 4px;
    }

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

    .hero-stats {
        gap: 14px;
        max-width: 650px;
    }

    .stat-box {
        padding: 16px 12px;
    }

    .stat-icon {
        width: 46px;
        height: 46px;
    }

    .stat-icon i {
        font-size: 1.35rem;
    }

    .stat-info h3 {
        font-size: 1.5rem;
    }

    /* Stats Section - 4 columns on large screens */
    .stats-section .container {
        gap: 1.5rem;
    }

    /* Header spacing adjustment */
    .main-nav {
        gap: 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links > li > a {
        font-size: 0.9rem;
    }

    .logo img {
        height: 50px;
    }
}

@media (max-width: 992px) {
    /* Ensure hero content uses full width on tablets/mobiles */
    .hero .container {
        padding-right: 2rem; /* reset the large desktop right padding */
    }

    .hero {
        min-height: 90vh;
        padding: 6rem 0 4rem;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, 
            rgba(9,85,47,0.88) 0%, 
            rgba(9,85,47,0.82) 50%, 
            rgba(9,85,47,0.75) 100%);
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
        margin: 0 auto;
    }

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

    .hero-title::after {
        margin-left: auto;
        margin-right: auto;
        width: 90px;
    }

    .hero-description {
        font-size: 1.05rem;
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        margin: 0 auto;
        gap: 14px;
    }

    .stat-box {
        padding: 16px 12px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
    }

    .stat-icon i {
        font-size: 1.25rem;
    }

    .stat-info h3 {
        font-size: 1.4rem;
    }

    .stat-info p {
        font-size: 0.72rem;
    }

    /* Stats Section Grid - 3 columns on medium screens */
    .stats-section .container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        max-width: 1100px;
    }

    .stat-item.climate-stat {
        padding: 2rem 1.5rem;
        max-width: none;
    }

    .features-section {
        margin-top: -60px;
    }

    .features-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 30px 25px;
    }

    .page-hero h1,
    #about-hero h1,
    #projects-hero h1,
    #research-hero h1,
    #news-hero h1,
    #contact-hero h1 {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 768px) {
    /* Further tighten padding for smaller screens if needed */
    .hero .container {
        padding-right: 2rem; /* keep consistent with default container padding */
    }

    /* Header adjustments for mobile */
    .main-nav {
        height: 70px;
    }

    .logo img {
        height: 45px;
    }

    .nav-center {
        top: 70px;
    }

    .nav-center.active {
        max-height: calc(100vh - 70px);
    }

    .mobile-menu-toggle {
        width: 28px;
        height: 24px;
    }

    .mobile-menu-toggle span {
        height: 2.5px;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        min-height: 85vh;
        padding: 90px 0 50px;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, 
            rgba(9,85,47,0.90) 0%, 
            rgba(9,85,47,0.85) 100%);
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
        margin: 0 auto;
    }

    .hero-badge {
        font-size: 0.85rem;
        padding: 10px 20px;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }

    .hero-title::after {
        width: 80px;
        height: 4px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 30px;
        max-width: 100%;
    }

    .hero-actions {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 40px;
        align-items: center;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 14px 28px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
        margin: 0 auto;
    }

    .stat-box {
        padding: 16px 12px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
    }

    .stat-icon i {
        font-size: 1.2rem;
    }

    .stat-info h3 {
        font-size: 1.4rem;
    }

    .stat-info p {
        font-size: 0.75rem;
        line-height: 1.25;
    }

    .hero-scroll-indicator {
        bottom: 20px;
        font-size: 0.8rem;
    }

    .features-section {
        margin-top: -40px;
    }

    .features-grid-new {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 25px 20px;
    }

    .feature-box {
        padding: 12px 10px;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }

    .feature-icon i {
        font-size: 1.4rem;
    }

    .feature-box h3 {
        font-size: 0.95rem;
    }

    .feature-box p {
        font-size: 0.8rem;
    }

    .page-hero h1,
    #about-hero h1,
    #projects-hero h1,
    #research-hero h1,
    #news-hero h1,
    #contact-hero h1 {
        font-size: 2.5rem !important;
    }

    .page-hero p,
    #about-hero p,
    #projects-hero p,
    #research-hero p,
    #news-hero p,
    #contact-hero p {
        font-size: 1rem !important;
        padding: 0 15px;
    }

    .page-hero,
    #about-hero,
    #projects-hero,
    #research-hero,
    #news-hero,
    #contact-hero {
        padding: 80px 0 60px !important;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 80vh;
        padding: 80px 0 40px;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 8px 16px;
        gap: 8px;
    }

    .hero-badge i {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 18px;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .hero-stats {
        gap: 12px;
    }

    .stat-box {
        padding: 16px 14px;
        gap: 12px;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
    }

    .stat-icon i {
        font-size: 1.3rem;
    }

    .stat-info h3 {
        font-size: 1.4rem;
    }

    .stat-info p {
        font-size: 0.8rem;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .features-section {
        margin-top: -30px;
    }

    .feature-icon {
        width: 45px;
        height: 45px;
    }

    .feature-icon i {
        font-size: 1.2rem;
    }

    .feature-box h3 {
        font-size: 0.9rem;
    }

    .feature-box p {
        font-size: 0.75rem;
    }

    .page-hero h1,
    #about-hero h1,
    #projects-hero h1,
    #research-hero h1,
    #news-hero h1,
    #contact-hero h1 {
        font-size: 2rem !important;
    }

    .page-hero p,
    #about-hero p,
    #projects-hero p,
    #research-hero p,
    #news-hero p,
    #contact-hero p {
        font-size: 0.95rem !important;
    }
}

/* Old Hero Styles - Keep for compatibility */
@media (max-width: 992px) {
    .hero {
        padding: 120px 0 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-text {
        padding: 40px 20px;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-image {
        min-height: 350px;
    }

    .features-section {
        margin-top: -60px;
    }

    .features-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 30px 25px;
    }

    .page-hero h1,
    #about-hero h1,
    #projects-hero h1,
    #research-hero h1,
    #news-hero h1,
    #contact-hero h1 {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 0 0;
    }

    .hero-text {
        padding: 30px 15px;
    }

    .hero-text h1 {
        font-size: 1.9rem;
    }

    .hero-text p {
        font-size: 0.9rem;
    }

    .hero-image {
        min-height: 300px;
    }

    .features-section {
        margin-top: -40px;
    }

    .features-grid-new {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 25px 20px;
    }

    .feature-box {
        padding: 12px 10px;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }

    .feature-icon i {
        font-size: 1.4rem;
    }

    .feature-box h3 {
        font-size: 0.95rem;
    }

    .feature-box p {
        font-size: 0.8rem;
    }

    .page-hero h1,
    #about-hero h1,
    #projects-hero h1,
    #research-hero h1,
    #news-hero h1,
    #contact-hero h1 {
        font-size: 2.5rem !important;
    }

    .page-hero p,
    #about-hero p,
    #projects-hero p,
    #research-hero p,
    #news-hero p,
    #contact-hero p {
        font-size: 1rem !important;
        padding: 0 15px;
    }

    .page-hero,
    #about-hero,
    #projects-hero,
    #research-hero,
    #news-hero,
    #contact-hero {
        padding: 80px 0 60px !important;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.6rem;
    }

    .hero-text p {
        font-size: 0.85rem;
    }

    .btn-primary-green {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .hero-image {
        min-height: 250px;
    }

    .features-section {
        margin-top: -30px;
    }

    .feature-icon {
        width: 45px;
        height: 45px;
    }

    .feature-icon i {
        font-size: 1.2rem;
    }

    .feature-box h3 {
        font-size: 0.9rem;
    }

    .feature-box p {
        font-size: 0.75rem;
    }

    .page-hero h1,
    #about-hero h1,
    #projects-hero h1,
    #research-hero h1,
    #news-hero h1,
    #contact-hero h1 {
        font-size: 2rem !important;
    }

    .page-hero p,
    #about-hero p,
    #projects-hero p,
    #research-hero p,
    #news-hero p,
    #contact-hero p {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 992px) {
    /* Page overlay when mobile menu is open */
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 998; /* below the menu (999) */
        pointer-events: none; /* clicks handled by JS outside check */
    }

    /* Header & Navigation */
    .header .container {
        padding: 0;
    }

    .main-nav {
        padding: 0 1.5rem;
        gap: 1rem;
        height: 75px;
        max-width: 100%;
    }

    .nav-brand {
        flex-shrink: 0;
    }

    .nav-center {
        position: fixed;
        top: 75px;
        left: 0;
        width: 100%;
        background: var(--white);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0);
        margin: 0;
        flex: unset;
        z-index: 999;
        border-top: 1px solid rgba(9, 85, 47, 0.08);
        backdrop-filter: saturate(160%) blur(6px);
        -webkit-backdrop-filter: saturate(160%) blur(6px);
    }

    .nav-center.active {
        max-height: calc(100vh - 75px);
        opacity: 1;
        visibility: visible;
        overflow-y: auto;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
        transform: translateY(0);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0.75rem 0;
    }

    .nav-links li {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(9, 85, 47, 0.08);
        background: transparent;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links > li > a {
        padding: 1.05rem 1.5rem;
        font-size: 1.02rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: var(--text-dark);
        line-height: 1.3;
    }

    .nav-links > li > a::after {
        display: none;
    }

    .nav-links > li > a.active {
        background: linear-gradient(90deg, rgba(9, 85, 47, 0.08), transparent);
        color: var(--primary-color);
        border-left: 3px solid var(--primary-color);
    }

    /* Mobile Dropdown Styles */
    .has-dropdown .dropdown-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none !important; /* ensure no horizontal slide */
        left: auto; right: auto; top: auto;
        box-shadow: none;
        border: none;
        background: rgba(9, 85, 47, 0.035);
        margin: 0;
        padding: 0; /* collapsed padding to avoid jump */
        max-height: 0; /* accordion collapsed */
        overflow: hidden;
        border-radius: 0; /* full-width block look */
        transition: max-height 0.3s ease, padding 0.2s ease; /* avoid transform-based slide */
    }

    .has-dropdown .dropdown-menu::before {
        display: none;
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 500px; /* accommodate more items if needed */
        padding: 0.25rem 0; /* add padding only when expanded */
        border-top: 1px solid rgba(9, 85, 47, 0.08);
    }

    .dropdown-menu a {
        padding: 0.95rem 1.5rem 0.95rem 2.25rem;
        font-size: 0.98rem;
        width: 100%;
    }

    .dropdown-menu a:hover {
        padding-left: 2.6rem;
        background: linear-gradient(90deg, rgba(9, 85, 47, 0.06), transparent);
    }

    .dropdown-icon {
        transition: transform 0.3s ease;
    }

    .has-dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }

    /* Navigation Actions */
    .nav-actions {
        flex-shrink: 0;
        margin-left: auto;
    }

    .nav-btn {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }
    .mobile-menu-toggle.active span { background: var(--secondary-color); }

    /* Stats Section Grid - 3 columns on medium screens */
    .stats-section .container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .stat-item.climate-stat {
        min-width: auto;
        width: 100%;
    }

    .features-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
        margin-bottom: 2rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .features-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-about, .footer-links, .footer-contact, .footer-social {
        align-items: center;
    }

    .social-icons {
        justify-content: center;
    }

    .cta {
        padding: 4rem 2rem;
    }

    /* Stats Section Grid - 3 columns on tablet, stacked for better display */
    .stats-section .container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 0 1rem;
        max-width: 900px;
    }

    .stat-item.climate-stat {
        padding: 2rem 1.2rem;
        max-width: none;
    }

    .stat-icon-circle {
        width: 60px;
        height: 60px;
    }

    .stat-icon-circle i {
        font-size: 1.8rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-item p {
        font-size: 1rem;
    }

    .stat-item small {
        font-size: 0.8rem;
    }

    /* Climate Clock Responsive */
    .climate-clock-section {
        padding: 4rem 0;
    }

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

    .climate-clock-header p {
        font-size: 1rem;
    }

    .climate-countdown {
        gap: 0.8rem;
    }

    .countdown-item {
        padding: 1.5rem 1rem;
        min-width: 90px;
    }

    .countdown-value {
        font-size: 2.5rem;
    }

    .countdown-label {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .countdown-separator {
        font-size: 2rem;
    }

    .climate-action-cta p {
        font-size: 1rem;
    }

    .btn-climate-action {
        font-size: 0.95rem;
        padding: 14px 28px;
    }
}

@media (max-width: 576px) {
    /* Stats Section Grid - Single column on mobile */
    .stats-section {
        padding: 3rem 0;
    }

    .stats-section .container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .stat-item.climate-stat {
        padding: 1.8rem 1.2rem;
    }

    .stat-icon-circle {
        width: 55px;
        height: 55px;
    }

    .stat-icon-circle i {
        font-size: 1.6rem;
    }

    .stat-number {
        font-size: 2.2rem;
        margin-bottom: 0.4rem;
    }

    .stat-item p {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }

    .stat-item small {
        font-size: 0.75rem;
    }

    /* Climate Clock Mobile */
    .climate-clock-header h2 {
        font-size: 1.6rem;
    }

    .climate-countdown {
        gap: 0.5rem;
    }

    .countdown-item {
        padding: 1.2rem 0.8rem;
        min-width: 70px;
    }

    .countdown-value {
        font-size: 2rem;
    }

    .countdown-label {
        font-size: 0.65rem;
    }

    .countdown-separator {
        font-size: 1.5rem;
        display: none;
    }

    .climate-action-cta p {
        font-size: 0.95rem;
    }

    .btn-climate-action {
        font-size: 0.9rem;
        padding: 12px 24px;
        width: 100%;
        justify-content: center;
    }
}