/* 1. Global Styles & Variables */
:root {
    --color-background: #F0EDE6; /* Light Beige */
    --color-text: #413F2C; /* Dark Brown/Green */
    --color-text-light: #F0EDE6;
    --color-accent: #6D6B5B; /* Earthy Gray/Brown */
    --color-section-alt: #FFFFFF; /* New: Pure White for separation */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Questrial', sans-serif;
}

body.dark-mode {
    --color-background: #1a1a1a;
    --color-text: #e0e0e0;
    --color-text-light: #1a1a1a;
    --color-accent: #9e9e9e;
    --color-section-alt: #2a2a2a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: var(--font-body); 
    color: var(--color-text); 
    background-color: var(--color-background); 
    overflow-x: hidden; /* FIX: Prevents horizontal scroll/bleed */
    font-size: 18px;
    line-height: 1.6;
}
body.scroll-lock { overflow: hidden; } /* This is correct for when menu is open */
.container { max-width: 1140px; margin: 0 auto; padding: 80px 20px; } /* Increased max-width and padding */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; }
h1 { font-size: 56px; line-height: 1.1; margin-bottom: 20px; } /* Slightly larger */
h2 { font-size: 64px; margin-bottom: 20px; text-align: center; }
h3 { font-size: 24px; margin-bottom: 15px; } /* Slightly larger */
p { line-height: 1.7; word-wrap: break-word; word-break: break-word; } /* FIX: Improved text wrapping */
.subtitle { font-size: 28px; margin-bottom: 60px; text-align: center; max-width: 900px; margin-left: auto; margin-right: auto; } /* Slightly larger */
.button { display: inline-block; padding: 12px 30px; background-color: var(--color-text); color: var(--color-text-light); text-decoration: none; font-family: var(--font-heading); font-weight: 700; border-radius: 50px; border: 2px solid var(--color-text); cursor: pointer; transition: all 0.3s ease; letter-spacing: 1px; text-transform: uppercase; } /* Better padding/style */
.button:hover { 
    background-color: transparent; 
    color: var(--color-text); 
    border-radius: 10px; 
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
} /* More distinct hover */

/* 2. Header */
.site-header { position: sticky; top: 0; width: 100%; z-index: 1000; background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px); transition: box-shadow 0.3s ease; }
.site-header.scrolled { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.header-container { display: flex; justify-content: space-between; align-items: center; padding: 10px 40px; }
.logo img { height: 60px; }
.main-nav ul { list-style: none; display: flex; gap: 30px; }
.main-nav a {
    text-decoration: none;
    color: var(--color-text-light);
    font-family: var(--font-heading);
    font-size: 18px;
    padding-bottom: 5px;
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-text-light);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }

/* FIX: Ensure mobile elements are HIDDEN by default on DESKTOP */
.hamburger-menu, .mobile-nav {
    display: none;
}

/* 3. Hero Section */
#hero { 
    min-height: 700px; /* Taller hero */
    background-image: linear-gradient(rgba(240, 237, 230, 0.1), rgba(240, 237, 230, 0.1)), url('assets/images/optimized/hero-background.webp'); 
    background-size: cover; 
    background-position: center; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    color: var(--color-text);
    background-attachment: fixed;
}
.hero-content { max-width: 1080px; margin: 0 auto; padding: 0 50px; }
.hero-content h1, .hero-content p { /* text-shadow: 1px 1px 3px rgba(0,0,0,0.5); */ }
.hero-content p { font-size: 24px; margin-bottom: 30px; } /* Slightly larger */
.hero-buttons .button { margin-right: 15px; }

/* 4. About Us Section */
#about { background-color: var(--color-background); } /* Section distinction */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; } /* Adjusted ratio and gap */
.about-text h2 { text-align: left; font-size: 72px; }
.about-images { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; perspective: 1000px; }
.about-images img { width: 100%; height: 280px; object-fit: cover; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); } /* Rounded corners and shadow */
.image-flip-container { transform-style: preserve-3d; }
.about-images .image-flip-container:first-child { grid-column: 1 / 3; }

/* 5. Services Section */
#services { background-color: var(--color-section-alt); } /* Section distinction */
.service-item { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; margin-bottom: 100px; padding: 40px; border-radius: 20px; background-color: var(--color-background); box-shadow: 0 5px 15px rgba(0,0,0,0.05); } /* Added padding and background to the item itself for distinction */
.service-item.reverse .scroll-flip-container { grid-column: 2 / 3; grid-row: 1 / 2; }
.service-item.reverse .service-text { grid-column: 1 / 2; grid-row: 1 / 2; }
.scroll-flip-container { perspective: 2000px; }
.service-item img { width: 100%; height: 450px; object-fit: cover; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); } /* Adjusted height and border-radius */

