/* * ======================================
 * SISTEMA DE DISEÑO: ESTILO ETÉREO DIGITAL
 * Implementación CSS
 * ======================================
 */

:root {
    /* Paleta de Color */
    --color-bg-centro: #F7F4F0;
    --color-bg-borde: #F5F0F2;
    --color-texto-primario: #000000;
    --color-texto-secundario: #222222;
    --color-visual-medio: #F0EAD6;

    /* Tipografía */
    --font-principal: 'Dosis', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --peso-principal: 300;
    --peso-ui: 400;
}

/* --- Globales y Fondo --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(ellipse at center, var(--color-bg-centro), var(--color-bg-borde));
    color: var(--color-texto-secundario);
    font-family: var(--font-principal);
    font-weight: var(--peso-principal);
    line-height: 1.7;
    min-height: 100vh;
}

/* --- Estructura y Espaciado --- */
section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* --- Tipografía --- */
h1, h2, h3 {
    font-family: var(--font-principal);
    font-weight: var(--peso-principal);
    color: var(--color-texto-primario);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: 1px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 4rem;
}

h3 {
    font-size: 1.2rem;
    color: var(--color-texto-secundario);
}

p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
}

a {
    color: var(--color-texto-primario);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* --- Componente: Navegación --- */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    /* [CAMBIO] Tamaño y color actualizados */
    font-size: 16px; 
    font-weight: var(--peso-ui);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #FFFFFF; /* Color blanco */
    z-index: 101;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    /* [CAMBIO] Tamaño y color actualizados */
    font-size: 16px;
    font-weight: var(--peso-ui);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #FFFFFF; /* Color blanco */
}

/* Estilos del Botón de Hamburguesa */
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    /* [CAMBIO] Color actualizado */
    background-color: #FFFFFF; /* Color blanco */
    position: absolute;
    left: 0;
    transition: all 0.3s ease-out;
}

.hamburger-line:nth-child(1) {
    top: 0;
}

.hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-line:nth-child(3) {
    bottom: 0;
}

.hamburger-btn.is-active .hamburger-line:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Animación de 'X' en modo abierto */
/* (Se necesita un color que contraste con el fondo claro del menú) */
.hamburger-btn.is-active .hamburger-line {
    background-color: var(--color-texto-primario); /* Negro */
}


/* --- Sección: Hero (index.html) --- */
#hero {
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('./img/hero.png');
    background-size: cover;
    background-position: center;
    animation: slowZoom 30s infinite alternate ease-in-out;
}

@keyframes slowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.hero-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease-out, transform 1s ease-out;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

#hero h1 {
    color: white;
    font-size: 3.5rem;
}

#hero p {
    font-size: 1.2rem;
    color: white;
    font-weight: 300;
}

/* --- Sección: Servicios (index.html) --- */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.servicio-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--color-visual-medio);
    padding: 2rem;
    transition: all 0.3s ease;
    text-align: center;
}

.servicio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.servicio-icon {
    margin-bottom: 1.5rem;
}

.servicio-icon svg {
    width: 64px;
    height: 64px;
    fill: none;
    stroke: var(--color-texto-secundario);
    stroke-width: 1.5;
    opacity: 0.8;
}

.servicio-item h3 {
    text-align: left;
    margin-bottom: 0.5rem;
}

.servicio-item p {
    font-size: 0.9rem;
    text-align: left;
    margin: 0;
    font-weight: 400;
}

/* --- Sección: Esquelas (index.html) --- */
.esquelas-list {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.esquela-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.esquela-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--color-visual-medio);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    transition: box-shadow 0.3s ease; 
}

.esquela-link:hover {
    transform: translateY(-3px);
}
.esquela-link:hover .esquela-item {
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.esquela-fecha-box {
    background: var(--color-texto-primario);
    color: var(--color-bg-centro);
    width: 130px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
}

.esquela-fecha-box svg {
    width: 48px;
    height: 48px;
    stroke: var(--color-bg-centro);
    stroke-width: 1.5;
    margin-bottom: 0.75rem;
}

.fecha-dia {
    font-size: 2.2rem;
    font-weight: var(--peso-ui);
    line-height: 1;
}

.fecha-mes-ano {
    font-size: 1rem;
    font-weight: var(--peso-ui);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.esquela-info {
    flex-grow: 1;
    padding: 1.5rem 2rem;
}

.esquela-info h3 {
    text-align: left;
    margin-bottom: 0.5rem;
}

.esquela-info p {
    text-align: left;
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
}

/* --- Sección: Instalaciones (index.html) --- */
.carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--color-visual-medio);
    background: white;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.carousel-slide img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 2rem;
    font-weight: 100;
    color: var(--color-texto-primario);
    cursor: pointer;
    padding: 0.5rem 1rem;
    z-index: 10;
    font-family: var(--font-principal);
    font-weight: var(--peso-principal);
    transition: background 0.3s ease;
}

