/**
 * ÍNDICE DEL CSS
 * 
 * 1. RESET Y ESTILOS GENERALES
 * 2. ENCABEZADO Y NAVEGACIÓN
 * 3. SECCIÓN HERO
 * 4. ESTRUCTURA DE SECCIONES
 * 5. SECCIÓN DE CANDIDATOS
 * 6. SECCIÓN DE CONTACTO
 * 7. PIE DE PÁGINA
 * 8. MEDIA QUERIES - RESPONSIVE DESIGN
 */

/* ====================================
   1. RESET Y ESTILOS GENERALES
   ==================================== */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
}

/* ====================================
   2. ENCABEZADO Y NAVEGACIÓN
   ==================================== */
header {
    background-color: #1a2a6c;
    color: white;
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .main-text {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
}

.logo-text .sub-text {
    font-size: 14px;
    color: #ffffff;
}

nav {
    display: flex;
    gap: 1rem;
}

nav button {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

nav button:hover {
    background-color: rgb(15, 3, 90);
    color: #1a2a6c;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ====================================
   3. SECCIÓN HERO
   ==================================== */
.hero {
    margin-top: 100px;
    width: 100%;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgb(153, 38, 38);
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-image {
    width: 85%;
    height: 100%;
    object-fit: cover;
    position: center;
    top: 0;
    left: 0;
}

/* ====================================
   4. ESTRUCTURA DE SECCIONES
   ==================================== */
section {
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #1a2a6c;
    font-size: 2.5rem;
}

/* ====================================
   5. SECCIÓN DE CANDIDATOS
   ==================================== */
.candidates {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrar todo el contenido */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Contenedor secundario para candidatos no destacados */
.candidates .secondary-candidates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

/* Estilos para destacar al candidato principal (centrado) */
.candidate-card.featured {
    width: 100%;
    max-width: 600px; /* Ancho máximo para el candidato destacado */
    margin: 0 auto; /* Centrar horizontalmente */
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(26, 42, 108, 0.05);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(26, 42, 108, 0.2);
    padding: 1rem;
}

.candidate-card.featured .candidate-image {
    max-height: 450px;
}

.candidate-card.featured .candidate-info h3 {
    font-size: 1.5rem;
    color: #1a2a6c;
}

/* Estilos generales para las tarjetas de candidatos */
.candidate-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.candidate-card:hover {
    transform: translateY(-10px);
}

.candidate-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px 8px 0 0;
    background-color: #f5f5f5;
    padding: 10px;
}

.candidate-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.candidate-info h3 {
    margin-bottom: 0.5rem;
    color: #1a2a6c;
}

.candidate-info p {
    color: #555;
    line-height: 1.6;
}

/* ====================================
   6. SECCIÓN DE CONTACTO
   ==================================== */
.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

form input, form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

form textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: #1a2a6c;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #0f1a45;
}

/* ====================================
   7. PIE DE PÁGINA
   ==================================== */
footer {
    background-color: #1a2a6c;
    color: white;
    padding: 3rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info {
    flex: 1;
    min-width: 250px;
}

.footer-logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
}

.footer-logo-text .main-text {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
}

.footer-logo-text .sub-text {
    font-size: 14px;
    color: #ffffff;
}

.footer-info p {
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.footer-info i {
    width: 20px;
    text-align: center;
    color: #f5f5f5;
}

.social-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 200px;
}

.social-title {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.social-icons {
    display: flex;
    gap: 1.2rem;
}

.social-icon {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

.copyright {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

/* ====================================
   8. MEDIA QUERIES - RESPONSIVE DESIGN
   ==================================== */

/* Tablets y dispositivos medianos */
@media (max-width: 992px) {
    .candidates .secondary-candidates {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dispositivos móviles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 0.5rem;
    }
    
    .logo-container {
        margin-bottom: 0.5rem;
    }
    
    .logo {
        height: 40px;
    }
    .logo-text .main-text {
        font-size: 18px;
    }
    .logo-text .sub-text {
        font-size: 12px;
    }
    
    .menu-toggle {
        display: block;
    }
    nav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #1a2a6c;
        flex-direction: column;
        padding: 1rem;
    }
    nav.active {
        display: flex;
    }
    nav button {
        width: 100%;
        margin: 0.5rem 0;
        text-align: center;
        padding: 0.3rem 0.7rem;
        font-size: 0.9rem;
    }
    
    .hero {
        margin-top: 60px;
        height: 50vh;
    }
    .hero-image {
        width: 100%;
        object-fit: contain;
    }
    
    .candidate-card.featured {
        transform: scale(1);
        max-width: 100%;
    }
    .candidate-image {
        max-height: 250px;
    }
    .candidate-info p {
        font-size: 0.9rem;
        max-height: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .candidate-card.featured .candidate-image {
        max-height: 300px;
    }
    .candidates .secondary-candidates {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-logo-section {
        justify-content: center;
    }
    .footer-info p {
        justify-content: center;
        font-size: 1.1rem;
    }
    .social-section {
        align-items: center;
    }
    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    .copyright {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    .candidate-info h3 {
        font-size: 1.2rem;
    }
}

/* Dispositivos móviles pequeños */
@media (max-width: 480px) {
    nav button {
        min-width: 45%;
        padding: 0.5rem;
    }
    .hero {
        margin-top: 60px;
    }
    .contact-container {
        padding: 1.5rem;
    }
    form input, form textarea {
        padding: 1rem;
    }
    .submit-btn {
        padding: 1.2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
}