/* ==========================================
   TVK WEBSITE - EXTERNAL CSS
   Mobile-First Responsive Design
   ========================================== */

/* ==========================================
   VARIABLES & RESET
   ========================================== */
:root {
    --primary-red: #A00000;
    --primary-yellow: #FECB03;
    --dark-red: #800000;
    --light-yellow: #FFF9E6;
    --text-dark: #212121;
    --text-light: #757575;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    padding: 0.8rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(160,0,0,0.3);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 4px 15px rgba(254,203,3,0.4);
}

.logo-text h1 {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-yellow);
    line-height: 1.2;
    padding-right: 50px;
}

.logo-text span {
    font-size: 0.8rem;
    opacity: 0.95;
}

.nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    left: -100%;
    top: 70px;
    background: var(--dark-red);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0,0,0,0.5);
    padding: 2rem 0;
    list-style: none;
    text-transform: uppercase;
}

.nav-links.active {
    left: 0;
    display: flex;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 1rem;
    display: block;
    font-weight: 500;
}

.lang-toggle {
    background: var(--primary-yellow);
    color: var(--primary-red);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    padding: 100px 1rem 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('./image/flag.jpeg') center;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.party-logo-hero {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.party-logo-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(254,203,3,0.6));
}

.hero h1 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    font-weight: 900;
}

.hero .tagline {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--primary-yellow);
    font-weight: bold;
}

.hero .location {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
}

.btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-primary {
    background: var(--primary-yellow);
    color: var(--primary-red);
}

.btn-secondary {
    background: white;
    color: var(--primary-red);
}

/* ==========================================
   SECTION COMMON STYLES
   ========================================== */
section {
    padding: 60px 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-red);
    font-weight: 900;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-yellow));
    margin: 10px auto;
}

.section-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    padding: 0 1rem;
}

/* ==========================================
   PRESIDENT SECTION
   ========================================== */
.president-section {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 20px 60px rgba(160,0,0,0.4);
}

.president-content {
    text-align: center;
}

.president-image-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    border: 6px solid var(--primary-yellow);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-yellow), #FFF);
}

.president-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.president-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-red);
    font-weight: bold;
}

.president-content h2 {
    font-size: 2rem;
    color: var(--primary-yellow);
    margin-bottom: 0.8rem;
}

.president-title {
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    background: rgba(254,203,3,0.2);
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    margin-bottom: 1rem;
}

.president-content p {
    font-size: 1rem;
    opacity: 0.95;
    line-height: 1.7;
    color: white;
}

/* ==========================================
   CENTRAL LEADERSHIP SECTION
   ========================================== */
.central-section {
    margin-bottom: 3rem;
}

.central-leaders-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.central-leader-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(160,0,0,0.15);
    border-top: 5px solid var(--primary-red);
}

