/* ============================================================
   HEADER.CSS — Big header banner + separate sticky nav
   Supports CSS variables for admin-controlled font sizes
   ============================================================ */

/* CSS VARIABLES — overridden by inline style from admin settings */
:root {
  --header-title-size:   2.2rem;
  --header-en-size:      0.82rem;
  --header-tagline-size: 0.85rem;
  --header-om-size:      0.85rem;
  --header-logo-size:    140px;
  --header-padding:      28px;
  --nav-font-size:       0.9rem;
}

/* ── TOP BAR ── */
.top-bar {
  background: linear-gradient(90deg, #1a0500, #3a0a00, #1a0500);
  color: rgba(255,255,255,0.75);
  padding: 7px 0; font-size: 0.78rem;
  border-bottom: 1px solid rgba(212,175,55,0.2);
  position: relative; z-index: 200;
}
.top-bar .container { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.top-bar-left       { display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
.top-bar-left span  { display:flex; align-items:center; gap:5px; }
.top-bar-left i     { color: #D4AF37; }
.top-bar-left a     { color: rgba(255,255,255,0.75); }
.top-bar-left a:hover { color: #FFD700; }
.top-bar-right      { display:flex; gap:14px; }
.top-bar-right a    { color: rgba(255,255,255,0.6); font-size: 1rem; transition: all 0.25s; }
.top-bar-right a:hover { color: #FFD700; transform: scale(1.2); }

/* ── MAIN HEADER BANNER ── */
#site-header-banner {
  background: linear-gradient(160deg, #2a0600 0%, #5C0A0A 35%, #8B1A1A 60%, #5C0A0A 80%, #1a0500 100%);
  padding: var(--header-padding) 0;
  position: relative; overflow: hidden; z-index: 150;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, transparent, #D4AF37, #FFD700, #D4AF37, transparent) 1;
}
#site-header-banner::before {
  content: ''; position: absolute; top: -40px; left: -60px;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.12) 0%, transparent 70%);
  pointer-events: none;
}
#site-header-banner::after {
  content: ''; position: absolute; bottom: -40px; right: -60px;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.header-glow-left {
  position: absolute; top: 50%; left: 5%; transform: translateY(-50%);
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,53,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.header-glow-right {
  position: absolute; top: 50%; right: 5%; transform: translateY(-50%);
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Brand layout */
.header-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 30px; text-decoration: none; position: relative; z-index: 1;
}

/* ── LOGO ── */
.header-logo-wrap { flex-shrink: 0; position: relative; }

.header-logo-svg {
  width:  var(--header-logo-size);
  height: var(--header-logo-size);
  filter: drop-shadow(0 0 18px rgba(212,175,55,0.5)) drop-shadow(0 0 40px rgba(212,175,55,0.25));
  animation: logoFloat 4s ease-in-out infinite;
}

/* FIXED: object-fit:cover fills the circle completely — no more small image */
.header-logo-img {
  width:  var(--header-logo-size);
  height: var(--header-logo-size);
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid rgba(212,175,55,0.5);
  box-shadow:
    0 0 0 6px rgba(212,175,55,0.12),
    0 0 25px rgba(212,175,55,0.5),
    0 0 55px rgba(212,175,55,0.2);
  animation: logoFloat 4s ease-in-out infinite;
  display: block;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ── TITLE BLOCK ── */
.header-title-block { text-align: center; flex: 1; }

.header-om-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 8px;
}
.header-om-symbol {
  font-size: 1.4rem;
  animation: omPulse 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.6));
}
.header-om-symbol:last-child { animation-delay: 1.25s; }
.header-om-text {
  font-size: var(--header-om-size);
  color: rgba(255,220,100,0.8);
  font-family: 'Noto Sans Tamil', sans-serif;
  letter-spacing: 0.15em;
}
@keyframes omPulse {
  0%,100% { transform: scale(1);    filter: drop-shadow(0 0 8px rgba(255,215,0,0.6)); }
  50%      { transform: scale(1.15); filter: drop-shadow(0 0 16px rgba(255,215,0,0.9)); }
}

/* Main Tamil title */
.header-site-name {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-weight: 900;
  font-size: var(--header-title-size);
  line-height: 1.25;
  background: linear-gradient(135deg, #FFF3A0 0%, #FFD700 40%, #F5A623 70%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

/* English subtitle */
.header-site-name-en {
  font-family: 'Cinzel Decorative', cursive;
  font-size: var(--header-en-size);
  color: rgba(255,220,150,0.75);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  font-weight: 400;
}

/* Tagline */
.header-tagline-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 4px;
}
.header-divider-line {
  flex: 1; max-width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.6));
}
.header-divider-line:last-child {
  background: linear-gradient(90deg, rgba(212,175,55,0.6), transparent);
}
.header-tagline {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: var(--header-tagline-size);
  color: rgba(255,200,100,0.8);
  font-weight: 400; font-style: italic; white-space: nowrap;
}

/* ── STICKY NAV BAR ── */
#main-nav-bar {
  background: linear-gradient(90deg, #3a0800, #5C0A0A, #6B0F0F, #5C0A0A, #3a0800);
  position: sticky; top: 0; z-index: 999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  border-bottom: 2px solid rgba(212,175,55,0.35);
}
.nav-inner { display: flex; align-items: center; gap: 12px; position: relative; }
.nav-brand-mini {
  display: none; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0; padding: 10px 0;
}
.nav-mini-om   { font-size: 1.4rem; color: #FFD700; }
.nav-mini-name {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 0.72rem; font-weight: 700; color: #FFD700;
  max-width: 200px; line-height: 1.2;
}
#main-nav-bar.scrolled .nav-brand-mini { display: flex; }

.nav-menu {
  list-style: none; display: flex; align-items: center;
  gap: 2px; flex: 1; justify-content: center; flex-wrap: wrap;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: flex; align-items: center; gap: 5px; padding: 16px 14px;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: var(--nav-font-size); font-weight: 600;
  color: rgba(255,235,180,0.9); text-decoration: none;
  transition: all 0.25s; white-space: nowrap; position: relative;
}
.nav-menu > li > a::after {
  content: ''; position: absolute; bottom: 0; left: 50%; right: 50%;
  height: 3px; background: linear-gradient(90deg, #FFD700, #D4AF37);
  border-radius: 3px 3px 0 0; transition: all 0.3s;
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a { color: #FFD700; }
.nav-menu > li > a:hover::after,
.nav-menu > li.active > a::after { left: 8px; right: 8px; }
.nav-menu > li > a i { font-size: 0.6rem; transition: transform 0.25s; }
.nav-menu > li:hover > a i { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 4px);
  left: 50%; transform: translateX(-50%) translateY(-8px);
  background: linear-gradient(160deg, #2a0500, #4a0808);
  border: 1px solid rgba(212,175,55,0.3); border-radius: 12px;
  list-style: none; min-width: 220px;
  opacity: 0; visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5); z-index: 100; overflow: hidden;
}
.has-dropdown:hover .dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.dropdown::before {
  content: ''; position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%); width: 12px; height: 12px;
  background: #2a0500;
  border-left: 1px solid rgba(212,175,55,0.3);
  border-top:  1px solid rgba(212,175,55,0.3);
  rotate: 45deg;
}
.dropdown li a {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px;
  font-family: 'Noto Sans Tamil', sans-serif; font-size: 0.85rem;
  color: rgba(255,220,150,0.85); text-decoration: none; transition: all 0.2s;
  border-bottom: 1px solid rgba(212,175,55,0.08);
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: rgba(212,175,55,0.12); color: #FFD700; padding-left: 24px; }
.dropdown li a i { color: rgba(212,175,55,0.6); width: 16px; text-align: center; font-size: 0.8rem; }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-donate {
  background: linear-gradient(135deg, #B8860B, #D4AF37, #B8860B);
  background-size: 200% auto; color: #1a0500; border: none; cursor: pointer;
  padding: 9px 18px; border-radius: 25px; font-size: 0.82rem; font-weight: 700;
  font-family: 'Noto Sans Tamil', sans-serif; display: flex; align-items: center;
  gap: 6px; text-decoration: none; transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(212,175,55,0.35); white-space: nowrap;
  animation: shimmerBtn 3s linear infinite;
}
@keyframes shimmerBtn { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }
.btn-donate:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212,175,55,0.5); color: #1a0500; }

#menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(212,175,55,0.2);
  cursor: pointer; padding: 10px; border-radius: 8px; transition: background 0.2s;
}
#menu-toggle:hover { background: rgba(212,175,55,0.15); }
#menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: #FFD700; border-radius: 2px; transition: all 0.3s;
}
#menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
#menu-toggle.open span:nth-child(2) { opacity: 0; }
#menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile nav */
#mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: linear-gradient(160deg, #1a0500, #3a0800, #1a0500);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94); overflow-y: auto;
}
#mobile-nav-overlay.open { transform: translateX(0); }
.mobile-nav-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid rgba(212,175,55,0.2);
  font-family: 'Noto Sans Tamil', sans-serif; font-size: 1rem; color: #FFD700;
}
#mobile-nav-close {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: white; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: all 0.2s;
}
#mobile-nav-close:hover { background: #8B1A1A; }
.mobile-nav-menu { list-style: none; padding: 10px 0; }
.mobile-nav-menu > li > a {
  display: flex; justify-content: space-between; align-items: center;
  color: rgba(255,235,180,0.9); padding: 14px 24px; font-size: 1.05rem;
  font-family: 'Noto Sans Tamil', sans-serif;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-decoration: none; transition: all 0.2s;
}
.mobile-nav-menu > li > a:hover { background: rgba(212,175,55,0.1); color: #FFD700; }
.mobile-nav-menu ul { display: none; background: rgba(0,0,0,0.2); }
.mobile-nav-menu ul.open { display: block; }
.mobile-nav-menu ul li a {
  display: block; color: rgba(255,220,150,0.7);
  padding: 11px 24px 11px 40px; font-size: 0.9rem;
  font-family: 'Noto Sans Tamil', sans-serif;
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.03); transition: all 0.2s;
}
.mobile-nav-menu ul li a:hover { color: #FFD700; padding-left: 48px; }

#scroll-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #B8860B, #D4AF37);
  color: #1a0500; border: none; cursor: pointer; font-size: 1rem;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 5px 18px rgba(212,175,55,0.4); transition: all 0.3s;
}
#scroll-top.visible { display: flex; }
#scroll-top:hover { transform: translateY(-3px) scale(1.1); }

@media (max-width: 1024px) {
  :root { --header-logo-size: 115px; }
  .header-brand { gap: 20px; }
  .nav-menu > li > a { padding: 14px 10px; }
}
@media (max-width: 768px) {
  :root { --header-title-size: 1.4rem; --header-logo-size: 100px; }
  #site-header-banner { padding: 20px 0 16px; }
  .header-brand { flex-direction: column; gap: 14px; text-align: center; }
  .nav-menu { display: none; }
  #menu-toggle { display: flex; }
  .nav-brand-mini { display: flex !important; }
  .btn-donate span { display: none; }
  .btn-donate { padding: 9px 12px; }
}
@media (max-width: 480px) {
  .top-bar-left span:last-child { display: none; }
}
