/* ============================================================
   style.css — Ilangudi Ayyanar Temple Website
   Updated: Light Header, Full-width Slider, Tamil Default
   ============================================================ */

:root {
  --saffron:      #FF6B00;
  --saffron-dark: #D45500;
  --saffron-light:#FFF3E0;
  --crimson:      #8B0000;
  --crimson-light:#C0392B;
  --gold:         #C9A84C;
  --gold-light:   #F5DEB3;
  --dark-brown:   #3E1A00;
  --cream:        #FDF6E3;
  --text-dark:    #2C1810;
  --text-muted:   #6B4F3A;
  --white:        #FFFFFF;
  --nav-bg:       #4A1500;
  --footer-bg:    #1A0A00;
  --shadow:       0 4px 20px rgba(139,0,0,0.15);
  --shadow-lg:    0 8px 40px rgba(139,0,0,0.25);
  --radius:       8px;
  --font-ta:      'Tiro Devanagari Tamil', serif;
  --font-en:      'Lato', sans-serif;
  --font-display: 'Cinzel', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-ta);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
}

.tamil-text  { font-family: var(--font-ta); }
.english-text{ font-family: var(--font-en); }

/* ---- Top Bar ---- */
.top-bar {
  background: var(--crimson);
  color: var(--gold-light);
  font-size: 0.82rem;
  padding: 6px 0;
}
.top-bar a { color: var(--gold-light); text-decoration: none; }
.top-bar a:hover { color: var(--white); }
.lang-switch {
  border: 1px solid rgba(201,168,76,0.6);
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-switch.active,
.lang-switch:hover {
  background: var(--gold);
  color: var(--dark-brown) !important;
  border-color: var(--gold);
}

/* ---- Header — LIGHT with texture ---- */
.site-header {
  background-color: #fffdf7 !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M0 0h80v80H0z' fill='none'/%3E%3Cpath d='M40 4L76 40L40 76L4 40z' fill='none' stroke='%23C9A84C' stroke-width='1' stroke-opacity='0.18'/%3E%3Cpath d='M40 16L64 40L40 64L16 40z' fill='none' stroke='%23C9A84C' stroke-width='0.8' stroke-opacity='0.12'/%3E%3Ccircle cx='40' cy='40' r='3' fill='%23C9A84C' fill-opacity='0.10'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #fffdf5 0%, #fff6e8 100%) !important;
  padding: 10px 0 !important;
  border-bottom: 3px solid var(--gold) !important;
  box-shadow: 0 2px 16px rgba(139,0,0,0.10) !important;
}

/* Logo — left aligned in 1/3 column, 500x125px (4:1 ratio) */
.logo-img {
  height: 85px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  display: block !important;
  margin: 0 !important;        /* left aligned — no auto margin */
}

.header-title-block { line-height: 1.4; }

.temple-name-ta {
  font-family: var(--font-ta);
  font-size: 1.4rem;
  color: var(--crimson);
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}
.temple-name-en {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--saffron-dark);
  letter-spacing: 1.5px;
  margin: 4px 0 0;
  text-transform: uppercase;
}
.temple-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.temple-location i { color: var(--saffron); }

/* ---- Navigation — Dark Brown ---- */
.main-nav {
  background: var(--nav-bg);
  box-shadow: 0 3px 15px rgba(0,0,0,0.4);
  z-index: 1000;
}
.main-nav .navbar-nav .nav-link {
  color: var(--gold-light) !important;
  font-family: var(--font-ta);
  font-size: 0.88rem;
  font-weight: 400;
  padding: 12px 13px !important;
  letter-spacing: 0.3px;
  transition: all 0.25s;
  border-bottom: 2px solid transparent;
}
.main-nav .navbar-nav .nav-link:hover,
.main-nav .navbar-nav .nav-link.active {
  color: var(--gold) !important;
  border-bottom-color: var(--gold);
  background: rgba(201,168,76,0.08);
}
.main-nav .dropdown-menu {
  background: var(--dark-brown);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 6px 0;
  min-width: 240px;
}
.main-nav .dropdown-item {
  color: var(--gold-light);
  font-family: var(--font-ta);
  font-size: 0.85rem;
  padding: 9px 18px;
  transition: all 0.2s;
}
.main-nav .dropdown-item:hover {
  background: var(--saffron);
  color: var(--white);
}
.main-nav .navbar-toggler { border-color: var(--gold); }

