/* ===============================
   Main Content Styles - Index.css
=============================== */

/* ---------- MAIN CONTAINER ---------- */
main.container {
    padding:  0;
    background: #f4f6f8;
}


/* ================= HERO CARD REVISED ================= */
.hero-card {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #ffffff;
    padding: 40px 20px; 
    border-radius: 20px;
    text-align: start;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    position: relative; /* ensure normal flow */
    overflow: hidden;
    z-index: 1; 
}

/* Add spacing from sticky header */
main.container {
    padding-top: 20px;
}

/* Optional subtle background shapes or gradient glow */
.hero-card::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -50px;
    left: -50px;
    z-index: 0;
}


.hero-card h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    z-index: 1;
    position: relative;
    text-align: center;
}

.hero-card p.small {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 20px;
    line-height: 1.6;
    z-index: 1;
    position: relative;
    text-align: start;
}

/* Buttons */
/* ================= HERO CARD BUTTONS ================= */
.hero-card .btn-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.hero-card .btn {
    font-weight: 700;
    padding: 14px 30px;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ff7e5f, #feb47b); /* warm gradient */
    color: #fff;
    text-decoration: none;
    display: inline-block;
}

.hero-card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    background: linear-gradient(135deg, #feb47b, #ff7e5f);
}

.hero-card .btn.secondary {
    background: linear-gradient(135deg, #6a11cb, #2575fc); /* cool gradient */
    color: #fff;
}

.hero-card .btn.secondary:hover {
    background: linear-gradient(135deg, #2575fc, #6a11cb);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

/* Highlight "common enemy" text */
.hero-card p.small.common-enemy {
    font-style: italic;
    font-weight: 600;
    color: #ffdd57;
    margin-top: 20px;
    font-size: 1.05rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}


.inline-flag {
    width: 60px;       /* adjust size as needed */
    height: auto;
    margin-left: 0.5rem;
    vertical-align: middle;
}


/* ================= HERO CARD COMMON ENEMIES ================= */
.hero-card .common-enemy {
    font-weight: 600;
    color: #ff4d4f; /* attention-grabbing red */
    margin-top: 20px;
    text-align: center;
}
.ke-underscore {
    display: inline-block;
    background-color: #0b1020; 
    color: #fff;
    padding: 0 0.5rem;
    border-radius: 3px;
    font-weight: 700;
    margin-right: 0.5rem;
    text-transform: uppercase;
    box-shadow: inset 0 -6px 0 #ff0000; 
}


.hero-card .common-enemy-list {
    list-style-type: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.hero-card .common-enemy-list li {
    background-color: #ffe6e6;
    color: #d93025;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


/* ---------------- Responsive adjustments for screens ≤768px ---------------- */
@media (max-width: 768px) {

    /* Main container padding smaller for mobile */
    main.container {
        padding: 15px 7px;
    }

    /* Hero card adjustments */
    .hero-card {
        padding: 10px 10px;
        border-radius: 16px;
        margin-bottom: 15px;
    }

    /* Hero card pseudo-element */
    .hero-card::before {
        width: 200px;
        height: 200px;
        top: -20px;
        left: -20px;
    }

    /* Hero card heading */
    .hero-card h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    /* Hero card paragraph */
    .hero-card p.small {
        font-size: 1rem;
        margin-bottom: 15px;
        line-height: 1.5;
    }

    /* Highlighted common enemy text */
    .hero-card p.small.common-enemy {
        font-size: 1rem;
        margin-top: 15px;
    }

    /* Hero card buttons */
    .hero-card .btn-group {
        flex-direction: column;
        gap: 15px;
        margin: 20px 0;
    }

    .hero-card .btn {
        font-size: 0.95rem;
        padding: 12px 25px;
    }

    .hero-card .btn.secondary {
        font-size: 0.95rem;
        padding: 12px 25px;
    }

    /* Inline flag adjustment */
    .inline-flag {
        width: 50px;
    }

    /* Common enemy list */
    .hero-card .common-enemy-list {
        gap: 10px;
    }

    .hero-card .common-enemy-list li {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    /* KE underscore adjustments */
    .ke-underscore {
        padding: 0 0.4rem;
        font-size: 0.95rem;
        margin-right: 0.4rem;
        box-shadow: inset 0 -5px 0 #ff0000;
    }
}


/* 🔥 Motto Styling */
/* 🔥 Motto Styling */
.motto {
    text-align: center;
    margin: 12px 0 25px;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    height: 1.8em;
    position: relative;
    overflow: hidden;
    perspective: 800px; /* Enable 3D perspective for cube effects */
}

/* All words stacked in the same position */
.motto span {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

/* Active word (JS adds animations dynamically) */
.motto span.active {
    opacity: 1;
    transform: translateY(0);
}

/* ✅ Word Colors */
.motto .tribeless   { color: #2ecc71; }  /* Bright Green */
.motto .leaderless  { color: #3498db; }  /* Bold Blue */
.motto .fearless    { color: #e74c3c; }  /* Strong Red */
.motto .boundless   { color: #f39c12; }  /* Orange / Energetic */
.motto .limitless   { color: #ddc806; }  /* Purple / Ambitious */
.motto .relentless  { color: #1abc9c; }  /* Teal / Determined */
.motto .selfless    { color: #e67e22; }  /* Carrot / Caring */

/* ================= ANIMATION VARIANTS ================= */

/* --- Basic Slides --- */
@keyframes slideFromLeft {
    from { opacity: 0; transform: translateX(-100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes slideFromRight {
    from { opacity: 0; transform: translateX(100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes slideFromTop {
    from { opacity: 0; transform: translateY(-100%) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideFromBottom {
    from { opacity: 0; transform: translateY(100%) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Zoom & Fade --- */
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 3D Cube Rotations --- */
@keyframes cubeLeft {
    from { opacity: 0; transform: rotateY(-90deg); }
    to { opacity: 1; transform: rotateY(0deg); }
}

@keyframes cubeRight {
    from { opacity: 0; transform: rotateY(90deg); }
    to { opacity: 1; transform: rotateY(0deg); }
}

@keyframes cubeTop {
    from { opacity: 0; transform: rotateX(90deg); }
    to { opacity: 1; transform: rotateX(0deg); }
}

@keyframes cubeBottom {
    from { opacity: 0; transform: rotateX(-90deg); }
    to { opacity: 1; transform: rotateX(0deg); }
}

/* 📱 Mobile adjustments */
@media (max-width: 768px) {
    .motto {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
        margin: 10px 0 20px;
        height: 1.5em; /* slightly smaller for mobile */
    }

    .motto span {
        transform: translateY(15px); /* smaller shift */
    }

    .motto span.active {
        transform: translateY(0);
    }
}





/* ================= LIVE STATS ================= */
.stats-overview-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    font-family: "Segoe UI", Roboto, sans-serif;
}

.stats-overview-section h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.stats-overview-section h2 {
    font-size: 1.4rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stats-overview-grid .card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    text-align: start;
    min-height: 220px; /* ensures all cards roughly same height */
}

#stats_overview_registered_id_breakdown,
#stats_overview_registered_voter_breakdown,
#stats_overview_will_vote {
    margin-top: 0.5rem;
}


.stats-overview-grid h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: #333;
}

#stats_overview_total_submissions,
#stats_overview_registered_count,
#stats_overview_registered_voter_count {
    font-size: 1.5rem;
    font-weight: 600;
    color: #222;
}

/* Vote lines */
.stats-overview-vote-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.4rem 0;
}

.stats-overview-vote-label {
    font-weight: 500;
    color: #333;
    min-width: 60px;
    text-align: left;
}

.stats-overview-vote-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-overview-stat-pct {
    font-size: 0.9rem;
    color: #555;
}

/* Bars */


.stats-overview-pct-fill {
    height: 100%;
    border-radius: 6px 0 0 6px;
}



/* Responsive */
@media (max-width: 768px) {
    .stats-overview-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats-overview-vote-line {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-overview-vote-stats {
        margin-top: 0.25rem;
    }

    .stats-overview-pct-bar {
        margin-left: 0;
        width: 100%;
        margin-top: 0.25rem;
    }

    .stats-overview-vote-label {
        min-width: 0;
    }
}

.stats-overview-pct-bar {
    flex: 1;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-left: 0.75rem;
}

.stats-overview-pct-fill {
    height: 100%;
    width: 0%;
    min-width: 5%;   /* ensures small bars are visible */
    max-width: 100%;
    border-radius: 6px 0 0 6px;
    transition: width 0.3s ease;
}

@media (max-width: 768px) {
    .stats-overview-pct-fill {
        border-radius: 6px !important; /* mobile uniform corners */
    }
}




/* ================= RECENT SUBMISSIONS ================= */
/* ================= RECENT SUBMISSION CARD ================= */
#recent-submission-card {
    background: #f0f8ff; /* very light blue */
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}



#recent-submission-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a75ff;
}

/* ================= FILTERS ================= */
#recent-submission-card .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

#recent-submission-card .filters label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

#recent-submission-card .filters select {
    padding: 0.4rem 0.8rem;
    margin-left: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #b3d1ff;
    background: #e6f2ff;
    font-size: 0.95rem;
    color: #003366;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

#recent-submission-card .filters select:hover,
#recent-submission-card .filters select:focus {
    border-color: #4da6ff;
    box-shadow: 0 0 6px rgba(77, 166, 255, 0.4);
    outline: none;
}

/* ================= SUBMISSIONS LIST ================= */
#recent-submission-card #recent-submissions {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid #cce0ff;
}

#recent-submission-card #recent-submissions li {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #d9ecff;
    font-size: 0.95rem;
    color: #003366;
    transition: background 0.3s ease;
    border-radius: 0.5rem;
    margin-bottom: 0.3rem;
}

#recent-submission-card #recent-submissions li:hover {
    background: linear-gradient(135deg, #4da6ff, #80c1ff, #4da6ff);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Scrollbar styling */
#recent-submission-card #recent-submissions::-webkit-scrollbar {
    width: 8px;
}

#recent-submission-card #recent-submissions::-webkit-scrollbar-track {
    background: #e6f2ff;
    border-radius: 4px;
}

#recent-submission-card #recent-submissions::-webkit-scrollbar-thumb {
    background: #4da6ff;
    border-radius: 4px;
}

#recent-submission-card #recent-submissions::-webkit-scrollbar-thumb:hover {
    background: #3399ff;
}

/* ================= RECENT SUBMISSION TABLE ================= */
#recent-submission-card .table-container {
    overflow-x: auto;
}

#recent-submission-card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#recent-submission-card th,
#recent-submission-card td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #cce0ff;
    font-size: 0.95rem;
    color: #003366;
}

#recent-submission-card th {
    background: #e6f2ff;
    font-weight: 600;
}

#recent-submission-card tr:hover {
    background: linear-gradient(135deg, #4da6ff, #80c1ff, #4da6ff);
    color: #fff;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {

    /* Recent submission card adjustments */
    #recent-submission-card {
        padding: 1.5rem 1rem;
        margin: 1.5rem 0;
        border-radius: 14px;
    }

    /* Card heading */
    #recent-submission-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    /* Filters adjustments */
    #recent-submission-card .filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    #recent-submission-card .filters label {
        font-size: 0.9rem;
    }

    #recent-submission-card .filters select {
        font-size: 0.9rem;
        padding: 0.35rem 0.7rem;
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Submissions list */
    #recent-submission-card #recent-submissions {
        max-height: 300px;
    }

    #recent-submission-card #recent-submissions li {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }

    /* Table adjustments */
    #recent-submission-card .table-container {
        overflow-x: auto;
    }

    #recent-submission-card table {
        font-size: 0.85rem;
    }

    #recent-submission-card th,
    #recent-submission-card td {
        padding: 0.6rem 0.8rem;
    }

    /* Pagination row for recent submissions */
    #recent-submission-card .pagination-controls {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
    }

    /* Buttons shrink to icon size */
    #recent-submission-card .pagination-controls .btn {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 2px 4px;
        width: auto;
        min-width: 0;
        font-size: 1.1rem;
    }

    /* Page info wraps if text is long */
    #recent-submission-card .pagination-controls .page-info {
        flex: 1 1 auto;
        min-width: 0;
        white-space: normal;
        overflow-wrap: break-word;
        text-align: center;
    }
}



