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

:root {
    --header-height: 100px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    padding-top: var(--header-height);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 480px;
    padding: 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;

    /* Fondo real del campus (asset local). */
    background-image: url('../public/validacion-background.jpg');
    background-color: transparent;
    background-blend-mode: normal;
    background-size: cover;
    background-position: center 33%;
    background-repeat: no-repeat;
}

/* Dark overlay for better text contrast */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 0;
}



.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 40px 0;
    color: #ffffff;
}

.hero.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: #f0f0f0;
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.7;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* Categories Section */
.categories {
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 0 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Candidates Section (same page margins as categories) */
.candidates-section {
    max-width: 1200px;
    margin: 60px auto 100px;
    padding: 0 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.candidates-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Candidates title styling */
.candidates-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #1a1a1a;
    margin: 0 auto 28px;
}

.candidates-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    background: rgba(0, 0, 0, 0.15);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* Grid: 2 columns, center the last card below */
.candidates-section .categories-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 32px;
    justify-items: stretch;
}

.candidates-section .categories-grid>.category-card:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 520px;
    width: 100%;
}

.categories.visible {
    opacity: 1;
    transform: translateY(0);
}

.categories-grid {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 32px;
}

.category-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 48px 40px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e31e24 0%, #b71c1c 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    border-color: #e31e24;
    box-shadow: 0 8px 24px rgba(227, 30, 36, 0.12);
    transform: translateY(-4px);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e31e24 0%, #b71c1c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    box-shadow: 0 4px 16px rgba(227, 30, 36, 0.2);
}

.category-icon .material-symbols-outlined {
    font-size: 40px;
    line-height: 1;
    color: #ffffff;
}

.category-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.category-description {
    font-size: 15px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.6;
}

.category-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #e31e24 0%, #b71c1c 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.2);
    cursor: pointer;
    border: none;
}

