:root {
    --dark-green: #142C14;
    --cal-poly: #2D5128;
    --fern-green: #537B2F;   
    --asparagus: #8DA750;    
    --mindaro: #d3dfc5;      
    --blanco-puro: #ffffff;
    --texto-base: #2D5128;
    --paper-bg: #f4eee1; 
    --paper-text: #3e3222; 
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--mindaro);
    color: var(--texto-base);
    font-family: 'Quicksand', sans-serif;
    overflow-x: hidden;
    background-image: url("https://www.transparenttextures.com/patterns/natural-paper.png");
    background-attachment: fixed;
}

/* --- MARCA IZQUIERDA --- */
.brand-corner {
    position: absolute;
    top: 25px;
    left: 30px;
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--cal-poly);
    letter-spacing: 1px;
    z-index: 2000;
    text-transform: lowercase;
}

/* --- NAVEGACIÓN --- */
nav { padding: 50px 20px; display: flex; justify-content: center; animation: fadeInUp 1s ease-out; }
nav ul {
    display: flex; gap: 20px; list-style: none;
    background: var(--blanco-puro); padding: 15px 30px;
    border-radius: 100px; border: 3px solid var(--asparagus);
    box-shadow: 0 15px 35px rgba(45, 81, 40, 0.15);
}
nav li { padding: 12px 28px; border-radius: 50px; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
nav a { text-decoration: none; color: var(--cal-poly); font-weight: 600; font-size: 1.2rem; text-transform: uppercase; }
nav li:hover { 
    background: var(--fern-green); 
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 10px 20px rgba(83, 123, 47, 0.3);
}
nav li:hover a { color: white; }

/* --- HERO --- */
.hero-container { height: 85vh; display: flex; align-items: center; justify-content: center; animation: fadeInUp 1.2s ease-out; }
.hero-card {
    width: 100%; max-width: 1300px; height: 100%;
    background: url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?q=80&w=1600&auto=format&fit=crop') center/cover;
    border-radius: 400px 400px 80px 80px; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden; border: 15px solid var(--blanco-puro);
    box-shadow: 0 40px 80px rgba(0,0,0,0.15);
}
.hero-content { position: relative; z-index: 10; text-align: center; width: 100%; }
.hero-content h1 {
    font-family: 'DM Serif Display', serif; font-size: clamp(4rem, 12vw, 9rem);
    color: var(--blanco-puro);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 30px var(--asparagus);
    margin-bottom: 10px;
}
.hero-content .subtitle {
    color: white; letter-spacing: 8px; text-transform: uppercase;
    font-size: 1.2rem; display: block; text-align: center;
}

/* --- CONTENIDOS --- */
.content-wrapper { max-width: 1100px; margin: -60px auto 100px; position: relative; z-index: 20; padding: 0 20px; }

.welcome-box {
    background: linear-gradient(145deg, #ffffff, #f9faf8); padding: 80px; border-radius: 80px;
    box-shadow: 0 30px 70px rgba(45, 81, 40, 0.12); border: 1px solid rgba(141, 167, 80, 0.3);
    border-bottom: 12px solid var(--asparagus); margin-bottom: 80px; text-align: center;
}

.welcome-box h2 { font-family: 'DM Serif Display', serif; font-size: 4.5rem; color: var(--dark-green); margin-bottom: 25px; line-height: 1; }

.gif-container { width: 80px; height: 80px; margin: 0 auto 30px; display: flex; align-items: center; justify-content: center; }
.gif-container img { max-width: 100%; max-height: 100%; object-fit: contain; }

.welcome-box p { font-size: 1.5rem; line-height: 1.8; color: var(--cal-poly); max-width: 800px; margin: 0 auto 30px; }

/* --- SEPARADOR NOVEDADES --- */
.novedades-title { font-family: 'DM Serif Display', serif; font-size: 4rem; text-align: center; color: var(--cal-poly); margin-bottom: 10px; }
.novedades-divider {
    width: 100%; max-width: 300px; height: 30px; margin: 0 auto 40px;
    border-top: 2px solid var(--asparagus); border-bottom: 2px solid var(--asparagus); position: relative;
}
.novedades-divider::after {
    content: "✦"; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); background: var(--mindaro); padding: 0 15px; color: var(--asparagus);
}

/* --- PERIÓDICO ACTUALIZADO --- */
.newspaper-section {
    background-color: var(--paper-bg); color: var(--paper-text);
    font-family: 'Playfair Display', serif; padding: 50px;
    border-radius: 5px; box-shadow: 20px 20px 0px var(--cal-poly);
    margin-bottom: 80px; background-image: url("https://www.transparenttextures.com/patterns/natural-paper.png");
}
.newspaper-header { text-align: center; border-bottom: 2px solid #333; margin-bottom: 30px; padding-bottom: 10px; }

.newspaper-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }

/* Contenedor de la foto real en el periódico */
.newspaper-img-frame {
    border: 4px double #333;
    padding: 5px;
    background: #fff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
}
.newspaper-img-frame img {
    width: 100%;
    height: auto;
    display: block;
    filter: sepia(0.3) grayscale(0.5); /* Efecto vintage */
    transition: all 0.5s ease;
}
.newspaper-img-frame:hover img {
    filter: none; /* Se pone a color al pasar el mouse */
}

/* --- CAJITA DE MÚSICA --- */
#music-box {
    position: fixed; 
    /* Quitamos bottom y right para que no interfieran con el movimiento */
    top: auto; 
    left: auto;
    /* Usamos transform para posicionarla inicialmente sin bloquear el JS */
    inset: auto 30px 30px auto; 
    
    z-index: 9999;
    background: var(--blanco-puro); 
    padding: 15px; 
    border-radius: 20px;
    border: 3px solid var(--asparagus); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.2); 
    width: 300px; 
    cursor: grab;
    
    /* Evita que se seleccionen textos mientras arrastras */
    user-select: none; 
    touch-action: none; 
}