/* ==========================
   Pagination Controls
========================== */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 10px 0;
    font-size: 0.95rem;
    color: #333;
}

.pagination-controls .btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.pagination-controls .btn:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.pagination-controls .btn:disabled {
    background-color: #d6d6d6;
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

.pagination-controls .page-info {
    font-weight: 500;
    color: #555;
    background: #f1f1f1;
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 180px;
    text-align: center;
}

.card .pagination-controls {
    border-top: 1px solid #ddd;
    margin-top: 10px;
    padding-top: 12px;
}


/* ==========================
   Pagination Controls (≤768px)
========================== */
@media (max-width: 768px) {
    .pagination-controls {
        gap: 8px;
        margin-top: 12px;
        padding: 8px 0;
        font-size: 0.85rem;
    }

    .pagination-controls .btn {
        width: 100%;
        max-width: 240px;
        padding: 8px 0;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .pagination-controls .page-info {
        min-width: auto;
        width: 100%;
        max-width: 240px;
        font-size: 0.85rem;
        padding: 8px 0;
    }

    .card .pagination-controls {
        margin-top: 8px;
        padding-top: 10px;
    }
}







/* ================= WHAT WE WANT SECTION ================= */
#causes-section {
    padding: 2rem 1rem;
    background: #e4e7eb;
    font-family: 'Poppins', sans-serif;
}

/* ================= SECTION HEADER ================= */
#causes-section .section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f5f9ff, #eaf3ff);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    padding: 3rem 2rem;
    margin-bottom: 3rem; /* space between header and causes container */
}

