/* Variables - Tema Día (Naturaleza Vibrante) */
:root {
    --bg-color: #000000;
    --bg-surface: rgba(255, 255, 255, 0.15);
    --bg-surface-hover: rgba(255, 255, 255, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --accent-color: #D4AF37;
    --accent-hover: #F1C40F;
    --border-color: rgba(255, 255, 255, 0.2);
    
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

/* Variables - Tema Oscuro (Noche) */
body.night-mode {
    --bg-surface: rgba(10, 15, 30, 0.7);
    --bg-surface-hover: rgba(10, 15, 30, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: transparent;
    transition: color 1.5s ease;
}

h1, h2, h3, h4, h5, h6, .logo, .intro-title {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-surface);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 1.5s ease, border-color 1.5s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: -0.5px;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-list a {
    font-weight: 600;
    font-size: 1rem;
}

.nav-list a:hover {
    color: var(--accent-color);
}

/* Fondos Globales */
.global-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: opacity 3s ease, filter 3s ease;
}

.global-bg-day {
    background-image: url('../img/fondo-dia.jpg');
    opacity: 1;
    filter: brightness(1);
}

.global-bg-night {
    background-image: url('../img/fondo-noche.jpeg');
    opacity: 0;
}

body.night-mode .global-bg-day { 
    opacity: 0; 
    filter: brightness(0.3);
}
body.night-mode .global-bg-night { 
    opacity: 1; 
}

.global-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(15, 35, 20, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
    transition: background 3s ease;
}

body.night-mode .global-overlay {
    background: linear-gradient(to bottom, rgba(5, 10, 30, 0.7) 0%, rgba(0, 0, 0, 0.85) 100%);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    transition: transform 1.5s ease;
}

.hero-content h1 {
    font-size: clamp(3.5rem, 6vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(0,0,0,0.6);
    letter-spacing: -1px;
    transition: text-shadow 3s ease;
}

.hero.night-mode .hero-content h1 {
    text-shadow: 0 10px 40px rgba(100, 150, 255, 0.4);
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 300;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    transition: text-shadow 3s ease, color 3s ease;
}

body.night-mode .hero-content p {
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.5);
    backdrop-filter: blur(5px);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Secciones generales */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Acerca - About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    transition: color 3s ease;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-image.collage {
    position: relative;
    border-radius: 20px;
    height: 500px;
}

.about-image img {
    border-radius: 20px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    position: absolute;
    transition: transform 0.5s ease;
}

.collage-img-1 {
    width: 75% !important;
    height: 75% !important;
    top: 0;
    left: 0;
    z-index: 2;
}

.collage-img-2 {
    width: 65% !important;
    height: 65% !important;
    bottom: 0;
    right: 0;
    z-index: 1;
    opacity: 0.8;
}

.about-image.collage:hover .collage-img-1 {
    transform: translate(-10px, -10px);
}

.about-image.collage:hover .collage-img-2 {
    transform: translate(10px, 10px);
    opacity: 1;
}

.about-experience-badge {
    position: absolute;
    bottom: 20px;
    left: -20px;
    background: var(--accent-color);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 3;
}

.about-experience-badge span {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.about-experience-badge p {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
    margin-top: 0.5rem;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-image.collage {
        height: 400px;
    }
}

/* Propósitos / Experiencias */
.purpose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.purpose-card {
    background-color: var(--bg-surface);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.purpose-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.purpose-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.purpose-card h3 {
    font-size: 1.6rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.purpose-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Banner Bíblico */
.bible-verse-banner {
    padding: 5rem 0;
    position: relative;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.02));
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 4rem 0;
}

.verse-text {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.verse-ref {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 2px;
}

/* Helpers */
.text-center {
    text-align: center;
}

/* Instalaciones - Tarjetas (Glassmorphism) */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
}

.card {
    background-color: var(--bg-surface);
    border-radius: 24px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(212, 175, 55, 0.3), inset 0 -40px 60px rgba(0,0,0,0.6);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    min-height: 350px;
    flex: 1 1 320px;
    max-width: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    position: relative;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    transform: translateZ(0);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--accent-color);
}

.card:hover::before {
    opacity: 0.7;
}

.card-content {
    position: relative;
    z-index: 2;
    background: rgba(20, 20, 20, 0.3);
    padding: 2.5rem 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.card:hover .card-content {
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding-bottom: 3rem;
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #fff;
    transition: color 0.3s;
}

.card:hover h3 {
    color: var(--accent-color);
}

.card p {
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    max-height: 0;
}

.card:hover p {
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
    margin-top: 1rem;
}

/* Galería - Masonry Grid */
.gallery-masonry {
    column-count: 3;
    column-gap: 1.5rem;
}

@media (max-width: 900px) {
    .gallery-masonry {
        column-count: 2;
    }
}
@media (max-width: 600px) {
    .gallery-masonry {
        column-count: 1;
    }
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Efecto focus en la galería */
.gallery-masonry:hover .gallery-item {
    filter: brightness(0.5) blur(2px);
}

.gallery-masonry .gallery-item:hover {
    filter: brightness(1.1) blur(0);
    transform: scale(1.03);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Lightbox (Visor) */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

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

.lightbox-close:hover {
    color: var(--accent-color);
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background-color: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
}

/* Contacto */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card {
    background-color: var(--bg-surface);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease, background-color 3s ease, border-color 3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

body.night-mode .contact-card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.15);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    animation: floatIcon 3s ease-in-out infinite;
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color 1.5s ease;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.highlight-card {
    background: linear-gradient(145deg, var(--bg-surface), rgba(0,0,0,0.05));
    border: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

body.night-mode .highlight-card {
    background: linear-gradient(145deg, var(--bg-surface), #1a1a1a);
}

.highlight-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Footer */
.footer {
    background-color: #000000;
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* Responsivo */
@media (max-width: 768px) {
    .nav-list {
        display: none; /* Simplificado para móviles en esta versión inicial */
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .contact-info {
        padding: 2rem 1.5rem;
    }
}

/* --- Animación de Intro (Retiro Espiritual) --- */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 1.5s ease, visibility 1.5s ease;
}

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

.intro-content {
    opacity: 0;
    animation: fadeInContent 3s ease forwards;
}

.intro-logo {
    width: 385px;
    max-width: 90vw;
    margin: 0 auto 1.5rem auto;
    display: block;
    animation: fadeInDown 1s ease forwards;
}

.intro-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.intro-subtitle {
    font-size: 1.2rem;
    color: rgba(212, 175, 55, 0.8); /* Dorado suave */
    font-style: italic;
}

/* Animations */
@keyframes fadeInContent {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowCross {
    from {
        text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    }
    to {
        text-shadow: 0 0 30px rgba(212, 175, 55, 0.8), 0 0 50px rgba(212, 175, 55, 0.4);
    }
}

/* Ocultar el scroll del body mientras está la intro */
body.no-scroll {
    overflow: hidden;
}

/* --- Visor 360 Pannellum --- */
.panorama-viewer {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    background-color: #111;
}

/* --- Nuevos estilos para Galerías Dinámicas --- */
.gallery-card {
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ver-fotos {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(212, 175, 55, 0.2);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    align-self: center;
}

.gallery-card:hover .ver-fotos {
    background-color: var(--accent-color);
    color: #fff;
}

/* Lightbox Navegación */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 1rem;
    user-select: none;
    transition: color 0.3s;
    z-index: 10001;
}

.lightbox-nav:hover {
    color: var(--accent-color);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Ocultar flechas si no hay más imágenes */
.lightbox-nav.hidden {
    display: none;
}
