/* ===============================================
   Variables & Reset
   =============================================== */
:root {
    /* Colors from logo - professional green tones */
    --color-primary: #2D7A3E;
    --color-primary-dark: #1F5A2D;
    --color-primary-light: #4A9A5A;
    --color-secondary: #2A4A34;
    --color-accent: #B8D4BE;
    --color-stone: #D8E8DD;
    --color-dark: #1A2E1F;
    --color-dark-gray: #2C3A30;
    --color-text: #3A4A3E;
    --color-text-light: #5A6A5E;
    --color-white: #FFFFFF;
    --color-off-white: #F8FAF9;
    --color-light-bg: #EEF5F1;
    
    /* Typography */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --spacing-2xl: 8rem;
    --spacing-3xl: 12rem;
    
    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.25);
    
    /* Container */
    --container-width: 1400px;
    --container-padding: 2rem;
    --content-width: 1200px;
    
    /* Header */
    --header-height: 90px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Loading State */
body:not(.loaded) {
    overflow: hidden;
}

body.loaded {
    animation: fadeIn 0.5s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===============================================
   Typography
   =============================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-dark);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

/* ===============================================
   Utility Classes
   =============================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section__subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section__title {
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.section__description {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 700px;
}

.section__header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section__header .section__title,
.section__header .section__description {
    margin-left: auto;
    margin-right: auto;
}

/* Buttons - Modern & Polished */
.btn,
.nav__link--cta {
    display: inline-block;
    padding: 1.125rem 2.25rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before,
.nav__link--cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before,
.nav__link--cta:hover::before {
    width: 300px;
    height: 300px;
}

.btn--primary,
.nav__link--cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(45, 122, 62, 0.25);
}

.btn--primary:hover,
.nav__link--cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 122, 62, 0.4);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
    backdrop-filter: blur(10px);
}

.btn--secondary:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn--large {
    padding: 1.5rem 3rem;
    font-size: 1.125rem;
}

/* ===============================================
   Header & Navigation - Modern & Clean
   =============================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition-base);
}

.header.scroll-header {
    box-shadow: var(--shadow-md);
    background-color: rgba(255, 255, 255, 0.98);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 calc(var(--container-padding) * 1.5);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav__logo-img {
    height: 55px;
    width: auto;
    transition: var(--transition-base);
}

.nav__logo-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-dark);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

@media screen and (max-width: 768px) {
    .nav__logo-text {
        font-size: 0.95rem;
        white-space: normal;
        line-height: 1.3;
    }
}

.header.scroll-header .nav__logo-img {
    height: 50px;
}

.nav__list {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.nav__link {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__link:hover::after,
.nav__link.active-link::after {
    width: 100%;
}

.nav__link--cta {
    border-radius: 8px;
    color: var(--color-white);
}

.nav__link--cta::after {
    display: none;
}

.nav__toggle,
.nav__close {
    display: none;
    font-size: 1.5rem;
    color: var(--color-dark);
    cursor: pointer;
}

.nav__lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 2.5rem;
}

.nav__lang-label {
    font-weight: 500;
    color: var(--color-text-light);
}

.nav__lang-btn {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background-color: transparent;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
}

.nav__lang-btn:hover {
    border-color: rgba(45, 122, 62, 0.4);
    background-color: rgba(45, 122, 62, 0.06);
}

.nav__lang-btn--active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
    border-color: transparent;
}

.nav__lang-divider {
    color: var(--color-text-light);
    opacity: 0.7;
}

/* Mobile Navigation */
@media screen and (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--color-white);
        padding: 4rem 2rem;
        transition: right 0.4s ease;
        box-shadow: var(--shadow-lg);
        display: block;
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 2rem;
        align-items: flex-start;
    }

    .nav__lang-switcher {
        margin: 2.5rem 0 0;
        justify-content: flex-start;
    }

    .nav__toggle,
    .nav__close {
        display: block;
    }

    .nav__close {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
    }
}

/* ===============================================
   Hero Section - Full Width
   =============================================== */
.hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: var(--header-height);
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 46, 31, 0.92) 0%, rgba(42, 74, 52, 0.85) 100%);
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url('https://ik.imagekit.io/sabbierablog/St-Pierre%20Triassi/images/building-restore2.png?updatedAt=1762312865618');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem clamp(2rem, 8vw, 8rem);
    animation: fadeInLeft 1s ease;
}