#causes-section .section-header h2 {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
}

#causes-section .section-header h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #4da6ff, #66c2ff);
    margin: 0.5rem auto 0 auto;
    border-radius: 2px;
}

#causes-section .section-header p {
    font-size: 1rem;
    color: #333;
    line-height: 1.8;
    max-width: 700px;
    text-align: start;
    margin: 0 auto;
}

/* ================= CAUSES GRID ================= */
#causes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f5f9ff, #eaf3ff);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    padding: 3rem 2rem;
}

/* Subtle animated light sweep */
#causes-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.2), transparent 70%);
    animation: lightSweep 12s linear infinite;
    pointer-events: none;
}

@keyframes lightSweep {
    0% { transform: translateX(-30%); opacity: 0.3; }
    50% { transform: translateX(30%); opacity: 0.1; }
    100% { transform: translateX(-30%); opacity: 0.3; }
}

/* ================= MODERN CARDS ================= */
/* ================= MODERN CARDS ================= */
.cause-card {
    position: relative;
    flex: 1 1 240px;
    max-width: 280px;
    min-height: 220px;
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    background: transparent; /* no back fill */
    border: 2px dashed rgba(0, 51, 102, 0.3); /* dotted/soft border */
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    text-align: center;
    color: #003366;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Headings & Text */
.cause-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.cause-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    min-height: 90px;
    text-align: start;
}

