/* =============================================================================
   Thirukoil Public Site CSS
   Bootstrap 5 + Custom Components
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Noto+Serif:ital,wght@0,400;0,700;1,400&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Spiritual & Premium Palette */
  --brand:         #b33921;    /* Deep Crimson */
  --brand-dark:    #8b2e1b;
  --brand-light:   #fff1ed;
  --gold:          #c59a2a;    /* Muted Sacred Gold */
  --gold-dark:     #a68122;
  --gold-light:    #fff9e6;
  --accent-saffron:#ff9933;    /* Traditional Saffron */
  
  /* Modern UI Neutrals */
  --text-main:     #1f2937;    /* Slate 800 */
  --text-body:     #4b5563;    /* Slate 600 */
  --text-muted:    #9ca3af;    /* Slate 400 */
  --border:        #e5e7eb;
  --bg-site:       #fcfcfd;
  --white:         #ffffff;
  
  /* Layout & Glassmorphism */
  --container-w:   1200px;
  --radius-lg:     24px;
  --radius-md:     16px;
  --radius-sm:     8px;
  --shadow-card:   0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-hover:  0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -6px rgba(0, 0, 0, 0.08);
  --transition:    cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

/* ─── Base ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.625;
  color: var(--text-body);
  background: var(--bg-site);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

a { color: var(--brand); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

/* ─── Site Header ────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}
.site-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 800; font-size: 1.3rem;
  color: var(--brand) !important;
  text-decoration: none;
}
.brand-icon { font-size: 1.4rem; }
.header-nav {
  display: flex; gap: 1.5rem; align-items: center;
  flex-direction: row;
}
.header-nav a {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text); padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.header-nav a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.mobile-menu-btn {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 0.4rem 0.7rem;
  font-size: 1.2rem; cursor: pointer; color: var(--text);
}

/* ─── Ad Wrappers ────────────────────────────────────────────────────────────── */
.ad-top-wrap { background: var(--white); border-bottom: 1px solid var(--border); padding: 0.5rem 0; text-align: center; }
.ad-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 10px, #e9ecef 10px, #e9ecef 20px);
  border: 1px dashed #ccc; border-radius: 8px;
  color: #999; font-size: 0.78rem; font-weight: 500;
  padding: 0.75rem; margin: 0.5rem 0; min-height: 50px;
}
.ad-unit { margin: 1rem 0; text-align: center; }
.ad-sticky-footer-wrap {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95);
  border-top: 1px solid var(--border);
  padding: 0.3rem;
  text-align: center; z-index: 50;
}

/* ─── Breadcrumb ─────────────────────────────────────────────────────────────── */
.breadcrumb-wrap { background: var(--white); border-bottom: 1px solid var(--border); padding: 0.5rem 0; }
.breadcrumb-list {
  list-style: none; display: flex; flex-wrap: wrap;
  align-items: center; gap: 0.2rem; padding: 0; margin: 0;
  font-size: 0.82rem;
}
.breadcrumb-item a { color: var(--brand); }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-sep { color: var(--text-muted); }

/* ─── Page Hero ──────────────────────────────────────────────────────────────── */
.page-hero { 
  border-radius: var(--radius-lg); 
  overflow: hidden; 
  margin-bottom: 2.5rem; 
  background: var(--white); 
  box-shadow: var(--shadow-card);
  position: relative;
}
.page-hero-img-wrap {
  position: relative;
  height: 400px;
  overflow: hidden;
}
.page-hero-img { 
  width: 100%; height: 100%; object-fit: cover; 
  transition: transform 1s ease;
}
.page-hero:hover .page-hero-img { transform: scale(1.03); }

.page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2.5rem;
}

.deity-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent-saffron); color: #fff;
  border-radius: 50px; font-size: 0.75rem; font-weight: 700;
  padding: 0.35rem 1rem; margin-bottom: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(255,153,51,0.3);
}

.page-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800; color: #fff; margin: 0 0 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-location { 
  color: rgba(255,255,255,0.9); 
  font-size: 1rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.5rem; 
}

.page-hero-body { padding: 1.5rem 2.5rem; background: var(--white); }

/* ─── Section Tabs ────────────────────────────────────────────────────────────── */
.section-tabs {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-top: 1rem;
}
.section-tab {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.875rem; font-weight: 600;
  color: var(--text-body);
  border: 1px solid var(--border);
  background: var(--bg-site);
  transition: var(--transition);
}
.section-tab:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-light); }
.section-tab.active { 
  background: var(--brand); color: #fff; border-color: var(--brand); 
  box-shadow: 0 4px 12px rgba(179,57,33,0.25);
}

/* ─── Info Bar ───────────────────────────────────────────────────────────────── */
.info-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }
.info-chip {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.4rem 0.75rem;
  font-size: 0.83rem; font-weight: 500; color: var(--text);
}
.info-chip i { color: var(--brand); }

/* ─── Prose / Body Content ───────────────────────────────────────────────────── */
.prose {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.125rem; line-height: 1.8;
  color: #374151;
  margin-bottom: 2rem;
}
.prose p { margin-bottom: 1.25rem; }
.prose strong { color: var(--text-main); font-weight: 700; }

/* ─── Section Heading ─────────────────────────────────────────────────────────── */
.section-heading {
  font-size: 1.35rem; font-weight: 700;
  color: var(--text); margin: 1.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand-light);
}
.section-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem;
}
.section-title i { color: var(--brand); }
.info-section { margin-bottom: 1.5rem; }

