/* --- Variables (del Manual de Marca) --- */
:root {
    --color-primary: #164872;   /* Azul */
    --color-secondary: #c19259; /* Dorado */
    --color-dark: #000000;      /* Negro */
    --color-light: #FDFBF5;     /* Fondo crema */
    --color-white: #FFFFFF;     /* Blanco */
    
    /* Tipografías (Fallback de Google Fonts) */
    --font-display: 'Cinzel', serif; /* Para títulos */
    --font-body: 'Montserrat', sans-serif;  /* Para cuerpo */
}

/* --- Reseteo y Globales --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--color-primary);
}

/* --- Header y Navegación --- */
.main-header {
    background: var(--color-white);
    border-bottom: 2px solid var(--color-secondary);
    padding: 0.5rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);

    /* --- LÍNEAS PARA HACERLO FIJO --- */
    position: sticky;
    top: 0;
    z-index: 900; /* Asegura que esté sobre el contenido */
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-icon {
    height: 60px;
    width: auto;
    margin-right: 10px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--color-primary);
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--color-secondary);
}

.nav-toggle {
    display: none; 
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
}

/* --- Botones (CTAs) --- */
.cta-button {
    display: inline-block;
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 5px;
    transition: background 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}
.cta-button:hover {
    background: #a97f4b; /* Dorado más oscuro */
}

.cta-button-secondary {
    display: inline-block;
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-secondary);
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.cta-button-secondary:hover {
    background: var(--color-secondary);
    color: var(--color-white);
    border-color: var(--color-secondary);
}

.cta-link {
    font-weight: 600;
    color: var(--color-secondary);
}
.cta-link:hover {
    text-decoration: underline;
}

/* --- Hero Section (Página de Inicio) --- */
.hero {
    background: var(--color-light); 
    text-align: center;
    padding: 4rem 0;
}
.hero h1 {
    font-size: 3rem;
    font-weight: 700;
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #444;
}

/* --- Sección Devocional (Página de Inicio) --- */
.devotion-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 3rem 20px;
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.devotion-card {
    background: var(--color-white);
    padding: 0;
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    overflow: hidden;
    border-radius: 4px;
}

