/*
Theme Name: Maria Peregrinaciones
Author: Juan Ignacio
Description: Tema a medida
Version: 2.8
*/

/* --- RESET Y BASICOS --- */
body { margin: 0; padding: 0; font-family: sans-serif; background: #f4f4f4; }
* { box-sizing: border-box; }
a { text-decoration: none; }
ul, li { list-style: none; margin: 0; padding: 0; }

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    background: #fff; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- HEADER --- */
.site-header img { width: 100%; height: auto; display: block; }

/* --- MENÚ PRINCIPAL --- */
.main-nav { background-color: #333; width: 100%; }
.top-menu { 
    display: flex; /* Quitamos el !important para que el responsive funcione */
    flex-direction: row; 
    width: 100%; 
}

/* ITEMS DEL MENÚ */
.menu-item-parent { position: relative; flex: 1; text-align: center; border-bottom: 3px solid transparent; transition: all 0.5s ease !important; }

.menu-title, .menu-direct-btn { 
    display: block; width: 100%; padding: 15px 10px; 
    color: white; font-weight: bold; cursor: pointer; color: #f8ded5;
    text-transform: uppercase; font-size: 14px; letter-spacing: 1px;
    border-bottom: none; /*3px solid transparent;*/ transition: all 0.3s ease; 
    background: none; border-top: none; border-left: none; border-right: none;
    font-family: inherit;
}

.menu-item-parent:hover { background-color: #555; border-bottom-color: #998E8A;}
.menu-item-parent:hover .menu-title, .menu-item-parent:hover .menu-direct-btn {
    color: #A1B0C2; border-bottom-color: #998E8A;
    /* border-bottom-color: #E52707; color: #E52707; */
    /* border-bottom-color: #A1B0C2; color: #A1B0C2; */
    
    
}

/* --- SUBMENÚ --- */
.submenu {
    display: none; position: absolute; top: 100%; left: 0; width: 100%; 
    background: #fff; min-width: 200px; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 999; text-align: left; 
}

.menu-item-parent:hover .submenu { display: block; }
.submenu li { border-bottom: 1px solid #eee; }

.submenu-btn {
    width: 100%; text-align: left; background: none; border: none;
    padding: 15px 20px; cursor: pointer; font-size: 14px; color: #333; transition: 0.2s;
}
.submenu-btn:hover { background: #f0f0f0; color: #007bff; padding-left: 25px; } 

/* --- CONTENIDO --- */
.content-area { padding: 40px; flex: 1; }
.info-panel { display: none; } 
.info-panel.activo { display: block; animation: fadeIn 0.5s; } 

.panel-title { text-align: center; margin-bottom: 30px; font-size: 2em; color: #333;}

/* --- DISEÑO A: ESTÁNDAR --- */
.grid-3-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; align-items: start; }
.col { line-height: 1.6; color: #444; }

.header-split { display: flex; flex-wrap: wrap; margin-bottom: 30px; background-color: #f0f0f0; }
.header-split-text {
    width: 33.33%; padding: 40px; display: flex; align-items: center;
    justify-content: center; text-align: center; font-style: italic;
    font-size: 1.1em; color: #555; background: #eaeaea; 
}

/* --- SLIDESHOW / IMAGEN --- */
.header-split-img { 
    width: 66.66%; 
    position: relative; 
    
    /* === EL CAMBIO CLAVE === */
    /* Define la proporción: 3 partes de ancho por 2 de alto (Estándar foto) */
    /* Si tus fotos son muy anchas, usa: aspect-ratio: 16 / 9; */
    aspect-ratio: 3 / 2; 
    
    overflow: hidden; 
}

/* Imagen estática (fallback) */
.header-split-img img.static-img { 
    width: 100%; height: 100%; object-fit: cover; display: block; 
}

/* Estilos del Slideshow */
.custom-slider {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
}

.slide-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0; 
    transition: opacity 1s ease-in-out; 
    z-index: 1;
}

.slide-img.visible {
    opacity: 1; 
    z-index: 2;
}

/* Ajuste Mobile: Aseguramos que en celular también se vea bien */
@media (max-width: 768px) {
    .header-split-img { width: 100%; aspect-ratio: 3 / 2; }
}

/* --- DISEÑO B: TARJETAS 2026 --- */
.cards-grid-wrapper {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 20px; margin-bottom: 40px; grid-auto-flow: dense; 
}
.card-item {
    background: #fff; border: 1px solid #ddd; border-radius: 5px; overflow: hidden;
    display: flex; flex-direction: column; text-align: center; padding-bottom: 0; 
    height: auto; transition: all 0.3s ease; 
}
.card-preview-wrapper { display: flex; flex-direction: column; height: 100%; width: 100%; }
.card-header-img { position: relative; width: 100%; height: 150px; flex-shrink: 0; }
.card-header-img img { width: 100%; height: 100%; object-fit: cover; }
.card-month-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: #fff; font-weight: bold; font-size: 1.4em; text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8); width: 100%; z-index: 2;
}
.card-body { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; align-items: center;}
.card-sub-title { font-weight: bold; font-size: 1em; margin-bottom: 10px; color: #333; }
.card-text-main { font-size: 0.9em; color: #666; margin-bottom: 15px; line-height: 1.4; min-height: 3em; }
.card-text-quote { font-size: 0.9em; font-style: italic; color: #888; margin-bottom: 20px; flex-grow: 1; }
.card-btn-toggle {
    display: inline-block; padding: 8px 20px; background-color: #333;
    color: #fff; text-transform: uppercase; font-size: 0.8em; border-radius: 3px;
    transition: background 0.3s; margin-top: auto; margin-bottom: 20px;
    border: none; cursor: pointer;
}
.card-btn-toggle:hover { background-color: #555; }
.card-full-details {
    display: none; padding: 30px; background-color: #fafafa;
    border-left: 1px solid #eee; text-align: left; 
}
.card-item.expanded {
    grid-column: 1 / -1; order: -1; flex-direction: row; 
    align-items: stretch; box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    border-color: #007bff; margin-top: 10px; margin-bottom: 10px;
}
.card-item.expanded .card-preview-wrapper { width: 25%; border-right: 1px solid #eee; background: #fff; }
.card-item.expanded .card-full-details { display: block; width: 75%; animation: fadeIn 0.5s; }

/* Footer */
.site-footer {
    background-color: #f9f9f9; border-top: 4px solid #786E6C;
    padding: 40px 20px; text-align: center; margin-top: auto; color: #555;
}
.footer-content h3 { text-transform: uppercase; font-size: 1.2em; margin-bottom: 20px; color: #333; }
.footer-content p { margin: 5px 0; font-size: 0.95em; }
.copyright { margin-top: 30px; font-size: 0.8em; color: #999; border-top: 1px solid #ddd; padding-top: 15px; display: inline-block; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .cards-grid-wrapper { grid-template-columns: repeat(2, 1fr); }
    .card-item.expanded .card-preview-wrapper { width: 40%; }
    .card-item.expanded .card-full-details { width: 60%; }
}

@media (max-width: 768px) {
    /* Menú: Forzamos columna */
    .top-menu { flex-direction: column !important; } 
    .menu-item-parent { width: 100%; text-align: center; border-bottom: 1px solid #444 !important; }
    
    .header-split-text, .header-split-img { width: 100%; }
    .grid-3-cols { grid-template-columns: 1fr; } 
    .cards-grid-wrapper { grid-template-columns: 1fr; }
    
    .card-item.expanded { flex-direction: column; }
    .card-item.expanded .card-preview-wrapper { width: 100%; border-right: none; border-bottom: 1px solid #eee; }
    .card-item.expanded .card-full-details { width: 100%; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- BOTÓN WHATSAPP FLOTANTE --- */
.whatsapp-btn-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000; /* Siempre arriba de todo */
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio entre texto e ícono */
}

/* El texto "Escribinos" (Oculto en móviles muy chicos para no tapar, visible en el resto) */
.whatsapp-text {
    background-color: #fff;
    padding: 8px 15px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
    opacity: 0; /* Aparece con animación */
    transform: translateX(20px);
    transition: all 0.5s ease;
    pointer-events: none; /* Para que el clic pase al botón si se superpone */
}

/* El círculo verde */
.whatsapp-float {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse 3s infinite; /* Latido suave */
}

.whatsapp-float:hover {
    background-color: #20b85a;
    transform: scale(1.1); /* Crece un poquito al pasar el mouse */
}

/* Icono SVG dentro del botón */
.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Mostrar el texto cuando pasas el mouse o después de unos segundos */
.whatsapp-btn-container:hover .whatsapp-text,
.whatsapp-btn-container.show-hint .whatsapp-text {
    opacity: 1;
    transform: translateX(0);
}

/* Animación de Latido (Pulse) */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Ajuste móvil: el botón un poco más chico y pegado al borde */
@media (max-width: 768px) {
    .whatsapp-btn-container { bottom: 20px; right: 20px; }
    .whatsapp-float { width: 55px; height: 55px; }
    .whatsapp-float svg { width: 30px; height: 30px; }
    /* En celular ocultamos el texto flotante para que no tape contenido, el ícono es universal */
    .whatsapp-text { display: none; }
}

/* --- MENSAJE DESTACADO (VIRGEN) --- */
.mensaje-destacado {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto; /* Centrado y con espacio abajo */
    padding: 20px 30px;
    background-color: #f8faff; /* Azul muy muy pálido */
    border-left: 5px solid #786E6C; /* #007bff; */ /* Borde azul a la izquierda */
    border-right: 5px solid #786E6C; /* #007bff; */ /* Borde azul a la derecha */
    border-radius: 8px;
    font-size: 1.1em;
    /* font-style: italic; */
    color: #444;
    line-height: 1.6;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}




/* --- REDES SOCIALES (FOOTER) --- */
.social-icons-container {
    margin-top: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px; /* Espacio entre los iconos */
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%; /* Circulos perfectos */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-link svg {
    width: 28px;
    height: 28px;
    fill: currentColor; /* El icono toma el color del texto */
}

/* Colores Oficiales */
.social-link.facebook { color: #1877F2; } /* Azul Facebook */
.social-link.instagram { color: #E1306C; } /* Rosa Instagram */

/* Efecto al pasar el mouse */
.social-link:hover {
    transform: translateY(-5px); /* Se levanta un poquito */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}


/* --- LEER MÁS (SOLO MÓVIL) --- */

/* Por defecto (PC): El botón está oculto y el texto se ve entero */
.mensaje-toggle-btn { display: none; }
.mensaje-texto-inner { height: auto; }

/* REGLAS SOLO PARA CELULAR (menos de 768px) */
@media (max-width: 768px) {
    
    /* El contenedor del texto cuando está "cerrado" */
    .mensaje-texto-inner.cerrado {
        max-height: 120px; /* Altura máxima visible */
        overflow: hidden;
        position: relative;
    }

    /* El efecto difuminado (Fade Out) */
    .mensaje-texto-inner.cerrado::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px; /* Altura del difuminado */
        /* Degradado desde transparente hasta el color de fondo del mensaje (#f8faff) */
        background: linear-gradient(to bottom, rgba(248,250,255,0), rgba(248,250,255,1));
        pointer-events: none; /* Para que no interfiera con clicks */
    }

    /* El Botón "Ver más" */
    .mensaje-toggle-btn {
        display: block; /* En celular sí lo mostramos */
        margin: 10px auto 0 auto;
        background: none;
        border: 1px solid #007bff;
        color: #007bff;
        padding: 5px 15px;
        border-radius: 20px;
        font-size: 0.85em;
        cursor: pointer;
        text-transform: uppercase;
        font-weight: bold;
    }
    
    .mensaje-toggle-btn:hover {
        background: #007bff;
        color: white;
    }
}


/* --- PROTECCIÓN DE IMÁGENES --- */
img {
    /* Evita que el usuario seleccione la imagen como si fuera texto */
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    
    /* Evita que se pueda arrastrar la imagen al escritorio */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: auto; /* Mantiene los clics si tienen enlaces, pero bloquea lo visual */
}

/* --- HEADER Y MARCA DE AGUA --- */

/* 1. Preparamos el contenedor */
.site-header {
    position: relative; /* IMPORTANTE: Esto permite que la marca de agua se ubique dentro de este bloque */
}

/* 2. La imagen del banner (igual que antes) */
.site-header img {
    width: 100%;
    height: auto;
    display: block;
    /* (Ya tiene el bloqueo de selección global que pusimos antes) */
}

/* --- HEADER RESPONSIVE --- */
.site-header picture {
    display: block;
    width: 100%;
}

/* Ajustamos la imagen dentro del picture para que siempre sea fluida */
.site-header img {
    width: 100%;
    height: auto;
    display: block; /* Elimina espacios extra abajo */
    object-fit: cover; /* Asegura que cubra el espacio */
}






/* --- UI MÓVIL: BLOQUEO DE SELECCIÓN Y PARPADEO (V4.3) --- */

/* Aplicamos esto a todos los elementos que sean "botones" */
.menu-title, 
.menu-direct-btn, 
.submenu-btn,
.card-btn-toggle,
.mensaje-toggle-btn,
.social-link {
    /* 1. Evita que se seleccione el texto (Adiós menú Copiar/Pegar) */
    -webkit-user-select: none; /* Chrome/Safari/Android */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    user-select: none;         /* Estándar */

    /* 2. Quita el recuadro azul/gris transparente al tocar en celular */
    -webkit-tap-highlight-color: transparent;
}