/* Global Styles & Resets */
:root {
    --font-nav: 'IBM Plex Mono', monospace;
    --font-body: 'Inter', sans-serif;
    --font-heading-main: 'Inter', sans-serif; /* For main H1 in hero */
    --font-section-title: 'IBM Plex Mono', monospace;

    --color-bg: #FFFFFF;
    --color-text-primary: #000000;
    --color-text-nav-inactive: #808080; /* Lighter gray for inactive nav */
    --color-border: #EAEAEA;
    --color-input-border: #CCCCCC;
    --color-overlay: rgba(0, 0, 0, 0.5);
    --color-shadow: rgba(0, 0, 0, 0.1);

    --sidebar-width: 220px;
    --sidebar-width-small-screen: 180px;
    --spacing-unit: 8px;
    --content-max-width: 900px;
    
    /* Mobile-specific variables */
    --mobile-header-height: 60px;
    --mobile-nav-width: 280px;
    --mobile-card-radius: 12px;
    --mobile-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Updated Font weights - lighter */
    --font-weight-thin: 200;
    --font-weight-extralight: 250;
    --font-weight-light: 300;
    --font-weight-regular: 350;
    --font-weight-medium: 400;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Prevent text selection */
body, p, h1, h2, h3, h4, h5, h6, span, div, a {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Prevent image dragging */
img {
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%; /* Prevent font size adjustment on orientation change */
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    line-height: 1.6;
    display: flex;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh; /* Ensure full height on Safari */
    overflow-x: hidden; /* Prevent horizontal scroll on Safari */
    overscroll-behavior-y: none;
}

/* Sidebar Navigation */
.sidebar-nav {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--color-bg);
    border-right: 1px solid var(--color-border);
    padding: calc(var(--spacing-unit) * 4);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1000;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.site-title {
    margin-bottom: calc(var(--spacing-unit) * 3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-title a {
    font-family: var(--font-nav);
    font-size: 1.5rem;
    font-weight: var(--font-weight-light);
    color: var(--color-text-primary);
    text-decoration: none;
    display: block;
    letter-spacing: 0.03em;
    text-align: center;
}

.site-subtitle {
    font-family: var(--font-nav);
    font-size: 0.7rem;
    font-weight: var(--font-weight-extralight);
    color: var(--color-text-nav-inactive);
    display: block;
    margin-top: calc(var(--spacing-unit) * 0.25);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    width: 100%;
}

.main-navigation ul {
    list-style: none;
}

.main-navigation li {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.main-navigation a {
    font-family: var(--font-nav);
    font-size: 0.8rem; /* Reduced from 0.9rem */
    font-weight: var(--font-weight-light);
    color: var(--color-text-nav-inactive);
    text-decoration: none;
    padding: calc(var(--spacing-unit) * 0.5) 0;
    display: block;
    transition: color 0.2s ease;
    letter-spacing: 0.03em;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--color-text-primary);
}

.sidebar-footer {
    margin-top: auto; /* Pushes footer to the bottom */
    padding-top: calc(var(--spacing-unit) * 2);
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-text-nav-inactive);
    text-align: center; /* Center align text and image */
}

.footer-image {
    display: block;
    width: 70%; /* Relative to sidebar width */
    max-width: 100px; /* Prevent it from being too large */
    margin: 0 auto calc(var(--spacing-unit) * 1.5) auto; /* Center horizontally, add space below */
    opacity: 0.8; /* Optional: make it a bit subtle */
}


/* Main Content Area */
.content-area {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    position: relative; /* Fix for Safari flexbox issues */
    min-height: 100vh; /* Ensure full height on Safari */
}

.content-section {
    min-height: 100vh;
    padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 6);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative; /* Fix for Safari flexbox issues */
    -webkit-transform: translateZ(0); /* Force hardware acceleration */
}
.content-section:last-child {
    border-bottom: none;
    min-height: calc(100vh - 1px); /* Avoid double border with potential browser scrollbar */
}

.section-content-wrapper {
    max-width: var(--content-max-width);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* General Image Styling */
img {
    /* Image protection */
    -webkit-user-drag: none; /* Prevents dragging on WebKit browsers */
    user-select: none; /* Standard property for disabling selection */
    -moz-user-select: none; /* Firefox */
    -webkit-user-select: none; /* Chrome, Safari, Opera */
    -ms-user-select: none; /* Internet Explorer/Edge */
    height: auto; /* Ensure aspect ratio is maintained */
    max-width: 100%;
    -webkit-backface-visibility: hidden; /* Fix for Safari image rendering */
    backface-visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

.content-section img {
    max-width: 100%;
    display: block; /* To allow margin auto for centering if needed */
    margin-bottom: calc(var(--spacing-unit) * 2);
    /* border-radius: 4px; Removed for sharper corners */
}

/* Typography in Content Area */
/* Hero Section Specific Image & Text Styling */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #fff;
    background-image: url("website_images/MODELECRUBAY.png");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: scroll;
    z-index: 1;
}
/* WebP support with fallback */
@supports (background-image: url("website_images/MODELECRUBAY.webp")) {
    .hero-section {
        background-image: url("website_images/MODELECRUBAY.webp");
    }
}
/* Ensure PNG fallback is always available */
.hero-section {
    background-image: url("website_images/MODELECRUBAY.png");
}

.section-title { /* For h2 in sections like About, Services */
    font-family: var(--font-section-title);
    font-size: 1.8rem;
    font-weight: var(--font-weight-light);
    color: var(--color-text-primary);
    margin-bottom: calc(var(--spacing-unit) * 5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

h3 {
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: var(--font-weight-thin);
    color: var(--color-text-primary);
    margin-bottom: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 3);
    letter-spacing: -0.02em;
}
h3.subsection-title {
    font-family: var(--font-section-title);
    font-size: 1rem;
    font-weight: var(--font-weight-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 2);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--spacing-unit);
}


h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: var(--font-weight-thin);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-unit) * 1;
    letter-spacing: -0.02em;
}

p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: var(--font-weight-extralight);
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-text-primary);
    line-height: 1.7;
    letter-spacing: 0.01em;
}

