:root{
  --red:#c4161c;
  --maroon:#800000;
  --yellow:#ffff00;
  --dark:#1a1a1a;
  --glass: rgba(255, 255, 255, 0.1);
  --bg:#f5f6f8;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
  margin:0;
  font-family:'Noto Sans Tamil',sans-serif;
  background:var(--bg);
}

/* HERO */
/* .hero {
  min-height:100vh;
  background:
linear-gradient(rgba(0,0,0,0.30), rgba(0,0,0,0.30)),
    url("images/banner.png") center/cover;
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  color:#fff;
} */

.hero {
  min-height: 100vh;
  background:
    linear-gradient(rgba(0,0,0,.30), rgba(0,0,0,.30)),
    url("assets/images/banner.png");
  background-size: cover;
  background-position: center;
}

@media (max-width: 768px) {
  .hero {
    background:
      linear-gradient(rgba(0,0,0,.30), rgba(0,0,0,.30)),
      url("assets/images/banner-mobile.jpg");
    background-size: cover;
    background-position: center top;
  }
}

.hero-box h1 { font-size:3.2rem; }

.tag {
  background:var(--red);
  padding:8px 22px;
  border-radius:25px;
  font-weight:700;
}

/* NAV */
nav {
  background:#fff;
  padding:16px;
  text-align:center;
  position:sticky;
  top:0;
  box-shadow:0 5px 20px rgba(0,0,0,.12);
}

nav a {
  margin:0 16px;
  text-decoration:none;
  color:#111;
  font-weight:600;
}

/* SECTIONS */
.section {
  max-width:1100px;
  margin:auto;
  padding:80px 20px;
  text-align:center;
}

.gray { background:#fff; }

.grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:25px;
}

.card {
  background:#fff;
  padding:30px;
  border-radius:20px;
  box-shadow:0 15px 40px rgba(0,0,0,.1);
}

/* LEADER */
.leader {
  display:flex;
  gap:40px;
  align-items:center;
  max-width:1100px;
  margin:auto;
  padding:80px 20px;
}

.leader img {
  width:260px;
  border-radius:20px;
}

/* SLIDER */
.slider {
  position:relative;
  max-width:900px;
  margin:auto;
}

.slide {
  width:100%;
  border-radius:20px;
  display:none;
}

.slide.active {
  display:block;
}

/* GALLERY */
.gallery {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
}

.gallery img {
  width:100%;
  border-radius:16px;
}

  footer {
      margin-top: 32px;
      background: #800000;
      color: #fff;
      text-align: center;
      padding: 16px;
      font-size: 13px;
    }

.back-home-wrap {
  width: 100%;
  text-align: center;
  padding: 25px 0;
  background: #fff;
}

.back-home-btn {
  display: inline-block;
  padding: 18px 55px;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  border-radius: 60px;

  background: linear-gradient(
    135deg,
    #7a0000,
    #c4161c,
    #ff2f2f
  );

  border: 4px solid #ffd700;

  box-shadow:
    0 6px 0 #5c0000,
    0 18px 40px rgba(0,0,0,0.45);

  letter-spacing: 1px;
  transition: all 0.25s ease;
}

/* Hover */
.back-home-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 10px 0 #5c0000,
    0 28px 55px rgba(0,0,0,0.55);
}

/* Click */
.back-home-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 3px 0 #5c0000,
    0 12px 25px rgba(0,0,0,0.4);
}

/* Glassmorphism Navigation */
/* Navigation Container */
.advanced-nav {
    background: rgba(80, 0, 0, 0.98); 
    backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--yellow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0; /* Ensures it starts at the edge */
    z-index: 10000; /* Highest priority */
    height: 70px; /* Explicit height */
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

/* Branding & Flag Aura */
.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.flag-aura {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)); /* Golden Backlight */
}

.nav-flag-vibe {
    width: 45px;
    height: 30px;
    border-radius: 3px;
    animation: advancedWave 3s infinite ease-in-out;
}

/* Flag Waving Animation */
@keyframes advancedWave {
    0%, 100% { transform: rotateY(0deg) skewY(0deg); }
    50% { transform: rotateY(60deg) skewY(8deg) scale(1.5); }
}

.logo-text { display: flex; flex-direction: column; }
.logo-text .district { font-size: 10px; color: white; opacity: 0.8; }
.logo-text .party { font-size: 16px; color: var(--yellow); font-weight: 900; }

/* Desktop Menu */
/* Navigation Menu Container */
.nav-menu { 
    display: flex; 
    list-style: none; 
    gap: 15px; /* Slightly tighter for better mobile fit */
    align-items: center; 
}

/* Base Link Style */
.nav-menu a { 
    position: relative;
    color: white; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 0.95rem; 
    padding: 10px 15px;
    transition: all 0.3s ease-in-out;
}

/* Hover & Active Selection Highlighting */
.nav-menu a:hover,
.nav-menu a.active {
    color: var(--yellow) !important;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.6);
}

/* The Advanced Sliding Underline */
.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 50%;
    background: var(--yellow);
    box-shadow: 0 0 8px var(--yellow);
    transition: all 0.3s ease-in-out;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 70%; /* Line grows from center on selection */
}

/* Advanced Join Button */
.nav-menu .join-btn { 
    background: var(--yellow); 
    color: #800000 !important; 
    padding: 10px 20px; 
    border-radius: 50px; /* Capsule shape */
    font-weight: 900;
    box-shadow: 0 4px 15px rgba(255, 255, 0, 0.3);
    border: 2px solid transparent;
}

.nav-menu .join-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: #fff; /* Changes to white for high-contrast pop */
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

/* Ensure Underline doesn't show for the Button */
.nav-menu .join-btn::after { display: none; }

/* Mobile View Logic */
#nav-check { display: none; }
.nav-toggler { display: none; cursor: pointer; }

@media (max-width: 900px) {
    .nav-toggler { display: flex; flex-direction: column; gap: 5px; }
    .nav-toggler span { width: 25px; height: 3px; background: var(--yellow); }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #500000;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: 0.3s ease-in-out;
    }

    #nav-check:checked ~ .nav-menu {
        max-height: 400px;
        padding: 20px 0;
    }
}

 .slim-header-v2 {
  background: var(--maroon); /* Use your existing maroon variable */
  padding: 100px 20px 20px; /* Top padding accounts for fixed nav */
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle background glow to add "Modern" depth */
.slim-header-v2::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: var(--yellow);
  filter: blur(100px);
  opacity: 0.15;
  transform: translateX(-50%);
}

.slim-header-v2 h1 {
  color: #ffffff;
  font-size: clamp(1.8rem, 8vw, 2.5rem); /* Responsive scaling */
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.accent-bar {
  width: 40px;
  height: 3px;
  background: var(--yellow);
  margin: 12px auto 0;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

/* Success Popup Styling */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-content h3 { color: #c4161c; margin-bottom: 10px; }

.close-popup-btn {
    background: #c4161c;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    margin-top: 20px;
    cursor: pointer;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}