.hero__title {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero__title-small {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 4px;
}

.hero__title-main {
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.05;
    letter-spacing: -1px;
}

.hero__description {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--color-stone);
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 600px;
}

.hero__buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero__scroll {
    position: absolute;
    bottom: 3rem;
    left: 4rem;
    z-index: 2;
}

.hero__scroll-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    animation: bounce 2s infinite;
    transition: var(--transition-base);
}

.hero__scroll-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===============================================
   About Section - Full Width Split
   =============================================== */
.about {
    position: relative;
    width: 100%;
    padding: 0;
    background-color: var(--color-white);
}

.about .container {
    max-width: 100%;
    padding: 0;
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    gap: 0;
}

.about__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(4rem, 10vw, 12rem) clamp(4rem, 8vw, 10rem);
    background-color: var(--color-off-white);
}

.about .section__subtitle,
.about .section__title {
    padding-left: 0;
}

.about__text {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.9;
    color: var(--color-text);
    margin-bottom: 1.75rem;
    opacity: 0.95;
}

.about__features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

.about__feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border-left: 3px solid transparent;
}

.about__feature:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--color-primary);
}

.about__feature svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.about__feature span {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-dark);
}

.about__images {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
}

.about__image {
    position: relative;
    overflow: hidden;
    transition: var(--transition-slow);
}

.about__image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 122, 62, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition-base);
}

.about__image:hover::after {
    opacity: 1;
}

.about__image:hover {
    transform: scale(1.05);
}

.about__image--1 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.about__image--2 {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}

.about__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media screen and (max-width: 968px) {
    .about__grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .about__images {
        height: 500px;
        order: -1;
    }

    .about__features {
        grid-template-columns: 1fr;
    }
    
    .about__content {
        padding: var(--spacing-lg) var(--container-padding);
    }
}

@media screen and (max-width: 640px) {
    .about__content {
        padding: var(--spacing-lg) 1.5rem;
    }
    
    .about__features {
        margin-top: 2rem;
    }
}

/* ===============================================
   Services Section - Full Width Modern Grid with Overlays
   =============================================== */
.services {
    position: relative;
    /* Light background for the whole section */
    background-color: var(--color-white);
    padding: var(--spacing-2xl) 0;
    width: 100%;
    overflow: hidden;
}

/* Decorative Background Overlays */
.services__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.services__overlay {
    position: absolute;
    /* Increase opacity so the shapes are clearly visible on white */
    background: linear-gradient(135deg, rgba(45, 122, 62, 0.22) 0%, rgba(74, 154, 90, 0.18) 100%);
    border-radius: 20px;
    animation: floatOverlay 20s ease-in-out infinite;
    /* Hint to the browser this element will be transformed for smoother animations */
    will-change: transform;
}

.services__overlay--1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -100px;
    transform: rotate(45deg);
}

.services__overlay--2 {
    width: 800px;
    height: 800px;
    bottom: -300px;
    right: -200px;
    transform: rotate(-30deg);
}

.services__overlay--3 {
    width: 400px;
    height: 400px;
    top: 50%;
    right: 10%;
    opacity: 0.6;
}

/* Additional overlays to distribute designs across the section */
.services__overlay--4 {
    width: 450px;
    height: 450px;
    top: 15%;
    left: 55%;
    opacity: 0.75;
}

.services__overlay--5 {
    width: 350px;
    height: 350px;
    bottom: -120px;
    left: 25%;
    opacity: 0.85;
}

.services__overlay--6 {
    width: 320px;
    height: 320px;
    top: 70%;
    left: -80px;
    opacity: 0.7;
}

.services__overlay--7 {
    width: 520px;
    height: 520px;
    top: -160px;
    right: 30%;
    opacity: 0.65;
}

.services__overlay--8 {
    width: 280px;
    height: 280px;
    bottom: 8%;
    right: -60px;
    opacity: 0.75;
}

