/* ========== RESET BÁSICO ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 25%, #166534 50%, #15803d 75%, #991b1b 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding-bottom: 50px;
    position: relative;
    overflow-x: hidden;
}

/* ========== AÑADIDO: DECORACIÓN NAVIDEÑA DE FONDO ========== */
body::before {
    content: '❄️';
    position: fixed;
    top: 10%;
    left: 5%;
    font-size: 3rem;
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
    animation: floatSnow 6s ease-in-out infinite;
}

body::after {
    content: '🎄';
    position: fixed;
    bottom: 10%;
    right: 5%;
    font-size: 3.5rem;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
    animation: sway 4s ease-in-out infinite;
}

@keyframes floatSnow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

@keyframes sway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

/* ========== COPOS DE NIEVE FLOTANTES ========== */
body::before {
    content: '❄️ ⛄ 🎁 ⭐';
    position: fixed;
    top: 15%;
    left: 8%;
    font-size: 2rem;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: floatDecor 8s ease-in-out infinite;
    letter-spacing: 40px;
}

@keyframes floatDecor {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-15px) translateX(10px); }
    50% { transform: translateY(-30px) translateX(-10px); }
    75% { transform: translateY(-15px) translateX(5px); }
}

/* ========== BOTÓN VOLVER (ARRIBA) ========== */
.nav-volver {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.9), rgba(127, 29, 29, 0.9));
    padding: 15px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    border-bottom: 2px solid rgba(254, 202, 202, 0.3);
}

/* ========== AÑADIDO: DECORACIÓN NAV ========== */
.nav-volver::before {
    content: '🔔';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    animation: ring 2s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: translateY(-50%) rotate(-10deg); }
    25% { transform: translateY(-50%) rotate(10deg); }
    50% { transform: translateY(-50%) rotate(-10deg); }
    75% { transform: translateY(-50%) rotate(10deg); }
}

.btn-volver {
    display: inline-block;
    text-decoration: none;
    color: #fef2f2;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(22, 101, 52, 0.8), rgba(21, 128, 61, 0.8));
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid rgba(254, 202, 202, 0.3);
    margin-left: 30px;
}

.btn-volver:hover {
    background: linear-gradient(135deg, rgba(21, 128, 61, 0.9), rgba(22, 163, 74, 0.9));
    color: #fff;
    transform: translateX(-5px) scale(1.05);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

/* ========== BOTÓN VOLVER (FINAL) ========== */
.nav-volver-final {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.9), rgba(127, 29, 29, 0.9));
    padding: 20px 30px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin-top: 60px;
    border-top: 2px solid rgba(254, 202, 202, 0.3);
    position: relative;
}

/* ========== AÑADIDO: DECORACIÓN NAV FINAL ========== */
.nav-volver-final::before {
    content: '⭐';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

.nav-volver-final::after {
    content: '⭐';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite 0.5s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.3); }
}

/* ========== TÍTULO ========== */
h1 {
    text-align: center;
    font-size: 40px;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    color: #fef2f2;
    padding: 40px 20px;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4);
    position: relative;
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.2), rgba(22, 101, 52, 0.2));
    border-radius: 15px;
    margin: 20px;
    border: 2px solid rgba(254, 202, 202, 0.2);
}

/* ========== AÑADIDO: DECORACIÓN H1 ========== */
h1::before {
    content: '✨';
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 2rem;
}

h1::after {
    content: '✨';
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
}

/* ========== IMAGEN CENTRADA ========== */
.imagen {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
    position: relative;
}

/* ========== AÑADIDO: DECORACIÓN IMAGEN ========== */
.imagen::before {
    content: '🎁';
    position: absolute;
    top: 10px;
    left: 10%;
    font-size: 2rem;
    opacity: 0.3;
    animation: bounce 2s ease-in-out infinite;
}

.imagen::after {
    content: '🎁';
    position: absolute;
    top: 10px;
    right: 10%;
    font-size: 2rem;
    opacity: 0.3;
    animation: bounce 2s ease-in-out infinite 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.imagen img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    border: 3px solid rgba(254, 202, 202, 0.3);
}

