/* Styles specific to index.html's 20 homepage sections only.
   Shared base/nav/footer/button/form/card styles live in style.css.
   Loaded AFTER style.css so these extend (not override) the shared system. */

    .nav-emergency {
      background: var(--federation-red) !important;
      color: white !important;
      border-radius: 6px;
      padding: 0.4rem 1rem !important;
      font-weight: 700 !important;
      animation: emergencyPulse 2s ease-in-out infinite;
    }

    @keyframes emergencyPulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(211,47,47,0.6); }
      50% { box-shadow: 0 0 0 8px rgba(211,47,47,0); }
    }

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

    /* =========================================
       HERO SECTION
    ========================================= */
    #hero {
      background: var(--coal-black);
      min-height: 100vh;
      position: relative;
      display: flex;
      align-items: center;
      overflow: hidden;
    }

    .hero-bg-pattern {
      position: absolute; inset: 0;
      background-image:
        radial-gradient(circle at 20% 50%, rgba(255,214,0,0.07) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(211,47,47,0.06) 0%, transparent 50%),
        repeating-linear-gradient(
          45deg,
          transparent,
          transparent 30px,
          rgba(255,214,0,0.015) 30px,
          rgba(255,214,0,0.015) 31px
        );
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(255,214,0,0.12);
      border: 1px solid rgba(255,214,0,0.3);
      color: var(--auto-yellow);
      border-radius: 50px;
      padding: 6px 16px;
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      margin-bottom: 1.5rem;
    }

    .hero-badge .dot {
      width: 7px; height: 7px;
      background: var(--auto-yellow);
      border-radius: 50%;
      animation: blink 1.5s ease-in-out infinite;
    }

    @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }

    .hero-title {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: clamp(2.4rem, 5vw, 4rem);
      color: var(--white);
      line-height: 1.1;
      margin-bottom: 1rem;
    }

    .hero-title .accent { color: var(--auto-yellow); }

    .hero-title .red-accent { color: var(--federation-red); }

    .hero-tamil {
      font-family: var(--font-tamil);
      font-size: clamp(1.1rem, 2.5vw, 1.5rem);
      color: rgba(255,255,255,0.65);
      margin-bottom: 1.5rem;
      font-weight: 400;
    }

    .hero-desc {
      color: rgba(255,255,255,0.7);
      font-size: 1rem;
      max-width: 520px;
      margin-bottom: 2.5rem;
      line-height: 1.75;
    }

    .btn-hero-primary {
      background: var(--auto-yellow);
      color: var(--coal-black);
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 1rem;
      padding: 0.75rem 2rem;
      border-radius: 10px;
      border: none;
      letter-spacing: 0.3px;
      transition: var(--transition);
    }

    .btn-hero-primary:hover { background: var(--auto-yellow-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,214,0,0.3); color: var(--coal-black); }

    .btn-hero-outline {
      background: transparent;
      color: white;
      border: 2px solid rgba(255,255,255,0.3);
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 1rem;
      padding: 0.75rem 1.75rem;
      border-radius: 10px;
      transition: var(--transition);
    }

    .btn-hero-outline:hover { border-color: white; color: white; background: rgba(255,255,255,0.08); }

    .btn-emergency-hero {
      background: var(--federation-red);
      color: white;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 1rem;
      padding: 0.75rem 1.75rem;
      border-radius: 10px;
      border: none;
      transition: var(--transition);
    }

    .btn-emergency-hero:hover { background: #B71C1C; transform: translateY(-2px); color: white; }

    /* Stats strip */
    .hero-stats-strip {
      margin-top: 3.5rem;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1px;
      background: rgba(255,255,255,0.1);
      border-radius: 14px;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,0.08);
    }

    .stat-cell {
      background: rgba(255,255,255,0.04);
      padding: 1.25rem 1rem;
      text-align: center;
    }

    .stat-cell .stat-num {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 1.8rem;
      color: var(--auto-yellow);
      line-height: 1;
    }

    .stat-cell .stat-label { font-size: 0.72rem; color: rgba(255,255,255,0.55); margin-top: 4px; letter-spacing: 0.3px; }

    /* Hero right - visual mockup cards */
    .hero-visual { position: relative; }

    .hero-card-stack { position: relative; height: 480px; }

    .hero-card-main {
      position: absolute;
      top: 0; right: 0;
      width: 85%;
      background: var(--dark-card);
      border: 1px solid rgba(255,214,0,0.2);
      border-radius: 20px;
      padding: 2rem;
      box-shadow: var(--shadow-lg);
    }

    .hero-card-mini {
      position: absolute;
      bottom: 20px; left: 0;
      width: 55%;
      background: var(--federation-red);
      border-radius: 14px;
      padding: 1.25rem;
      box-shadow: var(--shadow-md);
    }

    .id-card-preview {
      background: linear-gradient(135deg, #FFD600 0%, #F5A000 100%);
      border-radius: 12px;
      padding: 1.25rem;
      margin-bottom: 1rem;
    }

    .id-card-preview .id-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--coal-black); }

    .id-card-preview .id-meta { font-size: 0.72rem; color: rgba(0,0,0,0.65); }

    .id-photo-placeholder {
      width: 50px; height: 50px;
      background: rgba(0,0,0,0.15);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      color: rgba(0,0,0,0.4);
      font-size: 1.4rem;
    }

    /* =========================================
       ABOUT SECTION
    ========================================= */
    .about-vision-card {
      background: var(--auto-yellow);
      border-radius: var(--radius-lg);
      padding: 2rem;
      height: 100%;
    }

    .about-mission-card {
      background: var(--coal-black);
      color: white;
      border-radius: var(--radius-lg);
      padding: 2rem;
      height: 100%;
    }

    .about-founder-card {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: var(--radius-lg);
      padding: 2rem;
      text-align: center;
    }

    .founder-photo {
      width: 100px; height: 100px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--auto-yellow), var(--federation-red));
      display: flex; align-items: center; justify-content: center;
      font-size: 2.5rem;
      margin: 0 auto 1rem;
      color: white;
    }

    .timeline { position: relative; padding-left: 2rem; }

    .timeline::before {
      content: '';
      position: absolute;
      left: 7px; top: 0; bottom: 0;
      width: 2px;
      background: linear-gradient(to bottom, var(--auto-yellow), var(--federation-red));
    }

    .timeline-item { position: relative; margin-bottom: 1.5rem; }

    .timeline-dot {
      position: absolute;
      left: -1.85rem; top: 4px;
      width: 14px; height: 14px;
      background: var(--auto-yellow);
      border-radius: 50%;
      border: 2px solid var(--bg-body);
    }

    .timeline-year {
      font-family: var(--font-display);
      font-weight: 700;
      color: var(--auto-yellow);
      font-size: 0.9rem;
    }

    .timeline-desc { font-size: 0.88rem; color: var(--text-secondary); margin-top: 2px; }

    /* =========================================
       BENEFITS
    ========================================= */
    .benefit-card {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: var(--radius-md);
      padding: 1.75rem 1.5rem;
      text-align: center;
      transition: var(--transition);
      cursor: default;
    }

    .benefit-card:hover {
      background: var(--coal-black);
      border-color: var(--auto-yellow);
      transform: translateY(-6px);
    }

    .benefit-card:hover .benefit-title,
    .benefit-card:hover .benefit-desc { color: white; }

    .benefit-icon {
      width: 60px; height: 60px;
      background: var(--auto-yellow-light);
      border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.6rem;
      margin: 0 auto 1.2rem;
      transition: var(--transition);
    }

    .benefit-card:hover .benefit-icon { background: var(--auto-yellow); }

    .benefit-title {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 1rem;
      color: var(--text-primary);
      margin-bottom: 0.4rem;
      transition: var(--transition);
    }

    .benefit-desc { font-size: 0.8rem; color: var(--text-muted); transition: var(--transition); }

    /* =========================================
       ORG STRUCTURE
    ========================================= */
    .org-chart-wrap { overflow-x: auto; padding-bottom: 1rem; }

    .org-node {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }

    .org-box {
      background: var(--card-bg);
      border: 2px solid var(--card-border);
      border-radius: 10px;
      padding: 0.6rem 1.2rem;
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 0.85rem;
      color: var(--text-primary);
      white-space: nowrap;
      cursor: pointer;
      transition: var(--transition);
      min-width: 130px;
      text-align: center;
    }

    .org-box.top-level {
      background: var(--auto-yellow);
      color: var(--coal-black);
      border-color: var(--auto-yellow);
      font-size: 0.95rem;
    }

    .org-box.second-level {
      background: var(--coal-black);
      color: white;
      border-color: var(--coal-black);
    }

    .org-box.wing-level { border-color: var(--federation-red); color: var(--federation-red); }

    .org-box:hover { transform: scale(1.05); box-shadow: var(--shadow-sm); }

    .org-connector {
      width: 2px; height: 24px;
      background: var(--border-gray);
      margin: 0 auto;
    }

    .org-row {
      display: flex;
      gap: 12px;
      justify-content: center;
      flex-wrap: wrap;
    }

    .org-h-connector {
      display: flex;
      align-items: flex-start;
      gap: 0;
    }

    /* =========================================
       POSITION APPLICATION
    ========================================= */
    .position-badge {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 20px;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.3px;
    }

    .badge-open { background: #E8F5E9; color: #2E7D32; }

    .badge-filled { background: #FFEBEE; color: #C62828; }

    .badge-pending { background: #FFF8E1; color: #F57F17; }

    [data-theme="dark"] .badge-open { background: #1B3A1D; color: #81C784; }

    [data-theme="dark"] .badge-filled { background: #3A1212; color: #EF9A9A; }

    [data-theme="dark"] .badge-pending { background: #3A2A00; color: #FFD54F; }

    /* =========================================
       DRIVER ID CARD
    ========================================= */
    .id-card {
      width: 340px;
      background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
      border-radius: 18px;
      padding: 1.5rem;
      position: relative;
      overflow: hidden;
      box-shadow: var(--shadow-lg);
      border: 2px solid rgba(255,214,0,0.3);
      margin: 0 auto;
    }

    .id-card::before {
      content: '';
      position: absolute;
      top: -40px; right: -40px;
      width: 160px; height: 160px;
      background: rgba(255,214,0,0.08);
      border-radius: 50%;
    }

    .id-card-header {
      display: flex;
      align-items: center;
      gap: 10px;
      border-bottom: 1px solid rgba(255,214,0,0.2);
      padding-bottom: 1rem;
      margin-bottom: 1rem;
    }

    .id-card-logo {
      width: 40px; height: 40px;
      background: var(--auto-yellow);
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-family: var(--font-display);
      font-weight: 700;
      color: var(--coal-black);
      font-size: 0.9rem;
    }

    .id-card-org { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: var(--auto-yellow); }

    .id-card-sub { font-size: 0.65rem; color: rgba(255,255,255,0.5); }

    .id-card-body { display: flex; gap: 1rem; align-items: flex-start; }

    .id-photo {
      width: 72px; height: 72px;
      background: rgba(255,255,255,0.1);
      border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 2rem;
      color: rgba(255,255,255,0.4);
      flex-shrink: 0;
      border: 2px solid rgba(255,214,0,0.2);
    }

    .id-info .id-driver-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: white; }

    .id-info .id-pos { font-size: 0.75rem; color: var(--auto-yellow); font-weight: 600; margin: 2px 0; }

    .id-info .id-details { font-size: 0.72rem; color: rgba(255,255,255,0.6); line-height: 1.8; }

    .id-card-footer {
      margin-top: 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-top: 1px solid rgba(255,214,0,0.15);
      padding-top: 0.75rem;
    }

    .id-qr {
      width: 60px; height: 60px;
      background: white;
      border-radius: 6px;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.55rem;
      color: #333;
      text-align: center;
      padding: 4px;
    }

    .id-card-num { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--auto-yellow); letter-spacing: 1px; }

    .id-valid { font-size: 0.65rem; color: rgba(255,255,255,0.5); }

    /* =========================================
       FINANCIAL ASSISTANCE
    ========================================= */
    .assistance-card {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: var(--radius-md);
      padding: 1.5rem;
      transition: var(--transition);
    }

    .assistance-card:hover { border-color: var(--auto-yellow); box-shadow: var(--shadow-sm); }

    .assistance-icon {
      width: 52px; height: 52px;
      border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.4rem;
      margin-bottom: 1rem;
    }

    /* =========================================
       EMERGENCY SECTION
    ========================================= */
    .emergency-section { background: var(--federation-red); }

    .emergency-btn {
      width: 120px; height: 120px;
      border-radius: 50%;
      background: white;
      border: 6px solid rgba(255,255,255,0.4);
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      cursor: pointer;
      font-size: 2.4rem;
      color: var(--federation-red);
      transition: var(--transition);
      animation: emergRing 2.5s ease-in-out infinite;
      margin: 0 auto;
    }

    .emergency-btn:hover { transform: scale(1.08); }

    @keyframes emergRing {
      0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
      50% { box-shadow: 0 0 0 20px rgba(255,255,255,0); }
    }

    .emergency-card {
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.2);
      border-radius: var(--radius-md);
      padding: 1.5rem;
      color: white;
      text-align: center;
      transition: var(--transition);
    }

    .emergency-card:hover { background: rgba(255,255,255,0.2); }

    .emergency-card i { font-size: 2rem; margin-bottom: 0.75rem; display: block; }

    .counter-suffix { font-size: 1.6rem; }

    /* Chart container */
    .chart-container { position: relative; height: 260px; }

    /* =========================================
       WHATSAPP DIRECTORY
    ========================================= */
    .wa-district-card {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: var(--radius-sm);
      padding: 1rem 1.25rem;
      display: flex;
      align-items: center;
      gap: 1rem;
      transition: var(--transition);
      cursor: pointer;
    }

    .wa-district-card:hover { border-color: #25D366; box-shadow: 0 4px 16px rgba(37,211,102,0.1); }

    .wa-icon { font-size: 1.4rem; color: #25D366; }

    .wa-info .wa-name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }

    .wa-info .wa-meta { font-size: 0.75rem; color: var(--text-muted); }

    .btn-wa-join {
      background: #25D366;
      color: white;
      border: none;
      border-radius: 6px;
      padding: 4px 12px;
      font-size: 0.78rem;
      font-weight: 600;
      margin-left: auto;
      white-space: nowrap;
      cursor: pointer;
      transition: var(--transition);
    }

    .btn-wa-join:hover { background: #128C7E; }

    /* =========================================
       NEWS
    ========================================= */
    .news-card {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: var(--radius-md);
      overflow: hidden;
      transition: var(--transition);
    }

    .news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

    .news-img {
      height: 180px;
      background: linear-gradient(135deg, var(--coal-black), var(--mid-gray));
      display: flex; align-items: center; justify-content: center;
      font-size: 3rem;
      color: rgba(255,255,255,0.3);
    }

    .news-category-badge {
      display: inline-block;
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      padding: 3px 8px;
      border-radius: 4px;
      background: var(--auto-yellow-light);
      color: var(--coal-black);
      margin-bottom: 0.5rem;
    }

    .news-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--text-primary); line-height: 1.3; }

    .news-date { font-size: 0.75rem; color: var(--text-muted); }

    /* =========================================
       DONATION
    ========================================= */
    .donation-tier {
      border: 2px solid var(--card-border);
      border-radius: var(--radius-md);
      padding: 1.75rem;
      text-align: center;
      transition: var(--transition);
      cursor: pointer;
    }

    .donation-tier:hover, .donation-tier.selected {
      border-color: var(--auto-yellow);
      background: var(--auto-yellow-light);
    }

    .donation-amount {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 2rem;
      color: var(--text-primary);
    }

    .donation-label { font-size: 0.85rem; color: var(--text-muted); }

    /* =========================================
       MEMBERSHIP FORM STEPS
    ========================================= */
    .step-indicator {
      display: flex;
      align-items: center;
      margin-bottom: 2rem;
    }

    .step-dot {
      width: 36px; height: 36px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 0.9rem;
      border: 2px solid var(--border-gray);
      color: var(--text-muted);
      background: var(--card-bg);
      flex-shrink: 0;
    }

    .step-dot.active { background: var(--auto-yellow); border-color: var(--auto-yellow); color: var(--coal-black); }

    .step-dot.done { background: #2E7D32; border-color: #2E7D32; color: white; }

    .step-line { flex: 1; height: 2px; background: var(--border-gray); margin: 0 6px; }

    .step-line.done { background: var(--auto-yellow); }

    /* =========================================
       EV AWARENESS
    ========================================= */
    .ev-news-card {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-left: 4px solid var(--auto-yellow);
      border-radius: var(--radius-sm);
      padding: 1.25rem;
      margin-bottom: 1rem;
      transition: var(--transition);
    }

    .ev-news-card:hover { box-shadow: var(--shadow-sm); border-left-color: var(--federation-red); }

    /* =========================================
       LEGAL SUPPORT
    ========================================= */
    .legal-step {
      display: flex;
      gap: 1rem;
      align-items: flex-start;
      margin-bottom: 1.5rem;
    }

    .legal-step-num {
      width: 36px; height: 36px;
      background: var(--auto-yellow);
      color: var(--coal-black);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-family: var(--font-display);
      font-weight: 700;
      flex-shrink: 0;
    }

    /* =========================================
       MEMBERSHIP VERIFICATION
    ========================================= */
    .verify-box {
      background: var(--coal-black);
      border-radius: var(--radius-xl);
      padding: 3rem 2rem;
      text-align: center;
      color: white;
      position: relative;
      overflow: hidden;
    }

    .verify-box::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at 50% 0%, rgba(255,214,0,0.08), transparent 70%);
    }

    /* =========================================
       VOLUNTEER SECTION
    ========================================= */
    .volunteer-icon-card {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: var(--radius-md);
      padding: 2rem;
      text-align: center;
      transition: var(--transition);
    }

    .volunteer-icon-card:hover { background: var(--auto-yellow); border-color: var(--auto-yellow); }

    .volunteer-icon-card:hover .vol-icon, .volunteer-icon-card:hover .vol-title { color: var(--coal-black); }

    .vol-icon { font-size: 2.5rem; color: var(--auto-yellow); margin-bottom: 1rem; display: block; transition: var(--transition); }

    .vol-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; transition: var(--transition); }

    /* footer{} base styling already defined in style.css */

    /* =========================================
       HOMEPAGE COMPACTION
       This page hosts 18 full sections back-to-back, so spacing and card
       sizing are tightened here (overriding the 80px .section-pad default
       from style.css) to keep the page from feeling excessively long while
       still presenting every section the brief calls for.
    ========================================= */
    #mainContent .section-pad { padding: 52px 0; }
    #mainContent .section-title { font-size: clamp(1.6rem, 3vw, 2.15rem); }
    #mainContent .section-label { margin-bottom: 0.4rem; }
    #mainContent .section-divider { margin: 0.75rem 0 1.1rem; }
    #mainContent p { margin-bottom: 0.75rem; }
    #mainContent .card-modern { padding: 1.1rem !important; }
    #mainContent .benefit-card, #mainContent .assistance-card, #mainContent .emergency-card,
    #mainContent .ev-news-card, #mainContent .donation-tier {
      padding: 1.25rem !important;
    }
    #mainContent .benefit-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
    #mainContent .counter-num { font-size: 2.2rem; }

    /* Responsive tweaks */
    @media (max-width: 768px) {
      .hero-stats-strip { grid-template-columns: repeat(2, 1fr); }
      .hero-card-stack { display: none; }
      #mainContent .section-pad { padding: 40px 0; }
      .footer-bottom { text-align: center; justify-content: center; }
    }

    @media (max-width: 576px) {
      .hero-stats-strip { grid-template-columns: repeat(2, 1fr); }
    }