/* Remove bottom decorative line */
.cause-card::after {
    content: none; /* removed */
}

/* ================= COLOR BANDS PER CARD ================= */
.cause-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    width: 100%;
    border-radius: 1.5rem 1.5rem 0 0; /* match card top corners */
}

/* Top colors */
#cause-1::before { background: #4da6ff; }
#cause-2::before { background: #ff6a95; }
#cause-3::before { background: #33cc99; }
#cause-4::before { background: #ffcc66; }
#cause-5::before { background: #9933ff; }
#cause-6::before { background: #33b3ff; }
#cause-7::before { background: #ff9966; }
#cause-8::before { background: #66ffcc; }
#cause-9::before { background: #ff4da6; }
#cause-10::before { background: #6699ff; }
#cause-11::before { background: #00b38f; }



/* ================= READ MORE BUTTON ================= */
.read-more-container {
    width: 100%;
    text-align: center;
    margin-top: 3rem;
}

.what_we_want.read-more {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4da6ff, #66c2ff);
    border-radius: 2rem;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.what_we_want.read-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #5cb8ff, #80d0ff);
}

/* ================= RESPONSIVE ≤768px ================= */
/* ================= RESPONSIVE ≤768px ================= */
@media (max-width: 768px) {

    /* Causes Section */
    #causes-section {
        padding: 2rem 1rem; /* smaller padding */
    }

    /* Section Header */
    #causes-section .section-header {
        padding: 2rem 1rem; /* reduce header padding */
        gap: 0.75rem;       /* smaller spacing */
        margin-bottom: 2rem; /* less space to causes container */
    }

    #causes-section .section-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    #causes-section .section-header p {
        font-size: 0.85rem;
        line-height: 1.4;
        max-width: 100%;
        text-align: start;
    }

    /* Causes Container */
    #causes-container {
        flex-direction: column;
        gap: 1rem;         /* smaller gap between cards */
        padding: 1.5rem 1rem; /* reduce padding */
    }

    /* Cause Cards */
    .cause-card {
        max-width: 100%;
        min-height: 160px; /* slightly smaller height */
        padding: 1.2rem 1rem; /* smaller padding */
    }

    .cause-card h3 {
        font-size: 1.1rem;
    }

    .cause-card p {
        font-size: 0.85rem;
        min-height: auto;
    }

    /* Read More Button */
    .read-more-container {
        margin-top: 2rem;
    }

    .what_we_want.read-more {
        padding: 0.7rem 2rem;
        font-size: 0.9rem;
    }
}