.carousel-button:hover {
    background: white;
}

.carousel-button.prev {
    left: 1rem;
}

.carousel-button.next {
    right: 1rem;
}

/* --- Efecto de aparición en scroll --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 4rem 2rem;
    border-top: 1px solid var(--color-visual-medio);
    margin-top: 4rem;
    font-size: 12px;
    font-weight: var(--peso-ui);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-texto-secundario);
}

/* --- Responsividad y Menú Móvil --- */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    #hero h1 { font-size: 2.5rem; }
    h2 { font-size: 1.5rem; margin-bottom: 2rem; }
    section { padding: 4rem 1rem; }
    
    .header-nav { padding: 1rem; }
    
    /* Menú móvil */
    .hamburger-btn {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: radial-gradient(ellipse at center, var(--color-bg-centro), var(--color-bg-borde));
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.4s ease-out, visibility 0.4s;
        z-index: 99;
    }
    
    .main-nav.is-open {
        transform: translateX(0);
        visibility: visible;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .main-nav a {
        font-size: 2rem; /* Tamaño grande para overlay móvil */
        font-weight: var(--peso-principal);
        padding: 0.5rem 1rem;
        /* [CAMBIO] Color negro para el menú overlay (fondo claro) */
        color: var(--color-texto-primario);
    }

    /* Ajustes de otras secciones */
    .servicios-grid { grid-template-columns: 1fr; }
    .carousel-slide img { height: 400px; }
    .carousel-button { font-size: 1.5rem; }

    /* Ajuste responsive para Esquelas (index.html) */
    .esquela-item {
        flex-direction: column;
    }

    .esquela-fecha-box {
        width: 100%;
    }

    .esquela-info {
        padding: 1.5rem;
    }
}


/* * ======================================
 * PÁGINA: ESQUELA.HTML
 * ======================================
 */

/* --- Hero de Esquela (esquela.html) --- */
#esquela-hero {
    height: 50vh;
    min-height: 300px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

#esquela-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('./img/hero-esquela.png');
    background-size: cover;
    background-position: center;
    animation: slowZoom 30s infinite alternate ease-in-out;
}

.esquela-hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 1;
}

.esquela-hero-content h1 {
    color: white;
    font-size: 3.5rem;
    margin: 0;
    text-transform: none;
    font-weight: 300;
}

.esquela-hero-content span {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.8;
}

/* --- Contenido de Esquela (esquela.html) --- */
#esquela-detalles {
    padding-top: 4rem;
    padding-bottom: 4rem;
    max-width: 900px;
    text-align: left;
}

.volver-link {
    font-weight: var(--peso-ui);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 2rem;
}

.esquela-contenido {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.detalle-principal h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.detalle-principal .alias {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.detalle-principal .texto-fallecimiento {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
    margin: 0;
}

.detalle-principal .dep {
    font-size: 1.5rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-top: 2rem;
}

.detalle-familia {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
}

.familia-bloque {
    margin-bottom: 1rem;
}

.familia-bloque strong {
    display: block;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 1rem;
    color: var(--color-texto-primario);
    letter-spacing: 0.5px;
}

.familia-bloque p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 300;
}

/* --- Info de Servicio (esquela.html) --- */
#info-servicio {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--color-visual-medio);
    padding: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.info-icon {
    flex-shrink: 0;
}

.info-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--color-texto-secundario);
    stroke-width: 1.5;
    opacity: 0.8;
}

.info-texto {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
}

.info-texto strong {
    font-weight: 400;
    color: var(--color-texto-primario);
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.25rem;
}

.info-texto p {
    font-size: 1.1rem;
    font-weight: 300;
    margin: 0;
    max-width: none;
}

.info-texto p:not(:last-child) {
    margin-bottom: 0.5rem;
}

.info-texto strong, .info-texto b {
    font-weight: 400;
}

.agradecimiento {
    font-style: italic;
    text-align: center;
    font-weight: 300;
    font-size: 1.1rem;
    margin: 0;
    max-width: none;
}


/* --- Responsividad para esquela.html --- */
@media (max-width: 768px) {
    /* Hero de Esquela */
    #esquela-hero {
        height: 40vh;
    }
    .esquela-hero-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    .esquela-hero-content h1 {
        font-size: 2.5rem;
        order: 2;
    }
    .esquela-hero-content span {
        font-size: 1rem;
        order: 1;
    }
    .esquela-hero-content .fecha-fallecimiento {
        order: 3;
    }

    /* Contenido de Esquela */
    #esquela-detalles {
        padding-top: 2rem;
    }
    .esquela-contenido {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .detalle-principal .dep {
        margin-top: 1.5rem;
    }
    
    #info-servicio {
        padding: 2rem;
    }
    .info-item {
        gap: 1rem;
    }
    .info-icon svg {
        width: 40px;
        height: 40px;
    }
}
