/* ============================================================
   Tamilaga Makkal Kazhagam — Complete Stylesheet
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    --red:        #CC0000;
    --dark-red:   #8B0000;
    --deep-red:   #A00000;
    --gold:       #FFF700;
    --amber:      #FFB800;
    --black:      #1a1a1a;
    --white:      #FFFFFF;
    --gray-100:   #F8F8F8;
    --gray-200:   #EEEEEE;
    --gray-300:   #DDDDDD;
    --gray-400:   #BBBBBB;
    --gray-500:   #999999;
    --gray-600:   #777777;
    --gray-700:   #555555;
    --gray-800:   #333333;
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
    --shadow-md:  0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.15);
    --radius:     12px;
    --font-ta:    'Noto Sans Tamil', sans-serif;
    --font-en:    'Inter', 'Noto Sans Tamil', sans-serif;
    --transition: 0.3s ease;
    --nav-h:      72px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-ta);
    background: #8b0000;
    color: #f0e9e9;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Language Toggle (lang-text ::after approach) ─────────── */
body.lang-ta .lang-text::after { content: attr(data-ta); }
body.lang-en .lang-text::after { content: attr(data-en); }
.lang-text::after { content: attr(data-ta); }

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(26,26,26,0.97);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled { background: rgba(26,26,26,0.99); box-shadow: 0 4px 30px rgba(0,0,0,0.3); }
.navbar > .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-logo-img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.nav-party-name { font-size: 1rem; font-weight: 800; color: var(--white); letter-spacing: 0.3px; line-height: 1.2; }
.nav-center { flex: 1; display: flex; justify-content: center; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
    display: block; padding: 8px 16px; font-size: 0.88rem; font-weight: 600;
    color: rgba(255,255,255,0.7); border-radius: 8px; transition: all var(--transition); white-space: nowrap;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-menu a.active { color: var(--gold); }
.nav-cta {
    background: var(--red) !important; color: var(--white) !important;
    padding: 8px 20px !important; border-radius: 50px !important;
    font-weight: 700 !important; display: inline-flex !important; align-items: center; gap: 6px;
}
.nav-cta:hover { background: var(--deep-red) !important; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(204,0,0,0.4); }
.nav-cta.active { box-shadow: 0 0 0 2px var(--gold); }

.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lang-toggle { position: relative; display: flex; background: rgba(255,255,255,0.08); border-radius: 50px; padding: 3px; overflow: hidden; }
.lang-toggle-slider {
    position: absolute; top: 3px; left: 3px; width: calc(50% - 3px); height: calc(100% - 6px);
    background: var(--red); border-radius: 50px; transition: transform var(--transition); z-index: 0;
}
.lang-toggle-slider.en { transform: translateX(100%); }
.lang-toggle-btn {
    position: relative; z-index: 1; border: none; background: transparent;
    color: rgba(255,255,255,0.6); font-family: var(--font-ta);
    font-size: 0.78rem; font-weight: 700; padding: 6px 14px; cursor: pointer;
    transition: color var(--transition); white-space: nowrap;
}
.lang-toggle-btn.active { color: var(--white); }

.nav-mobile-btn {
    display: none; background: transparent; border: 1px solid rgba(255,255,255,0.15);
    color: var(--white); width: 40px; height: 40px; border-radius: 8px;
    font-size: 1.1rem; cursor: pointer; align-items: center; justify-content: center;
}

/* ── Hero ──────────────────────────────────────────────────── */
.unified-hero {
    padding-top: var(--nav-h);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255,247,0,0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(255,215,0,0.04) 0%, transparent 45%),
        linear-gradient(175deg, #3a0000 0%, #8B0000 30%, #a80000 55%, #8B0000 80%, #2a0000 100%);
}
.unified-hero::after {
    content: '';
    position: absolute;
    top: 55%; left: 12%;
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(255,247,0,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroGlowPulse 5s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}
@keyframes heroGlowPulse {
    0%   { opacity: .4; transform: translate(-50%,-50%) scale(.9); }
    100% { opacity: 1;  transform: translate(-50%,-50%) scale(1.12); }
}
.hero-banner-strip {
    width: 100%; overflow: hidden; line-height: 0;
    max-width: 860px; margin: 30px auto 0;
    padding: 0 20px; position: relative; z-index: 1;
}
.hero-banner-strip img {
    width: 100%; height: auto; object-fit: contain;
    max-height: 140px; border-radius: 14px;
    border: 3px solid var(--gold);
    box-shadow: 0 0 20px rgba(255,247,0,0.2), 0 8px 32px rgba(0,0,0,0.5);
    background: #1a0000;
}
.hero-leader-row {
    display: flex; align-items: center; gap: 48px;
    padding: 50px 0 60px; position: relative; z-index: 1;
}
.leader-circle-frame {
    width: 260px; height: 260px; border-radius: 50%; flex-shrink: 0;
    padding: 6px; position: relative;
    background: conic-gradient(from 0deg, #FFD700, #FFF700, #FFA500, #FFD700, #FFF700, #FFA500, #FFD700);
    box-shadow: 0 0 40px rgba(255,215,0,0.28), 0 0 80px rgba(139,0,0,0.3);
    animation: leaderRingRotate 6s linear infinite;
}
.leader-circle-frame img {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 50%; border: 5px solid #2a0000;
    display: block;
}
.leader-circle-frame::after {
    content: '';
    position: absolute; inset: -14px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,247,0,0.2);
    animation: leaderPulseRing 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes leaderRingRotate {
    to { background: conic-gradient(from 360deg, #FFD700, #FFF700, #FFA500, #FFD700, #FFF700, #FFA500, #FFD700); }
}
@keyframes leaderPulseRing {
    0%,100% { transform: scale(1); opacity: .5; }
    50%     { transform: scale(1.08); opacity: 0; }
}
.hero-leader-info { flex: 1; }
.hero-leader-name {
    font-size: clamp(2rem,5vw,3.2rem); font-weight: 900;
    color: var(--gold); line-height: 1.15; margin-bottom: 8px;
    text-shadow: 0 3px 12px rgba(0,0,0,0.5);
}
.hero-leader-designation {
    font-size: 1rem; font-weight: 700; color: #FFD700;
    margin-bottom: 20px; display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 18px; background: rgba(255,215,0,0.08);
    border: 1px solid rgba(255,215,0,0.2); border-radius: 30px;
    text-transform: uppercase; letter-spacing: 1.5px;
}
.hero-leader-bio {
    font-size: 1rem; color: #f0d9c0; line-height: 1.85; max-width: 540px;
}

/* ── Counter ───────────────────────────────────────────────── */
.counter-section { background: linear-gradient(135deg, var(--gold), var(--amber)); padding: 48px 0; }
.counter-wrap {
    display: flex; align-items: center; gap: 40px;
    background: rgba(0,0,0,0.2); border-radius: var(--radius); padding: 32px 40px;
    border: 1px solid rgba(255,255,255,0.08);
}
.counter-main { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.counter-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--gold); }
.counter-num { font-size: 2.6rem; font-weight: 900; color: var(--white); font-family: var(--font-en); line-height: 1; }
.counter-label { font-size: 0.85rem; color: rgba(255,255,255,0.7); font-weight: 600; margin-top: 4px; }
.counter-sep { width: 1px; height: 60px; background: rgba(255,255,255,0.15); flex-shrink: 0; }
.counter-stats { display: flex; gap: 40px; flex: 1; justify-content: center; }
.counter-stat { text-align: center; }
.counter-stat-val { font-size: 2rem; font-weight: 900; color: var(--white); font-family: var(--font-en); line-height: 1; }
.counter-stat-lbl { font-size: 0.82rem; color: rgba(255,255,255,0.65); font-weight: 600; margin-top: 6px; }

/* ── News Section ─────────────────────────────────────────── */
.news-section {
    padding: 70px 0;
    background: radial-gradient(ellipse at 50% 0%, rgb(234,2,2) 0%, transparent 55%), linear-gradient(180deg, rgba(254,241,0,0.65) 0%, #ff0000 50%, rgba(236,239,55,1) 100%);
}
.section-header { text-align: center; margin-bottom: 40px; }
.section-label {
    display: inline-block; padding: 6px 20px;
    background: rgba(255,247,0,0.1);
    border: 1px solid rgba(255,247,0,0.25);
    color: var(--gold); font-size: 0.82rem; font-weight: 800;
    border-radius: 50px; margin-bottom: 16px; letter-spacing: 0.5px; text-transform: uppercase;
}
.section-title {
    font-size: clamp(1.6rem,4vw,2.4rem); font-weight: 900;
    color: var(--white); margin-bottom: 12px; line-height: 1.2;
}
.section-desc { font-size: 1rem; color: #c8a098; max-width: 640px; margin: 0 auto; line-height: 1.7; }

.news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }

/* ── News Carousel ────────────────────────────────────────── */
.news-carousel {
    position: relative; overflow: hidden;
    padding: 10px 0 20px;
}
.news-carousel::before,
.news-carousel::after {
    content: ''; position: absolute; top: 0; bottom: 0;
    width: 80px; z-index: 2; pointer-events: none;
}
.news-carousel::before { left: 0; background: linear-gradient(90deg, #1a0000, transparent); }
.news-carousel::after  { right: 0; background: linear-gradient(270deg, #1a0000, transparent); }

.news-carousel-track {
    display: flex; gap: 24px;
    width: max-content;
    animation: newsCarouselScroll var(--carousel-dur, 40s) linear infinite;
}
.news-carousel-track:hover { animation-play-state: paused; }
@keyframes newsCarouselScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.news-carousel-card {
    width: 340px; flex-shrink: 0;
    background: linear-gradient(160deg, rgba(60,0,0,0.55), rgba(26,0,0,0.8));
    border: 1px solid rgba(255,247,0,0.1);
    border-radius: var(--radius); overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    position: relative;
}
.news-carousel-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #8B0000, var(--gold), #8B0000);
    z-index: 2;
}
.news-carousel-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,247,0,0.25);
    box-shadow: 0 14px 44px rgba(139,0,0,0.4), 0 0 20px rgba(255,247,0,0.06);
}

.news-carousel-card .news-card-img { height: 200px; position: relative; overflow: hidden; }
.news-carousel-card .news-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    filter: brightness(0.9);
    transition: transform 0.5s ease, filter 0.4s ease;
}
.news-carousel-card:hover .news-card-img img { transform: scale(1.05); filter: brightness(1.05); }

.news-card-date { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.7); color: var(--gold); padding: 4px 12px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; font-family: var(--font-en); backdrop-filter: blur(4px); border: 1px solid rgba(255,247,0,0.15); }
.news-card-tag { position: absolute; top: 12px; right: 12px; background: linear-gradient(135deg, var(--dark-red), var(--red)); color: var(--white); padding: 4px 12px; border-radius: 6px; font-size: 0.72rem; font-weight: 800; }

.news-card-body { padding: 20px; }
.news-card-title { font-size: 1.05rem; font-weight: 800; color: var(--white); margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-snippet { font-size: 0.88rem; color: #c09898; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.btn-read-more {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 12px; font-size: 0.84rem; font-weight: 700;
    color: var(--gold); transition: all var(--transition);
}
.btn-read-more:hover { color: #FFF700; gap: 10px; }
.btn-read-more i { font-size: 0.7rem; transition: transform var(--transition); }
.btn-read-more:hover i { transform: translateX(3px); }

.news-carousel-empty { text-align: center; padding: 50px 20px; color: var(--gray-500); }
.news-carousel-empty i { font-size: 2.5rem; margin-bottom: 12px; display: block; color: var(--gray-400); }

/* Base news card (for news-grid) */
.news-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--gray-200);
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.news-img { position: relative; overflow: hidden; height: 220px; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-card:hover .news-img img { transform: scale(1.05); }
.news-date-badge { position: absolute; top: 12px; left: 12px; background: var(--red); color: var(--white); padding: 4px 12px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; font-family: var(--font-en); }
.news-cat { position: absolute; top: 12px; right: 12px; background: var(--gold); color: var(--black); padding: 4px 12px; border-radius: 6px; font-size: 0.72rem; font-weight: 800; }
.news-body { padding: 20px; }
.news-title { font-size: 1.05rem; font-weight: 800; color: var(--black); margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-excerpt { font-size: 0.88rem; color: var(--gray-600); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-more-wrap { text-align: center; margin-top: 36px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: 50px; font-family: var(--font-ta);
    font-size: 0.92rem; font-weight: 700; cursor: pointer; border: none; transition: all var(--transition);
}
.btn-primary {
    background: linear-gradient(135deg, var(--gold), #FFA500);
    color: #2a0000;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #FFF700, var(--gold));
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255,215,0,0.35);
}
.btn-sm { padding: 10px 22px; font-size: 0.85rem; }

/* ── Ticker ────────────────────────────────────────────────── */
.h-ticker {
    overflow: hidden;
    background: linear-gradient(90deg, #5a0000, var(--dark-red), #a50000, var(--dark-red), #5a0000);
    padding: 24px 0;
    border-top: 2px solid rgba(255,247,0,0.2);
    border-bottom: 2px solid rgba(255,247,0,0.2);
    position: relative;
}
.h-ticker::before,
.h-ticker::after {
    content: ''; position: absolute; top: 0; bottom: 0;
    width: 80px; z-index: 2; pointer-events: none;
}
.h-ticker::before { left: 0; background: linear-gradient(90deg, #5a0000, transparent); }
.h-ticker::after  { right: 0; background: linear-gradient(270deg, #5a0000, transparent); }
.h-ticker-track {
    display: flex; gap: 16px;
    animation: tickerScroll 45s linear infinite;
    width: max-content;
}
.h-ticker-track:hover { animation-play-state: paused; }
@keyframes tickerScroll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.h-ticker-card {
    display: flex; align-items: center; gap: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,247,0,0.15);
    border-radius: 50px; padding: 12px 24px; white-space: nowrap; flex-shrink: 0;
    transition: all var(--transition);
}
.h-ticker-card:hover {
    background: rgba(255,247,0,0.08);
    border-color: rgba(255,247,0,0.35);
    transform: scale(1.03);
}
.h-ticker-num {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #FFA500);
    color: #2a0000; font-family: var(--font-en);
    font-size: 0.78rem; font-weight: 900; flex-shrink: 0;
}
.h-ticker-text { font-size: 0.9rem; font-weight: 600; color: #ffe6cc; }

/* ── Footer ────────────────────────────────────────────────── */
.footer { background: #0d0d0d; color: rgba(255,255,255,0.7); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand-text-title { font-size: 1.3rem; font-weight: 900; color: var(--white); margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.75; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
    color: rgba(255,255,255,0.6); transition: all var(--transition);
}
.footer-social a:hover { background: var(--red); color: var(--white); transform: translateY(-2px); }
.footer-col h4 { font-size: 0.95rem; font-weight: 800; color: var(--white); margin-bottom: 20px; position: relative; padding-bottom: 12px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 30px; height: 3px; background: var(--red); border-radius: 2px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: 0.88rem; color: rgba(255,255,255,0.6); transition: all var(--transition); }
.footer-col ul a:hover { color: var(--gold); padding-left: 6px; }
.footer-contact-item { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.footer-contact-item > i { color: var(--red); margin-top: 4px; font-size: 0.85rem; width: 16px; text-align: center; flex-shrink: 0; }
.footer-contact-item p { font-size: 0.85rem; line-height: 1.6; }
.footer-address-line { display: block; }
.footer-address-line i { color: var(--gold); margin-right: 6px; font-size: 0.75rem; width: 14px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; font-size: 0.82rem; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,0.5); transition: color var(--transition); }
.footer-bottom-links a:hover { color: var(--gold); }

/* ── Contact Page ──────────────────────────────────────────── */
.contact-section { padding: 100px 0 60px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-info-card { background: linear-gradient(135deg, var(--dark-red), var(--red)); border-radius: var(--radius); padding: 40px; color: var(--white); }
.contact-info-card h2 { font-size: 1.8rem; font-weight: 900; margin-bottom: 8px; }
.contact-info-card > p { font-size: 0.92rem; opacity: 0.8; margin-bottom: 32px; line-height: 1.7; }
.contact-info-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.contact-info-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--gold); flex-shrink: 0; }
.contact-info-text h4 { font-size: 0.9rem; font-weight: 800; margin-bottom: 4px; }
.contact-info-text p { font-size: 0.85rem; opacity: 0.85; line-height: 1.5; }
.contact-form-card { background: var(--white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-md); border: 1px solid var(--gray-200); }
.contact-form-card h2 { font-size: 1.5rem; font-weight: 900; margin-bottom: 24px; color: var(--black); }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.form-input, .form-textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-300); border-radius: 8px;
    font-family: var(--font-ta); font-size: 0.9rem; font-weight: 500; color: var(--black);
    background: var(--gray-100); transition: border-color var(--transition), box-shadow var(--transition), background var(--transition); outline: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(204,0,0,0.08); background: var(--white); }
.form-textarea { resize: vertical; min-height: 100px; }

/* ── News Listing Page ─────────────────────────────────────── */
.news-page { padding: 100px 0 60px; background: var(--gray-100); min-height: 80vh; }
.news-page-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.news-page-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
    transition: transform var(--transition), box-shadow var(--transition);
}
.news-page-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-page-img { height: 200px; overflow: hidden; background: var(--gray-200); }
.news-page-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-page-card:hover .news-page-img img { transform: scale(1.05); }
.news-page-body { padding: 20px; }
.news-page-cat { display: inline-block; padding: 3px 10px; background: rgba(204,0,0,0.08); color: var(--red); font-size: 0.72rem; font-weight: 800; border-radius: 4px; margin-bottom: 10px; }
.news-page-title { font-size: 1.05rem; font-weight: 800; color: var(--black); margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-page-desc { font-size: 0.85rem; color: var(--gray-600); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.news-page-date { font-size: 0.78rem; color: var(--gray-500); font-family: var(--font-en); }
.news-empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--gray-500); font-size: 1.1rem; }
.news-empty i { font-size: 3rem; margin-bottom: 16px; display: block; color: var(--gray-400); }

/* ── Members Page ─────────────────────────────────────────── */
.page-members {
    background: linear-gradient(135deg, var(--red) 0%, var(--amber) 100%) !important;
    background-attachment: fixed !important; min-height: 100vh !important; padding: 30px 16px 60px !important;
}
.page-members .navbar, .page-members .footer { position: relative !important; }

.form-wrapper { max-width: 820px; margin: 0 auto; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.form-header { text-align: center; padding: 28px 30px 20px; position: relative; }
.form-header::after { content: ''; position: absolute; bottom: 0; left: 30px; right: 30px; height: 2px; background: linear-gradient(90deg, var(--red), var(--amber), var(--red)); border-radius: 2px; }
.header-top { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 16px; }
.leader-photo-box { width: 80px; height: 96px; border-radius: 8px; border: 2px solid var(--red); overflow: hidden; flex-shrink: 0; background: var(--gray-100); display: flex; align-items: center; justify-content: center; }
.leader-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.leader-photo-box .placeholder-icon { color: var(--gray-400); font-size: 1.8rem; }
.party-name-main { font-size: clamp(1.5rem,4.5vw,2.1rem); font-weight: 900; color: var(--red); line-height: 1.2; }
.office-address { font-size: 0.76rem; color: var(--gray-700); margin-top: 8px; line-height: 1.7; font-weight: 500; }
.office-address i { color: var(--red); margin-right: 4px; font-size: 0.7rem; }
.form-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 28px; border: 2px solid var(--red); border-radius: 50px; background: rgba(204,0,0,0.04); }
.form-badge span { font-size: 1rem; font-weight: 800; color: var(--red); }
.form-badge i { color: var(--red); font-size: 0.85rem; }
.form-body { padding: 28px 30px 30px; }
.field-group { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.field-label .num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; background: var(--red); color: var(--white);
    border-radius: 4px; font-size: 0.65rem; font-weight: 800; margin-right: 6px; font-family: var(--font-en);
}
.field-input {
    width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-300); border-radius: 8px;
    font-family: var(--font-ta); font-size: 0.9rem; font-weight: 500; color: var(--black);
    background: var(--gray-100); transition: border-color var(--transition), box-shadow var(--transition), background var(--transition); outline: none;
}
.field-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(204,0,0,0.08); background: var(--white); }
.field-input::placeholder { color: var(--gray-500); font-weight: 400; }
select.field-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5l6.5 6 6.5-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer;
}
.photo-upload-section { display: flex; align-items: flex-start; gap: 20px; }
.photo-preview-box {
    width: 120px; height: 150px; border: 2px dashed var(--gray-400); border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; background: var(--gray-100); overflow: hidden; flex-shrink: 0;
    transition: border-color var(--transition); cursor: pointer;
}
.photo-preview-box:hover { border-color: var(--red); }
.photo-preview-box img { width: 100%; height: 100%; object-fit: cover; display: none; }
.photo-preview-box .ph-icon { color: var(--gray-400); font-size: 1.6rem; }
.photo-preview-box .ph-text { font-size: 0.65rem; color: var(--gray-500); font-weight: 600; text-align: center; }
.photo-upload-info { flex: 1; padding-top: 6px; }
.upload-btn-label {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
    background: var(--gray-100); border: 1.5px solid var(--gray-300); border-radius: 8px;
    font-size: 0.84rem; font-weight: 600; color: var(--gray-700); cursor: pointer; transition: all var(--transition);
}
.upload-btn-label:hover { border-color: var(--red); color: var(--red); }
.upload-hint { font-size: 0.72rem; color: var(--gray-500); margin-top: 8px; line-height: 1.5; }
#photoInput { display: none; }
.pledge-section { margin-top: 28px; padding: 20px 22px; background: linear-gradient(135deg, rgba(204,0,0,0.03), rgba(255,184,0,0.04)); border: 1.5px solid rgba(204,0,0,0.12); border-radius: 12px; position: relative; }
.pledge-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--red), var(--amber), var(--red)); border-radius: 12px 12px 0 0; }
.pledge-title { font-size: 0.9rem; font-weight: 800; color: var(--red); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pledge-text { font-size: 0.84rem; color: var(--gray-700); line-height: 2; font-weight: 500; }
.pledge-checkbox-row { margin-top: 16px; display: flex; align-items: flex-start; gap: 10px; }
.pledge-checkbox-row input[type="checkbox"] { display: none; }
.custom-check { width: 20px; height: 20px; border: 2px solid var(--gray-400); border-radius: 5px; flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); margin-top: 1px; }
.custom-check i { font-size: 0.65rem; color: var(--white); opacity: 0; transform: scale(0); transition: all var(--transition); }
.pledge-checkbox-row input[type="checkbox"]:checked + .custom-check { background: var(--red); border-color: var(--red); }
.pledge-checkbox-row input[type="checkbox"]:checked + .custom-check i { opacity: 1; transform: scale(1); }
.pledge-checkbox-row label[for="pledgeCheck"] { font-size: 0.84rem; font-weight: 600; color: var(--gray-700); cursor: pointer; line-height: 1.5; }
.submit-section { margin-top: 28px; text-align: center; }
.submit-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    padding: 14px 48px; background: linear-gradient(135deg, var(--red), var(--deep-red));
    color: var(--white); border: none; border-radius: 10px;
    font-family: var(--font-ta); font-size: 1.05rem; font-weight: 800;
    cursor: pointer; transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(204,0,0,0.35); position: relative; overflow: hidden;
}
.submit-btn::before { content: ''; position: absolute; top: 0; left: -10%; width: 0; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent); transform: skewX(-15deg); transition: width 0.5s; }
.submit-btn:hover::before { width: 150%; }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(204,0,0,0.45); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.submit-note { font-size: 0.72rem; color: var(--gray-500); margin-top: 12px; }
.field-input.error { border-color: #D32F2F; box-shadow: 0 0 0 3px rgba(211,47,47,0.1); }
.error-msg { font-size: 0.72rem; color: #D32F2F; margin-top: 4px; display: none; font-weight: 600; }
.error-msg.show { display: block; }

/* ── PDF Template ─────────────────────────────────────────── */
#pdfTemplate { position: absolute; left: -9999px; top: 0; width: 794px; font-family: var(--font-ta); background: var(--white); color: var(--black); }
.pdf-inner { padding: 36px 40px; }
.pdf-header { text-align: center; border-bottom: 2px solid var(--red); padding-bottom: 18px; margin-bottom: 22px; }
.pdf-header h1 { font-size: 22px; font-weight: 900; color: var(--red); margin-bottom: 6px; }
.pdf-header p { font-size: 10px; color: var(--gray-600); line-height: 1.6; }
.pdf-badge { display: inline-block; margin-top: 10px; padding: 4px 20px; border: 1.5px solid var(--red); border-radius: 50px; font-size: 12px; font-weight: 800; color: var(--red); }
.pdf-body { display: flex; gap: 24px; }
.pdf-photo { width: 120px; flex-shrink: 0; }
.pdf-photo img { width: 120px; height: 150px; object-fit: cover; border: 1.5px solid var(--red); border-radius: 6px; }
.pdf-photo .no-photo { width: 120px; height: 150px; border: 1.5px dashed var(--gray-400); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 11px; }
.pdf-fields { flex: 1; }
.pdf-row { display: flex; margin-bottom: 8px; font-size: 12px; line-height: 1.5; }
.pdf-row-label { width: 190px; flex-shrink: 0; font-weight: 700; color: var(--gray-700); }
.pdf-row-value { flex: 1; color: var(--black); font-weight: 600; border-bottom: 1px dotted var(--gray-300); padding-bottom: 2px; }
.pdf-pledge { margin-top: 20px; padding: 14px 18px; background: #FFF8E1; border: 1px solid #FFE082; border-radius: 8px; }
.pdf-pledge-title { font-size: 11px; font-weight: 800; color: var(--red); margin-bottom: 8px; }
.pdf-pledge-text { font-size: 10px; color: var(--gray-700); line-height: 1.9; }
.pdf-footer { margin-top: 24px; display: flex; justify-content: space-between; align-items: flex-end; }
.pdf-sign-line { width: 180px; border-top: 1px solid var(--black); padding-top: 6px; font-size: 10px; color: var(--gray-700); text-align: center; font-weight: 600; }
.pdf-date-stamp { font-size: 10px; color: var(--gray-500); text-align: right; }
.pdf-stamp-circle { width: 90px; height: 90px; border: 2px solid var(--red); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-align: center; margin-top: 8px; opacity: 0.3; }
.pdf-stamp-circle span { font-size: 8px; font-weight: 800; color: var(--red); line-height: 1.3; }

/* ── Toast & Loading ───────────────────────────────────────── */
.toast { position: fixed; top: 90px; right: 24px; padding: 14px 24px; background: var(--white); border-radius: 10px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; z-index: 9999; transform: translateX(120%); transition: transform 0.4s cubic-bezier(0.4,0,0.2,1); border-left: 4px solid var(--red); }
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: #2E7D32; }
.toast-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.toast:not(.success) .toast-icon { background: rgba(204,0,0,0.1); color: var(--red); }
.toast.success .toast-icon { background: rgba(46,125,50,0.1); color: #2E7D32; }
.toast-text { font-size: 0.85rem; font-weight: 600; color: var(--gray-800); }
.loading-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 10000; backdrop-filter: blur(4px); }
.loading-overlay.active { display: flex; }
.loading-box { background: var(--white); padding: 32px 48px; border-radius: 14px; text-align: center; box-shadow: var(--shadow-lg); }
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--gray-200); border-top-color: var(--red); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box p { font-size: 0.9rem; font-weight: 600; color: var(--gray-800); }

/* ── Scroll Reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .news-grid, .news-page-grid { grid-template-columns: repeat(2,1fr); }
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root { --nav-h: 64px; }
    .nav-center { position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; background: rgba(26,26,26,0.98); backdrop-filter: blur(16px); flex-direction: column; align-items: stretch; padding: 20px; transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4,0,0.2,1); overflow-y: auto; }
    .nav-center.open { transform: translateX(0); }
    .nav-menu { flex-direction: column; gap: 4px; }
    .nav-menu a { padding: 14px 16px; font-size: 1rem; border-radius: 10px; }
    .nav-cta { text-align: center; justify-content: center; margin-top: 8px; }
    .nav-mobile-btn { display: flex; }
    .hero-leader-row { flex-direction: column; text-align: center; gap: 32px; padding: 40px 0; }
    .leader-circle-frame { width: 200px; height: 200px; }
    .leader-circle-frame::after { inset: -12px; }
    .hero-leader-designation { margin-left: auto; margin-right: auto; }
    .hero-leader-bio { margin: 0 auto; }
    .counter-wrap { flex-direction: column; gap: 24px; padding: 24px; }
    .counter-sep { width: 60px; height: 1px; }
    .counter-stats { gap: 24px; }
    .news-grid, .news-page-grid { grid-template-columns: 1fr; }
    .news-carousel-card { width: 290px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .field-row, .form-row { grid-template-columns: 1fr; }
    .photo-upload-section { flex-direction: column; align-items: center; }
    .photo-upload-info { width: 100%; text-align: center; }
    .upload-btn-label { width: 100%; justify-content: center; }
    .submit-btn { width: 100%; padding: 14px 24px; }
}
@media (max-width: 480px) {
    .leader-circle-frame { width: 160px; height: 160px; }
    .counter-num { font-size: 2rem; }
    .counter-stat-val { font-size: 1.6rem; }
    .news-carousel-card { width: 260px; }
    .news-carousel-card .news-card-img { height: 160px; }
    .photo-preview-box { width: 100px; height: 125px; }
}

