
:root {
    --primario: #e67e22;
    --secundario: #d35400;
    --fondo: #fdfaf7;
    --texto: #2c3e50;
    --max-width: 1240px;
    --gradiente-header: linear-gradient(120deg, rgba(44, 62, 80, 0.9), rgba(142, 68, 12, 0.82));
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--fondo);
    color: var(--texto);
    line-height: 1.7;
}

main {
    max-width: var(--max-width);
    margin: -40px auto 80px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* Estilos de la Cabecera - lasrecetasdecharo.es */
#main-header {
    min-height: 180px;
    display: block;
}

header {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: 
        var(--gradiente-header),
        url('https://images.unsplash.com/photo-1544148103-0773bf10d330?q=80&w=1600&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; 
    color: white;
    padding: 70px 0;
    text-align: center;
    box-shadow: 0 12px 28px rgba(25, 35, 45, 0.22);
    transition: padding 0.3s ease-out;
}

.header-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.header-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px; /* Separación con el título */
}

.btn-volver {
    color: #fdfaf7;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-placeholder {
    width: 42px; /* Mismo ancho que .btn-volver */
    flex-shrink: 0;
}

.btn-volver:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

.header-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 42px;
    padding: 0 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(3px);
    flex-shrink: 0; /* Evita que se encoja */
}

header h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    margin: 0;
    text-shadow: 0 5px 18px rgba(0, 0, 0, 0.45);
}

header p {
    font-size: clamp(1.1rem, 2.3vw, 1.55rem);
    opacity: 0.95;
    margin: 14px auto 0;
}

/* Clases de utilidad para visibilidad (controlado por JS) */
.hidden {
    display: none !important; /* Desaparece y no ocupa espacio */
}
.invisible {
    visibility: hidden; /* Se oculta pero reserva su espacio */
}

/* Animación suave para la entrada del contenido */
.header-content {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive del Header */
@media (max-width: 768px) {
    header { 
        padding: 40px 0 50px;
    }

    .btn-volver, .header-placeholder {
        width: 38px;
        height: 38px;
    }

    .header-badge {
        height: 38px;
        font-size: 0.75rem;
        padding: 0 18px;
    }

    header h1 {
        font-size: 1.8rem; 
    }

    header p {
        font-size: 1rem;
    }
}

/* Estilos del pie de página - lasrecetasdecharo.es */
footer {
    width: 100%;
    background: #2c3e50;
    color: white;
    padding: 60px 0;
    text-align: center;
    line-height: normal;
    margin-top: 60px;
}

.footer-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

footer a {
    color: #ffbd80;
    text-decoration: none;
    font-weight: bold;
    margin: 0 20px;
    transition: 0.3s;
}

footer a:hover {
    color: white;
}

.footer-links {
    margin: 10px 0 40px;
}

.copy {
    font-size: 0.9em;
    opacity: 0.6;
    margin-top: 30px;
}
