/* ============================================
   JANGID SAMAJ TEMPLE — Design System v7
   Theme: Flat Saffron — No Gradients
   ============================================ */

:root {
  /* --- Core Colors --- */
  --saffron:        #FF9933;
  --saffron-dark:   #CC7000;
  --saffron-hover:  #E68000;
  --saffron-dim:    rgba(255, 153, 51, 0.10);
  --saffron-glow:   rgba(255, 153, 51, 0.28);
  --white:          #FFFFFF;
  --black:          #111111;
  --bg:             #FFFAF4;
  --bg-card:        #FFFFFF;
  --border:         #EEE0C8;
  --text:           #1A0F00;
  --text-muted:     #9A7B52;
  --divider:        #EEE0C8;

  /* --- Shadows --- */
  --shadow-xs:      0 1px 4px rgba(0,0,0,0.06);
  --shadow-sm:      0 3px 12px rgba(0,0,0,0.08);
  --shadow-md:      0 8px 30px rgba(0,0,0,0.10);
  --shadow-lg:      0 20px 60px rgba(0,0,0,0.13);
  --shadow-saffron: 0 6px 22px rgba(255,153,51,0.32);

  /* --- Shape & Motion --- */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-pill: 100px;
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --t:      0.22s;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
}

.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================
   HEADER
   ============================================ */
.top-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--saffron);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-xs);
}

.header-flex {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 20px;
  padding: 14px 0;
  flex-wrap: wrap;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 1.5rem;
  line-height: 1;
}

/* Header Logo Text refinement */
.logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  font-style: italic;
  color: var(--saffron);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

/* Contact — two labelled blocks with divider */
.contact-info {
  display: flex;
  align-items: center;
}

.contact-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 0 20px;
}

.contact-label {
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-value {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text);
}

.contact-divider {
  width: 1px;
  height: 34px;
  background: var(--border);
  flex-shrink: 0;
}

/* ============================================
   ANNOUNCEMENT TICKER
   ============================================ */
.ticker-box {
  background: var(--saffron);
  padding: 9px 0;
  overflow: hidden;
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-item {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-ticker 55s linear infinite;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

@keyframes scroll-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ============================================
   MAIN WRAPPER
   ============================================ */
main.container {
  padding-top: 0;
  padding-bottom: 80px;
}

/* ============================================
   EVENT BANNER / CAROUSEL
   ============================================ */
.promo-strip {
  position: relative;
  width: 100%;
  height: 155px;
  overflow: hidden;
  border-radius: var(--r-lg);
  margin: 24px 0;
  background: #1A1A1A;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border);
}

.promo-slider {
  display: flex;
  height: 100%;
  transition: transform 0.75s var(--ease);
}

.promo-slide-img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   3-COLUMN LAYOUT
   ============================================ */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 2.5fr 1fr; /* Dominant center, narrower side panels */
  gap: 28px; /* Consistent gap between columns */
  margin-top: 32px;
  align-items: stretch; /* Force grid children to allow stretching */
}

/* ============================================
   CENTER COLUMN — Sponsorships (New Style)
   ============================================ */
.center-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.center-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.9rem; /* Match prominence */
  font-weight: 900;
  color: var(--black);
  text-align: left;
  letter-spacing: -0.03em;
  margin: 0 0 0 4px;
  text-transform: uppercase; /* Premium feel */
}

.sponsor-slider-container {
  position: relative;
  overflow: hidden;
  height: 520px; /* Dominant hero height perfectly matching 5-card menus */
  background: transparent;
  border-radius: 16px; /* Unified radius across all blocks */
  border: none;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08); /* Soft shadow depth */
}

/* Gradient overlay removed for transparency */
.sponsor-slider-container::after {
  display: none;
}

.sponsor-slider {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 0;
}

.sponsor-slide-img {
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
  object-fit: cover; /* Fill the entire area */
  display: block;
  padding: 0 2px; /* Very slight gap between sponsors */
  box-sizing: border-box;
}

/* ============================================
   SIDE MENUS — Card Style (Premium)
   ============================================ */