.imagen img:hover {
    transform: scale(1.03) rotate(1deg);
    box-shadow: 0 12px 40px rgba(185, 28, 28, 0.5);
}

/* ========== CONTENIDO / BIOGRAFÍA ========== */
.contenido {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

p, .biografia {
    font-size: 18px;
    font-family: 'Times New Roman', Times, serif;
    text-align: justify;
    line-height: 1.8;
    margin: 25px 40px;
    padding: 30px;
    background: linear-gradient(145deg, rgba(254, 242, 242, 0.9), rgba(240, 253, 244, 0.85));
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: #1c1917;
    border-left: 5px solid #b91c1c;
    border-right: 5px solid #166534;
    position: relative;
}

/* ========== AÑADIDO: DECORACIÓN PÁRRAFOS ========== */
p::before, .biografia::before {
    content: '☩';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    color: #b91c1c;
    opacity: 0.1;
}

/* ========== DATOS IMPORTANTES ========== */
.datos {
    max-width: 700px;
    margin: 50px auto;
    padding: 35px;
    background: linear-gradient(145deg, rgba(254, 242, 242, 0.95), rgba(240, 253, 244, 0.9));
    border-radius: 15px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(185, 28, 28, 0.3);
    position: relative;
}

/* ========== AÑADIDO: DECORACIÓN DATOS ========== */
.datos::before {
    content: '🌟';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    animation: sparkleTop 3s ease-in-out infinite;
}

@keyframes sparkleTop {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
    50% { transform: translateX(-50%) scale(1.2); opacity: 1; }
}

.datos h2 {
    text-align: center;
    font-size: 28px;
    color: #7f1d1d;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #b91c1c;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.datos ul {
    list-style: none;
    padding: 0;
}

.datos li {
    font-size: 16px;
    padding: 15px 20px;
    margin: 10px 0;
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.7), rgba(240, 253, 244, 0.7));
    border-radius: 10px;
    border-left: 4px solid #b91c1c;
    border-right: 4px solid #166534;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.datos li:hover {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.9), rgba(220, 252, 231, 0.9));
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.3);
}

.datos li strong {
    color: #7f1d1d;
    font-weight: 700;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    body::before,
    body::after {
        font-size: 2rem;
    }

    h1 {
        font-size: 28px;
        padding: 25px 15px;
        margin: 15px;
    }

    h1::before,
    h1::after {
        font-size: 1.5rem;
        top: 15px;
    }

    p, .biografia {
        font-size: 16px;
        margin: 20px 15px;
        padding: 25px 20px;
    }

    .imagen img {
        max-width: 90%;
        border-radius: 10px;
    }

    .imagen::before,
    .imagen::after {
        font-size: 1.5rem;
    }

    .datos {
        margin: 30px 15px;
        padding: 25px 20px;
    }

    .datos::before {
        font-size: 1.5rem;
    }

    .datos h2 {
        font-size: 22px;
    }

    .datos li {
        font-size: 14px;
        padding: 12px 15px;
    }

    .btn-volver {
        font-size: 14px;
        padding: 8px 15px;
    }

    .nav-volver::before {
        font-size: 1.2rem;
    }

    .nav-volver-final {
        padding: 15px 20px;
        margin-top: 40px;
    }

    .nav-volver-final::before,
    .nav-volver-final::after {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    body::before,
    body::after {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 24px;
        padding: 20px 10px;
        margin: 10px;
    }

    h1::before,
    h1::after {
        font-size: 1.2rem;
        top: 10px;
        left: 10px;
    }

    h1::after {
        right: 10px;
        left: auto;
    }

    p, .biografia {
        font-size: 14px;
        margin: 15px 10px;
        padding: 20px 15px;
    }

    .imagen::before,
    .imagen::after {
        font-size: 1.2rem;
        left: 5%;
    }

    .imagen::after {
        right: 5%;
        left: auto;
    }

    .datos {
        margin: 20px 10px;
        padding: 20px 15px;
    }

    .datos::before {
        font-size: 1.2rem;
    }

    .nav-volver::before,
    .nav-volver-final::before,
    .nav-volver-final::after {
        font-size: 1rem;
    }
}