/* =========================================================
   PRÁCTICAS PROFESIONALIZANTES — Proyecto WEBEPET
   Mismo estilo que la página de la Baliza, en tonos naranja.
   ========================================================= */

:root {
    --brasa: #3A1A08;        /* marrón tostado: encabezado y pie */
    --brasa-2: #55280D;
    --naranja: #BF4A0C;      /* naranja quemado: portada */
    --naranja-2: #D9620F;
    --tinta: #2A1508;        /* texto principal */
    --tinta-suave: #6B5243;  /* texto secundario */
    --arena: #F4E6D6;        /* fondo general */
    --papel: #FCF6EE;        /* paneles claros */
    --senal: #FFA53A;        /* naranja vivo: acento */
    --durazno: #FFD9AE;      /* naranja claro sobre fondos oscuros */
    --linea: #E3CDB6;

    --f-titulo: "Archivo", "Arial Narrow", Arial, sans-serif;
    --f-texto: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;

    --ancho: 1160px;
    --gutter: clamp(16px, 4vw, 40px);

    color-scheme: only light;
}

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    font-family: var(--f-texto);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--tinta);
    background: var(--arena);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible {
    outline: 3px solid var(--senal);
    outline-offset: 3px;
}

.contenedor {
    max-width: var(--ancho);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Tipografía ---------- */

h1, h2, h3 {
    font-family: var(--f-titulo);
    font-stretch: 75%;
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.005em;
    color: var(--brasa);
}

h1 { font-size: clamp(1.9rem, 8.6vw, 4rem); overflow-wrap: break-word; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: 0.5em; }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); margin-bottom: 0.4em; line-height: 1.1; }

p + p { margin-top: 0.9em; }

.bajada {
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    line-height: 1.5;
    color: var(--tinta-suave);
    max-width: 38em;
}

.texto { max-width: 40em; }

/* ---------- Botones y enlaces ---------- */

.boton {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.85em 1.4em;
    font-family: var(--f-titulo);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: background-color .2s, color .2s, border-color .2s;
}

.boton-senal { background: var(--senal); color: var(--tinta); }
.boton-senal:hover { background: #FFBE6B; }

.boton-linea { border-color: currentColor; color: inherit; }
.boton-linea:hover { background: rgba(255,255,255,.12); }

.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.enlace {
    font-weight: 600;
    color: var(--brasa);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    text-decoration-color: var(--naranja-2);
}
.enlace:hover { text-decoration-color: var(--brasa); }

/* =========================================================
   ENCABEZADO
   ========================================================= */

.encabezado {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--brasa);
    color: #fff;
}

.encabezado .contenedor {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.marca {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: var(--f-titulo);
    font-stretch: 75%;
    font-weight: 800;
    font-size: 1.35rem;
    line-height: 1;
}

.marca-sello {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: var(--senal);
    color: var(--brasa);
    font-size: 1.7rem;
}

.navegacion { display: flex; gap: 4px; }

.navegacion a {
    padding: 8px 14px;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    color: rgba(255,255,255,.82);
    border-radius: 4px;
}

.navegacion a:hover { color: #fff; background: var(--brasa-2); }

.menu-boton {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

/* =========================================================
   PORTADA
   ========================================================= */

.portada {
    position: relative;
    background: var(--naranja);
    color: #fff;
    overflow: hidden;
}

.portada-foto {
    position: absolute;
    inset: 0 0 0 46%;
}

.portada-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 44%;
}

/* fundido de la foto hacia el naranja, para que el texto se lea */
.portada-foto::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--naranja) 0%, rgba(191,74,12,.6) 28%, rgba(191,74,12,0) 60%);
}

.portada .contenedor {
    position: relative;
    padding-top: clamp(56px, 8vw, 104px);
    padding-bottom: clamp(56px, 8vw, 104px);
}

.portada-texto { max-width: 680px; }
.portada-texto .bajada { max-width: 30em; }

.sobretitulo {
    font-family: var(--f-titulo);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--durazno);
    margin-bottom: 14px;
}

