/* Estilos generales para formularios */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 50%, #fff 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Espacio para el header fijo */
}

.main-content {
    flex: 1 0 auto;
}

/* --- HEADER Y NAVEGACIÓN --- */
.site-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #e11b1f;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    height: 50px;
    width: auto;
}

.logo-section h1 {
    color: #e11b1f;
    font-size: 1.8em;
    margin: 0;
    font-weight: 700;
}

.nav-link {
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-link:hover {
    color: #e11b1f;
    background: rgba(225, 27, 31, 0.08);
}

.nav-link.active {
    color: #e11b1f;
    background: rgba(225, 27, 31, 0.15);
}


/* --- HEADER RESPONSIVE (CORREGIDO) --- */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

/* Estilos del menú para ESCRITORIO */
.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    transition: all 0.3s;
}

/* Botón hamburguesa (oculto en escritorio) */
.nav-toggle {
    display: none; /* Oculto por defecto */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1100;
}
.nav-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #e11b1f;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animación del botón hamburguesa al estar activo */
.nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* VISTA MÓVIL (cuando la pantalla sea de 900px o menos) */
@media (max-width: 900px) {
    .header-container {
        flex-direction: row; 
        padding: 0 15px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none; /* Oculto hasta que se haga clic */
        position: absolute;
        top: 60px; /* Justo debajo del header */
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: center; /* Centramos los links */
        gap: 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 10px 0;
        z-index: 1001;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 15px 20px;
        text-align: center;
        border-bottom: 1px solid #f3f4f6;
    }
    .nav-link:last-child {
        border-bottom: none;
    }
}


/* --- HERO SECTION --- */
.hero-section {
    background: linear-gradient(135deg, #fff 80%, #f8fafc 100%);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    color: #e11b1f;
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(225, 27, 31, 0.08);
}

.hero-subtitle {
    color: #374151;
    font-size: 1.3em;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    color: #1f2937;
}

.stat-number {
    color: #e11b1f;
    font-size: 2.5em;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 1em;
    opacity: 0.8;
}

/* --- FILTROS DE VACANTES (CORREGIDO) --- */
#filtros-vacantes {
    max-width: 950px;
    margin: 0 auto 36px auto;
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid #e5e7eb;
}

.filtros-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 28px;
}

.filtro-item {
    display: flex;
    flex-direction: column;
}

.filtro-item.palabra-clave {
    grid-column: 1 / -1; 
    text-align: center;
}

.filtro-item label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    text-align: left;
}

.filtro-item input[type="text"],
.filtro-item select {
    padding: 10px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: #fdfdff;
    transition: border 0.2s, box-shadow 0.2s;
    width: 100%;
}

.filtro-item input[type="text"]:focus,
.filtro-item select:focus {
    border-color: #e11b1f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 27, 31, 0.1);
}

.filtro-item.palabra-clave input[type="text"] {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.filtro-boton {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 10px;
}

.filtro-boton button {
    background: #e11b1f;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    min-width: 200px;
}

.filtro-boton button:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

/* Estilos para Select2 */
.select2-container--default .select2-selection--single {
    height: 43px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #e11b1f;
    box-shadow: 0 0 0 3px rgba(225, 27, 31, 0.1);
}

/* VISTA MÓVIL para los filtros */
@media (max-width: 900px) {
    #filtros-vacantes {
        padding: 20px;
    }
    .filtros-grid {
        grid-template-columns: 1fr;
        gap: 18px 0;
    }
}


/* --- SECCIÓN DE VACANTES --- */
.vacancies-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.no-vacantes {
    text-align: center;
    padding: 40px 20px;
}
.no-vacantes h2 {
    color: #1f2937;
    margin-bottom: 10px;
}

/* Grid y Tarjetas de Vacantes (Copiado de tu código en el PHP) */
.custom-vacancies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    justify-content: center;
    align-items: stretch;
    margin-top: 32px;
}
@media (max-width: 1400px) {
    .custom-vacancies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 1050px) {
    .custom-vacancies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    .custom-vacancies-grid {
        grid-template-columns: 1fr;
    }
}
.custom-vacancy-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(30, 41, 59, 0.10), 0 1.5px 6px 0 rgba(225, 27, 31, 0.08);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    border: 1.5px solid #e5e7eb;
}
.custom-vacancy-card:hover {
    box-shadow: 0 8px 32px 0 rgba(225, 27, 31, 0.13), 0 2px 8px 0 rgba(30, 41, 59, 0.10);
    transform: translateY(-4px);
    border-color: #e11b1f;
}
.vacancy-card-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.custom-vacancy-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    background: #f3f4f6;
}
.custom-vacancy-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.custom-vacancy-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e11b1f;
    margin-bottom: 8px;
    text-align: center;
}
.custom-vacancy-meta {
    display: flex;
    gap: 12px;
    font-size: 0.95rem;
    color: #334155;
    margin-bottom: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.custom-vacancy-meta i {
    color: #e11b1f;
    margin-right: 4px;
}
.custom-vacancy-description {
    color: #475569;
    font-size: 1rem;
    margin-bottom: 14px;
    text-align: center;
    min-height: 48px;
}
.custom-vacancy-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 10px;
    width: 100%;
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.custom-vacancy-details i {
    color: #e11b1f;
    margin-right: 4px;
}
.custom-vacancy-extra {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 10px;
    width: 100%;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.vacancy-card-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 16px;
}
.custom-apply-button {
    background: #e11b1f;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px 0 rgba(225, 27, 31, 0.08);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.custom-apply-button:hover {
    background: #b91c1c;
    color: #fff;
    box-shadow: 0 4px 16px 0 rgba(225, 27, 31, 0.13);
}

/* PAGINACIÓN MODERNA */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 0 0;
}
.pagination .page-link {
    display: inline-block;
    background: #fff;
    color: #e11b1f;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 1.08rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px 0 rgba(225, 27, 31, 0.06);
}
.pagination .page-link.active, .pagination .page-link:hover {
    background: #e11b1f;
    color: #fff;
    box-shadow: 0 4px 16px 0 rgba(225, 27, 31, 0.13);
}

/* --- OTRAS SECCIONES --- */
.about-section, .contact-section {
    background: #f8fafc;
    border-radius: 12px;
    margin: 40px auto 32px auto;
    max-width: 800px;
    padding: 36px 32px 28px 32px;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.07);
}
.about-section h2, .contact-section h2 {
    color: #e11b1f;
    font-size: 2.1rem;
    margin-bottom: 16px;
    font-weight: 700;
    text-align: center;
}
.about-section p, .contact-section p {
    color: #374151;
    font-size: 1.15rem;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 0;
}
@media (max-width: 600px) {
    .about-section, .contact-section {
        padding: 18px 8px 14px 8px;
    }
    .about-section h2, .contact-section h2 {
        font-size: 1.3rem;
    }
    .about-section p, .contact-section p {
        font-size: 1rem;
    }
}