ul, ol {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: var(--font-weight-extralight);
    padding-left: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

li {
    margin-bottom: var(--spacing-unit);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-extralight);
    letter-spacing: 0.01em;
}

a {
    color: var(--color-text-primary); /* Default link color, can be more specific */
    text-decoration: underline;
    text-decoration-color: var(--color-text-nav-inactive); /* Subtle underline */
    transition: text-decoration-color 0.2s ease;
}

a:hover {
    text-decoration-color: var(--color-text-primary);
}

/* Buttons - Minimalist */
.btn {
    font-family: var(--font-nav);
    font-size: 0.9rem;
    font-weight: var(--font-weight-light);
    text-decoration: none;
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
    border: 1px solid var(--color-text-primary);
    color: var(--color-text-primary);
    display: inline-block;
    margin-right: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
    transition: background-color 0.2s ease, color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.btn:hover {
    background-color: var(--color-text-primary);
    color: var(--color-bg);
    text-decoration: none;
}

.btn-text { /* For links that should look like buttons but be text-based */
    border: none;
    padding: calc(var(--spacing-unit) * 0.5) 0;
    text-decoration: underline;
    text-decoration-color: var(--color-text-nav-inactive);
}
.btn-text:hover {
    background-color: transparent;
    color: var(--color-text-primary);
    text-decoration-color: var(--color-text-primary);
}

.hero-buttons {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
    margin-top: calc(var(--spacing-unit) * 3);
}

.hero-buttons .btn {
    margin-top: calc(var(--spacing-unit) * 2);
}


/* Specific Section Content Styling - Minimalist */
#about .section-content-wrapper > img:first-of-type { /* Image directly under section title */
    max-width: 400px; /* Adjusted for "medium" */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: calc(var(--spacing-unit) * 4); /* Space before "Who We Are" text */
}