@keyframes floatOverlay {
    0%, 100% {
        transform: translate(0, 0) rotate(45deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(50deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(40deg);
    }
    75% {
        transform: translate(20px, 30px) rotate(55deg);
    }
}

.services .container {
    max-width: var(--container-width);
    position: relative;
    z-index: 1;
}

.services .section__header {
    text-align: center;
}

.services .section__subtitle {
    /* Match subtitle color to other sections like About */
    color: var(--color-primary);
}

.services .section__title {
    /* Dark heading like "Building Montreal's Legacy, One Stone at a Time" */
    color: var(--color-dark);
}

.services .section__description {
    /* Standard body text color used in other sections */
    color: var(--color-text-light);
}

/* Services Grid - Stacked Horizontal Cards */
.services__grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: var(--spacing-lg);
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

/* Service Card - Horizontal Layout */
.service__card {
    position: relative;
    /* Give cards their own dark glass background so they stay readable on white section bg */
    background: linear-gradient(135deg, rgba(26, 46, 31, 0.96) 0%, rgba(42, 74, 52, 0.96) 100%);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    overflow: hidden;
    /* Limit transitions to cheap, GPU-friendly properties */
    transition:
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease-out,
        background 0.3s ease-out;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 45% 55%;
    min-height: 450px;
    /* Initial entrance state, animated via .service__card--visible */
    opacity: 0;
    transform: translate3d(0, 24px, 0);
}

/* Single, lightweight entrance state used for all cards */
.service__card--visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* On desktop (pointer fine, hover available), keep cards fully visible from the start
   so entrance animations don't compete with hover and feel laggy while scrolling. */
@media (hover: hover) and (pointer: fine) {
    .service__card {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Reverse Card - Image on Right */
.service__card--reverse {
    grid-template-columns: 55% 45%;
}

.service__card--reverse .service__image {
    order: 2;
}

.service__card--reverse .service__content {
    order: 1;
}

/* Service Image */
.service__image {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.service__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* Show the original image without darkening overlay */
    filter: none;
    transform: scale(1);
}

.service__image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Remove dark overlay over service images */
    background: transparent;
    transition: all 0.6s ease;
}

.service__card:hover .service__image img {
    transform: scale(1.15) !important;
    filter: brightness(1) contrast(1.2);
}

.service__card:hover .service__image-overlay {
    /* Keep overlay transparent on hover */
    background: transparent;
}

/* Service Content Area */
.service__content {
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Service Header with Icon */
.service__header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Icon Wrapper */
.service__icon-wrapper {
    position: relative;
    width: 75px;
    height: 75px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(45, 122, 62, 0.4);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service__icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    animation: pulse 3s ease infinite;
}

.service__card:hover .service__icon-wrapper {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 15px 50px rgba(45, 122, 62, 0.6);
}

.service__card:hover .service__icon-wrapper::before {
    opacity: 1;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.05);
    }
}

.service__icon {
    width: 32px;
    height: 32px;
    color: var(--color-white);
    transition: all 0.5s ease;
}

.service__card:hover .service__icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
}

/* Service Title */
.service__title {
    font-size: clamp(1.5rem, 2vw, 1.875rem);
    color: var(--color-white);
    line-height: 1.2;
    transition: all 0.4s ease;
    margin: 0;
}

.service__card:hover .service__title {
    color: var(--color-accent);
    transform: translateX(8px);
}

/* Service Description */
.service__description {
    color: var(--color-stone);
    margin-bottom: 2rem;
    line-height: 1.9;
    font-size: 1rem;
    opacity: 0.95;
}

/* Service List */
.service__list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.service__list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-stone);
    font-size: 0.9375rem;
    line-height: 1.5;
    /* Start slightly offset and fade in when parent card becomes visible */
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.4s ease-out,
        transform 0.4s ease-out;
}

/* Staggered reveal once the card itself becomes visible */
.service__card--visible .service__list li {
    opacity: 1;
    transform: translateY(0);
}

.service__card--visible .service__list li:nth-child(1) {
    transition-delay: 0.12s;
}

.service__card--visible .service__list li:nth-child(2) {
    transition-delay: 0.18s;
}

.service__card--visible .service__list li:nth-child(3) {
    transition-delay: 0.24s;
}

.service__card--visible .service__list li:nth-child(4) {
    transition-delay: 0.3s;
}

.service__card:hover .service__list li {
    color: var(--color-white);
    transform: translateY(0) translateX(5px);
}

