/* =========================================================================
   Misión Cristiana - Hoja de Estilos Dinámica
   Estética: Carismática & Ortodoxa (Royal Purple, Flame Orange, Animaciones)
========================================================================== */

:root {
    /* Color Palette - Vibrant, Charismatic, spiritual Fire & Royal Orthodox */
    --color-primary: #3b0066;
    /* Deep Royal Purple */
    --color-primary-light: #5e00a3;
    /* Vibrant Purple */
    --color-accent: #FF7043;
    /* Flame Orange/Coral - Holy Spirit/Fire */
    --color-accent-hover: #FF8A65;
    --color-gold: #FFB300;
    /* Classic Gold for Orthodox stability */
    --color-bg: #FDFBFA;
    /* Warm off-white */
    --color-surface: #FFFFFF;
    --color-text: #2c3e50;
    --color-text-light: #607d8b;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    /* Orthodox/Classic anchor */
    --font-body: 'Inter', sans-serif;
    /* Modern readibility */

    /* Spacing & Layout */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-xxl: 6rem;
    --border-radius: 12px;

    /* Dynamic UI Variables */
    --transition-fast: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-sm: 0 4px 15px rgba(94, 0, 163, 0.08);
    /* Purple tinted shadows */
    --shadow-md: 0 10px 30px rgba(94, 0, 163, 0.12);
    --shadow-hover: 0 20px 40px rgba(255, 112, 67, 0.2);
    /* Orange fire shadow */
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Dynamic Animations */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 112, 67, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 112, 67, 0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-flex {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.align-center {
    align-items: center;
}

.section {
    padding: var(--space-xxl) 0;
    position: relative;
}

.text-center {
    text-align: center;
}

.text-white {
    color: #FFFFFF !important;
}

.text-gold {
    color: var(--color-gold) !important;
}

.text-accent {
    color: var(--color-accent) !important;
}

.mt-2 {
    margin-top: var(--space-lg);
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.bg-dark {
    background: linear-gradient(-45deg, var(--color-primary), #1a0033, var(--color-primary-light));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: white;
}

.divider {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
    margin-bottom: var(--space-lg);
    border-radius: 2px;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: 50px;
    /* More modern/dynamic shape */
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, var(--color-accent), #FF5722);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.6);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border-color: white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--color-primary);
    transform: translateY(-3px);
}

.btn-play {
    animation: pulse-glow 2s infinite;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(253, 251, 250, 0.85);
    /* Slightly warm glassy */
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(94, 0, 163, 0.05);
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: var(--transition-smooth);
}

.navbar.menu-active {
    z-index: 4000 !important;
    /* Force above the overlay (2999) */
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(253, 251, 250, 0.98);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 85px;
    width: auto;
    transition: var(--transition-fast);
}

.navbar.scrolled .logo img {
    height: 60px;
}

/* Base Nav Links (Desktop) */
.nav-links {
    display: flex;
    align-items: center;
}

.nav-links-inner {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.mobile-drawer-header {
    display: none;
    /* Hidden on Desktop */
}

.nav-links a {
    font-weight: 600;
    color: var(--color-primary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Modifier para Navbars de páginas internas oscuras */
.navbar.bg-dark .nav-links a {
    color: rgba(255, 255, 255, 0.9);
}

.navbar.bg-dark .mobile-menu-btn {
    color: rgba(255, 255, 255, 0.9);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1438232992991-995b7058bbb3?auto=format&fit=crop&q=80&w=2000');
    /* More energetic/worship crowd image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 0, 102, 0.9) 0%, rgba(26, 0, 51, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

.hero-subtitle {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(255, 112, 67, 0.2);
    border: 1px solid rgba(255, 112, 67, 0.5);
    border-radius: 50px;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
    font-weight: 700;
}

.hero-title {
    color: white;
    font-size: 4.5rem;
    margin-bottom: var(--space-md);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.hero-text {
    font-size: 1.35rem;
    margin-bottom: var(--space-xl);
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* VerTV Player Section */
.player-section {
    background-color: #0f001a;
    padding: var(--space-xl) 0;
    border-top: 5px solid var(--color-accent);
    position: relative;
    overflow: hidden;
}

.player-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(94, 0, 163, 0.2) 0%, transparent 60%);
    animation: pulse-glow 8s infinite alternate;
    pointer-events: none;
}

.tv-player-container {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    backdrop-filter: blur(10px);
    height: 600px;
}

.player-main {
    flex: 3;
    position: relative;
    background: #000;
    display: flex;
    flex-direction: column;
}

.player-video {
    flex: 1;
    width: 100%;
    background: url('https://images.unsplash.com/photo-1518609878373-06d740f60d8b?auto=format&fit=crop&q=80&w=1200') center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-overlay-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: var(--transition-smooth);
    animation: float-centered 4s ease-in-out infinite;
    z-index: 10;
}

@keyframes float-centered {
    0% {
        transform: translate(-50%, -50%);
    }

    50% {
        transform: translate(-50%, calc(-50% - 10px));
    }

    100% {
        transform: translate(-50%, -50%);
    }
}

.player-overlay-play:hover {
    color: var(--color-accent);
    transform: translate(-50%, -50%) scale(1.1);
}

.player-info {
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.8));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.player-channel-badge {
    display: inline-block;
    background: var(--color-accent);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.player-sidebar {
    flex: 1;
    min-width: 300px;
    background: rgba(10, 0, 20, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    margin-bottom: 0.5rem;
}

.channel-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.channel-item.active {
    background: rgba(94, 0, 163, 0.4);
    border-color: var(--color-primary-light);
}

.channel-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.channel-icon img {
    max-height: 100%;
}

.channel-details h4 {
    color: white;
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
}

.channel-details p {
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin: 0;
}

.live-badge {
    color: #ff3b3b;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: #ff3b3b;
    border-radius: 50%;
    animation: pulse-glow 1s infinite alternate;
}

/* Solas Section - Dynamic Cards */
.section-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background-color: rgba(94, 0, 163, 0.08);
    color: var(--color-primary-light);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
}

.sola-card {
    background-color: var(--color-surface);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border-top: 5px solid var(--color-primary-light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sola-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}

.sola-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--color-accent);
}

.sola-card:hover::after {
    transform: scaleX(1);
}

.sola-icon {
    font-size: 3.5rem;
    background: linear-gradient(45deg, var(--color-primary-light), var(--color-accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
    display: inline-block;
}

.sola-card:hover .sola-icon {
    transform: scale(1.15) rotate(5deg);
}

.sola-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

/* Educacion Cards - Image Overlays */
.edu-grid {
    margin-top: var(--space-xl);
}

.edu-card {
    height: 300px;
    border-radius: var(--border-radius);
    text-align: center;
    color: white;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.edu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(26, 0, 51, 0.95) 0%, rgba(94, 0, 163, 0.4) 100%);
    z-index: 1;
    transition: var(--transition-smooth);
}

.edu-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.8s ease;
}

.edu-card:hover {
    box-shadow: 0 15px 30px rgba(94, 0, 163, 0.3);
    transform: translateY(-5px);
}

.edu-card:hover img {
    transform: scale(1.1);
}

.edu-card:hover::before {
    background: linear-gradient(to top, rgba(255, 112, 67, 0.9) 0%, rgba(94, 0, 163, 0.2) 100%);
}

.edu-card-content {
    position: relative;
    z-index: 2;
    width: 100%;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.edu-card:hover .edu-card-content {
    transform: translateY(0);
}

.edu-icon {
    font-size: 3rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.edu-card h4 {
    color: white;
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
}

/* Footer */
.footer {
    background-color: #0f001a;
    color: white;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: var(--color-accent);
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 8px;
}

.footer-bottom {
    background-color: #05000a;
    padding: 1.5rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -105%;
        /* Hide completely */
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background-color: #FFFFFF !important;
        /* Hard opaque white */
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
        z-index: 4001 !important;
        /* Above everything else */
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        overflow: hidden;
        pointer-events: none;
    }

    .nav-links.active {
        right: 0;
        pointer-events: all;
        /* Enable when shown */
    }

    /* Scrollable links area with better contrast */
    .nav-links .nav-links-inner {
        padding: 1rem 2rem 3rem 2rem;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        overflow-y: auto;
        flex-grow: 1;
        background-color: #FFFFFF;
    }

    .nav-links a {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--color-primary);
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        display: block;
        transition: var(--transition-fast);
    }

    .nav-links a:active {
        color: var(--color-accent);
        background-color: rgba(94, 0, 163, 0.05);
        /* Visual feedback on touch */
    }

    /* Mobile Drawer Header */
    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem 2rem;
        background-color: #f8f9fa;
        border-bottom: 2px solid var(--color-primary);
    }

    .mobile-drawer-header img {
        height: 45px !important;
        width: auto;
    }

    .close-drawer-btn {
        background: var(--color-primary);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        cursor: pointer;
        font-size: 1.2rem;
    }

    .nav-actions .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: block !important;
        z-index: 1002;
    }

    /* Menu Overlay - Emergency Visibility */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7) !important;
        backdrop-filter: blur(5px);
        z-index: 2999 !important;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .menu-overlay.active {
        display: block;
        opacity: 1;
        pointer-events: all;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .tv-player-container {
        flex-direction: column;
        height: auto;
    }

    .player-video {
        height: 250px;
    }

    .player-sidebar {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        max-height: 400px;
    }
}