.value-props-grid, .services-list, .faq-list {
    display: grid;
    gap: calc(var(--spacing-unit) * 3);
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin: 0; /* Reset margin to prevent Safari gap issues */
}

.value-prop-item, .service-item-card, .faq-item-card {
    padding: calc(var(--spacing-unit) * 2);
    border: 1px solid var(--color-border);
}
.value-prop-item h4, .service-item-card h4, .faq-item-card p strong {
    margin-bottom: var(--spacing-unit);
}

.service-item-card img {
    /* width: 100%; Make image take full width of card */
    /* max-height: 220px; Removed */
    /* object-fit: cover; Removed */
    max-width: 180px; /* "Medium" size within card */
    height: auto;
    margin: 0 auto calc(var(--spacing-unit) * 2) auto; /* Center and add bottom margin */
    display: block;
    /* border-radius: 3px; Removed */
}


.sustainability-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 3);
}
.sustainability-details > div {
    padding: calc(var(--spacing-unit) * 1);
}
.sustainability-details h3 { /* Overriding general h3 margin for this context */
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.sustainability-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 2);
}
.sustainability-image-grid img {
    margin-bottom: 0; /* Remove default bottom margin as gap handles it */
    width: 100%;
    height: auto; /* Ensures full image is shown, respecting aspect ratio */
    /* object-fit: cover; Removed */
}
#sustainability .sustainability-details > div > img { /* For single image under packaging */
     max-width: 250px; /* Adjusted for "medium" */
     margin-left: auto;
     margin-right: auto;
     margin-bottom: calc(var(--spacing-unit) * 2);
}


.choosing-reasons-list {
    list-style: none;
    padding-left: 0;
}
.choosing-reasons-list li {
    padding: var(--spacing-unit) 0;
    border-bottom: 1px solid var(--color-border);
}
.choosing-reasons-list li:last-child {
    border-bottom: none;
}
.choosing-reasons-list li strong {
    font-weight: 500; /* Medium weight from Inter */
}

/* Contact Form - Minimalist */
.contact-layout {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 5);
}
.contact-details, .contact-form-wrapper {
    flex: 1;
    min-width: 300px;
}

.contact-form-minimal .form-group {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.contact-form-minimal label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: var(--font-weight-extralight);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    color: var(--color-text-primary);
    letter-spacing: 0.02em;
}

.contact-form-minimal input[type="text"],
.contact-form-minimal input[type="email"],
.contact-form-minimal input[type="tel"],
.contact-form-minimal textarea {
    width: 100%;
    padding: calc(var(--spacing-unit) * 1.25);
    border: 1px solid var(--color-input-border);
    background-color: var(--color-bg);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: var(--font-weight-extralight);
    color: var(--color-text-primary);
    outline: none;
    transition: border-color 0.2s ease;
    letter-spacing: 0.02em;
}

.contact-form-minimal input[type="text"]:focus,
.contact-form-minimal input[type="email"]:focus,
.contact-form-minimal input[type="tel"]:focus,
.contact-form-minimal textarea:focus {
    border-color: var(--color-text-primary);
}

.contact-form-minimal textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form-minimal .btn-submit { /* Specific submit button */
    font-family: var(--font-nav);
    font-size: 0.9rem;
    padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 2.5);
    background-color: var(--color-text-primary);
    color: var(--color-bg);
    border: 1px solid var(--color-text-primary);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.contact-form-minimal .btn-submit:hover {
    background-color: var(--color-text-nav-inactive); /* Lighter on hover */
    border-color: var(--color-text-nav-inactive);
    color: var(--color-text-primary);
}

.map-placeholder {
    margin-top: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 2);
    border: 1px solid var(--color-border);
    text-align: center;
}
.map-placeholder a {
    font-family: var(--font-body);
}

.instagram-link-minimal {
    margin-top: calc(var(--spacing-unit) * 4);
    text-align: left; /* Or center if preferred */
}
.instagram-link-minimal h3 a {
    font-family: var(--font-nav);
    text-decoration: underline;
    text-decoration-color: var(--color-text-nav-inactive);
}
.instagram-link-minimal h3 a:hover {
    text-decoration-color: var(--color-text-primary);
}