.service__list-icon {
    color: var(--color-primary-light);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.service__card:hover .service__list-icon {
    color: var(--color-accent);
    transform: scale(1.3) rotate(360deg);
}

.service__list li span {
    flex: 1;
}

/* Card Hover Effects */
.service__card:hover {
    transform: translateY(-8px) scale(1.01);
    /* Slightly brighter dark gradient on hover, not transparent over white */
    background: linear-gradient(135deg, rgba(31, 74, 43, 1) 0%, rgba(45, 122, 62, 1) 100%);
    border-color: rgba(45, 122, 62, 0.6);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(45, 122, 62, 0.3),
        inset 0 0 60px rgba(45, 122, 62, 0.05);
}

/* Mobile: Apply smooth hover effects when in view */
@media screen and (max-width: 968px) {
    /* Ensure smooth transitions on mobile */
    .service__card {
        transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .service__card.mobile-in-view {
        transform: translateY(-8px) scale(1.01);
        /* Use the same rich green gradient as desktop cards so they don't turn white on mobile */
        background: linear-gradient(135deg, rgba(31, 74, 43, 1) 0%, rgba(45, 122, 62, 1) 100%);
        border-color: rgba(45, 122, 62, 0.6);
        box-shadow: 
            0 30px 80px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(45, 122, 62, 0.3),
            inset 0 0 60px rgba(45, 122, 62, 0.05);
    }
    
    .service__card.mobile-in-view::after {
        opacity: 1;
    }
    
    .service__card .service__image img {
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                    filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .service__card.mobile-in-view .service__image img {
        transform: scale(1.15) !important;
        filter: brightness(1) contrast(1.2);
    }
    
    .service__card .service__image-overlay {
        transition: background 0.6s ease;
    }
    
    .service__card.mobile-in-view .service__image-overlay {
        /* No overlay on mobile either */
        background: transparent;
    }
    
    .service__card .service__icon-wrapper {
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .service__card.mobile-in-view .service__icon-wrapper {
        transform: rotate(10deg) scale(1.1);
        box-shadow: 0 15px 50px rgba(45, 122, 62, 0.6);
    }
    
    .service__card.mobile-in-view .service__icon-wrapper::before {
        opacity: 1;
    }
    
    .service__card .service__icon {
        transition: transform 0.5s ease, filter 0.5s ease;
    }
    
    .service__card.mobile-in-view .service__icon {
        transform: scale(1.15);
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    }
    
    .service__card .service__title {
        transition: color 0.4s ease;
    }
    
    .service__card.mobile-in-view .service__title {
        color: var(--color-accent);
    }
    
    .service__card .service__list li {
        transition: color 0.4s ease;
    }
    
    .service__card.mobile-in-view .service__list li {
        color: var(--color-white);
    }
    
    .service__card .service__list-icon {
        transition: color 0.4s ease, transform 0.4s ease;
    }
    
    .service__card.mobile-in-view .service__list-icon {
        color: var(--color-accent);
        transform: scale(1.3);
    }
}

/* Glow effect on hover */
.service__card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(45, 122, 62, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.service__card:hover::after {
    opacity: 1;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .service__card,
    .service__card--reverse {
        grid-template-columns: 50% 50%;
        min-height: 400px;
    }
    
    .service__content {
        padding: 3rem;
    }
    
    .service__list {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 968px) {
    .services {
        padding: var(--spacing-xl) 0;
    }
    
    .services__grid {
        gap: 2.5rem;
    }
    
    .service__card,
    .service__card--reverse {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .service__card--reverse .service__image {
        order: 1;
    }
    
    .service__card--reverse .service__content {
        order: 2;
    }
    
    .service__image {
        height: 350px;
    }
    
    .service__content {
        padding: 2.5rem;
    }
    
    .service__header {
        gap: 1.25rem;
    }
    
    .service__icon-wrapper {
        width: 65px;
        height: 65px;
    }
    
    .service__icon {
        font-size: 1.75rem;
    }
    
    .service__list {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
}

@media screen and (max-width: 640px) {
    .services__grid {
        gap: 2rem;
    }
    
    .service__card,
    .service__card--reverse {
        border-radius: 20px;
    }
    
    .service__image {
        height: 280px;
    }
    
    .service__content {
        padding: 2rem;
    }
    
    .service__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .service__icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .service__icon {
        font-size: 1.5rem;
    }
    
    .service__title {
        font-size: 1.375rem;
    }
    
    .service__description {
        font-size: 0.9375rem;
    }
    
    .service__list li {
        font-size: 0.875rem;
    }
}

/* ===============================================
   Portfolio Section - Full Width Masonry-Style Gallery
   =============================================== */
.portfolio {
    background-color: var(--color-dark);
    padding: var(--spacing-2xl) 0;
    width: 100%;
}

.portfolio .container {
    max-width: 100%;
    padding: 0;
}

.portfolio .section__header {
    max-width: var(--content-width);
    margin: 0 auto var(--spacing-lg);
    padding: 0 var(--container-padding);
}

.portfolio .section__subtitle {
    color: var(--color-accent);
}

.portfolio .section__title {
    color: var(--color-white);
}

.portfolio .section__description {
    color: var(--color-stone);
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    max-width: 100%;
}

.portfolio__item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: none;
    border: 2px solid var(--color-dark);
    background-color: var(--color-dark);
}

.portfolio__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.portfolio__item:hover img {
    transform: scale(1.05);
}

@media screen and (max-width: 968px) {
    .portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 640px) {
    .portfolio__grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   Why Choose Us Section - Full Width Reversed
   =============================================== */
.why-choose {
    position: relative;
    width: 100%;
    padding: 0;
    background-color: var(--color-white);
}

.why-choose .container {
    max-width: 100%;
    padding: 0;
}

.why-choose__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    gap: 0;
}

.why-choose__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(4rem, 10vw, 12rem) clamp(4rem, 8vw, 10rem);
    order: 2;
    background-color: var(--color-white);
}

.why-choose .section__subtitle,
.why-choose .section__title {
    padding-left: 0;
}

.why-choose__text {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.9;
    margin-bottom: 3rem;
    color: var(--color-text);
}

.why-choose__reasons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.reason__item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--color-off-white) 0%, var(--color-white) 100%);
    border-radius: 16px;
    transition: var(--transition-base);
    border: 1px solid transparent;
    align-items: flex-start;
}

.reason__item:hover {
    background: var(--color-white);
    border-color: var(--color-accent);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.reason__icon {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.reason__content {
    flex: 1;
}

.reason__content h3 {
    font-size: clamp(1.25rem, 1.5vw, 1.5rem);
    margin-bottom: 1rem;
    color: var(--color-dark);
    line-height: 1.3;
}

.reason__content p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
}

.why-choose__image {
    order: 1;
    position: relative;
    overflow: hidden;
}

.why-choose__image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(45, 122, 62, 0.1) 0%, transparent 50%);
}

.why-choose__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===============================================
   FAQ Section - Elegant Accordion
   =============================================== */
.faq {
    background-color: var(--color-light-bg);
    padding: var(--spacing-2xl) 0;
}

.faq .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.faq .section__header {
    text-align: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-lg);
}

/* Move green underline to sit below the section subtitles instead of above the block */
.faq .section__header::before,
.services .section__header::before,
.portfolio .section__header::before {
    display: none;
}

.faq .section__subtitle,
.services .section__subtitle,
.portfolio .section__subtitle {
    position: relative;
}

.faq .section__subtitle::after,
.services .section__subtitle::after,
.portfolio .section__subtitle::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.faq__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.faq__item {
    flex: 1 1 calc(50% - 1.25rem);
    max-width: 100%;
    background-color: var(--color-white);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(184, 212, 190, 0.6);
    overflow: hidden;
    transition: var(--transition-base);
}

.faq__item--active {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
    transform: translateY(-4px);
}

.faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.faq__question span:first-child {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
}

.faq__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition-base);
}

