/* ===================================
   RESPONSIVE STYLES
=================================== */

/* Large Desktop */
@media (min-width: 1400px) {
    :root {
        --container-max-width: 1320px;
    }
    
    .hero-content {
        padding: 140px 0 80px;
    }
    
    .clients-grid {
        gap: 4rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .clients-grid {
        gap: 2.5rem;
    }
    
    /* About Section - Desktop */
    .about-content {
        gap: 3rem;
    }
    
    .about-text {
        padding-left: 1.5rem;
    }
    
    .pillars-grid {
        gap: 2.5rem;
    }
}

/* Tablet */
@media (max-width: 991px) {
    :root {
        --container-padding: 16px;
        --section-padding: var(--space-4xl) 0;
        --component-gap: var(--space-xl);
        --element-gap: var(--space-md);
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        height: calc(100vh - 100%);
        background-color: var(--primary-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 1.5rem;
        padding: 2rem 0;
        transform: translateX(-100%);
        transition: var(--transition-medium);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        width: 100%;
    }
    
    .hamburger {
        display: flex;
        z-index: 1001;
        padding: 4px;
    }
    
    
    .hero {
        min-height: 600px;
    }
    
    .hero-content {
        padding: 100px 0 40px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .clients-grid {
        gap: 2rem;
    }
    
    .client-logo {
        height: 35px;
    }
    
    /* About Section - Tablet */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-bottom: 4rem;
    }
    
    .about-text {
        padding-left: 0;
        text-align: center;
    }
    
    .about-img {
        height: 350px;
    }
    
.pillars-grid {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
        max-width: 100%;
        margin: 0;
    }
    
    .pillar-card {
        text-align: center;
    }
    
    .foundation-intro {
        text-align: center;
    }
}

/* Mobile Large */
@media (max-width: 767px) {
    :root {
        --section-padding: var(--space-3xl) 0;
        --component-gap: var(--space-lg);
        --element-gap: var(--space-sm);
    }
    
    /* Fix sticky header for mobile */
    body {
        padding-top: 80px !important;
    }
    
    .header {
        top: 10px;
        padding: 8px 12px;
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        transform: none;
        background-color: rgba(33, 38, 33, 0.9);
    }
    
    .nav-container {
        justify-content: space-between !important;
        gap: 8px;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Mobile header layout: hamburger + logo + contact button */
    .nav-logo {
        order: 2;
        flex: 1;
        justify-content: center;
        min-width: 0; /* Allow logo to shrink */
    }
    
    .nav-logo .logo-img {
        height: 30px !important;
        max-width: 120px;
    }
    
    .hamburger {
        order: 1;
        display: flex !important;
        flex-shrink: 0;
        padding: 2px;
    }
    
    /* Standard mobile menu - slide down from top */
    .nav-menu {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: calc(100vh - 70px);
        background-color: var(--primary-bg) !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 0 !important;
        padding: 1rem 0 !important;
        transform: translateY(-100%) !important;
        transition: transform 0.3s ease-in-out !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        z-index: 999 !important;
        display: flex !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }
    
    .nav-menu.active {
        transform: translateY(0) !important;
    }
    
    .nav-item {
        width: 100% !important;
        text-align: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .nav-item:last-child {
        border-bottom: none !important;
    }
    
    .nav-link {
        display: block !important;
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
        width: 100% !important;
        color: var(--text-white) !important;
        text-decoration: none !important;
        transition: background-color 0.2s ease !important;
    }
    
    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .nav-cta {
        background-color: var(--primary-green) !important;
        color: white !important;
        margin: 1rem 2rem !important;
        border-radius: 6px !important;
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
    
    .nav-cta:hover {
        background-color: #1e8a47 !important;
    }
    
    .mobile-header-cta {
        order: 3;
        display: block;
        flex-shrink: 0;
    }
    
    .mobile-header-cta .nav-cta {
        padding: 6px 8px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-logo .logo-img {
        height: 35px;
    }
    
    .nav-logo .logo-img[src$=".svg"] {
        max-width: 140px;
    }
    
    .hero {
        min-height: 500px;
        padding-top: 80px !important;
    }
    
    .hero-content {
        padding: var(--space-xl) 0 var(--space-lg);
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: var(--space-md);
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: var(--space-xl);
        line-height: 1.5;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }
    
    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.95rem;
        width: 200px;
    }
    
    .clients-section {
        padding: var(--space-lg) 0 var(--space-xl);
    }
    
    .clients-grid {
        gap: var(--space-md);
        justify-content: center;
    }
    
    .client-logo {
        height: 30px;
    }
    
    .section-header {
        margin-bottom: var(--component-gap);
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .grid {
        gap: 1.5rem;
    }
    
    /* About Section - Mobile */
    .about-content {
        gap: var(--component-gap);
        margin-bottom: var(--component-gap);
    }
    
    .about-image {
        order: 1;
        display: flex;
        justify-content: center;
    }
    
    .about-img {
        height: 300px;
        width: 100%;
        border-radius: 16px;
        object-fit: cover;
    }
    
    .about-text {
        order: 2;
    }
    
    .about-description {
        font-size: 1rem;
        line-height: 1.7;
        text-align: left;
    }
    
    .foundation-section {
        margin-top: var(--component-gap);
    }
    
    .foundation-intro {
        font-size: 1.1rem;
        margin-bottom: var(--component-gap);
        text-align: center;
    }
    
    .pillars-grid {
        gap: var(--component-gap);
    }
    
    .pillar-card {
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .pillar-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto 1.5rem;
        background: var(--accent-green);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .icon-svg {
        width: 32px;
        height: 32px;
    }
    
    .pillar-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .pillar-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Services Section - Mobile */
    .services-grid {
        gap: var(--component-gap);
        display: flex;
        flex-direction: column;
    }
    
    .service-item {
        display: flex;
        flex-direction: column;
        gap: var(--element-gap);
        text-align: center;
        width: 100%;
    }
    
    .service-item-reverse {
        direction: ltr;
        flex-direction: column;
    }
    
    .service-content {
        padding: 0;
        order: 2;
    }
    
    .service-image {
        order: 1;
        width: 100%;
        border-radius: 16px;
        overflow: hidden;
    }
    
    .service-img {
        height: 280px;
        width: 100%;
        object-fit: cover;
        border-radius: 16px;
    }
    
    .service-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .service-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .services-cta {
        text-align: center;
        margin-top: var(--component-gap);
    }
    
    .services-cta .btn {
        width: auto;
        min-width: 220px;
    }
    
    /* Team Section - Mobile */
    .team-grid {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        grid-template-columns: unset !important;
    }
    
    .team-member {
        width: 100% !important;
        max-width: 100%;
        margin: 0;
    }
    
    .team-member:nth-child(1),
    .team-member:nth-child(2),
    .team-member:nth-child(3),
    .team-member:nth-child(4),
    .team-member:nth-child(5) {
        grid-column: unset !important;
        grid-row: unset !important;
    }
    
    .member-image {
        height: 450px;
        border-radius: 16px;
        width: 100%;
        overflow: hidden;
        margin: 0;
        box-sizing: border-box;
    }
    
    .member-image img,
    .team-member .rounded-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 16px;
        margin: 0;
        box-sizing: border-box;
    }
    
    /* Sustainability Section - Mobile */
    .sustainability-banner {
        height: 300px;
        padding: 2rem 1rem;
    }
    
    .sustainability-banner .banner-content {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .banner-title {
        font-size: 1.5rem;
        line-height: 1.4;
        text-align: center;
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .sustainability-content {
        padding: 3rem 0;
    }
    
    .sustainability-pillars {
        gap: 4rem;
        padding: 0 1rem;
    }
    
    .pillar-section {
        text-align: left;
        padding: 0;
    }
    
    .pillar-header {
        margin-bottom: 1rem;
    }
    
    .pillar-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .pillar-intro {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }
    
    .pillar-list {
        padding-left: 0;
        margin: 0;
    }
    
    .pillar-item {
        padding-left: 2rem;
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.2rem;
    }
    
    .pillar-item::before {
        left: 0.5rem;
        top: 0.2rem;
    }
    
    /* SDG Section - Mobile */
    .sdg-alignment {
        padding: 4rem 0;
        margin-top: 4rem;
    }
    
    .sdg-title {
        font-size: 1.6rem;
        text-align: center;
        margin-bottom: 3rem;
        line-height: 1.3;
    }
    
    .sdg-grid {
        display: flex !important;
        flex-direction: column;
        gap: 1.5rem;
        max-width: 100%;
        margin: 0;
        padding: 0 var(--container-padding);
    }
    
    .sdg-item {
        padding: 2rem 1.5rem;
        border-radius: 12px;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }
    
    .sdg-number {
        font-size: 2.2rem;
        margin-bottom: 0.5rem;
    }
    
    .sdg-label {
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        max-width: none;
        line-height: 1.3;
    }
    
    .sdg-icon {
        margin-top: 1rem;
    }
    
    .sdg-icon-img {
        width: 40px;
        height: 40px;
    }
    
    /* Commitment Section - Mobile */
    .commitment-section {
        padding: 4rem 0;
        margin-top: 4rem;
    }
    
    .commitment-content {
        display: flex;
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }
    
    .commitment-text {
        padding: 0 1rem;
        order: 2;
    }
    
    .commitment-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .commitment-description {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .commitment-image {
        order: 1;
        display: flex;
        justify-content: center;
    }
    
    .commitment-img {
        height: 300px;
        width: 100%;
        max-width: 300px;
        border-radius: 16px;
        object-fit: cover;
    }
    
    /* Contact Section - Mobile */
    .contact-info {
        flex-direction: column;
        gap: var(--element-gap);
        align-items: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    /* Footer - Mobile */
    .footer-content {
        flex-direction: column;
        gap: var(--element-gap);
        text-align: center;
    }
    
    .footer-copyright {
        text-align: center;
    }
    
    /* Improve touch targets for mobile */
    .nav-link,
    .btn,
    .social-link,
    .linkedin-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .team-member {
        touch-action: manipulation;
        position: relative;
    }
    
    /* Show mobile info button only on mobile */
    .mobile-info-toggle {
        display: block !important;
        position: absolute !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 15 !important;
    }
    
    /* Hide hover functionality on mobile - use button instead */
    .team-member:hover .member-overlay {
        opacity: 0 !important;
    }
    
    /* Mobile overlay state controlled by JavaScript */
    .team-member.active .member-overlay {
        opacity: 1 !important;
    }
    
    /* Ensure member image has relative positioning for absolute button */
    .member-image {
        position: relative !important;
    }
    
    /* Better mobile typography */
    .section-title {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }
    
    .section-subtitle {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
    
    /* Improve mobile card and image sizing */
    .card {
        padding: 1.25rem 1rem !important;
        margin-bottom: 1rem;
        box-sizing: border-box;
    }
    
    .rounded-container,
    .rounded-img {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Better mobile touch targets */
    .btn {
        min-height: 48px !important;
        padding: 12px 20px !important;
        box-sizing: border-box;
    }
    
    /* Mobile container constraints */
    .container {
        padding-left: var(--container-padding) !important;
        padding-right: var(--container-padding) !important;
        max-width: 100vw !important;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Fix image overflow issues - exclude header logo */
    .section img:not(.logo-img),
    .rounded-img,
    .service-img,
    .commitment-img,
    .about-img {
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box;
    }
    
    /* Sustainability Banner - Mobile */
    .banner-title {
        font-size: 1.6rem;
        line-height: 1.3;
        padding: 0 1.5rem;
        box-sizing: border-box;
        max-width: 100%;
    }
    
    .sustainability-banner {
        width: calc(100% - 20px);
        max-width: calc(100vw - 20px);
        height: 300px;
        margin: 0 10px;
        border-radius: 8px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    .sustainability-banner .banner-content {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
}

/* Mobile Small */
@media (max-width: 575px) {
    :root {
        --container-padding: 16px;
        --section-padding: var(--space-2xl) 0;
        --component-gap: var(--space-lg);
        --element-gap: var(--space-sm);
    }
    
    /* Smaller header for small mobile */
    body {
        padding-top: 70px !important;
    }
    
    .header {
        top: 8px;
        padding: 6px 10px;
        left: 8px;
        right: 8px;
        width: calc(100% - 16px);
        max-width: calc(100% - 16px);
        transform: none;
    }
    
    .nav-menu {
        top: 60px !important;
    }
    
    .hero {
        padding-top: 60px !important;
    }
    
    .hero-title {
        font-size: 2rem;
        white-space: normal !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        width: 180px;
        padding: var(--space-xs) var(--space-md);
    }
    
    .clients-grid {
        gap: var(--space-sm);
    }
    
    .client-logo {
        height: 25px;
    }
    
    .section-header {
        margin-bottom: var(--component-gap);
    }
    
    .card {
        padding: 1.25rem;
    }
    
    /* Team Section - Small Mobile */
    .team-grid {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .team-member {
        margin: 0;
    }
    
    .member-image {
        height: 400px;
        overflow: hidden;
    }
    
    .member-image img,
    .rounded-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* Ensure mobile info button is visible on small screens too */
    .mobile-info-toggle {
        display: block !important;
        width: 50px !important;
        height: 50px !important;
        bottom: 16px !important;
        right: 16px !important;
    }
    
    .info-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    /* Services Section - Small Mobile */
    .services-grid {
        gap: 3.5rem;
    }
    
    .service-img {
        height: 250px;
    }
    
    .service-title {
        font-size: 1.4rem;
    }
    
    .service-description {
        font-size: 0.95rem;
    }
    
    /* Sustainability Pillars Mobile - Updated Structure */
    .sustainability-pillars {
        display: flex !important;
        flex-direction: column;
        gap: 3rem;
        padding: 0;
    }
    
    .pillar-text-section,
    .pillar-image-section {
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
    }
    
    .pillar-text-section {
        padding: 20px;
        order: 1;
    }
    
    .pillar-image-section {
        height: 250px !important;
        order: 2;
        margin-bottom: 2rem;
    }
    
    .pillar-image-section img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
    }
    
    /* Sustainability - Small Mobile */
    .pillar-title {
        font-size: 1.2rem;
    }
    
    .pillar-intro {
        font-size: 0.95rem;
    }
    
    .pillar-item {
        font-size: 0.9rem;
    }
    
    .banner-title {
        font-size: 1.3rem;
        padding: 0 1rem;
        max-width: calc(100% - 2rem);
        box-sizing: border-box;
    }
    
    /* Additional mobile fixes for small screens */
    .sustainability-banner {
        width: calc(100% - 16px);
        max-width: calc(100vw - 16px);
        margin: 0 8px;
    }
    
    .sustainability-pillars {
        gap: 3.5rem;
    }
    
    /* SDG Section - Small Mobile */
    .sdg-title {
        font-size: 1.4rem;
    }
    
    .sdg-grid {
        max-width: 100%;
        padding: 0 var(--container-padding);
    }
    
    .sdg-item {
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .sdg-number {
        font-size: 1.8rem;
    }
    
    .sdg-label {
        font-size: 0.7rem;
    }
    
    /* Commitment Section - Small Mobile */
    .commitment-title {
        font-size: 1.6rem;
    }
    
    .commitment-description {
        font-size: 0.95rem;
    }
    
    .commitment-img {
        height: 280px;
    }
}

/* Mobile Extra Small */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .btn {
        width: 160px;
        font-size: 0.9rem;
    }
    
    .nav-logo .logo-img {
        height: 30px;
    }
    
    .nav-logo .logo-img[src$=".svg"] {
        max-width: 120px;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-content {
        padding: 60px 0 20px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 1rem;
    }
    
    .btn {
        width: auto;
        min-width: 140px;
    }
}

/* Print Styles */
@media print {
    .header,
    .hamburger,
    .btn {
        display: none;
    }
    
    .hero {
        height: auto;
        min-height: auto;
        page-break-inside: avoid;
    }
    
    .hero-background,
    .hero-overlay {
        display: none;
    }
    
    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
}

/* Additional Mobile Updates for New Components */
@media (max-width: 767px) {
    /* Services Grid Mobile */
    .services-grid {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
    }

    .service-item:nth-child(3) {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .service-item:nth-child(3) .service-image {
        order: 1;
    }

    .service-item:nth-child(3) .service-content {
        order: 2;
    }

    /* Sustainability Pillars Mobile */
    .sustainability-pillars {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
        padding: 0 var(--container-padding);
    }

    .pillar-section {
        margin: 0 !important;
        padding: 20px !important;
    }

    .pillar-section.with-image {
        flex-direction: column !important;
        gap: 20px;
        padding: 20px !important;
    }

    .pillar-section.with-image.reverse {
        flex-direction: column !important;
        padding: 20px !important;
    }

    .pillar-placeholder {
        height: 150px;
        order: 1;
    }

    .pillar-content {
        order: 2;
        padding: 0 !important;
    }

    /* Team Section Header Mobile */
    .team-section .section-header {
        flex-direction: column !important;
        text-align: left;
        gap: 1rem;
    }

    .team-section .section-left {
        text-align: left;
    }

    .team-section .section-title {
        margin-bottom: 0.5rem;
        text-align: left;
    }

    .team-section .section-subtitle {
        text-align: left;
        max-width: 100%;
        margin: 0;
    }

    /* Footer Mobile */
    .footer-content {
        gap: 2rem !important;
    }

    /* Foundation Cards Mobile - One per row */
    .pillars-grid {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
    }

    .pillar-card {
        width: 100% !important;
        flex: none !important;
        text-align: center;
        padding: 2rem 1rem;
    }
}
