/* ============================================================
   Sri Sakthi Jothida Nilayam — Custom styles
   Palette: Maroon · Gold · Temple Ivory / Blue
   ============================================================ */

:root {
    --maroon: #871b3c;
    --maroon-dark: #6b1530;
    --maroon-deep: #4f0f24;
    --gold: #c9a227;
    --gold-light: #e6c65c;
    --gold-soft: #f3e2a9;
    --ivory: #fdf7ec;
    --ivory-2: #f6ecd8;
    --temple-blue: #6b1530;
    --temple-blue-light: #7d1a39;
    --ink: #2a1a12;
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
    font-family: 'Poppins', 'Noto Sans Tamil', system-ui, sans-serif;
    color: var(--ink);
    background: var(--ivory);
}
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; }
:lang(ta), .ta-text { font-family: 'Noto Sans Tamil', 'Poppins', sans-serif; }

h1, h2, h3, .heading {
    font-family: 'Playfair Display', 'Noto Serif Tamil', serif;
}

/* ---- Utility colours ---- */
.text-maroon { color: var(--maroon); }
.text-gold   { color: var(--gold); }
.text-temple { color: var(--temple-blue); }
.bg-maroon   { background-color: var(--maroon); }
.bg-maroon-dark { background-color: var(--maroon-dark); }
.bg-gold     { background-color: var(--gold); }
.bg-ivory    { background-color: var(--ivory); }
.bg-ivory-2  { background-color: var(--ivory-2); }
.bg-temple   { background-color: var(--temple-blue); }
.border-gold { border-color: var(--gold); }

/* ---- Decorative divider ---- */
.divider-gold {
    display: flex; align-items: center; justify-content: center; gap: .75rem;
}
.divider-gold::before, .divider-gold::after {
    content: ""; height: 2px; width: 60px;
    background: linear-gradient(90deg, transparent, var(--gold));
}
.divider-gold::after { background: linear-gradient(90deg, var(--gold), transparent); }
.divider-gold span { color: var(--gold); font-size: 1.25rem; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .7rem 1.5rem; border-radius: 9999px; font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    cursor: pointer; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--maroon-deep);
    box-shadow: 0 6px 18px rgba(201,162,39,.35);
}
.btn-gold:hover { box-shadow: 0 10px 26px rgba(201,162,39,.5); }
.btn-maroon { background: var(--maroon); color: #fff; }
.btn-maroon:hover { background: var(--maroon-dark); }
.btn-outline {
    border: 2px solid var(--gold); color: var(--ivory);
}
.btn-outline:hover { background: var(--gold); color: var(--maroon-deep); }

/* ---- Header ---- */
.site-header { transition: box-shadow .25s ease, background .25s ease; }
.nav-link {
    position: relative; font-weight: 600; color: var(--ivory-2);
    padding: .35rem 0; transition: color .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); }
.nav-link::after {
    content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
    background: var(--gold); transition: width .25s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.lang-toggle a {
    padding: .15rem .5rem; border-radius: 6px; font-weight: 600; font-size: .85rem;
}
.lang-toggle a.active { background: var(--gold); color: var(--maroon-deep); }

/* Single language toggle button in header */
.lang-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .4rem 1rem; border-radius: 9999px; font-weight: 700; font-size: .85rem;
    border: 2px solid var(--gold-light); color: var(--gold-light);
    background: rgba(230,198,92,.12);
    transition: background .2s ease, color .2s ease; white-space: nowrap;
}
.lang-btn:hover { background: var(--gold); color: var(--maroon-deep); border-color: var(--gold); }