.faq__icon::before,
.faq__icon::after {
    content: '';
    position: absolute;
    background-color: var(--color-primary);
    transition: var(--transition-base);
}

.faq__icon::before {
    width: 12px;
    height: 2px;
}

.faq__icon::after {
    width: 2px;
    height: 12px;
}

.faq__item--active .faq__icon {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.faq__item--active .faq__icon::before {
    background-color: var(--color-white);
}

.faq__item--active .faq__icon::after {
    opacity: 0;
    transform: scaleY(0);
}

.faq__answer {
    padding: 0 1.75rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.55s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity 0.4s ease,
        padding-top 0.55s ease,
        padding-bottom 0.55s ease;
    will-change: max-height, opacity, padding-top, padding-bottom;
}

.faq__item--active .faq__answer {
    padding-top: 0.75rem;
    padding-bottom: 1.5rem;
    opacity: 1;
}

.faq__answer p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin: 0;
}

@media screen and (max-width: 968px) {
    .faq {
        padding: var(--spacing-xl) 0;
    }

    .faq .section__header {
        text-align: left;
        margin-bottom: var(--spacing-md);
    }

    .faq__grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .faq__item {
        flex: 1 1 100%;
    }
}

@media screen and (max-width: 640px) {
    .faq .container {
        padding: 0 1.5rem;
    }

    .faq__question {
        padding: 1.25rem 1.25rem;
    }

    .faq__answer {
        padding: 0 1.25rem;
    }

    .faq__item--active .faq__answer {
        padding-top: 0.5rem;
        padding-bottom: 1.25rem;
    }
}