/* ================= TOP CANDIDATES & RECENT SUBMISSIONS ================= */
/* =============================== 
   Top Preferred Candidates Section 
=============================== */
.top-preferred-candidates {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 25px 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.top-preferred-candidates h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #0d1020;
    text-align: center;
}

/* ================= FILTERS ================= */
.top-preferred-candidates .filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
    background-color: #f4f6f8;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.top-preferred-candidates .filters label {
    font-weight: 500;
    margin-right: 6px;
}

.top-preferred-candidates .filters select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.top-preferred-candidates .filters select:hover,
.top-preferred-candidates .filters select:focus {
    border-color: #0d6efd;
    outline: none;
}

/* ================= CANDIDATE GRID ================= */
.top-preferred-candidates #candidates-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 0;
    list-style: none;
    margin: 0;
}

/* Each Candidate Card */
.top-preferred-candidates .candidate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background-color: #f9f9f9;
    padding: 18px 12px;
    border-radius: 14px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}



.top-preferred-candidates .candidate-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #0d1020;
}

.top-preferred-candidates .candidate-card strong {
    font-size: 1.2rem;
    color: #0d1020;
    margin-bottom: 4px;
    display: block;
}

.top-preferred-candidates .candidate-card button.see-votes-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background-color: #0d6efd;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.top-preferred-candidates .candidate-card button.see-votes-btn:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
}

/* ================= PAGINATION ================= */
.top-preferred-candidates .pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.top-preferred-candidates .pagination-controls .btn {
    padding: 8px 16px;
    border-radius: 8px;
    background-color: #0d6efd;
    color: #fff;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.top-preferred-candidates .pagination-controls .btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.top-preferred-candidates .pagination-controls .btn:hover:not(:disabled) {
    background-color: #0b5ed7;
}

.top-preferred-candidates .page-info {
    font-size: 0.95rem;
    color: #555;
}