.side-menu {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Unified top-down loading */
  gap: 20px; /* Precise fixed gap ensures exact same spacing on both sides */
  height: 520px; /* Perfectly matches normalized slider */
  min-width: 0;
}

.side-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0 4px; /* Rely entirely on flex gap for spacing if stacked */
  text-align: left;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.1;
}

.btn-ornamental {
  background: #FFFFFF; /* Pure White */
  border-radius: 16px; /* Unified radius */
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  border: none; /* Remove subtle borders in favor of shadows */
  box-shadow: 0 4px 12px rgba(0,0,0,0.04); /* Very subtle shadow */
  width: 100%;
  height: 80px; /* Precise height for mathematical rhythm */
  cursor: pointer;
  box-sizing: border-box;
}

.btn-ornamental:hover {
  transform: translateY(-4px); /* Larger lift on hover */
  background: #FFFFFF;
  box-shadow: 0 12px 24px rgba(0,0,0,0.08); /* Enhance shadow on lift */
}

/* Slightly scale icon on hover */
.btn-ornamental:hover .btn-icon-circle {
  transform: scale(1.1);
}

.btn-icon-circle {
  width: 48px; /* Slightly smaller icon circle for cleanliness */
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron), #E67A00); /* Richer gradient tone */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(230, 122, 0, 0.3); /* Softer, richer shadow */
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); /* Enable scaling */
}

.material-symbols-sharp {
  font-variation-settings:
    'FILL' 0,
    'wght' 300,
    'GRAD' 0,
    'opsz' 24;
  font-size: 24px;
  user-select: none;
}

.btn-text-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.btn-title {
  font-weight: 600; /* Reduced from 800 */
  font-size: 0.92rem; /* Reduced from 1.1rem */
  color: #1A1A1A;
  line-height: 1.2;
}

.btn-subtitle {
  font-weight: 600; /* Reduced from 800 */
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A0A0A0;
}

/* --- Admin Footer Block (Right Side only) --- */
.admin-footer-block {
  background: #E0D9D1; /* Luxury Tan/Beige */
  border-radius: 28px;
  padding: 30px 24px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  border: 1px solid #D1C8BD;
}

.admin-lock-icon {
  font-size: 2.8rem;
  color: #5D3A1A;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.admin-warning-text {
  font-size: 0.85rem;
  font-style: italic;
  color: #4A3321;
  opacity: 0.85;
  line-height: 1.5;
  font-weight: 600;
  max-width: 200px;
}

.admin-login-btn {
  border: 2px solid #5D3A1A;
  border-radius: 30px;
  padding: 12px 36px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #5D3A1A;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  background: transparent;
}

.admin-login-btn:hover {
  background: #5D3A1A;
  color: white;
  transform: translateY(-2px);
}

/* ============================================
   SLIDER NAV ARROWS
   ============================================ */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.92);
  border: 1.5px solid rgba(255,153,51,0.4);
  color: var(--saffron-dark);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.82rem;
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  backdrop-filter: blur(4px);
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
  line-height: 1;
}

.slider-nav:hover {
  background: var(--saffron);
  color: var(--white);
  border-color: var(--saffron);
  transform: translateY(-50%) scale(1.12);
}

.sponsor-slider-container .slider-nav.prev { left: 12px; }
.sponsor-slider-container .slider-nav.next { right: 12px; }
.promo-strip .slider-nav { width: 28px; height: 28px; font-size: 0.72rem; }
.promo-strip .slider-nav.prev { left: 12px; }
.promo-strip .slider-nav.next { right: 12px; }

/* ============================================
   EMPTY STATE
   ============================================ */
.no-data-msg {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 8, 0, 0.58);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--bg-card);
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  border-radius: var(--r-xl);
  padding: 36px;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--border);
  border-top: 3px solid var(--saffron);
}

.close-modal {
  position: absolute;
  top: 18px; right: 22px;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--t);
  line-height: 1;
}
.close-modal:hover { color: var(--saffron); }

/* ============================================
   DATA TABLES
   ============================================ */
.table-responsive {
  overflow-x: auto;
  margin-top: 20px;
  border-radius: var(--r-sm);
  border: 1px solid var(--divider);
}

