* {
    box-sizing: border-box;
}

:root {
    --primary-red: #d62828;
    --dark-red: #b30000;
    --gold: #ffd700;
    --text-dark: #333333;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.modal-title {
    font-family: 'Playfair Display', serif;
}

/* Header / Hero */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    color: var(--white);
    text-align: center;
    padding: 100px 20px 150px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.star-icon {
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.hero h1 {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    color: var(--gold);
}

.hero .subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Intro Section */
.intro {
    padding: 60px 20px;
    background: var(--white);
    text-align: center;
    position: relative;
    z-index: 3;
    margin-top: -80px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.intro-box p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 40px;
}

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-box {
    background: var(--bg-light);
    padding: 30px 20px;
    border-radius: 12px;
    border-bottom: 4px solid var(--gold);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-red);
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    color: #666;
}

/* Timeline */
.candidates-timeline {
    padding: 80px 20px;
    background: var(--bg-light);
    position: relative;
}

.timeline-container {
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--gold), var(--primary-red));
    transform: translateX(-50%);
    z-index: 0;
    /* Background element */
}

.timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--gold);
    border: 3px solid var(--white);
    border-radius: 50%;
    z-index: 1;
    /* Lowered z-index to stay behind card focus if needed */
    box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.2);
}

.candidate-card {
    position: relative;
    z-index: 5;
    /* Above timeline line/dots */
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 80%;
    padding: 30px;
    gap: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.candidate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--gold);
}

.candidate-card.reverse {
    flex-direction: row-reverse;
}

.candidate-image {
    flex-shrink: 0;
    width: 200px;
    /* Increased container size */
    height: 200px;
    border-radius: 50%;
    border: 6px solid var(--gold);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: var(--white);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    /* Added padding to shrink the inner image */
}

.candidate-image img {
    width: 90%;
    /* Scale down image slightly */
    height: 90%;
    object-fit: contain;
    /* Changed to contain to ensure full image is visible */
    border-radius: 50%;
    /* Keep image circular if needed */
    display: block;
}

.candidate-info {
    flex: 1;
}

.badge {
    display: inline-block;
    background: var(--dark-red);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.candidate-info h2 {
    color: var(--dark-red);
    margin: 0 0 15px 0;
    font-size: 1.8rem;
}

.position-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.position-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #555;
}

.position-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 1.2rem;
    line-height: 1;
}

.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-red);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.candidate-card:hover .btn-more {
    color: var(--dark-red);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    border-radius: 16px;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-red);
    transition: all 0.3s;
    z-index: 10;
}

.close:hover {
    background: var(--dark-red);
    color: var(--white);
}

.modal-header {
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    color: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: 16px 16px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 1.8rem;
    color: var(--gold);
}

.modal-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
}

.modal-body {
    padding: 30px;
}

.info-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
}

.info-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-group h3 {
    color: var(--dark-red);
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    display: flex;
    align-items: flex-start;
    /* Align with top of text */
    gap: 12px;
}

.info-group h3::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
    margin-top: 6px;
    /* Offset to center with first line of text */
    flex-shrink: 0;
    /* Prevent shrinking */
}

.info-group p {
    margin: 5px 0;
    color: #444;
}

.info-group ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
    color: #444;
}

.info-group ul li {
    margin-bottom: 8px;
}

.modal-deco {
    text-align: center;
    padding-bottom: 20px;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 991px) {
    .candidate-card {
        width: 95%;
        flex-direction: column !important;
        text-align: center;
        gap: 20px;
    }

    .timeline-line {
        display: none;
    }

    .timeline-dot {
        display: none;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .position-list li {
        text-align: left;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .stats-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero {
        padding: 80px 15px 120px;
    }

    .intro {
        margin-top: -60px;
        padding: 40px 15px;
    }

    .candidates-timeline {
        padding: 40px 15px;
    }

    .candidate-image {
        width: 160px;
        /* Slightly larger on mobile than before */
        height: 160px;
        margin: 0 auto;
        padding: 5px;
        /* Minimum padding for mobile */
    }

    .candidate-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}