.leader-image-container {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.leader-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.leader-placeholder {
    font-size: 5rem;
    color: white;
    font-weight: bold;
}

.leader-info {
    padding: 1.5rem;
    text-align: center;
}

.leader-info h3 {
    font-size: 1.5rem;
    color: var(--primary-red);
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.leader-position {
    background: var(--primary-red);
    color: var(--primary-yellow);
    font-weight: 700;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.95rem;
}

/* ==========================================
   LOCAL LEADERSHIP SECTION - MOBILE OPTIMIZED
   ========================================== */
.local-section {
    background: linear-gradient(135deg, var(--light-yellow), #FFF);
    border-radius: 20px;
    padding: 2rem 1rem;
    margin-bottom: 3rem;
}

.local-section-title {
    text-align: center;
    font-size: 1.6rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
    font-weight: 900;
}

/* CRITICAL: Mobile 2-Card Grid Layout */
.local-leaders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 100%;
}

.local-leader-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(160,0,0,0.12);
    border-left: 4px solid var(--primary-yellow);
}

.local-image-container {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.local-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.local-placeholder {
    font-size: 3.5rem;
    color: white;
    font-weight: bold;
}

.local-info {
    padding: 1rem 0.8rem;
}

.local-info h4 {
    font-size: 1.1rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.3;
}

.local-position-badge {
    background: var(--primary-red);
    color: white;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    border-radius: 15px;
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.8rem;
    text-align: center;
}

.local-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    background: var(--light-yellow);
    border-radius: 8px;
    font-size: 0.75rem;
}
.phone-row {
    white-space: nowrap;        /* keeps it in one line */
    text-align: center;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;    /* safety for very small screens */
}

/* Mobile */
@media (max-width: 480px) {
    .phone-row {
        font-size: 0.65rem;
        padding: 0.35rem;
    }
}


.detail-label {
    font-weight: 600;
    color: var(--primary-red);
}

.phone-row {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: white;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ==========================================
   EXECUTIVE COMMITTEE - MOBILE 2-CARD GRID
   ========================================== */
.committee-section {
    background: white;
    border-radius: 20px;
    padding: 2rem 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.committee-section-title {
    text-align: center;
    font-size: 1.6rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
    font-weight: 900;
}

/* CRITICAL: Mobile 2-Card Grid Layout */
.committee-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 100%;
}

.committee-card {
    background: linear-gradient(135deg, white, var(--light-yellow));
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(160,0,0,0.1);
    border-top: 3px solid var(--primary-yellow);
}

.committee-image-container {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.committee-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.committee-placeholder {
    font-size: 3rem;
    color: white;
    font-weight: bold;
}

.committee-info {
    padding: 1rem 0.8rem;
    text-align: center;
}

.committee-info h4 {
    font-size: 1rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    font-weight: 800;
    line-height: 1.3;
}

.committee-role {
    background: var(--primary-red);
    color: white;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    display: inline-block;
    font-size: 0.75rem;
    margin-bottom: 0.8rem;
}

.committee-details {
    display: flex;
    justify-content: space-around;
    padding-top: 0.8rem;
    border-top: 2px solid var(--primary-yellow);
}

.committee-detail-item {
    text-align: center;
}

.committee-detail-label {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.committee-detail-value {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 700;
}

/* ==========================================
   VISION SECTION
   ========================================== */
.vision-section {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: white;
    border-radius: 20px;
    padding: 2.5rem 1rem;
}

.vision-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.vision-card {
    background: rgba(255,255,255,0.95);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 5px solid var(--primary-yellow);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

.vision-card h3 {
    color: var(--primary-red);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.vision-icon {
    font-size: 2rem;
}

.vision-card p {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.contact-info,
.contact-form {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(160,0,0,0.12);
}

.contact-info h3,
.contact-form h3 {
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.contact-item {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
}

.contact-icon {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-yellow));
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.contact-item strong {
    display: block;
    font-size: 1rem;
    color: var(--primary-red);
    margin-bottom: 0.3rem;
}

.contact-item a {
    color: var(--primary-red);
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-red);
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #eee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-yellow);
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    color: white;
    padding: 3rem 1rem 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-yellow);
    font-size: 1.3rem;
    font-weight: 800;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: white;
    text-decoration: none;
    display: block;
    margin: 0.6rem 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    background: white;
    color: var(--primary-red);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
}

.copyright {
    border-top: 2px solid rgba(255,255,255,0.2);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================
   LANGUAGE TOGGLE
   ========================================== */
.lang-en, .lang-ta {
    display: none;
}

body[data-lang="en"] .lang-en {
    display: block;
}

body[data-lang="ta"] .lang-ta {
    display: block;
}

body[data-lang="en"] .lang-en-inline {
    display: inline;
}

body[data-lang="en"] .lang-ta-inline {
    display: none;
}

body[data-lang="ta"] .lang-en-inline {
    display: none;
}

body[data-lang="ta"] .lang-ta-inline {
    display: inline;
}

/* Fix for navigation links - only show one language */
.nav-links li a.lang-en,
.nav-links li a.lang-ta {
    display: none;
}

body[data-lang="en"] .nav-links li a.lang-en {
    display: block;
}

body[data-lang="ta"] .nav-links li a.lang-ta {
    display: block;
}

/* ==========================================
   TABLET RESPONSIVE (min-width: 600px)
   ========================================== */
@media (min-width: 600px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .local-leaders-grid,
    .committee-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .vision-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   DESKTOP RESPONSIVE (min-width: 968px)
   ========================================== */
@media (min-width: 968px) {
    nav {
        padding: 0 2rem;
    }
    
    .logo-img {
        width: 60px;
        height: 60px;
    }
    
    .logo-text h1 {
        font-size: 1.4rem;
    }
    
    .nav-links {
        position: static;
        display: flex;
        flex-direction: row;
        background: none;
        box-shadow: none;
        padding: 0;
        gap: 2rem;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .hero {
        padding: 140px 2rem 100px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .party-logo-hero {
        width: 150px;
        height: 150px;
    }
    
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    section {
        padding: 100px 2rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .president-section {
        padding: 4rem;
    }
    
    .president-image-container {
        width: 250px;
        height: 250px;
    }
    
    .president-content h2 {
        font-size: 3.5rem;
    }
    
    .central-leaders-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .leader-image-container {
        height: 300px;
    }
    
    .local-section {
        padding: 4rem;
    }
    
    .local-leaders-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2.5rem;
    }
    
    .local-image-container {
        height: 280px;
    }
    
    .committee-section {
        padding: 4rem;
    }
    
    .committee-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .committee-image-container {
        height: 200px;
    }
    
    .vision-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 3rem;
    }
}










#musicWidget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #000;
    color: #fff;
    font-size: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