#music-box:active {
    cursor: grabbing;
}

audio { 
    width: 100%; 
    height: 35px; 
    outline: none;
}











/* --- ESTILOS DE CONTACTO MEDIEVAL VINTAGE (Reemplazo) --- */

/* Importar fuentes adicionales para estilo medieval/antiguo */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=IM+Fell+English+SC&display=swap');

:root {
    --pergamino-bg: #f2e8c9; /* Color base pergamino */
    --borde-oro: #b8860b; /* Oro viejo */
    --texto-medieval: #3e2723; /* Marrón muy oscuro */
    --rojo-sello: #8b0000; /* Rojo carmesí oscuro */
}

.contact-section-medieval {
    background-color: #121a13; /* Fondo extra oscuro para contraste */
    padding: 80px 20px;
    margin-top: 50px;
    color: var(--texto-medieval);
    font-family: 'IM Fell English SC', serif; /* Fuente tipo libro antiguo */
    position: relative;
    overflow: hidden;
}

/* Divisores antiguos */
.ancient-divider {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.ancient-divider.bottom {
    margin-top: 40px;
    margin-bottom: 0;
}

.ancient-divider::before,
.ancient-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--borde-oro), transparent);
}

.ancient-divider::before { left: 10%; }
.ancient-divider::after { right: 10%; }

.divider-ornament {
    font-size: 2rem;
    color: var(--borde-oro);
    font-family: 'Cinzel Decorative', serif;
}

