/* ==========================================================================
   1. VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand & Theme Colors */
  --color-primary: #1F0954;
  --color-accent: #FF4000;
  --color-whatsapp: #25D366;
  --color-primary-action: #D90065;
  --color-mahasabha-1: #0057D9;
  --color-mahasabha-2: #D4A000;
  --color-mahasabha-3: #6A1B9A;

  /* Neutral & Base Colors */
  --color-bg-light: #ffffff;
  --color-bg-alt: #fdfdfd;
  --color-bg-article: #f9f9f9;
  --color-text-main: #1F0954;
  --color-text-light: #ffffff;
  --color-text-muted: #f0f0f0;

  /* Dimensions & Grid */
  --container-max-width: 1100px;
  --container-width-pct: 92%;

  /* Z-Index Hierarchy */
  --z-slide-bg: 1;
  --z-slide-active: 2;
  --z-static-overlay: 5;
  --z-header: 10;

  /* Animation & Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slide: 0.5s ease-in-out;
  --transition-fade: 0.8s ease-in-out;

  /* Elevation / Shadows */
  --shadow-header: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.3);
  --shadow-social-hover: 0 5px 15px rgba(217, 0, 101, 0.4);
  --shadow-text: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   2. LAYOUT & CONTAINERS
   ========================================================================== */
.main-container {
  width: min(var(--container-max-width), var(--container-width-pct));
  margin: 0 auto;
}

.hero-section-wrapper {
  position: relative;
  width: 100%;
}

.layer-motion-container {
  position: relative;
  width: 100%;
  min-height: 960px;
  overflow: hidden;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
header {
  top: 0;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-header);
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  z-index: var(--z-header);
}

.main-nav a {
  text-decoration: none;
  color: var(--color-primary);
  margin-left: 18px;
}

.main-logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  color: var(--color-primary);
}

/* ==========================================================================
   4. STATIC HERO CONTENT OVERLAY
   ========================================================================== */
.static-overlay-layer {
  position: absolute;
  inset: 0;
  z-index: var(--z-static-overlay);
  pointer-events: none; /* Allows click events to pass through empty space */
}

/* Re-enable pointer events for interactive elements */
.static-overlay-layer a,
.static-overlay-layer button,
.main-hero-content {
  pointer-events: auto;
}

.main-hero {
  position: absolute;
  inset: 0;
  z-index: var(--z-static-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.main-hero-content {
  color: var(--color-text-light);
  text-align: center;
  padding: 20px;
}

.main-badge {
  display: inline-block;
  background: var(--color-bg-light);
  padding: 8px 24px;
  border-radius: 20px;
  color: var(--color-primary);
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 15px;
}

.main-hero h1 {
  font: 800 3rem 'Poppins', sans-serif;
  margin: 10px 0;
  text-shadow: var(--shadow-text);
}

.main-hero h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  margin: 6px 0;
}

.main-hero p {
  font-size: 1.1rem;
  margin-top: 12px;
  color: var(--color-text-muted);
}

/* ==========================================================================
   5. BUTTONS & SOCIAL ICON GROUP
   ========================================================================== */
.main-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.main-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.main-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Button Variants */
.main-primary      { background-color: var(--color-primary-action) !important; color: #ffffff !important; }
.main-secondary    { background-color: var(--color-primary) !important; color: #ffffff !important; }
.main-whatsapp     { background-color: var(--color-whatsapp) !important; color: #ffffff !important; }
.main-action       { background-color: #FF4000 !important; color: #ffffff !important; }
.main-mahasabha-1  { background-color: #0057D9 !important; color: #ffffff !important; }
.main-mahasabha-2  { background-color: #D4A000 !important; color: #ffffff !important; }
.main-mahasabha-3  { background-color: #6A1B9A !important; color: #ffffff !important; }
.main-peopleOpinion  { background-color: #008A4E !important; color: #ffffff !important; }

/* Social Icons */
.social-layer {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Wraps gracefully on smaller screens */
  white-space: normal;  
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-text-light);
  font-size: 18px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-normal);
}

.social-icon-btn:hover {
  background: #D90065;
  transform: translateY(-3px);
  box-shadow: var(--shadow-social-hover);
}

/* ==========================================================================
   6. BACKGROUND SLIDESHOW CORE
   ========================================================================== */
.slide-slider {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition-fade);
  z-index: var(--z-slide-bg);
}

.slide-slider.active {
  opacity: 1;
  z-index: var(--z-slide-active);
}

/* ==========================================================================
   7. ARTICLE SLIDER TRACK
   ========================================================================== */
/* ==========================================================================
   ARTICLE SLIDER FIXES
   ========================================================================== */

/* Outer container clipping the overflowing slides */
.article-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden; /* CRITICAL: Clips slides outside viewport */
  background: #f9f9f9;
  padding: 30px 0;
}

/* Horizontal track moving via inline transform style */
.article-slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth sliding */
  will-change: transform;
}

/* Individual article item */
.article-slide {
  /* CRITICAL: Force every slide to take exact full width of parent */
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 20px;
  
  /* Fade effect for inactive slides */
  opacity: 0.3;
  transition: opacity 0.5s ease-in-out;
}

/* Highlight currently active article */
.article-slide.active {
  opacity: 1;
}
/* ==========================================================================
   8. STATS SECTION
   ========================================================================== */
.main-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 30px 0;
  background: var(--color-bg-alt);
  font-weight: 600;
  color: var(--color-primary);
}

/* ==========================================================================
   9. MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
  .main-hero h1 { 
    font-size: 2rem; 
  }
  
  .main-hero h2 { 
    font-size: 1.1rem; 
  }
  
  .main-nav { 
    flex-direction: column; 
    gap: 12px;
  }

  .main-nav a {
    margin-left: 0;
  }
}