/* CSS Variables */
:root {
    --primary-color: hsl(150, 20%, 30%); /* Deep Sage Green */
    --accent-color: hsl(40, 70%, 60%); /* Warm Ochre/Gold */
    --text-dark: hsl(0, 0%, 20%);
    --text-light: hsl(0, 0%, 95%);
    --bg-light: hsl(0, 0%, 98%);
    --bg-dark: hsl(0, 0%, 15%);
    --border-color: hsl(0, 0%, 85%);

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;

    --max-width: 1200px;
    --section-padding: 80px;
    --card-border-radius: 12px;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 3.5em; }
h2 { font-size: 2.5em; }
h3 { font-size: 1.8em; }
h4 { font-size: 1.4em; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 25px;
}

.section-padding {
    padding: var(--section-padding) 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-description {
    font-size: 1.15em;
    color: var(--text-dark);
    max-width: 800px;
    margin: 15px auto 50px auto;
    text-align: center;
}

/* Header */
.main-header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 2.2em;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.logo a:hover {
    color: var(--accent-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    font-family: var(--font-heading);
    font-size: 1.1em;
    color: var(--text-dark);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-dark);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-dark);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Mobile Nav Open State */
body.nav-open .hamburger {
    background: transparent;
}

body.nav-open .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

body.nav-open .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}


/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3)), url('images/image_14.jpg') center/cover no-repeat;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: inherit;
    filter: blur(5px); /* Subtle background blur for depth */
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    padding: 0 20px;
    opacity: 1;
    transform: translateY(20px);
    animation: fadeInSlideUp 1s forwards ease-out 0.3s;
}

.hero-content h1 {
    font-size: 4.5em;
    margin-bottom: 20px;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.3);
    color: var(--text-light);
}

.hero-content p {
    font-size: 1.5em;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

@keyframes fadeInSlideUp {
    from {
        opacity: 1;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* About Section */
.about-section h2, .about-section h3 {
    text-align: center;
}
.about-section h2 {
    margin-bottom: 20px;
}
.about-section h3 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.6em;
    margin-bottom: 30px;
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transform: scale(1);
    transition: transform 0.4s ease;
}
.about-image:hover {
    transform: scale(1.02);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.about-image:hover img {
    transform: scale(1.05);
}

.about-text {
    flex: 2;
    min-width: 300px;
    text-align: left;
}

.about-text h2, .about-text h3 {
    text-align: left;
}


/* Services Section */
.services-section h2, .services-section .section-description {
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 cards per row */
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background-color: #fff;
    border-radius: var(--card-border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.service-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.4s ease;
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card h3 {
    color: var(--primary-color);
    margin: 25px 15px 10px 15px;
    font-size: 1.5em;
    font-weight: 600;
}

.service-card p {
    padding: 0 25px 25px 25px;
    font-size: 1em;
    color: var(--text-dark);
}


/* Gallery Section */
.gallery-section h2, .gallery-section .section-description {
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 cards per row */
    gap: 20px;
    margin-top: 50px;
}

.gallery-item {
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-medium);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}


/* Testimonials Section */
.testimonials-section h2, .testimonials-section .section-description {
    text-align: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 cards per row */
    gap: 30px;
    margin-top: 50px;
}

.testimonial-card {
    background: linear-gradient(135deg, #fff, var(--bg-light));
    border-radius: var(--card-border-radius);
    padding: 30px;
    box-shadow: var(--shadow-light);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.testimonial-card p {
    font-style: italic;
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.testimonial-card h4 {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: 600;
    margin-top: auto; /* Push name to bottom */
}


/* Connect Section (Static Info) */
.connect-section {
    text-align: center;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, hsl(140, 25%, 40%) 100%);
    box-shadow: inset 0 5px 20px rgba(0,0,0,0.2);
}

.connect-section h2 {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 3em;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.connect-section p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 15px auto;
    line-height: 1.7;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}


/* Footer */
.main-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
}

.main-footer p {
    margin: 0;
}


/* Scroll Reveal Animation */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* Media Queries */
@media (max-width: 992px) {
    h1 { font-size: 3.5em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.5em; }
    .hero-content p { font-size: 1.3em; }

    .main-nav ul li {
        margin-left: 20px;
    }

    .services-grid,
    .gallery-grid,
    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Allow wrapping and resizing */
        gap: 25px;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-text h2, .about-text h3 {
        text-align: center;
    }

    .about-image {
        max-width: 600px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.3em; }
    .hero-content p { font-size: 1.1em; }
    .section-padding { padding: 60px 0; }
    .section-description { font-size: 1em; margin-bottom: 30px; }

    .main-header .container {
        padding: 0 15px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.4s ease-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 999;
    }

    body.nav-open .main-nav .nav-links {
        transform: translateX(0);
    }

    .main-nav ul li {
        margin: 20px 0;
    }

    .main-nav ul li a {
        font-size: 1.5em;
        color: var(--text-dark);
    }

    .hero-section {
        height: 70vh;
    }

    .services-grid,
    .gallery-grid,
    .testimonials-grid {
        grid-template-columns: 1fr; /* Cards stack to 1 column */
        gap: 20px;
    }
    .service-card {
        max-width: 400px; /* Constrain width for better look on small screens */
        margin: 0 auto;
    }
    .gallery-item, .testimonial-card {
        max-width: 500px;
        margin: 0 auto;
    }

    .connect-section h2 {
        font-size: 2.2em;
    }
    .connect-section p {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.6em; }
    h3 { font-size: 1.2em; }
    .hero-content p { font-size: 1em; }

    .logo a {
        font-size: 1.8em;
    }

    .main-nav .nav-links {
        width: 85%;
    }

    .section-padding { padding: 40px 0; }

    .about-image {
        min-width: unset; /* Allow it to shrink further */
    }
    .connect-section h2 {
        font-size: 1.8em;
    }
}
/* Visible state helpers */
+ .animate-fade-in-up.visible,
+ .animate-fade-in-left.visible,
+ .animate-fade-in-right.visible,
+ .animate-bounce-y.visible,
+ .section-scroll-animate.visible,
+ .text-animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}