/* Responsive Design */
@media (max-width: 992px) {
    :root {
        --sidebar-width: var(--sidebar-width-small-screen);
    }
    .content-section {
        padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 4);
    }
    h1 { font-size: 2.4rem; }
    .section-title { font-size: 1.6rem; }

    .hero-section .section-content-wrapper > img:first-child {
        max-height: 260px; /* Adjusted */
        max-width: 70%; /* Adjusted */
    }
    #about .section-content-wrapper > img:first-of-type {
        max-width: 350px; /* Adjusted */
    }
    .footer-image {
        max-width: 80px;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column; /* Stack sidebar on top of content */
    }

    .sidebar-nav {
        width: 100%;
        height: auto; /* Adjust height for content */
        position: fixed;
        -webkit-transform: translateZ(0); /* Force hardware acceleration */
        transform: translateZ(0);
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: calc(var(--spacing-unit) * 2);
        text-align: center; /* Center align sidebar content */
    }

    .sidebar-content {
        align-items: center; /* Center items like title and nav */
    }

    .site-title {
        margin-bottom: calc(var(--spacing-unit) * 2);
    }
    .site-title a { font-size: 1.3rem; }
    .site-subtitle { font-size: 0.65rem; }


    .main-navigation ul {
        display: flex; /* Arrange nav items horizontally if possible */
        flex-wrap: wrap;
        justify-content: center;
        padding-left: 0;
    }
    .main-navigation li {
        margin: calc(var(--spacing-unit) * 0.5) var(--spacing-unit);
    }
    .main-navigation a {
        font-size: 0.75rem; /* Reduced from 0.85rem */
        padding: calc(var(--spacing-unit) * 0.5);
    }

    .sidebar-footer {
        margin-top: calc(var(--spacing-unit) * 2);
        font-size: 0.75rem;
    }
     .footer-image {
        max-width: 90px; /* Adjust for mobile view if needed */
        margin-bottom: var(--spacing-unit);
    }


    .content-area {
        margin-left: 0; /* Remove margin when sidebar is on top */
    }

    .content-section {
        padding: calc(var(--spacing-unit) * 5) calc(var(--spacing-unit) * 3);
        min-height: auto; /* Allow sections to be their natural height */
    }
    .content-section:first-of-type { /* Add top padding to first section to clear mobile nav */
      padding-top: calc(var(--spacing-unit) * 5);
    }


    h1 { font-size: 2rem; }
    .section-title { font-size: 1.4rem; }
    h3 { font-size: 1.15rem; }
    h4 { font-size: 1rem; }
    p, ul, ol { font-size: 0.9rem; }

    .hero-section .section-content-wrapper > img:first-child {
        max-height: 220px; /* Adjusted */
        max-width: 80%; /* Adjusted */
    }
     #about .section-content-wrapper > img:first-of-type {
        max-width: 280px; /* Adjusted */
    }
    .service-item-card img {
        /* max-height: 180px; Removed, max-width controls size now */
        max-width: 160px; /* Slightly smaller for mobile card context if needed */
    }


    .value-props-grid, .services-list, .faq-list, .sustainability-details {
        grid-template-columns: 1fr; /* Stack items */
        gap: calc(var(--spacing-unit) * 3);
    }
    .sustainability-image-grid {
        grid-template-columns: 1fr; /* Stack images in sustainability on mobile */
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-unit: 7px; /* Slightly reduce spacing unit for very small screens */
    }
    .sidebar-nav {
        padding: calc(var(--spacing-unit) * 1.5);
    }
    .site-title a { font-size: 1.2rem; }
    .site-subtitle { font-size: 0.6rem; }


    .main-navigation a {
        font-size: 0.7rem; /* Reduced from 0.8rem */
    }

    .content-section {
        padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
    }

    .hero-section .section-content-wrapper > img:first-child {
        max-height: 180px; /* Adjusted */
    }
    #about .section-content-wrapper > img:first-of-type {
        max-width: 230px; /* Adjusted */
    }
    .service-item-card img {
        max-width: 150px; /* Further adjust for very small screens */
    }
    .hero-section h2 { font-size: 1rem; } /* Redundant if H1/H2 removed, but kept for consistency */
    .section-title { font-size: 1.2rem; }

    .btn, .contact-form-minimal .btn-submit {
        font-size: 0.8rem;
        padding: var(--spacing-unit) calc(var(--spacing-unit) * 1.5);
    }
    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center; /* Center buttons on mobile */
        gap: var(--spacing-unit);
    }
    .hero-buttons .btn {
      width: auto; /* Allow buttons to size to content */
      margin-right: 0;
    }

    .footer-image {
        max-width: 70px;
    }
}

