/* =================================================================
   ESTILOS · OFERTAS DE TRABAJO
   Se carga SOLO en ofertas-de-trabajo.php.
   Reutiliza las variables :root --empresa-color-* de styles.css
   ================================================================= */

/* ---------- Portada de sección (banner superior) ---------- */
.ofertas-portada-section {
    background: url('../imagenes/ofertas-top.jpg') no-repeat center center;
    background-size: cover;
    width: 100%;
    height: 500px;
}

/* ---------- Intro superior ---------- */
.ofertas-intro-section {
    background-color: #d3d3d3;
    padding: 60px 20px 50px;
}

.ofertas-intro-title {
    font-family: 'Lato', sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: #4A4A49;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

.ofertas-intro-text {
    font-size: 1.15rem;
    color: #333;
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ---------- Contenedor del listado ---------- */
.ofertas-listado-section {
    padding: 60px 15px 20px;
}

.ofertas-vacio {
    font-size: 1.2rem;
    color: #555;
    padding: 60px 0;
}

.ofertas-accordion {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 1000px;
    margin: 0 auto;
}

/* ---------- Tarjeta de oferta ---------- */
.oferta-item {
    border-radius: 0;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    /* Pequeño anclaje para que al saltar por #slug no quede tapada por nav */
    scroll-margin-top: 30px;
}

.oferta-item:hover {
    box-shadow: 0px 10px 22px rgba(0, 0, 0, 0.12);
}

/* ---------- Cabecera clickeable ---------- */
.oferta-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    border: none;
    cursor: pointer;
    text-align: left;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    transition: filter 0.25s ease;
}

.oferta-header:hover,
.oferta-header:focus-visible {
    filter: brightness(1.05);
    outline: none;
}

.oferta-header:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6);
}

/* Colores rotando igual que la home */
.oferta-rojo .oferta-header     { background-color: var(--empresa-color-rojo); }
.oferta-naranja .oferta-header  { background-color: var(--empresa-color-naranja); }
.oferta-amarillo .oferta-header { background-color: var(--empresa-color-amarillo); }

.oferta-header-main {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
}

.oferta-titulo {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.25;
    color: #ffffff;
}

/* ---------- Chips informativos ---------- */
.oferta-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.oferta-chip {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 13px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.3;
}

.oferta-chip-ubicacion::before { content: "📍 "; }
.oferta-chip-nivel::before     { content: "🇩🇪 "; margin-right: 2px; }

/* ---------- Chevron ---------- */
.oferta-chevron {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.oferta-chevron::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-right: 2.5px solid #ffffff;
    border-bottom: 2.5px solid #ffffff;
    transform: translate(-50%, -70%) rotate(45deg);
    transition: transform 0.3s ease;
}

.oferta-header[aria-expanded="true"] .oferta-chevron {
    background-color: rgba(255, 255, 255, 0.4);
}

.oferta-header[aria-expanded="true"] .oferta-chevron::before {
    transform: translate(-50%, -30%) rotate(225deg);
}

/* ---------- Cuerpo expandible ---------- */
.oferta-body {
    background-color: #ffffff;
}

.oferta-body-inner {
    padding: 28px 32px 32px;
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
}

.oferta-resumen {
    font-size: 1.1rem;
    font-style: italic;
    color: #4A4A49;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.oferta-seccion {
    font-family: 'Lato', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #d43835;
    margin: 24px 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.oferta-seccion:first-of-type {
    margin-top: 8px;
}

.oferta-lista {
    padding-left: 22px;
    margin: 0 0 8px;
}

.oferta-lista li {
    margin-bottom: 8px;
}

/* ---------- Bloque de contacto por vacante ---------- */
.oferta-contacto {
    margin-top: 32px;
    padding: 22px 26px;
    background-color: #e5e5e5;
    border-radius: 0;
}

.oferta-contacto-titulo {
    font-weight: 700;
    color: #000;
    margin: 0 0 12px;
}

.oferta-contacto-nombre {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.oferta-contacto-dato {
    margin-bottom: 4px;
}

.oferta-contacto-label {
    display: inline-block;
    min-width: 85px;
    font-weight: 600;
}

.oferta-contacto a {
    color: #000;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.oferta-contacto a:hover {
    color: #e0714d;
    border-bottom-color: #e0714d;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .ofertas-portada-section { height: 350px; }

    .ofertas-intro-section { padding: 48px 18px 40px; }
    .ofertas-intro-title   { font-size: 2rem; }
    .ofertas-intro-text    { font-size: 1rem; }

    .ofertas-listado-section { padding: 40px 10px 20px; }
    .ofertas-accordion       { gap: 16px; }

    .oferta-header {
        padding: 20px 18px;
        gap: 12px;
    }
    .oferta-titulo {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }
    .oferta-chip {
        font-size: 0.78rem;
        padding: 4px 10px;
    }
    .oferta-chevron {
        width: 28px;
        height: 28px;
    }
    .oferta-body-inner {
        padding: 22px 20px 26px;
    }
    .oferta-seccion {
        font-size: 1.05rem;
    }
    .oferta-contacto {
        padding: 18px 16px;
    }
    .oferta-contacto-label {
        display: block;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .oferta-header {
        flex-wrap: nowrap;
    }
}