/* Vote CTA Section */
.vote-cta {
    max-width: 1200px;
    margin: 36px auto 10px;
    padding: 0 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: none; /* hidden until countdown ends */
}
.vote-cta.vote-cta--enabled { display: block; }
.vote-cta.visible { opacity: 1; transform: translateY(0); }
.vote-cta-inner {
    position: relative;
    isolation: isolate;
    background: linear-gradient(135deg, #e31e24 0%, #b71c1c 100%);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 14px;
    padding: 32px 28px;
    display: grid;
    gap: 10px;
    place-items: center;
    text-align: center;
    color: #fff;
    box-shadow: 0 18px 40px rgba(183, 28, 28, 0.35);
    overflow: hidden;
}
.vote-cta-inner::before {
    content: '';
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 160px;
    background: radial-gradient(closest-side, rgba(255,255,255,0.22), transparent 70%);
    transform: translateY(-20px) rotate(-2deg);
    pointer-events: none;
    z-index: -1;
}
.vote-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.28);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .3px;
}
.vote-cta-badge .material-symbols-outlined { font-size: 18px; }
.vote-cta-icon {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: #e31e24;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18), inset 0 -2px 6px rgba(0,0,0,0.06);
    margin: 6px 0 6px;
    animation: pulse-cta 3s ease-in-out infinite;
}
.vote-cta-icon .material-symbols-outlined { font-size: 40px; }
.vote-cta-title { font-size: 32px; font-weight: 900; letter-spacing: -.5px; color: #fff; }
.vote-cta-subtitle { font-size: 16px; color: #fff; opacity: .95; margin-bottom: 6px; }
.vote-cta .category-button {
    background: #fff;
    color: #e31e24;
    border: 1px solid rgba(227,30,36,0.35);
    box-shadow: 0 8px 20px rgba(255,255,255,0.15), 0 10px 24px rgba(0,0,0,0.18);
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 800;
}
.vote-cta .category-button:hover {
    transform: translateY(-3px) scale(1.03);
}

@keyframes pulse-cta { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

@media (max-width: 768px) {
  .vote-cta { padding: 0 20px; margin: 20px auto; }
}

.category-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(227, 30, 36, 0.3);
}

/* Info Section */
.info-section {
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    padding: 80px 60px;
    margin-top: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.info-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.info-container {
    max-width: 1200px;
    margin: 0 auto;
}

.info-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: -0.5px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.info-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.info-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.info-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #e31e24;
    margin-bottom: 12px;
}

.info-card-title .material-symbols-outlined {
    font-size: 20px;
    vertical-align: -3px;
    margin-right: 6px;
}

.info-card-text {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
}

/* Accented info card for high-contrast notices */
.info-card-accent {
    background: linear-gradient(135deg, #e31e24 0%, #b71c1c 100%);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 8px 20px rgba(227, 30, 36, 0.25);
}
.info-card-accent .info-card-title { color: #fff; }
.info-card-accent .info-card-text { color: #fff; }
.info-card-accent .material-symbols-outlined { color: #fff; }

/* Make the accent card span full grid width and center content */
.info-grid .info-card-accent {
    grid-column: 1 / -1;
    justify-self: center;
    text-align: center;
}

@media (min-width: 769px) {
    .info-grid .info-card-accent { max-width: 1200px; }
}

/* Highlights (alternating image + text) */
.highlights-section {
    max-width: 1200px;
    margin: 40px auto 100px;
    padding: 0 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.highlights-section.visible { opacity: 1; transform: translateY(0); }

.highlights-container { display: flex; flex-direction: column; gap: 28px; }

.highlights-title { 
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #1a1a1a;
    margin: 0 auto 16px;
}

.highlight { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; opacity: 0; transform: translateY(20px); transition: all .6s ease; }
.highlight.visible { opacity: 1; transform: translateY(0); }
.highlight.reverse { grid-template-columns: 1fr 1.1fr; }
.highlight.reverse .highlight-media { order: 2; }
.highlight.reverse .highlight-text { order: 1; }

.highlight-media { position: relative; overflow: hidden; border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,0.12); }
.highlight-media img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transform: scale(1);
    transition: transform .4s ease, filter .4s ease;
    filter: brightness(0.95) contrast(1.05);
}
.highlight:hover .highlight-media img { transform: scale(1.04); filter: brightness(0.9) contrast(1.1); }

.highlight-text h3 { font-size: 28px; margin-bottom: 10px; color: #1a1a1a; }
.highlight-text p { font-size: 16px; color: #555; }

/* Hero Info banner (in-hero schedules) */
.hero-info {
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    max-width: 900px;
    margin: 0 auto;
}

.time-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #e31e24 0%, #b71c1c 100%);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .2px;
    margin: 0 auto 12px;
}

.time-box .material-symbols-outlined { font-size: 18px; }

.schedule {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 12px;
    color: #fff;
}

.schedule-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
}

.schedule-title { font-weight: 700; margin-bottom: 4px; }
.schedule-time { font-size: 14px; opacity: .95; }

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: row;
        gap: 24px;
        padding: 20px;
    }

    .logo-section {
        flex-direction: column;
        gap: 20px;
    }

    .hero {
        min-height: 460px;
        padding: 0 20px;
        background-position: center 70%;
    }

    .hero-title {
        font-size: 32px;
    }

    .categories {
        padding: 0 20px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .info-section {
        padding: 40px 20px;
    }

    .highlights-section { padding: 0 20px; margin: 20px auto 60px; }
    .highlight,
    .highlight.reverse { grid-template-columns: 1fr; }
    .highlight-media img { height: 200px; }

    .hero-info { padding: 14px; }
    .schedule { grid-template-columns: 1fr; }

    .candidates-section {
        padding: 0 20px;
        margin: 40px auto 60px;
    }

    .candidates-section .categories-grid {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .candidates-section .categories-grid>.category-card:nth-child(3) {
        grid-column: auto;
        max-width: none;
    }

    .footer-inner {
        padding: 0 20px;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        justify-self: center;
    }
}

/* Modal Tutorial (scoped by id to avoid conflicts) */
#tutorial-modal.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 4000; }
#tutorial-modal.modal.open { display: flex; }
#tutorial-modal .modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
#tutorial-modal .modal-dialog { position: relative; background: #fff; width: min(920px, 92vw); max-height: 88vh; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; }
#tutorial-modal .modal-header { padding: 18px 22px; border-bottom: 1px solid #eee; }
#tutorial-modal .modal-header h2 { font-size: 20px; margin: 0; }
#tutorial-modal .modal-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 8px; border: 1px solid #eee; background: #fff; cursor: pointer; font-size: 24px; line-height: 1; color: #666; }
#tutorial-modal .modal-close:hover { background: #fafafa; }
#tutorial-modal .modal-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; padding: 18px; align-items: start; }
#tutorial-modal .tutorial-step h3 { margin-bottom: 8px; font-size: 18px; color: #1a1a1a; }
#tutorial-modal .tutorial-step p { color: #555; font-size: 15px; }
#tutorial-modal .tutorial-image-wrap { border: 1px solid #eee; border-radius: 10px; overflow: hidden; background: #f9f9f9; }
#tutorial-modal .tutorial-image-wrap img { width: 100%; height: 360px; object-fit: cover; display: block; }
#tutorial-modal .modal-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid #eee; }
#tutorial-modal .step-dots { display: flex; gap: 8px; align-items: center; }
#tutorial-modal .dot { width: 10px; height: 10px; border-radius: 999px; background: #ddd; border: none; cursor: pointer; }
#tutorial-modal .dot.active { background: #e31e24; }
#tutorial-modal .nav-buttons { display: flex; gap: 10px; }
#tutorial-modal .button-ghost { padding: 12px 22px; background: #fff; color: #e31e24; border: 1px solid #e31e24; border-radius: 8px; font-weight: 500; cursor: pointer; }
#tutorial-modal .button-ghost:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 768px) {
  #tutorial-modal .modal-body { grid-template-columns: 1fr; }
  #tutorial-modal .tutorial-image-wrap img { height: 240px; }
}