/* Solutions Section */
#solutions { background-color: var(--color-background); }
.solutions-list { list-style: '•  '; padding-left: 20px; columns: 3; -webkit-columns: 3; -moz-columns: 3; gap: 40px; }
.solutions-list li { font-size: 20px; font-family: var(--font-heading); font-weight: 700; margin-bottom: 25px; break-inside: avoid; }

/* 6. Why Choose Us Section */
#benefits { background-color: var(--color-section-alt); } /* Section distinction */
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; }
.benefit-item { position: relative; background-color: #000; color: var(--color-text-light); padding: 50px; border-radius: 20px; font-family: var(--font-heading); font-size: 24px; text-align: center; overflow: hidden; z-index: 1; } /* More padding, less aggressive border-radius */
.benefit-icon { position: absolute; bottom: -30px; left: -30px; width: 120px; height: 120px; opacity: 0.1; z-index: -1; filter: invert(1); }

/* 7. Testimonials */
#testimonials { background-color: #e9e5db; }
.slider-wrapper { position: relative; max-width: 100%; overflow: hidden; }
.slides-container { display: flex; transition: transform 0.7s ease-in-out; }
.slide { display: flex; min-width: 100%; gap: 30px; justify-content: center; }
.testimonial-card { background-color: white; padding: 50px; border-radius: 20px; width: 48%; text-align: center; box-shadow: 0 15px 35px rgba(0,0,0,0.1); } /* More padding, less aggressive border-radius, stronger shadow */
.testimonial-card p { font-size: 20px; margin-bottom: 20px; }
.testimonial-card h4 { font-family: var(--font-body); }
.testimonial-card span { color: var(--color-accent); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: var(--color-accent); color: white; border: none; border-radius: 50%; width: 50px; height: 50px; font-size: 24px; cursor: pointer; z-index: 10; opacity: 0.7; transition: opacity 0.2s; }
.slider-btn:hover { opacity: 1; }
.prev { left: -25px; }
.next { right: -25px; }

/* 8. Partner Section */
#partner { background-color: var(--color-background); text-align: center; }

/* 9. Footer */
footer { background-color: var(--color-section-alt); padding: 80px 0; border-top: 5px solid var(--color-text); } /* ADDED: Strong border for distinction */
.footer-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: start; }
.footer-col-1 h2 { font-size: 64px; } /* Slightly smaller for balance */
.footer-col-1 p { margin-bottom: 15px; }
.footer-col-2 h3 { font-size: 38px; margin-bottom: 20px; }
form input, form textarea { width: 100%; padding: 15px; margin-bottom: 20px; border: 1px solid var(--color-text); border-radius: 100px; background: transparent; font-family: var(--font-body); font-size: 16px; }
form textarea { border-radius: 30px; }

/* 10. Popup Modal Styles */
.modal-overlay { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
.modal-overlay.open { opacity: 1; visibility: visible; transition: opacity 0.4s ease; }
.modal-content { background-color: white; border-radius: 10px; display: flex; max-width: 800px; width: 90%; position: relative; transform: scale(0.9); opacity: 0; transition: transform 0.4s ease, opacity 0.4s ease; }
.modal-overlay.open .modal-content { transform: scale(1); opacity: 1; }
.modal-image { width: 50%; }
.modal-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px 0 0 10px; }
.modal-form { width: 50%; padding: 40px; text-align: center; }
.close-button { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 2.5rem; color: #aaa; cursor: pointer; }
.close-button:hover { color: #333; }

/* 11. Animation initial state for text reveal */
.text-reveal span {
    display: inline-block;
}

/* 12. Page Ending Line Style */
.page-end-line {
    height: 50px;
    background-color: var(--color-text);
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 500;
}
.page-end-line::before {
    content: 'CLEAR VISION. ADVANCED CARE.';
    color: var(--color-text-light);
    font-family: var(--font-heading);
    font-size: 16px;
    letter-spacing: 5px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
}

/* 13. Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-accent);
    color: var(--color-text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}
.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-to-top:hover {
    background-color: var(--color-text);
    transform: translateY(-5px);
}

/* 14. Theme Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}
.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}
.theme-switch input { display: none; }
.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}
.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}
input:checked + .slider {
    background-color: var(--color-accent);
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}

/* 15. Google Translate */
#google_translate_element {
    margin-left: 20px;
}