@media screen and (max-width: 968px) {
    .why-choose__grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .why-choose__image {
        order: -1;
        height: 500px;
    }
    
    .why-choose__content {
        order: 1;
        padding: var(--spacing-lg) var(--container-padding);
    }
    
    .why-choose__reasons {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .reason__item {
        padding: 2rem;
    }
}

@media screen and (max-width: 640px) {
    .why-choose__content {
        padding: var(--spacing-lg) 1.5rem;
    }
    
    .reason__item {
        padding: 1.75rem;
    }
    
    .reason__icon {
        width: 60px;
        height: 60px;
    }
}

/* ===============================================
   CTA Section - Full Width Impactful
   =============================================== */
.cta-section {
    position: relative;
    padding: var(--spacing-3xl) 0;
    width: 100%;
    text-align: center;
    overflow: hidden;
}

.cta-section__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
}

.cta-section__bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 122, 62, 0.5) 0%, rgba(26, 46, 31, 0.6) 100%);
}

.cta-section__content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.cta-section__title {
    color: var(--color-white);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.cta-section__description {
    font-size: clamp(1.125rem, 1.5vw, 1.375rem);
    color: var(--color-stone);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.cta-section .btn--primary {
    padding: 1.5rem 3rem;
    font-size: 1.125rem;
    background: var(--color-white);
    color: var(--color-primary);
    border: 3px solid var(--color-white);
    font-weight: 700;
}

.cta-section .btn--primary:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    border-color: var(--color-white);
}

/* ===============================================
   Contact Section - Modern Split Layout
   =============================================== */
.contact {
    background-color: var(--color-off-white);
    padding: var(--spacing-2xl) 0;
}

.contact__grid {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: var(--spacing-xl);
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.contact__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact__text {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.8;
    margin-bottom: 3rem;
    color: var(--color-text);
}

.contact__details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact__detail {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--color-white);
    border-radius: 12px;
    transition: var(--transition-base);
    border-left: 4px solid transparent;
}

.contact__detail:hover {
    border-left-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
}

.contact__detail-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.contact__detail-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.contact__detail-content p {
    color: var(--color-text-light);
    margin: 0;
    font-size: 0.9375rem;
}

.contact__detail-content a {
    color: var(--color-primary);
    font-weight: 600;
}

.contact__detail-content a:hover {
    text-decoration: underline;
}

.contact__form-wrapper {
    background-color: var(--color-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.contact__form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.form__group {
    display: flex;
    flex-direction: column;
}

.form__group--full {
    grid-column: 1 / -1;
}

.form__label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-dark);
    font-size: 0.9375rem;
}

.form__input,
.form__textarea {
    padding: 1.25rem;
    border: 2px solid var(--color-light-bg);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-base);
    background-color: var(--color-off-white);
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(45, 122, 62, 0.1);
    background-color: var(--color-white);
}

.form__textarea {
    resize: vertical;
    min-height: 160px;
}

.contact__form .btn {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 1.25rem 2.5rem;
}