/* ---- Hero Slider — Full Width, between nav and info bar ---- */
.hero-slider {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.hero-slider .carousel-item {
  height: 500px;
  overflow: hidden;
}
.hero-slider .carousel-item img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: center center;
  filter: brightness(0.60);
  display: block;
}
.hero-slider .carousel-caption {
  bottom: 22%;
  text-align: center;
  padding: 0 40px;
}
.hero-slider .carousel-caption h2 {
  font-family: var(--font-ta);
  font-size: 2.2rem;
  color: #fff;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.9);
  margin-bottom: 8px;
}
.hero-slider .carousel-caption p {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}
.hero-slider .carousel-indicators [data-bs-target] {
  background-color: var(--gold);
  width: 10px; height: 10px;
  border-radius: 50%;
  opacity: 0.7;
}
.hero-slider .carousel-indicators .active { opacity: 1; }

/* ---- Info Bar — One Line, Spacious ---- */
.info-bar {
  background: var(--crimson);
  color: var(--gold-light);
  padding: 0;
  margin: 0;
}
.info-bar .info-row {
  display: flex;
  align-items: stretch;
  min-height: 70px;
}
.info-bar .info-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 10px;
  border-right: 1px solid rgba(201,168,76,0.25);
  transition: background 0.2s;
}
.info-bar .info-item:last-child { border-right: none; }
.info-bar .info-item:hover { background: rgba(201,168,76,0.08); }
.info-bar .info-item i {
  font-size: 1.6rem;
  color: var(--gold);
  flex-shrink: 0;
}
.info-bar .info-text { line-height: 1.3; }
.info-bar .info-label {
  display: block;
  font-size: 0.70rem;
  color: rgba(245,222,179,0.7);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-en);
}
.info-bar .info-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-light);
  font-family: var(--font-ta);
  white-space: nowrap;
}

/* ---- Section Title ---- */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--crimson);
  font-weight: 700;
  letter-spacing: 1px;
}
.section-title h2 .ta {
  font-family: var(--font-ta);
  font-size: 1.1rem;
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 4px;
}
.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ---- Cards ---- */
.temple-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(201,168,76,0.2);
}
.temple-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.temple-card .card-header-custom {
  background: linear-gradient(135deg, var(--crimson), var(--saffron));
  color: var(--white);
  padding: 14px 20px;
}
.temple-card .card-body { padding: 20px; }

/* ---- Buttons ---- */
.btn-saffron {
  background: linear-gradient(135deg, var(--saffron), var(--saffron-dark));
  color: var(--white);
  border: none;
  border-radius: 25px;
  padding: 10px 28px;
  font-weight: 600;
  font-family: var(--font-ta);
  transition: all 0.3s;
  box-shadow: 0 3px 12px rgba(255,107,0,0.35);
}
.btn-saffron:hover {
  background: linear-gradient(135deg, var(--saffron-dark), var(--crimson));
  color: var(--white);
  transform: translateY(-2px);
}
.btn-crimson {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-light));
  color: var(--white);
  border: none;
  border-radius: 25px;
  padding: 10px 28px;
  font-weight: 600;
  font-family: var(--font-ta);
  transition: all 0.3s;
}
.btn-crimson:hover {
  background: linear-gradient(135deg, var(--dark-brown), var(--crimson));
  color: var(--white);
  transform: translateY(-2px);
}
.btn-outline-gold {
  border: 2px solid var(--gold);
  color: var(--gold);
  border-radius: 25px;
  padding: 8px 24px;
  font-weight: 600;
  background: transparent;
  font-family: var(--font-ta);
  transition: all 0.3s;
}
.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--dark-brown);
}

/* ---- Welcome Section ---- */
.welcome-section {
  background: linear-gradient(135deg, var(--saffron-light) 0%, var(--cream) 100%);
  padding: 60px 0;
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
}