/* ─── Timings ─────────────────────────────────────────────────────────────────── */
.timings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.75rem; }
.timing-card { background: var(--gold-light); border-radius: var(--radius); padding: 1rem 1.25rem; border: 1px solid rgba(212,160,23,0.2); }
.timing-label { font-size: 0.78rem; color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.timing-value { font-size: 1rem; font-weight: 700; color: var(--text); }
.timings-full { margin-bottom: 1.5rem; }
.timings-card-lg { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.timing-session-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.35rem; }
.timing-session-label i { color: var(--gold); }
.timing-session-time { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.entry-fee-box { background: var(--brand-light); color: var(--brand); border-radius: 8px; padding: 0.75rem 1rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }

/* ─── Pooja ─────────────────────────────────────────────────────────────────── */
.pooja-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.pooja-chip { background: var(--brand-light); color: var(--brand); border-radius: 20px; padding: 0.3rem 0.85rem; font-size: 0.83rem; font-weight: 500; border: 1px solid rgba(192,57,43,0.2); }
.pooja-list { display: flex; flex-direction: column; gap: 0.5rem; }
.pooja-item { display: flex; align-items: center; gap: 0.75rem; background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 0.65rem 1rem; }
.pooja-num { width: 28px; height: 28px; background: var(--brand); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }
.pooja-name { font-weight: 500; }

/* ─── Route ─────────────────────────────────────────────────────────────────── */
.route-grid { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.route-card { display: flex; align-items: center; gap: 1rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.route-icon { width: 40px; height: 40px; background: var(--brand-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--brand); font-size: 1.1rem; flex-shrink: 0; }
.route-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.route-value { font-weight: 600; }
.map-link { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--brand); color: #fff; padding: 0.65rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; margin-top: 0.5rem; }
.map-link:hover { background: var(--brand-dark); color: #fff; }

/* ─── FAQ ───────────────────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item { 
  background: var(--white); 
  border: 1px solid var(--border); 
  border-radius: var(--radius-md); 
  transition: var(--transition);
}
.faq-item:hover { border-color: var(--gold); box-shadow: var(--shadow-card); }
.faq-question { 
  cursor: pointer; padding: 1.25rem 1.5rem; 
  font-weight: 700; font-size: 1rem; 
  list-style: none; display: flex; justify-content: space-between; align-items: center; 
  color: var(--text-main);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { 
  content: '\F64D'; font-family: 'bootstrap-icons';
  font-size: 1rem; color: var(--gold); transition: transform 0.3s ease;
}
details[open] .faq-question::after { transform: rotate(180deg); }
.faq-answer { padding: 0 1.5rem 1.25rem; color: var(--text-body); font-size: 1rem; line-height: 1.7; border-top: 1px solid var(--border); margin-top: 0; padding-top: 1.25rem; }

/* ─── Tags ───────────────────────────────────────────────────────────────────── */
.tag-section { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.5rem 0; }
.tag-link { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 0.25rem 0.75rem; font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.tag-link:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }
.keyword-link { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

/* ─── Read More ─────────────────────────────────────────────────────────────── */
.read-more-link { font-size: 0.85rem; font-weight: 600; color: var(--brand); display: inline-block; margin-top: 0.5rem; }
.read-more-link:hover { color: var(--brand-dark); }

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.sidebar-card-title { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 0.85rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--brand-light); }
.quick-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.quick-facts li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; }
.quick-facts i { color: var(--brand); width: 16px; }

/* ─── Related Content ─────────────────────────────────────────────────────────── */
.related-section { margin: 2.5rem 0; }
.related-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.related-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow var(--transition), transform var(--transition); }
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-link { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; color: var(--text); text-decoration: none; }
.related-icon { font-size: 1.5rem; flex-shrink: 0; }
.related-type { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.related-name { font-size: 0.9rem; font-weight: 600; line-height: 1.3; margin: 0; }
.related-deity { font-size: 0.78rem; color: var(--brand); }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer { background: #111; color: #eee; padding: 3rem 0 1.5rem; margin-top: 3rem; }
.footer-brand { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 0.5rem; }
.footer-desc { color: #999; font-size: 0.88rem; }
.footer-heading { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #ccc; margin-bottom: 0.75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: #999; font-size: 0.88rem; }
.footer-links a:hover { color: #fff; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.footer-tag { background: #222; color: #999; border-radius: 20px; padding: 0.2rem 0.6rem; font-size: 0.78rem; }
.footer-tag:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #222; font-size: 0.82rem; color: #666; flex-wrap: wrap; gap: 0.5rem; }
.footer-bottom a { color: #999; }

/* ─── Listing & Tag pages ─────────────────────────────────────────────────────── */
.hero-banner {
    background: linear-gradient(135deg, #FF9933 0%, #FF5500 100%);
    color: white;
    padding: 20px 0;
    margin-bottom: 15px;
    text-align: center;
}
.listing-hero { background: linear-gradient(135deg, #FF9933 0%, #FF5500 100%); color: white; padding: 3rem 0 2rem; margin-bottom: 2rem; }
.listing-title { font-size: 2rem; font-weight: 800; }
.listing-subtitle { opacity: 0.85; font-size: 1rem; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.content-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition); }
.content-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.content-card-img { width: 100%; height: 180px; object-fit: cover; background: var(--bg); }
.content-card-img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg,var(--brand-light),var(--gold-light)); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.content-card-body { padding: 1rem 1.25rem; }
.content-card-type { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--brand); }
.content-card-title { font-size: 1rem; font-weight: 700; margin: 0.3rem 0 0.5rem; line-height: 1.3; }
.content-card-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .timings-grid { grid-template-columns: 1fr; }
  .timings-card-lg { grid-template-columns: 1fr; }
  .page-hero-img { height: 200px; }
  .section-tabs { gap: 0.3rem; }
  .section-tab { font-size: 0.76rem; padding: 0.3rem 0.7rem; }
  body { padding-bottom: 60px; } /* space for sticky footer ad */
}

/* ─── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333333; border-radius: 12px; }