.portada h1 { color: #fff; }

.portada h1 span { display: block; color: var(--durazno); }

.portada .bajada { color: rgba(255,255,255,.92); margin-top: 24px; }

/* Ficha de la jornada */
.ficha {
    margin-top: 32px;
    max-width: 520px;
    background: var(--brasa);
    border-radius: 6px;
    border-left: 6px solid var(--senal);
    padding: 6px 20px;
}

.ficha div {
    display: grid;
    grid-template-columns: 7.5em 1fr;
    gap: 12px;
    padding: 11px 0;
}

.ficha div + div { border-top: 1px solid rgba(255,255,255,.14); }

.ficha dt { color: var(--senal); font-weight: 600; font-size: .95rem; }
.ficha dd { color: #fff; line-height: 1.35; }

/* Franja */
.premio {
    background: var(--senal);
    color: var(--tinta);
}

.premio .contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 32px;
    padding-top: 22px;
    padding-bottom: 22px;
}

.premio p {
    font-family: var(--f-titulo);
    font-stretch: 75%;
    font-weight: 800;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    line-height: 1.1;
}

.premio .enlace { color: var(--tinta); text-decoration-color: var(--tinta); }

/* Secciones genéricas */
.seccion { padding: clamp(64px, 9vw, 112px) 0; }
.seccion-clara { background: var(--papel); }

.encabezado-seccion { max-width: 40em; margin-bottom: 40px; }

/* Bloque texto + foto */
.dupla {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.dupla-invertida .dupla-foto { order: -1; }

.dupla .bajada { margin-bottom: 1em; }

.dupla-foto img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}

.dupla-foto .foto-alta { aspect-ratio: 4 / 5; object-position: 50% 62%; }

.dupla-foto figcaption {
    margin-top: 10px;
    font-size: 0.92rem;
    color: var(--tinta-suave);
}

/* Cita del docente */
.cita {
    padding-left: 24px;
    border-left: 6px solid var(--naranja-2);
    font-size: clamp(1.2rem, 1.9vw, 1.4rem);
    line-height: 1.5;
    font-style: italic;
    color: var(--tinta);
}

.aclaracion {
    margin-top: 36px;
    padding: 22px 26px;
    background: var(--papel);
    border-left: 6px solid var(--senal);
    font-size: 1.12rem;
    font-weight: 600;
}

/* Agradecimiento */
.galardon {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 44px;
    align-items: center;
    padding: 40px clamp(24px, 4vw, 52px);
    background: var(--brasa);
    color: #fff;
    border-radius: 6px;
}

.galardon-numero {
    font-family: var(--f-titulo);
    font-stretch: 75%;
    font-weight: 800;
    font-size: clamp(3.4rem, 8vw, 6rem);
    line-height: .9;
    color: var(--senal);
}

.galardon h3 { color: #fff; margin-bottom: 8px; }
.galardon p { color: rgba(255,255,255,.85); font-size: 1.12rem; max-width: 36em; }

/* Galería */
.galeria {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.galeria li { aspect-ratio: 3 / 4; }
.galeria .ancha { grid-column: span 2; aspect-ratio: auto; }

.galeria a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: var(--brasa);
    cursor: zoom-in;
}

.galeria img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 52%;
    transition: transform .4s ease;
}

.galeria a:hover img { transform: scale(1.04); }

/* Visor de fotos */
.visor {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    padding: 56px 12px 16px;
    background: rgba(30,12,3,.94);
}

.visor[open] { display: flex; align-items: center; justify-content: center; gap: 8px; }

.visor::backdrop { background: rgba(30,12,3,.6); }

.visor img {
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.visor button {
    flex: none;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--senal);
    color: var(--brasa);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.visor button:hover { background: #FFBE6B; }

.visor-cerrar { position: absolute; top: 8px; right: 12px; font-size: 1.2rem !important; }

/* Cierre */
.cierre {
    background: var(--naranja);
    color: #fff;
}

.cierre h2 { color: #fff; max-width: 17em; font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.06; }
.cierre h2 span { color: var(--durazno); }
.cierre .bajada { color: rgba(255,255,255,.92); }

/* =========================================================
   PIE
   ========================================================= */

.pie {
    background: var(--brasa);
    color: rgba(255,255,255,.82);
    padding: 64px 0 28px;
    font-size: 0.98rem;
}

.pie-grilla {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 40px;
}

.pie h2 {
    color: #fff;
    font-size: 1.9rem;
    margin-bottom: 10px;
}

.pie h3 {
    color: var(--senal);
    font-family: var(--f-texto);
    font-stretch: 100%;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
}

.pie p { max-width: 26em; }
.pie ul { list-style: none; }
.pie li + li { margin-top: 6px; }
.pie a { text-decoration: none; }
.pie li a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.35); }
.pie a:hover { color: var(--senal); }

.pie-base {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 48px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.15);
    font-size: 0.9rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 960px) {
    .portada-foto { inset: 0 0 0 30%; opacity: .5; }
    .galardon { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .menu-boton { display: block; }

    .navegacion {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 8px var(--gutter) 16px;
        background: var(--brasa);
        border-top: 1px solid rgba(255,255,255,.12);
    }

    .navegacion.abierta { display: flex; }

    .navegacion a { padding: 12px 0; font-size: 1.05rem; }

    .portada-foto { position: relative; inset: auto; opacity: 1; height: 280px; }
    .portada-foto::before { background: linear-gradient(0deg, var(--naranja) 0%, rgba(191,74,12,0) 55%); }
    .portada .contenedor { padding-top: 12px; }

    .ficha div { grid-template-columns: 1fr; gap: 0; }

    .dupla { grid-template-columns: 1fr; }
    .dupla-invertida .dupla-foto { order: 0; }

    .galeria { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .galeria .ancha,
    .galeria li:last-child { grid-column: span 2; aspect-ratio: 16 / 9; }

    .visor { padding: 60px 4px 76px; }
    .visor-flecha { position: absolute; bottom: 14px; }
    .visor-anterior { left: calc(50% - 60px); }
    .visor-siguiente { right: calc(50% - 60px); }

    .pie-grilla { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