/* Contenedor del Manuscrito */
.manuscript-wrapper {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.manuscript-details {
    background-color: var(--pergamino-bg);
    background-image: url('https://www.transparenttextures.com/patterns/parchment.png'); /* Textura de pergamino */
    border: 15px solid #fff; /* Borde exterior blanco simulando papel */
    border-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50"><rect width="50" height="50" fill="%23f2e8c9"/><circle cx="25" cy="25" r="20" fill="none" stroke="%23b8860b" stroke-width="2"/></svg>') 15 round; /* Borde decorativo básico */
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
    border-radius: 5px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.manuscript-details:hover {
    transform: scale(1.02);
}

/* Sello y Cabecera */
.manuscript-seal {
    list-style: none;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.manuscript-seal::-webkit-details-marker { display: none; }

.manuscript-seal h3 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 2.2rem;
    color: var(--texto-medieval);
    margin: 15px 0 5px 0;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.seal-sub {
    font-size: 1rem;
    color: #5d4037;
    font-style: italic;
}

/* Sello de Cera simulado */
.wax-seal {
    width: 70px;
    height: 70px;
    background-color: var(--rojo-sello);
    background-image: url('https://www.transparenttextures.com/patterns/reign.png');
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.5);
    border: 3px solid #600000;
}

.seal-letter {
    font-family: 'Cinzel Decorative', serif;
    font-size: 3rem;
    color: var(--borde-oro);
    font-weight: bold;
}

/* Esquinas ornamentales inspiradas en la foto */
.corner-ornament {
    position: absolute;
    width: 100px;
    height: 100px;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.6;
}

.corner-ornament.top-right {
    top: 10px;
    right: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M100,0 C80,10 60,0 50,15 C40,0 20,10 0,0" fill="none" stroke="%233e2723" stroke-width="1"/></svg>'); /* Ejemplo simple de filigrana */
}

.corner-ornament.bottom-left {
    bottom: 10px;
    left: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,100 C20,90 40,100 50,85 C60,100 80,90 100,100" fill="none" stroke="%233e2723" stroke-width="1"/></svg>');
}

/* Contenido del Manuscrito Abierto */
.manuscript-content {
    padding: 0 30px 40px 30px;
    cursor: default;
    animation: unfoldManucript 0.6s ease-out;
}

/* Marco interior simulando las líneas y borde de la foto */
.inner-frame {
    border: 2px solid var(--borde-oro);
    padding: 30px;
    background-image: linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 100% 1.6em; /* Simula las líneas de escritura de la foto */
    position: relative;
}

.inner-frame::before {
    content: "";
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px solid rgba(184, 134, 11, 0.3);
}

.medieval-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1; /* Sobre las líneas de fondo */
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.1rem;
    color: #212121;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, 
.form-group textarea {
    padding: 12px;
    border: 1px solid #c7b299;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    font-family: 'IM Fell English SC', serif;
    font-size: 1rem;
    color: var(--texto-medieval);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--borde-oro);
    background-color: rgba(255, 255, 255, 0.9);
}

/* Botón Medieval */
.medieval-btn {
    background-color: var(--rojo-sello);
    background-image: url('https://www.transparenttextures.com/patterns/asfalt-dark.png');
    color: var(--pergamino-bg);
    padding: 15px;
    border: 2px solid #600000;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.medieval-btn:hover {
    background-color: #a30000;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

/* Animación de desdoble */
@keyframes unfoldManucript {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scaleY(0);
        transform-origin: top;
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scaleY(1);
        transform-origin: top;
    }
}





.medieval-color-picker {
    -webkit-appearance: none; /* Quita el estilo base de Chrome/Safari */
    -moz-appearance: none;    /* Quita el estilo base de Firefox */
    appearance: none;
    
    width: 80px;
    height: 40px;
    cursor: pointer;
    background-color: transparent; /* Evita que el fondo del pergamino interfiera */
    border: 3px double var(--borde-oro); /* Un borde elegante medieval */
    padding: 0; /* CRÍTICO: El padding suele ocultar el color en algunos navegadores */
    border-radius: 4px;
}

/* Este selector es el truco para Chrome/Edge/Safari */
.medieval-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.medieval-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

/* Este selector es el truco para Firefox */
.medieval-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 2px;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.color-label {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--texto-medieval);
}




