/* style.css */

html, body {
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 1000;
    background: #496544;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===== NAV DROPDOWN ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 280px;
    background: #fff;
    border: 1px solid #E2E8E0;
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(45, 62, 47, 0.12);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 120;
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -0.75rem;
    left: 0;
    right: 0;
    height: 0.75rem;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: #2D3E2F;
    text-transform: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.dropdown-link:hover {
    background: #F0F3F0;
    color: #496544;
    padding-left: 1.25rem;
}

.mobile-services-list.hidden {
    display: none !important;
}

.mobile-services-list:not(.hidden) {
    display: flex;
}

.mobile-services-icon {
    transition: transform 0.3s ease;
}

.mobile-services-toggle.open .mobile-services-icon {
    transform: rotate(180deg);
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    transform: translateX(100%);
}

#mobile-menu.translate-x-full {
    transform: translateX(100%);
}

#mobile-menu:not(.translate-x-full) {
    transform: translateX(0);
}

/* ===== MARQUEE ===== */
.marquee-content {
    animation: marquee 28s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== GALLERY ===== */
.gallery-img {
    width: 100%;
    aspect-ratio: 1/1;
    cursor: pointer;
    overflow: hidden;
    border-radius: 1rem;
    position: relative;
    background-color: #f0f0f0;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-img:hover img {
    transform: scale(1.1);
}

/* ===== FILTER BUTTONS ===== */
.filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid #496544;
    color: #496544;
    font-weight: 600;
    transition: all 0.3s;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: #496544;
    color: white;
    border-color: #496544;
}

/* ===== FAQ ACCORDION ===== */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-active .accordion-content {
    max-height: 500px;
}

.accordion-active .icon {
    transform: rotate(180deg);
}

.icon {
    transition: transform 0.3s ease;
}

/* ===== LIGHTBOX / MODALS ===== */
#lightbox,
#modal,
#service-modal {
    display: none;
}

#lightbox:not(.hidden),
#modal:not(.hidden),
#service-modal:not(.hidden) {
    display: flex !important;
}

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-36px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(36px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulseSoft {
    0%, 100% { box-shadow: 0 0 0 0 rgba(73, 101, 68, 0.35); }
    50% { box-shadow: 0 0 0 12px rgba(73, 101, 68, 0); }
}

.hero-animate > * {
    animation: fadeUp 0.8s ease both;
}

.hero-animate > *:nth-child(1) { animation-delay: 0.1s; }
.hero-animate > *:nth-child(2) { animation-delay: 0.25s; }
.hero-animate > *:nth-child(3) { animation-delay: 0.4s; }
.hero-animate > *:nth-child(4) { animation-delay: 0.55s; }

.hero-form-animate {
    animation: fadeUp 0.9s ease 0.35s both;
}

.float-soft {
    animation: floatSoft 4s ease-in-out infinite;
}

.btn-pulse {
    animation: pulseSoft 2.4s ease-in-out infinite;
}

.step-num {
    transition: transform 0.35s ease, background-color 0.35s ease;
}

.group:hover .step-num,
.step-card:hover .step-num {
    transform: scale(1.08);
}

/* ===== SERVICE CARDS ===== */
#services-container .service-card,
.service-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#services-container .service-card:hover,
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(45, 62, 47, 0.12);
}

/* ===== TESTIMONIALS CAROUSEL ===== */
.testimonials-viewport {
    width: 100%;
    overflow: hidden;
}

.testimonials-slider {
    display: flex;
    width: 100%;
    will-change: transform;
}

.testimonial-slide {
    flex: 0 0 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.testimonial-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 9999px;
    border: none;
    padding: 0;
    background: #C3C8BE;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, width 0.25s ease;
}

.testimonial-dot.active {
    background: #496544;
    width: 1.5rem;
}

.testimonial-dot:hover {
    background: #7D9B76;
}

/* ===== HEADER ===== */
header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

header.scrolled {
    box-shadow: 0 8px 24px rgba(45, 62, 47, 0.08);
}

/* ===== IMAGE FIXES ===== */
img {
    max-width: 100%;
    height: auto;
}

iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ===== MOBILE ===== */
@media (max-width: 767px) {
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1, h2, h3, h4, p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    form input,
    form select,
    form textarea {
        width: 100%;
        box-sizing: border-box;
    }

    #gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    #gallery-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    #gallery-filters::-webkit-scrollbar {
        display: none;
    }

    #testimonials .relative {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    .marquee-content {
        animation: marquee 15s linear infinite;
    }

    .relative.min-h-\[100dvh\] .relative.z-10 {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .min-h-\[100dvh\] {
        min-height: 100dvh;
        max-width: 100vw;
    }

    .min-h-\[100dvh\] .max-w-\[1420px\] {
        max-width: 100vw;
    }

    .bg-white.p-10 {
        padding: 1.5rem;
    }

    .bg-white.p-10 h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }

    footer .grid {
        grid-template-columns: 1fr;
    }

    .text-h1 {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }

    .text-h2 {
        font-size: 1.5rem !important;
    }

    .hero-form-animate {
        margin-top: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }
}
