/*
 * Centro Familiar Cristiano - Estilos Principales
 * Versión limpia y optimizada
 */

/* ==========================================
   RESET Y CONFIGURACIÓN BÁSICA
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* ==========================================
   HEADER MEJORADO
   ========================================== */

/* Header base - transparente sobre hero */
#header {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Header cuando hace scroll */
#header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}


/* ==========================================
   TEXTO DEL HEADER
   ========================================== */

/* Texto blanco por defecto (sobre video) */
.header-text {
    color: white;
}

/* Texto oscuro cuando scrolled */
#header.scrolled .header-text {
    color: #1f2937;
}

/* ==========================================
   ICONOS DEL HEADER
   ========================================== */

/* Iconos blancos por defecto */
.header-icon {
    color: white;
}

/* Iconos oscuros cuando scrolled */
#header.scrolled .header-icon {
    color: #374151;
}

/* ==========================================
   LINKS DE NAVEGACIÓN
   ========================================== */

/* Links blancos por defecto */
.nav-link {
    color: white;
    position: relative;
}

/* Links oscuros cuando scrolled */
#header.scrolled .nav-link {
    color: #4b5563;
}

/* Hover sobre hero (blanco) */
.nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

/* Hover cuando scrolled (azul) */
#header.scrolled .nav-link:hover {
    color: #1e40af;
    background: rgba(30, 64, 175, 0.05);
}

/* Efecto underline animado */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

#header.scrolled .nav-link::after {
    background: #1e40af;
}

.nav-link:hover::after {
    width: 80%;
}

/* ==========================================
   MOBILE MENU
   ========================================== */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Animación de los items del menú móvil */
.mobile-menu-item {
    opacity: 0;
    transform: translateX(20px);
    animation: slideInRight 0.3s ease forwards;
}

.mobile-menu.open .mobile-menu-item:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.open .mobile-menu-item:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu.open .mobile-menu-item:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu.open .mobile-menu-item:nth-child(4) { animation-delay: 0.25s; }
.mobile-menu.open .mobile-menu-item:nth-child(5) { animation-delay: 0.3s; }
.mobile-menu.open .mobile-menu-item:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-overlay {
    background: linear-gradient(135deg,
        rgba(15, 23, 42, 0.92) 0%,
        rgba(30, 58, 138, 0.90) 50%,
        rgba(30, 64, 175, 0.88) 100%);
}

/* Partículas flotantes */
.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.3;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-40px) translateX(-10px);
        opacity: 0.6;
    }
}

.particle:nth-child(1) { width: 4px; height: 4px; top: 20%; left: 10%; animation: float 8s ease-in-out infinite; }
.particle:nth-child(2) { width: 6px; height: 6px; top: 40%; left: 80%; animation: float 10s ease-in-out infinite 2s; }
.particle:nth-child(3) { width: 3px; height: 3px; top: 60%; left: 20%; animation: float 12s ease-in-out infinite 4s; }
.particle:nth-child(4) { width: 5px; height: 5px; top: 30%; left: 60%; animation: float 9s ease-in-out infinite 1s; }
.particle:nth-child(5) { width: 4px; height: 4px; top: 70%; left: 70%; animation: float 11s ease-in-out infinite 3s; }
.particle:nth-child(6) { width: 7px; height: 7px; top: 15%; left: 40%; animation: float 13s ease-in-out infinite 5s; }
.particle:nth-child(7) { width: 3px; height: 3px; top: 80%; left: 30%; animation: float 10s ease-in-out infinite 2.5s; }
.particle:nth-child(8) { width: 5px; height: 5px; top: 25%; left: 90%; animation: float 14s ease-in-out infinite 6s; }

/* Animaciones de entrada del hero */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-badge { animation-delay: 0.2s; }
.hero-title { animation-delay: 0.4s; }
.hero-subtitle { animation-delay: 0.6s; }
.hero-buttons { animation-delay: 0.8s; }
.hero-scroll { animation-delay: 1.2s; }

/* ==========================================
   BOTONES
   ========================================== */
.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

/* Efecto de brillo en botones */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Botón de Google Maps con gradiente animado */
.bg-size-200 {
    background-size: 200% 100%;
}

.bg-pos-0 {
    background-position: 0% 0%;
}

.bg-pos-100 {
    background-position: 100% 0%;
}

/* ==========================================
   CARDS Y EFECTOS HOVER
   ========================================== */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(30, 64, 175, 0.15);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* ==========================================
   GRADIENTES
   ========================================== */
.gradient-text {
    background: linear-gradient(135deg, #1e40af, #3b82f6, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   GLASSMORPHISM
   ========================================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================
   ANIMACIONES ÚTILES
   ========================================== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   SCROLL PROGRESS BAR
   ========================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #3b82f6, #0ea5e9);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ==========================================
   BLOG CONTENT
   ========================================== */
.blog-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1F2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-content p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
    color: #4B5563;
}

.blog-content blockquote {
    border-left: 4px solid #1e40af;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6B7280;
    background: linear-gradient(90deg, rgba(30, 64, 175, 0.05), transparent);
    padding: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* ==========================================
   UTILIDADES
   ========================================== */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

/* ==========================================
   OPTIMIZACIÓN DE PERFORMANCE
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .scroll-progress,
    header,
    .mobile-menu {
        display: none !important;
    }
}