/* ---- Gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1;
  border: 2px solid rgba(201,168,76,0.3);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(139,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item .gallery-overlay i { color: var(--gold); font-size: 2rem; }

/* ---- Management Cards ---- */
.mgmt-card {
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--saffron);
  transition: transform 0.3s;
}
.mgmt-card:hover { transform: translateY(-4px); }
.mgmt-card img {
  width: 100px; height: 130px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 3px solid var(--gold);
  margin-bottom: 12px;
}
.mgmt-card .mgmt-name {
  font-family: var(--font-ta);
  font-size: 0.9rem;
  color: var(--crimson);
  font-weight: 600;
  line-height: 1.4;
}
.mgmt-card .mgmt-position {
  font-size: 0.75rem;
  color: var(--saffron);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-en);
}
.mgmt-card .mgmt-position-ta {
  font-family: var(--font-ta);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- Tables ---- */
.temple-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.temple-table thead {
  background: linear-gradient(135deg, var(--crimson), var(--saffron));
  color: var(--white);
}
.temple-table thead th {
  padding: 14px 16px;
  font-family: var(--font-ta);
  font-weight: 400;
  font-size: 0.9rem;
}
.temple-table tbody tr { border-bottom: 1px solid rgba(201,168,76,0.2); }
.temple-table tbody tr:hover { background: var(--saffron-light); }
.temple-table tbody td {
  padding: 12px 16px;
  font-family: var(--font-ta);
  font-size: 0.88rem;
  color: var(--text-dark);
}

/* ---- Contact Form ---- */
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  border-top: 5px solid var(--saffron);
}
.contact-form-wrap .form-label {
  font-family: var(--font-ta);
  font-size: 0.88rem;
  color: var(--crimson);
  font-weight: 600;
}
.contact-form-wrap .form-control {
  border: 2px solid rgba(201,168,76,0.4);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-ta);
  font-size: 0.9rem;
  transition: border-color 0.3s;
}
.contact-form-wrap .form-control:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.15);
}

/* ---- Page Banner ---- */
.page-banner {
  background: linear-gradient(135deg, var(--dark-brown), var(--crimson));
  padding: 50px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '🕉';
  position: absolute;
  font-size: 15rem;
  opacity: 0.04;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.page-banner h1 {
  font-family: var(--font-ta);
  color: var(--gold-light);
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}
.page-banner .breadcrumb { background: transparent; justify-content: center; }
.page-banner .breadcrumb-item a { color: var(--gold); text-decoration: none; }
.page-banner .breadcrumb-item.active { color: var(--gold-light); }
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: var(--gold); }

/* ---- Map ---- */
.map-box {
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: var(--shadow);
}

/* ---- Footer ---- */
.site-footer { background: var(--footer-bg); color: rgba(245,222,179,0.8); }
.footer-top { padding: 50px 0 30px; }
.footer-bottom {
  background: rgba(0,0,0,0.4);
  padding: 14px 0;
  font-size: 0.82rem;
  color: rgba(245,222,179,0.6);
  border-top: 1px solid rgba(201,168,76,0.2);
}
.footer-logo {
  width: 240px;          /* the logo is a wide 4:1 banner — 100px made it unreadable */
  max-width: 100%;
  height: auto;
  opacity: 1;
  filter: brightness(0) invert(1) opacity(0.85);
}
.footer-heading {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201,168,76,0.3);
}
.footer-text { font-size: 0.88rem; line-height: 1.8; font-family: var(--font-ta); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: rgba(245,222,179,0.75);
  text-decoration: none;
  font-size: 0.88rem;
  font-family: var(--font-ta);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }
.footer-contact { list-style: none; padding: 0; }
.footer-contact li {
  display: flex; gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-family: var(--font-ta);
}
.footer-contact i { color: var(--gold); margin-top: 3px; flex-shrink: 0; }
.footer-contact a { color: rgba(245,222,179,0.75); text-decoration: none; }
.footer-contact a:hover { color: var(--gold); }

/* ---- Divider ---- */
.divider-ornament {
  text-align: center;
  margin: 30px 0;
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 12px;
}