.devotion-card h3,
.devotion-card p,
.devotion-card a {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.devotion-card a {
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* --- Sección Productos (Página de Inicio) --- */
.featured-products {
    padding: 3rem 0;
    text-align: center;
    background: var(--color-white);
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.product-card {
    background: #fff;
    border: 1px solid #eee;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-5px);
}
.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.product-card h3, .product-card p {
    padding: 0 1.5rem;
}
.product-card h3 {
    margin-top: 1rem;
    color: var(--color-dark);
}
.product-card a {
    margin: 1.5rem;
    text-align: center;
}

/* --- Encabezado de Página (para Catálogo, Contacto, etc.) --- */
.page-header {
    background-color: var(--color-primary);
    padding: 2rem 20px;
    text-align: center;
}

.page-header h1 {
    color: var(--color-white);
    margin-bottom: 0;
}

.page-header p.page-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* --- Estilos Página de Contacto --- */
.contact-section {
    background-color: var(--color-white);
    padding: 3rem 20px;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-top: 3rem;
    margin-bottom: 3rem;
    max-width: 900px;
}

.contact-section p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group textarea {
    line-height: 1.6;
}

.cta-form {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 5px;
    transition: background 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.cta-form:hover {
    background: #0a2f4c;
}

.cta-form i {
    margin-right: 8px;
}

/* --- ESTILOS PARA PÁGINA DE CATÁLOGO (PRODUCTO) --- */
.product-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .product-container {
        grid-template-columns: 1fr 1fr;
    }
}

.main-image-container img {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: zoom-in; 
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.thumbnail-gallery .thumbnail {
    width: 100%;
    height: auto;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.thumbnail-gallery .thumbnail:hover {
    border-color: var(--color-secondary);
}

.thumbnail-gallery .thumbnail.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 5px rgba(22, 72, 114, 0.5);
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.product-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.product-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.product-features li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.product-features .fa-check {
    color: var(--color-secondary);
    margin-right: 0.5rem;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.product-actions label {
    font-weight: 600;
}

.product-actions input[type="number"] {
    width: 60px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    text-align: center;
}

.product-actions .cta-button {
    flex-grow: 1;
    text-align: center;
}
.product-actions .cta-button i {
    margin-right: 8px;
}

/* --- Estilos del Modal (Lightbox) para Zoom --- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(22, 72, 114, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--color-secondary);
    text-decoration: none;
}

/* --- Estilos para la sección Nosotros --- */
.about-section {
    padding: 3rem 0;
}

.about-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 2.5rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .about-card {
        flex-direction: row;
        text-align: left;
    }
    .about-card.right-aligned {
        flex-direction: row-reverse;
    }
}

.about-image-container {
    flex: 1;
    max-width: 100%;
}

@media (min-width: 768px) {
    .about-image-container {
        flex: 1;
        max-width: 50%;
    }
}

.about-image-container img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.about-text {
    flex: 1;
    padding: 2rem;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .about-text h2 {
        text-align: left;
    }
}


.about-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    text-align: center;
}

@media (min-width: 768px) {
    .about-text p {
        text-align: left;
    }
}

/* --- ESTILOS PÁGINA SANTORAL --- */
.calendar-container {
    padding-top: 3rem;
    padding-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .calendar-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.calendar-month {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.calendar-month h2 {
    font-size: 1.5rem;
    padding: 1rem 1.5rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    margin: 0;
}

.calendar-list {
    list-style: none;
    padding: 1.5rem;
    margin: 0;
}

.calendar-list li {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #333;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.calendar-list li:last-child {
    border-bottom: none;
}

.calendar-list .calendar-day {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-secondary);
    margin-right: 1rem;
    width: 40px;
    text-align: right;
}

/* --- ESTILOS PÁGINA CATECISMO (INFOGRAFÍAS) --- */
.infographic-grid-container {
    display: grid;
    /* 1 columna en móvil, 2 en tablet, 3 en desktop */
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 0; /* Ajustado por la nueva sección */
    padding-bottom: 3rem;
}

@media (min-width: 576px) {
    .infographic-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .infographic-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.infographic-card {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.infographic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.infographic-card img {
    width: 100%;
    height: auto; 
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.infographic-text {
    padding: 1.5rem;
}

.infographic-text h3 {
    font-size: 1.4rem;
    color: var(--color-primary);
}

.infographic-text p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0;
}

/* --- Footer --- */
.main-footer {
    background: var(--color-primary);
    color: #ddd;
    padding: 3rem 0;
    text-align: center;
    margin-top: 0;
}
.main-footer p {
    color: var(--color-white);
}
.social-links a {
    color: var(--color-white);
    margin: 0 0.5rem;
    text-decoration: underline;
    font-weight: 600;
}
.social-links a:hover {
    color: var(--color-secondary);
}

/* --- Responsividad (Móvil) --- */
@media (max-width: 768px) {
    .logo-container {
        max-width: 250px; 
    }
    .logo-icon {
        height: 45px;
    }
    .logo-text {
        font-size: 1.4rem;
    }

    .nav-toggle {
        display: block;
    }
    .nav-menu {
        display: none; 
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 75px;
        left: 0;
        background: var(--color-white);
        text-align: center;
        border-top: 1px solid #eee;
    }
    .nav-menu.active {
        display: flex; 
    }
    .nav-menu li {
        margin: 1rem 0;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .contact-section {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
        padding: 2rem 1rem;
    }

    .thumbnail-gallery {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .infographic-grid-container {
        grid-template-columns: 1fr; /* 1 columna en móvil pequeño */
    }
}

/* --- Botón Flotante de WhatsApp --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: var(--color-white);
    border-radius: 50%;
    text-align: center;
    font-size: 2rem;
    line-height: 60px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 100;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* --- ESTILOS PÁGINA CINE DE SANTOS --- */
.movie-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .movie-grid-container {
        /* 2 columnas en tablet */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .movie-grid-container {
         /* 3 columnas en desktop, como la página de catecismo */
        grid-template-columns: repeat(3, 1fr);
    }
}

.movie-card {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.movie-card .movie-poster {
    width: 100%;
    height: 400px; /* Alto fijo para pósters */
    object-fit: cover; /* Asegura que la imagen cubra el espacio */
    object-position: top; /* Se enfoca en la parte superior del póster */
    display: block;
}

.movie-text {
    padding: 1.5rem;
}

.movie-text h3 {
    font-size: 1.4rem;
    color: var(--color-primary);
}

.movie-text p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0;
}

/* --- ESTILOS SEPARADORES Y TÍTULOS DE SECCIÓN --- */
.section-divider {
    border: 0;
    height: 1px;
    background-color: #ddd;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--color-primary);
}


/* --- ESTILOS PÁGINA CATECISMO (AÑO LITÚRGICO) --- */
.liturgical-calendar-section {
    padding-top: 0; /* Ajustado por la sección de Adviento */
    text-align: left; /* Ajustado por la sección de Adviento */
}
.liturgical-calendar-section h2,
.liturgical-calendar-section p {
    text-align: center; /* Centramos solo el título y párrafo de esta sección */
}

.liturgical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.liturgical-card {
    display: flex;
    align-items: center;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 1.5rem;
    border-left: 10px solid var(--color-primary); /* Borde de color */
    text-align: left;
}

.liturgical-icon {
    font-size: 2.5rem;
    margin-right: 1.5rem;
}

.liturgical-text h3 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}
.liturgical-text p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
    line-height: 1.5;
}

/* --- Colores Litúrgicos para las tarjetas --- */
.liturgical-card.violet { border-color: #551A8B; }
.liturgical-card.violet .liturgical-icon { color: #551A8B; }

.liturgical-card.white { border-color: #f0f0f0; }
.liturgical-card.white .liturgical-icon { color: #ccc; }

.liturgical-card.gold { border-color: var(--color-secondary); } /* Reusa tu dorado */
.liturgical-card.gold .liturgical-icon { color: var(--color-secondary); }

.liturgical-card.green { border-color: #006400; }
.liturgical-card.green .liturgical-icon { color: #006400; }

.liturgical-card.red { border-color: #B22222; }
.liturgical-card.red .liturgical-icon { color: #B22222; }

/* --- ESTILOS SECCIÓN DESTACADA DE TIEMPO LITÚRGICO --- */
.season-highlight-section {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-top: 3rem;
    margin-bottom: 2rem;
    overflow: hidden;
    /* Borde superior con el color litúrgico */
    border-top: 10px solid #551A8B; /* Morado Adviento/Cuaresma */
}

@media (min-width: 768px) {
    .season-highlight-section {
        flex-direction: row;
    }
}

.season-image {
    flex: 1;
}

.season-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.season-text {
    flex: 1.5; /* Más espacio para el texto */
    padding: 2.5rem;
}

.season-text h2 {
    font-size: 2.2rem;
    margin-top: 0;
    color: #551A8B; /* Color Morado */
}

.season-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

/* Lista de características (re-usando estilo de catálogo) */
.season-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.season-features li {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
}

.season-features .fa-check {
    color: var(--color-secondary); /* Dorado de tu marca */
    margin-right: 0.75rem;
}