/* Site-specific CSS variables - generated per site */
:root {
    --primary: #f8fafc;
    --primary-dark: #00000c;
    --secondary: #0f172a;
    --accent: #b5935b;
    --dark: #111827;
    --light: #f8fafc;
}

/* Animations */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* Section spacing consistency */
.section-padding { padding: 5rem 0; }
@media (max-width: 768px) { .section-padding { padding: 3rem 0; } }

/* ========== CONTRAST & READABILITY FIXES ========== */

/* Sticky header: always has solid background for contrast */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Hero sections: dark overlay for text readability on background images */
[data-gjs-type="hero"],
section[class*="hero"],
.hero-section {
    position: relative;
}

/* Auto-overlay on hero sections with background images */
[data-gjs-type="hero"][style*="background-image"]::before,
section[class*="hero"][style*="background-image"]::before,
[data-gjs-type="hero"] .bg-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.45) 0%,
        rgba(0,0,0,0.35) 50%,
        rgba(0,0,0,0.5) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Ensure hero content sits above overlay (target only content containers, not decorative orbs) */
[data-gjs-type="hero"] > [data-animate],
[data-gjs-type="hero"] > .relative:not(.absolute),
[data-gjs-type="hero"] > section,
section[class*="hero"] > [data-animate],
section[class*="hero"] > .relative:not(.absolute) {
    position: relative;
    z-index: 2;
}

/* Text shadow for hero headings - extra readability */
[data-gjs-type="hero"] h1,
[data-gjs-type="hero"] h2,
[data-gjs-type="hero"] p,
section[class*="hero"] h1,
section[class*="hero"] h2,
section[class*="hero"] p {
    text-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
}

/* CAPTCHA styles */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.captcha-row label {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}
.captcha-row input {
    width: 80px;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}
.captcha-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    display: none;
}

/* ========== ACCORDION (details/summary) FIXES ========== */
/* Remove transitions that interfere with native toggle */
details, summary, details > * {
    transition-property: none !important;
}
summary {
    cursor: pointer;
    list-style: none;
    -webkit-appearance: none;
}
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }
/* Ensure content is visible when open */
details[open] > *:not(summary) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ========== HERO MOBILE RESPONSIVE FIX ========== */
@media (max-width: 1023px) {
    [data-gjs-type="hero"] .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    [data-gjs-type="hero"] .grid > div:first-child {
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    [data-gjs-type="hero"] h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    [data-gjs-type="hero"] p {
        max-width: 100% !important;
    }
    [data-gjs-type="hero"] .flex-wrap,
    [data-gjs-type="hero"] .flex {
        justify-content: center;
    }
}
@media (max-width: 640px) {
    [data-gjs-type="hero"] h1 {
        font-size: 1.75rem !important;
    }
}