/* ---- Alerts ---- */
.alert-success { background: #d4edda; border-color: #c3e6cb; color: #155724; }
.alert-danger  { background: #f8d7da; border-color: #f5c6cb; color: #721c24; }

/* ---- Language switcher hide/show ---- */
.lang-en { display: none; }
.lang-ta { display: inline; }
body.lang-english .lang-en { display: inline; }
body.lang-english .lang-ta { display: none; }
body.lang-english { font-family: var(--font-en); }

/* ---- Responsive ---- */
@media (max-width: 992px) {
  .info-bar .info-value { white-space: normal; font-size: 0.8rem; }
  .info-bar .info-item { padding: 10px 6px; gap: 8px; }
  .info-bar .info-item i { font-size: 1.3rem; }
}
@media (max-width: 768px) {
  .hero-slider .carousel-item,
  .hero-slider .carousel-item img { height: 260px; }
  .hero-slider .carousel-caption h2 { font-size: 1.2rem; }
  .hero-slider .carousel-caption p { display: none; }
  .temple-name-ta { font-size: 0.95rem; }
  .info-bar .info-row { flex-wrap: wrap; }
  .info-bar .info-item { flex: 0 0 50%; border-bottom: 1px solid rgba(201,168,76,0.2); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-form-wrap { padding: 24px; }
}

/* ---- Admin-managed content (pages edited in the admin panel) ---- */
div.lang-ta { display: block; }
body.lang-english div.lang-en { display: block; }
body.lang-english div.lang-ta { display: none; }
.cms-content { font-size: 1rem; line-height: 2; color: var(--text-dark); }
.cms-content p { margin-bottom: 1rem; }
.cms-content ul, .cms-content ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.cms-content li { margin-bottom: .55rem; }
.cms-content h2, .cms-content h3, .cms-content h4 { color: var(--crimson); font-family: var(--font-display); margin: 1.4rem 0 .8rem; font-size: 1.25rem; }
.cms-content img { max-width: 100%; height: auto; border-radius: 8px; border: 3px solid var(--gold); margin: .5rem 0; }
.cms-content table, .cms-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.cms-content td, .cms-content th, .cms-table td, .cms-table th { border: 1px solid #e6d3a8; padding: .55rem .75rem; vertical-align: top; }
.cms-content th, .cms-table th { background: var(--saffron-light); color: var(--crimson); }
.cms-content a { color: var(--crimson); font-weight: 600; }
.data-table thead th { background: var(--saffron-light); color: var(--crimson); white-space: nowrap; }
.album-card { display: block; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 6px 18px rgba(74,21,0,.12); text-decoration: none; transition: transform .2s; }
.album-card:hover { transform: translateY(-4px); }
.album-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.album-card .ac-body { padding: 12px 14px; }
.album-card .ac-title { color: var(--crimson); font-weight: 700; }
.album-card .ac-meta { color: var(--text-muted); font-size: .82rem; }
.res-card { background: #fff; border-radius: 12px; box-shadow: 0 6px 18px rgba(74,21,0,.10); overflow: hidden; height: 100%; }
.res-card video, .res-card iframe { width: 100%; aspect-ratio: 16/9; display: block; border: 0; background: #000; }
.res-card .rc-body { padding: 12px 16px; }

/* ---- Scrolling announcement ticker (Admin → Scrolling Messages) ---- */
.ia-ticker { display: flex; align-items: stretch; height: 38px; background: linear-gradient(90deg, #fff8ec, #fdebd0); border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); overflow: hidden; }
.ia-ticker-label { flex: none; display: flex; align-items: center; padding: 0 14px; background: linear-gradient(135deg, var(--crimson), #b3261e); color: #fff; font-weight: 700; font-size: .85rem; white-space: nowrap; z-index: 2; box-shadow: 4px 0 8px rgba(0,0,0,.12); }
.ia-ticker-track { flex: 1; overflow: hidden; position: relative; }
.ia-ticker-run { display: inline-block; white-space: nowrap; padding-left: 100%; line-height: 38px; font-size: .95rem; font-weight: 600; color: var(--crimson); animation: ia-ticker linear infinite; will-change: transform; }
.ia-ticker-run a { color: var(--crimson); text-decoration: underline; text-underline-offset: 3px; }
.ia-ticker-run a:hover { color: var(--saffron); }
.ia-ticker-sep { margin: 0 22px; color: var(--saffron); }
.ia-ticker:hover .ia-ticker-run { animation-play-state: paused; }
@keyframes ia-ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ia-ticker-run { animation-duration: 120s !important; } }
@media (max-width: 576px) { .ia-ticker-label { padding: 0 10px; font-size: .78rem; } .ia-ticker-run { font-size: .88rem; } }

/* ---- Footer visitor counter (split-flap digits) ---- */
.ia-visitors .vc-label { color: var(--gold); font-size: .85rem; font-weight: 600; margin-bottom: 6px; letter-spacing: .3px; }
.vc-digits { display: inline-flex; gap: 5px; }
.vc-digit { position: relative; display: inline-block; min-width: 1.55em; text-align: center; background: #f5ecd9; border-radius: 5px; padding: 5px 4px; box-shadow: 0 3px 5px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.6); perspective: 220px; overflow: hidden; }
.vc-digit::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: rgba(0,0,0,.18); pointer-events: none; }
.vc-digit-face { display: inline-block; color: var(--crimson); font-weight: 800; font-size: 1.25rem; line-height: 1.45; font-family: 'Lato', sans-serif; transition: transform .09s ease-in; transform-style: preserve-3d; }
.vc-digit-face.flip { transform: rotateX(80deg); }