.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--divider);
  white-space: nowrap;
}

.data-table th {
  background: var(--saffron-dim);
  color: var(--saffron-dark);
  font-weight: 800;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--saffron-dim); }

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 52px 20px;
  margin-top: 64px;
  border-top: 3px solid var(--saffron);
}

footer h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--saffron);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
footer p { color: rgba(255,255,255,0.45); font-size: 0.85rem; }
footer div { margin-top: 14px; font-size: 0.73rem; color: rgba(255,255,255,0.25); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .container { padding: 0 20px; }
  .main-layout { grid-template-columns: 230px 1fr 230px; gap: 18px; }
}

@media (min-width: 1025px) {
  /* Desktop Layout: True 2-Row Separation */
  .column-wrapper {
    display: contents; /* Flattens wrapper so children are direct grid items */
  }
  
  /* Map extracted children directly back to their intended column tracks */
  .column-wrapper:nth-child(1) > * { grid-column: 1; }
  .column-wrapper:nth-child(2) > * { grid-column: 2; }
  .column-wrapper:nth-child(3) > * { grid-column: 3; }
  
  /* Map row 1 */
  .col-title {
    grid-row: 1;
    align-self: end; /* Ensure titles all rest perfectly on the exact same bottom line */
    margin-bottom: 24px; /* Clean exact gap between titles and the content row */
  }
  
  /* Map row 2 */
  .col-content {
    grid-row: 2;
    align-self: start;
  }
}

@media (max-width: 1024px) {
  .main-layout { display: flex; flex-direction: column; gap: 32px; }
  .column-wrapper { display: flex; flex-direction: column; gap: 16px; }
  .side-menu { flex-direction: row; flex-wrap: wrap; gap: 10px; margin-top: 0; height: auto; }
  .col-title { width: 100%; margin: 0; }
  #about-trust-menu .btn-ornamental { flex: 1 1 170px; }
  .side-menu:not(#about-trust-menu) .btn-ornamental { flex: 1 1 148px; }
  
  /* Order: Center Sponsorships -> Right Quick Links -> Left Trust Menu */
  .column-wrapper:nth-child(2) { order: 1; }
  .column-wrapper:nth-child(3) { order: 2; border-bottom: 2px solid var(--divider); padding-bottom: 24px; }
  .column-wrapper:nth-child(1) { order: 3; padding-top: 24px; }
  
  .sponsor-slider-container { height: 280px; }
}

@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .header-flex { flex-direction: column; align-items: flex-start; gap: 8px; }
  .logo-text { font-size: 1.15rem; }
  .contact-info { width: 100%; justify-content: flex-start; }
  .contact-block { align-items: flex-start; }
  #about-trust-menu .btn-ornamental,
  .side-menu:not(#about-trust-menu) .btn-ornamental { flex: 1 1 100%; }
  .promo-strip { height: 110px; margin: 16px 0; }
  .sponsor-slider-container { height: 210px; }
  .modal-content { padding: 20px 16px; }
  .btn-ornamental.admin-btn { flex: 1 1 100% !important; }
}

/* Language Toggle Styles */
.lang-toggle-wrap {
  position: absolute; /* Changed from fixed to stay inside header */
  top: 15px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px;
  border-radius: 30px;
  display: flex;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  backdrop-filter: blur(8px);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lang-btn.active {
  background: var(--saffron);
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 153, 51, 0.3);
}

.lang-btn:hover:not(.active) {
  background: rgba(0,0,0,0.05);
}

/* Mobile Responsive Header & Toggle */
@media (max-width: 768px) {
  .top-header {
    display: flex;
    flex-direction: column;
    padding-top: 10px;
  }
  
  .lang-toggle-wrap {
    position: static; /* Stack naturally on mobile */
    margin: 5px auto 10px auto;
    width: fit-content;
    order: -1; /* Place above the logo */
    box-shadow: none;
    background: rgba(0,0,0,0.03);
  }

  .header-flex {
    padding: 10px 0;
  }

  .logo img {
    max-height: 60px !important; /* Scale down logo on mobile */
  }
}