/* ================= MEDIA QUERIES ≤768px ================= */
@media (max-width: 768px) {

    /* Filters: stack vertically, full width */
    .top-preferred-candidates .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px;
    }

    .top-preferred-candidates .filters label,
    .top-preferred-candidates .filters select {
        width: 100%;
        font-size: 0.9rem;
    }

    /* Candidate Grid: single column */
    .top-preferred-candidates #candidates-display {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Candidate Card adjustments */
    .top-preferred-candidates .candidate-card {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 15px;
    }

    .top-preferred-candidates .candidate-card img {
        width: 100px;
        height: 100px;
        border-radius: 50%;
    }

    .top-preferred-candidates .candidate-card strong {
        font-size: 1.1rem;
        text-align: center;
    }

    .top-preferred-candidates .candidate-card button.see-votes-btn {
        width: 100%;
        max-width: 200px;
        font-size: 0.95rem;
        text-align: center;
        padding: 4px 6px;
    }

    /* Pagination Controls */
    .top-preferred-candidates .pagination-controls {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    /* Pagination Buttons */
    .top-preferred-candidates .pagination-controls .btn {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 4px 6px;
        width: auto;
        min-width: 0;
        font-size: 1.2rem;
    }

    /* Pagination Text */
    .top-preferred-candidates .pagination-controls .page-info {
        flex: 1 1 auto;
        min-width: 0;
        white-space: normal;
        overflow-wrap: break-word;
        text-align: center;
    }


    /* Heading adjustments */
    .top-preferred-candidates h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    /* Section padding */
    .top-preferred-candidates {
        padding: 20px 15px;
        margin-bottom: 30px;
    }
}



/* Candidate cards */
.candidate-card strong {
    font-size: 1.1em;
}
.candidate-card .see-votes-btn {
    margin-top: 8px;
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}
.candidate-card .see-votes-btn:hover {
    background: #0056b3;
}


/* Animation */
@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.9);}
    to {opacity: 1; transform: scale(1);}
}

@media (max-width: 768px) {
    /* Candidate card layout for mobile */
    .candidate-card {
        flex-direction: column; /* stack image and text vertically */
        align-items: center;
        width: 100%; /* full width on small screens */
        padding: 12px;
        margin: 10px 0;
    }

    /* Candidate image */
    .candidate-card img {
        width: 100%;      /* make image responsive */
        max-width: 180px; /* limit max size */
        height: auto;
        margin-bottom: 12px;
    }

    /* Candidate name */
    .candidate-card strong {
        font-size: 1rem;
        text-align: center;
    }

    /* See votes button */
    .candidate-card .see-votes-btn {
        width: 100%;        /* full width button */
        text-align: center;
        padding: 8px 0;
        font-size: 0.95rem;
    }
}





/* ================= VOTES POPUP MODAL ================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 10px;
}

.modal-content {
    background-color: #fff;
    border: 1px solid #ddd;
    max-width: 650px;
    width: 100%;
    padding: 20px;
    position: relative;
    overflow-y: auto;
    max-height: 90%;
}

.modal-content h3 {
    margin-top: 0;
    font-size: 1.3rem;
    color: #222;
}

.modal-content p {
    margin: 6px 0;
    font-size: 0.95rem;
    color: #555;
}

.modal-content .close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}

.modal-content .close-btn:hover {
    color: #333;
}


/* ---------------- Modal responsive for ≤768px ---------------- */
@media (max-width: 768px) {

    .modal {
        padding: 5px; /* reduce padding for small screens */
        align-items: flex-start; /* allow modal to start near top */
        overflow-y: auto; /* allow background scroll prevention handled via JS */
    }

    .modal-content {
        max-width: 95%; /* almost full width */
        padding: 15px;
        max-height: 85vh; /* ensure it fits within viewport */
        border-radius: 12px; /* softer edges for mobile */
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .modal-content p {
        font-size: 0.9rem;
    }

    .modal-content .close-btn {
        top: 8px;
        right: 12px;
        font-size: 1.2rem;
    }
}



/* ================= TABS ================= */
.tabs {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background-color: #f2f2f2;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab-btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.tab-content {
    display: none;
    margin-top: 12px;
}

.tab-content.active {
    display: block;
}

.tab-content ul {
    list-style: none;
    padding-left: 0;
}

.tab-content ul li {
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: #333;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column; /* stack buttons vertically */
        gap: 6px;
    }

    .tab-btn {
        font-size: 0.85rem; /* slightly smaller buttons */
        padding: 5px 10px;
        flex: 1 1 auto; /* buttons stretch full width */
        text-align: center;
    }

    .tab-content {
        font-size: 0.9rem; /* slightly smaller content */
    }

    .tab-content ul li {
        padding: 6px 0; /* more spacing for touch targets */
    }
}




