/* 
 * index.css - Homepage specific styling
 * Uses main.css for base styles and variables
 * Color accent: Teal/Cyan from logo (#2dd4bf → #0ea5e9)
 *
 * IMPORTANT FIX v2.0:
 * The generic .section animation (opacity:0 / transform) was overriding
 * template sections that use <section> tags directly (e.g. #why-book-with-us).
 * Fixed by:
 *   1. Scoping .section animation ONLY to .container-section children
 *   2. Adding explicit exclusion for any section that opts out via [data-no-fade]
 *   3. Template CSS handles its own opacity via [data-wbu-reveal] / !important guard
 */

/* ── LOADING OVERLAY ── */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(45, 212, 191, 0.15);
    border-top: 3px solid #2dd4bf;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.5);
    margin-top: 20px;
    font-size: 15px;
    font-weight: 400;
    font-family: var(--font-primary, 'Inter', sans-serif);
    letter-spacing: 0.5px;
}

/* ── MAIN CONTENT ── */
#main-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}
#main-content.ready {
    opacity: 1;
}

/* ── SECTION LOADING PLACEHOLDERS ── */
.section-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    flex-direction: column;
}
.section-loading .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}
.section-loading p {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.4);
}

/* ── CONTAINER SECTIONS (template wrappers) ── */
.container-section {
    min-height: 200px;
}

/* ── ERROR MESSAGE ── */
#error-message {
    background-color: #dc3545;
    color: white;
    padding: 15px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: none;
}

/* ── SECTION SCROLL FADE-IN ANIMATION
   SCOPED: only .section divs that are DIRECT children of .container-section
   Template <section> elements manage their own opacity and should NOT be affected.
   ── */
.container-section > .section {
    padding: 70px 0;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.container-section > .section.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/*
 * SAFETY NET: Any native <section> element with a template ID should
 * never be hidden by index.css. These overrides ensure template sections
 * remain visible regardless of class-based animations above.
 */
section[id]:not(.container-section) {
    opacity: 1 !important;
    transform: none !important;
    /* Do NOT override padding — let each template control its own spacing */
}

/* ── WHATSAPP BUTTON ── */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), 0 0 15px rgba(37, 211, 102, 0.5);
}
.whatsapp-btn:active {
    transform: scale(0.95);
}
.whatsapp-btn img {
    height: 60px;
    width: auto;
}

/* ── ACCESSIBILITY ── */
.skip-link {
    position: absolute;
    top: -40px;
    left: 10px;
    background: #2dd4bf;
    color: #0a0a0a;
    padding: 10px 15px;
    border-radius: 5px;
    z-index: 10000;
    transition: top 0.3s ease;
    font-weight: 600;
}
.skip-link:focus {
    top: 10px;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.4);
}

/* ── SMOOTH SCROLLING ── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ── RESPONSIVE ── */
@media (max-width: 991.98px) {
    .container-section > .section { padding: 60px 0; }
    .spinner       { width: 44px; height: 44px; }
    .loading-text  { font-size: 14px; }
    .whatsapp-btn img { height: 55px; }
}
@media (max-width: 767.98px) {
    .container-section > .section { padding: 50px 0; }
    .spinner       { width: 40px; height: 40px; border-width: 3px; }
    .loading-text  { font-size: 13px; }
    .whatsapp-btn  { bottom: 25px; right: 25px; }
    .whatsapp-btn img { height: 50px; }
    .section-loading { min-height: 250px; }
}
@media (max-width: 575.98px) {
    .container-section > .section { padding: 40px 0; }
    .loading-text  { font-size: 12px; }
    .whatsapp-btn  { bottom: 20px; right: 20px; }
    .whatsapp-btn img { height: 45px; }
    .section-loading { min-height: 200px; }
    .section-loading .spinner { width: 35px; height: 35px; }
}