/* Fix for Safari button and input styling */
button, input, textarea {
    -webkit-appearance: none;
    border-radius: 0;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: calc(var(--spacing-unit) * 1.5);
    cursor: pointer;
    position: absolute;
    top: calc(var(--spacing-unit) * 2);
    right: calc(var(--spacing-unit) * 2);
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-primary);
    margin: 4px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .sidebar-nav {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar-nav.nav-open {
        transform: translateX(0);
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* Enhanced Mobile Styles */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar-nav {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        padding: calc(var(--spacing-unit) * 2);
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        background-color: var(--color-bg);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar-nav.nav-open {
        transform: translateX(0);
    }

    .sidebar-content {
        padding-top: calc(var(--spacing-unit) * 4);
    }

    .main-navigation ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: calc(var(--spacing-unit) * 1.5);
    }

    .main-navigation a {
        font-size: 1rem;
        padding: calc(var(--spacing-unit) * 1) 0;
    }

    .content-area {
        margin-left: 0;
        margin-top: 60px; /* Space for fixed header */
    }

    .content-section {
        padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
    }

    .hero-section .section-content-wrapper > img:first-child {
        max-height: 200px;
        max-width: 90%;
    }

    .service-item-card {
        padding: calc(var(--spacing-unit) * 2);
    }

    .service-item-card img {
        max-width: 140px;
    }

    .sustainability-image-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 2);
    }

    .contact-layout {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 3);
    }

    .contact-details, .contact-form-wrapper {
        width: 100%;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    :root {
        --spacing-unit: 6px;
    }

    .content-section {
        padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 2);
    }

    h1 { font-size: 1.8rem; }
    .section-title { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1rem; }
    p, ul, ol { font-size: 0.9rem; }

    .hero-section .section-content-wrapper > img:first-child {
        max-height: 160px;
    }

    .service-item-card img {
        max-width: 120px;
    }

    .btn, .contact-form-minimal .btn-submit {
        width: 100%;
        text-align: center;
        margin-right: 0;
    }

    .hero-buttons {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 2);
    }

    .hero-buttons .btn {
        width: 100%;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .btn:hover,
    .btn-text:hover,
    .main-navigation a:hover {
        background-color: transparent;
        color: var(--color-text-primary);
    }

    .contact-form-minimal input[type="text"]:focus,
    .contact-form-minimal input[type="email"]:focus,
    .contact-form-minimal input[type="tel"]:focus,
    .contact-form-minimal textarea:focus {
        border-color: var(--color-text-primary);
        outline: none;
    }
}

/* Fix for iOS input zoom */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select,
    textarea,
    input {
        font-size: 16px;
    }
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

@media (max-width: 768px) {
    .mobile-nav-overlay {
        display: block;
    }
}