/* ---- Sliders ---- */
.slider {
    position: relative; width: 100%; overflow: hidden;
    height: clamp(280px, 56vw, 640px); background: var(--maroon-deep);
}
.slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
    background-size: cover; background-position: center;
}
.slide.active { opacity: 1; }
.slide::after { content: none; }   /* no overlay — show the image only */
.slide-caption {
    position: absolute; left: 6%; top: 50%; transform: translateY(-50%);
    z-index: 2; max-width: 640px; padding-right: 1rem;
    color: var(--maroon);
    text-shadow: 0 1px 4px rgba(255,255,255,.85), 0 0 2px rgba(255,255,255,.95);
    overflow-wrap: break-word; word-break: break-word;
}
.slide-caption .eyebrow { color: var(--maroon-dark); }
.slide-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.4rem); font-weight: 600;
    color: var(--maroon-dark); max-width: 34ch; line-height: 1.4;
}
@media (max-width: 640px) {
    .slider { height: clamp(300px, 62vw, 420px); }
    .slide-caption {
        left: 5%; right: 5%; max-width: none; padding-right: 0;
        top: 50%; transform: translateY(-50%);
    }
    .slide-caption h2 { font-size: 1.45rem !important; line-height: 1.2; margin-bottom: .4rem; }
    .slide-caption .eyebrow { font-size: .68rem; margin-bottom: .35rem; }
    .slide-subtitle { font-size: .9rem; max-width: 100%; line-height: 1.3; }
    /* Hide side arrows on phones (dots + auto-rotate handle navigation) */
    .slider-arrow { display: none; }
}
.slider-dots {
    position: absolute; bottom: 18px; left: 0; right: 0; z-index: 3;
    display: flex; gap: 10px; justify-content: center;
}
.slider-dots button {
    width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--gold);
    background: transparent; cursor: pointer; transition: background .2s;
}
.slider-dots button.active { background: var(--gold); }
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    background: rgba(122,28,39,.6); color: var(--gold-light);
    width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gold);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    font-size: 1.4rem; transition: background .2s;
}
.slider-arrow:hover { background: var(--maroon); }
.slider-arrow.prev { left: 16px; } .slider-arrow.next { right: 16px; }

/* ---- Cards ---- */
.card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 8px 24px rgba(62,13,19,.08);
    border: 1px solid rgba(201,162,39,.25);
    transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(62,13,19,.15); }

.award-card {
    background: linear-gradient(180deg, #fff, var(--ivory-2));
    border-left: 5px solid var(--gold);
}

/* ---- Section framing ---- */
.section-pad { padding: clamp(3rem, 7vw, 5.5rem) 1rem; }
.eyebrow {
    letter-spacing: .18em; text-transform: uppercase; font-size: .8rem;
    color: var(--gold); font-weight: 700;
}

/* ---- Gallery ---- */
.gallery-item img { transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.06); }

/* ---- Lightbox ---- */
.lightbox {
    position: fixed; inset: 0; z-index: 100; display: none;
    background: rgba(20,6,9,.92); align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border: 3px solid var(--gold); border-radius: 8px; }
.lightbox .close { position: absolute; top: 20px; right: 26px; color: var(--gold-light); font-size: 2.4rem; cursor: pointer; }

/* ---- Fade-in on scroll ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---- Floating contact buttons ---- */
.floaters { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 12px; }
.floaters a {
    width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: transform .2s;
}
.floaters a:hover { transform: scale(1.1); }
.fl-wa { background: #25D366; }
.fl-call { background: var(--maroon); }

/* Footer social buttons */
.social-btn {
    width: 42px; height: 42px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; color: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.social-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 18px rgba(0,0,0,.35); }

/* ---- Admin ---- */
.admin-shell { min-height: 100vh; background: var(--ivory-2); }
.admin-input {
    width: 100%; padding: .65rem .85rem; border: 1px solid #d8c8a0; border-radius: 10px;
    background: #fff;
}
.admin-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.2); }

/* ---- Header nav: keep Tamil labels on one line ---- */
.site-header nav.ta-text .nav-link {
    white-space: nowrap;
    font-size: 0.95rem;
}

/* Slightly reduce brand block width pressure in Tamil header */
.site-header .ta-text.heading {
    font-size: 1.35rem;
}

@media (min-width: 1024px) and (max-width: 1180px) {
    .site-header nav.ta-text .nav-link {
        font-size: 0.85rem;
    }
    .site-header nav.ta-text {
        gap: 0.85rem !important;
    }
}