/* ================= FILTERS ================= */
.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.filters label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-right: 6px;
}

.filters select {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    font-size: 0.95rem;
    min-width: 160px;
    cursor: pointer;          /* Add cursor pointer */
    transition: all 0.2s;
}

.filters select:hover {
    border-color: #007bff;
}

.filters select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 4px rgba(0,123,255,0.4);
}

.filters div {
    display: flex;
    flex-direction: column;
}

.filters .small {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .filters {
        flex-direction: column; /* stack filters vertically */
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
        padding: 8px 0;
    }

    .filters label {
        font-size: 0.9rem;
        margin-right: 0; /* remove horizontal spacing for stacked layout */
    }

    .filters select {
        width: 100%; /* make dropdowns full width */
        min-width: unset; /* remove fixed min-width */
        font-size: 0.9rem;
    }

    .filters div {
        width: 100%; /* ensure wrapper div takes full width */
    }

    .filters .small {
        font-size: 0.8rem;
    }
}


/*--------------- GEN-Z HEROES (Integrated 3D style - LARGE CARDS + FIXED IMAGE VISIBILITY) ----------------------*/
/*--------------- GEN-Z HEROES (Full-Width Auto-Slider) ----------------------*/
.slider-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1400px;
    margin: 50px auto;
    border-radius: 16px;
    background-color: #fff8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Horizontal slider area */
.heroes-grid {
    display: flex;
    transition: transform 0.8s ease-in-out;
    width: 100%;
}

/* Each hero fills the view */
.hero-item {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 40px;
    text-align: start;
    background-color: #fff;
    border-radius: 16px;
}

.hero-photo {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    border-radius: 14px;
    background: #fafafa;
    margin-bottom: 20px;
}

.hero-item h3 {
    font-size: 1.8rem;
    color: #e63946;
    margin-bottom: 12px;
    text-align: center;
}

.hero-item p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.8;
}

/* Slider arrows */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    padding: 12px 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-btn:hover {
    background: #e63946;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.left {
    left: 15px;
}

.slider-btn.right {
    right: 15px;
}

/* Green navigation dots */
.slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

.slider-dots .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #ccc;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.slider-dots .dot.active {
    background-color: #2ecc71;
    transform: scale(1.3);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hero-item {
        padding: 20px;
    }

    .hero-photo {
        max-height: 340px;
    }

    .hero-item h3 {
        font-size: 1.4rem;
    }

    .hero-item p {
        font-size: 1rem;
    }

    .slider-btn {
        font-size: 1.4rem;
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    /* Smaller, tighter dots for mobile */
    .slider-dots {
        gap: 5px;
        margin-top: 16px;
    }

    .slider-dots .dot {
        width: 8px;
        height: 8px;
        transform: scale(1); /* reset */
    }

    .slider-dots .dot.active {
        transform: scale(1.2);
    }
}




/* Support Info Styling */
.support-info {
    background-color: #f5f7fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-align: center;
    max-width: 400px;
    margin: 1.5rem auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.support-info p {
    margin: 0.4rem 0;
    font-size: 1rem;
    color: #1e293b;
}

.support-info p:first-child {
    font-weight: 600;
    margin-bottom: 0.8rem;
}

/* Responsive 768px */
@media (max-width: 768px) {
    .support-info {
        padding: 0.75rem 1rem;
        margin: 1rem auto;
        max-width: 95%;
    }

    .support-info p {
        font-size: 0.9rem;
    }

    .support-info p:first-child {
        margin-bottom: 0.5rem;
    }
}