/* Enhanced Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 24px;
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .nav-toggle span {
        width: 100%;
        height: 2px;
        background-color: var(--color-text-primary);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

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

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

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

    .sidebar-nav {
        width: var(--mobile-nav-width);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .sidebar-nav.nav-open {
        transform: translateX(0);
    }

    /* Improved Mobile Content Layout */
    .content-area {
        margin-top: var(--mobile-header-height);
        padding-top: calc(var(--spacing-unit) * 2);
    }

    .content-section {
        scroll-margin-top: var(--mobile-header-height);
    }

    /* Enhanced Mobile Typography */
    .section-title {
        font-size: 1.6rem;
        margin-bottom: calc(var(--spacing-unit) * 3);
    }

    .tagline {
        font-size: 1.1rem;
        line-height: 1.5;
        padding: 0 calc(var(--spacing-unit) * 2);
    }

    /* Improved Mobile Card Layout */
    .service-item-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: calc(var(--spacing-unit) * 3);
        margin-bottom: calc(var(--spacing-unit) * 2);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .service-item-card img {
        width: 100%;
        max-width: 160px;
        height: auto;
        margin-bottom: calc(var(--spacing-unit) * 2);
        transition: transform 0.3s ease;
    }

    .service-item-card:hover img {
        transform: scale(1.05);
    }

    /* Enhanced Mobile Form Elements */
    .contact-form-minimal input,
    .contact-form-minimal textarea {
        font-size: 16px; /* Prevent iOS zoom */
        padding: calc(var(--spacing-unit) * 1.5);
        border-radius: 8px;
        border: 1px solid var(--color-input-border);
        background-color: var(--color-bg);
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .contact-form-minimal input:focus,
    .contact-form-minimal textarea:focus {
        border-color: var(--color-text-primary);
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    }

    /* Improved Mobile Buttons */
    .btn {
        width: 100%;
        padding: calc(var(--spacing-unit) * 1.5);
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 500;
        text-align: center;
        transition: transform 0.2s ease, background-color 0.2s ease;
    }

    .btn:active {
        transform: scale(0.98);
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    :root {
        --spacing-unit: 6px;
    }

    .content-section {
        padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 2);
    }

    .service-item-card {
        padding: calc(var(--spacing-unit) * 2);
    }

    .service-item-card img {
        max-width: 140px;
    }

    /* Optimized Image Loading for Small Screens */
    .sustainability-image-grid img,
    .service-item-card img {
        loading: "lazy";
        decoding: "async";
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .btn:active,
    .service-item-card:active {
        transform: scale(0.98);
    }

    .main-navigation a {
        padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
    }
}

/* Add smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior-y: none;
}

/* Image Gallery Grid */
.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    aspect-ratio: 1;
    background: var(--color-bg);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    font-size: 0.75rem;
    color: var(--color-text-primary);
    text-align: center;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    position: relative;
    background: none;
    opacity: 1;
    transform: none;
    transition: none;
}

.gallery-item:hover .gallery-caption {
    background: rgba(255, 255, 255, 1);
}

/* Responsive Gallery */
@media (max-width: 1400px) {
    .image-gallery-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 1200px) {
    .image-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.7rem;
    }
}

@media (max-width: 992px) {
    .image-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
}

@media (max-width: 768px) {
    .image-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .gallery-caption {
        font-size: 0.8rem;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .image-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    .gallery-caption {
        font-size: 0.7rem;
        padding: 6px;
    }
}

/* Add font-face declarations for extra light weights */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 200;
    src: url('https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 200;
    src: url('https://fonts.gstatic.com/s/ibmplexmono/v19/-F6qfjptAgt5VM-kVkqdyU8n1iIq129k.woff2') format('woff2');
}

/* Scroll Arrows */
.scroll-arrow {
    position: fixed;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    opacity: 0.3;
    transition: opacity 0.3s ease;
    z-index: 1000;
    cursor: pointer;
    pointer-events: auto;
    right: 20px;
}

.scroll-arrow.up {
    top: 40px;
    border-bottom: 8px solid var(--color-text-primary);
}

.scroll-arrow.down {
    bottom: 40px;
    border-top: 8px solid var(--color-text-primary);
}

.scroll-arrow:hover {
    opacity: 0.6;
}

/* Hide arrows when at top/bottom of page */
.scroll-arrow.up.hidden,
.scroll-arrow.down.hidden {
    opacity: 0;
    pointer-events: none;
}