/* ==========================================================================
   EL FARO - PANTALLA DE INICIO (SPLIT LAYOUT)
   ========================================================================== */

:root {
    --bg-dark: #041C2C; /* Pantone 296 C */
    --text-light: #FFFFFF;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* ==========================================================================
   LOADER INTRO
   ========================================================================== */
.intro-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.intro-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-gif {
    width: auto;
    height: auto;
    max-width: 150px; /* Tamaño máximo para el icono del faro */
    object-fit: contain;
    /* Si la imagen no es transparente, el filtro la vuelve negra invisible. Lo reemplazamos por fondo blanco */
    /* Animación opcional de latido (pulse) */
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   MAIN LAYOUT (SPLIT SCREEN)
   ========================================================================== */
.split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- Panel Izquierdo --- */
.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background-color: var(--bg-dark);
}

.content-wrapper {
    max-width: 500px;
    width: 100%;
    text-align: center;
}

/* Título Espaciado */
.spaced-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 5px;
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.spaced-title span {
    margin: 0 4px;
}

/* Logo */
.logo-container {
    margin-bottom: 50px;
}

.main-logo {
    max-width: 250px;
    width: 100%;
    height: auto;
    /* Fondo blanco para que el logo se vea bien aunque no sea transparente */
}

/* Texto de bienvenida */
.welcome-text {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 50px;
    font-weight: 400;
}

/* Grupo de botones */
.buttons-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.btn {
    display: block;
    width: 100%;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-solid {
    background-color: var(--text-light);
    color: var(--bg-dark);
    border: 1px solid var(--text-light);
}

.btn-solid:hover {
    background-color: #e6e6e6;
    color: #000;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--text-light);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Panel Derecho --- */
.right-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.welcome-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center; /* Alineado hacia arriba para que no corte las cabezas */
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.bg-image.active {
    opacity: 1;
    z-index: 2;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--bg-dark) 0%, transparent 50%);
    z-index: 3;
    pointer-events: none;
}

/* ==========================================================================
   INICIO.HTML - NAVEGACIÓN STICKY
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.main-header.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    height: 50px;
    filter: brightness(0) invert(1);
}

.nav-links ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links ul li a:hover {
    color: #F5D241;
}

.mobile-menu-btn {
    display: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   INICIO.HTML - HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    font-weight: 300;
}

/* ==========================================================================
   INICIO.HTML - CARDS SECTION
   ========================================================================== */
.cards-section {
    padding: 2px;
    background-color: #000;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.image-card {
    position: relative;
    height: 400px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: var(--text-light);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: background 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-card:hover .card-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.card-overlay h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.card-overlay p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

/* ==========================================================================
   INICIO.HTML - MINISTERIOS
   ========================================================================== */
.ministerios-section {
    padding: 100px 0;
    background-color: #050505;
    text-align: center;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 50px;
    font-weight: 800;
}

.min-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.min-card {
    position: relative;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
}

.min-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    transition: filter 0.3s ease;
}

.min-card:hover img {
    filter: brightness(0.9);
}

.min-card h3 {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
}

/* ==========================================================================
   INICIO.HTML - ORACIÓN
   ========================================================================== */
.prayer-section {
    position: relative;
    padding: 120px 0;
    text-align: center;
    overflow: hidden;
}

.prayer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.prayer-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prayer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 60, 94, 0.85); /* Azul Marino Corporativo */
    z-index: -1;
}

.prayer-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.prayer-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(0,0,0,0.5);
    padding: 40px;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-light);
    border-radius: 5px;
    font-family: var(--font-main);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

.btn-primary {
    background: #F5D241; /* Dorado */
    color: #000;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary:hover {
    background: #fff;
}

/* ==========================================================================
   INICIO.HTML - FOOTER
   ========================================================================== */
.main-footer {
    background-color: #000;
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-logo {
    width: 150px;
    filter: brightness(0) invert(1);
    margin-bottom: 10px;
}

.social-icon {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #F5D241;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 992px) {
    .split-layout {
        flex-direction: column;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .left-panel {
        padding: 60px 20px;
        order: 1; /* El texto y logo primero en móviles */
    }

    .right-panel {
        min-height: 50vh;
        order: 2;
    }

    .carousel-overlay {
        background: linear-gradient(to bottom, var(--bg-dark) 0%, transparent 50%);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Mobile Nav Modal */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #000;
    z-index: 2000;
    padding: 80px 30px;
    transition: right 0.3s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav .close-menu {
    position: absolute;
    top: 30px;
    right: 30px;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav ul li {
    margin-bottom: 20px;
}

.mobile-nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ==========================================================================
   DROPDOWN MENU
   ========================================================================== */
.nav-menu ul li.dropdown {
    position: relative;
}

.nav-menu ul li.dropdown .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-dark);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    z-index: 1000;
    padding: 10px 0;
    border-radius: 8px;
    list-style: none;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    /* Sobrescribir flex del ul padre */
    flex-direction: column;
    gap: 0;
}

.nav-menu ul li.dropdown:hover .submenu {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.nav-menu ul li.dropdown .submenu li {
    display: block;
    margin: 0;
    width: 100%;
}

.nav-menu ul li.dropdown .submenu li a {
    padding: 12px 20px;
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.nav-menu ul li.dropdown .submenu li a:hover {
    color: var(--color-accent);
    background-color: rgba(255,255,255,0.05);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   GALERÍA GRID
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    aspect-ratio: 16/9;
}

.gallery-item img, .gallery-item iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 20px;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

.gallery-caption h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-accent);
}