@media screen and (max-width: 968px) {
    .contact__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .contact__form {
        grid-template-columns: 1fr;
    }
    
    .contact__form-wrapper {
        padding: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .contact__form-wrapper {
        padding: 1.5rem;
    }
}

/* ===============================================
   Footer
   =============================================== */
.footer {
    background-color: var(--color-dark);
    color: var(--color-stone);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__logo-img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(1.2);
}

.footer__description {
    color: var(--color-accent);
    line-height: 1.8;
    margin-top: 1rem;
}

.footer__title {
    color: var(--color-white);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__links a {
    color: var(--color-accent);
    transition: var(--transition-base);
}

.footer__links a:hover {
    color: var(--color-primary-light);
    padding-left: 5px;
}

.footer__links li {
    color: var(--color-accent);
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(184, 212, 190, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer__copyright {
    color: var(--color-accent);
    margin: 0;
}

.footer__legal {
    display: flex;
    gap: 2rem;
}

.footer__legal-link {
    color: var(--color-accent);
    font-size: 0.9375rem;
}

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

@media screen and (max-width: 968px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 576px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ===============================================
   Scroll to Top Button
   =============================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 999;
}

.scroll-top.show-scroll {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-5px);
}

/* ===============================================
   Animations & Effects
   =============================================== */
.fade-in {
    animation: fadeIn 0.6s ease;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease;
}

.slide-in-right {
    animation: slideInRight 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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);
    }
}

/* Section Decorative Elements */
.section__header::before {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

/* Image Hover Effects */
.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

/* Parallax Sections */
.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

@media (prefers-reduced-motion: reduce) {
    .parallax-section {
        background-attachment: scroll;
    }
}

/* ===============================================
   Responsive Design - Full Width Optimized
   =============================================== */
@media screen and (max-width: 1200px) {
    :root {
        --container-padding: 2rem;
        --spacing-xl: 5rem;
        --spacing-lg: 3rem;
        --spacing-2xl: 6rem;
        --spacing-3xl: 8rem;
    }
}

@media screen and (max-width: 968px) {
    /* Hero Mobile */
    .hero {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }
    
    .hero__overlay {
        width: 100%;
        background: linear-gradient(180deg, rgba(26, 46, 31, 0.92) 0%, rgba(42, 74, 52, 0.85) 100%);
    }
    
    .hero::before {
        width: 100%;
        height: 100%;
    }
    
    .hero__content {
        padding: 3rem var(--container-padding);
    }
    
    .hero__scroll {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media screen and (max-width: 768px) {
    :root {
        --container-padding: 1.5rem;
        --spacing-xl: 4rem;
        --spacing-lg: 3rem;
        --spacing-md: 1.5rem;
        --spacing-2xl: 4rem;
        --spacing-3xl: 5rem;
        --header-height: 70px;
    }

    .hero__buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero__buttons .btn {
        width: 100%;
    }
    
    .section__header {
        text-align: center;
    }
}

@media screen and (max-width: 640px) {
}

@media screen and (max-width: 480px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 4rem;
    }

    .scroll-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .hero__content {
        padding: 2rem 1.5rem;
    }
    
    .hero__title-main {
        font-size: 2.25rem;
    }
}

/* Mobile overflow guardrails (prevents sideways scroll without affecting desktop) */
@media screen and (max-width: 768px) {
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Ensure the contact section never overflows horizontally */
    .contact,
    .contact .container,
    .contact__grid,
    .contact__form-wrapper {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Explicitly keep contact children within viewport width */
    .contact__info,
    .contact__form-wrapper,
    .contact__form,
    .contact__details {
        width: 100%;
    }

    /* Prevent transient internal scrollbar caused by reveal animation on first view */
    .contact__form-wrapper {
        /* avoid vertical clipping of inputs but still block horizontal overflow */
        overflow-x: hidden;
        overflow-y: visible;
    }
    .contact__info,
    .contact__form-wrapper {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }

    /* Ensure grid items can shrink and never overflow on mobile */
    .contact__form,
    .form__group {
        min-width: 0;
    }
    .form__input,
    .form__textarea,
    .contact__form select {
        width: 100%;
        max-width: 100%;
    }
}

/* ===============================================
   Print Styles
   =============================================== */
@media print {
    .header,
    .nav,
    .hero__scroll,
    .scroll-top,
    .btn {
        display: none;
    }

    body {
        color: #000;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* ===============================================
   Accessibility
   =============================================== */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===============================================
   Performance Optimizations
   =============================================== */
/* GPU Acceleration for smooth animations */
.hero,
.about__image,
.service__card,
.portfolio__item,
.btn,
.nav__link {
    will-change: transform;
}

/* Optimize images for performance */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Smooth font rendering */
@supports (font-smooth: always) {
    body {
        font-smooth: always;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}


