@font-face {
    font-family: 'KD Akuru';
    src: url('KD Akuru.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Haluvidhaa';
    src: url('Haluvidhaa-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --pnc-turquoise: #00A69C;
    --pnc-dark: #007A73;
    --primary-color: var(--pnc-turquoise);
    --secondary-color: var(--pnc-dark);
    --accent-color: #FFFFFF;
    /* Clean white for accents */
    --link-color: #00E5D9;
    /* Lighter turquoise for highlights */
    --bg-color: #F8FBFA;
    --card-bg: #FFFFFF;
    --text-color: #1A2E2C;
    --text-light: #526361;
    --font-regular: 'KD Akuru', serif;
    --font-bold: 'Haluvidhaa', sans-serif;
}

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

body {
    font-family: var(--font-regular);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    /* Increased line height for Thaana */
    direction: rtl;
    /* Important for Thaana */
}


.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.main-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.party-logo-container {
    margin-bottom: 2.5rem;
}

.party-logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.hero-poster-container {
    margin: 8rem auto 6rem;
    max-width: 100%;
    border-radius: 2.5rem;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-poster {
    width: 100%;
    height: auto;
    display: block;
}

.main-header h1 {
    font-family: var(--font-bold);
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    font-weight: normal;
    line-height: 1.2;
}

.candidate-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
    opacity: 0.95;
    font-family: var(--font-bold);
}

.party-info {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: normal;
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    backdrop-filter: blur(10px);
}

.header-divider {
    width: 100px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 auto 2.5rem;
}

.subtitle {
    font-size: 1.8125rem;
    opacity: 0.95;
    font-weight: 400;
}

.grid {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    /* Large spacing between sections */
}

/* Professional Report Style - Row Layout */
.card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: row;
    /* Side by side on desktop */
    align-items: center;
    gap: 4rem;
    position: relative;
    padding-bottom: 6rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle separator */
}

.card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Alternating Layout */
.card:nth-child(even) {
    flex-direction: row-reverse;
}

.card-image {
    flex: 1;
    height: 400px;
    /* Taller, cinematic aspect ratio */
    width: 100%;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    /* High-end shadow for images */
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.card:hover .card-image img {
    transform: scale(1.03);
}

/* Placeholder Styling Updates for larger size */
.placeholder-image {
    font-size: 1.625rem;
}

.card-content {
    flex: 1;
    padding: 0;
    /* Remove padding as gap handles it */
    text-align: right;
    /* RTL */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-content h2 {
    font-family: var(--font-bold);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #000000;
    line-height: 1.3;
    font-weight: normal;
    position: relative;
}

/* Decorative underline for headings */
.card-content h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--link-color);
    margin-top: 1rem;
    border-radius: 2px;
}

.card-content p {
    color: var(--text-light);
    font-size: 1.275rem;
    line-height: 1.9;
}

/* Infinite Candidate Slider */
.candidate-slider-section {
    margin: 6rem calc(-50vw + 50%);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    text-align: center;
    background: white;
    padding: 4rem 0;
}

.candidate-slider-section h2 {
    font-family: var(--font-bold);
    font-size: 2.25rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.slider-container {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
    background: transparent;
}

.slider-track {
    display: flex;
    width: calc(240px * 10);
    /* 220px (width) + 20px (gap equivalent) * 10 items */
    animation: scroll 30s linear infinite;
    gap: 2rem;
    padding-left: 1rem;
}

.slider-track:hover {
    animation-play-state: paused;
}

.slider-item {
    flex: 0 0 220px;
    height: 300px;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    background: #eee;
}

.slider-item:hover {
    transform: scale(1.1);
    z-index: 5;
    box-shadow: 0 15px 30px rgba(0, 166, 156, 0.3);
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(240px * 5));
    }
}

.main-footer {
    text-align: center;
    margin-top: 8rem;
    padding: 3rem;
    border-top: 1px solid #eee;
    color: var(--text-light);
    font-size: 1.225rem;
}

@media (max-width: 900px) {
    .main-header h1 {
        font-size: 3.25rem;
    }

    .card {
        flex-direction: column !important;
        gap: 2rem;
        padding-bottom: 4rem;
        text-align: center;
    }

    .card-image {
        height: 300px;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

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

    .card-content h2::after {
        margin: 1rem auto;
    }

    /* Slider Mobile */
    .candidate-slider-section {
        margin-top: 5rem;
    }

    .slider-item {
        flex: 0 0 170px;
        height: 230px;
    }

    .slider-track {
        width: calc(194px * 10);
        animation: scroll-mobile 20s linear infinite;
        gap: 1.5rem;
    }

    @keyframes scroll-mobile {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(194px * 5));
        }
    }
}