/* ==========================================================================
   LANDING PAGE SPECIFIC STYLES (INDEX.PHP)
   ========================================================================== */

/* Mandatory Scroll Snapping Container */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    /* Hide scrollbar for a cleaner look */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

/* Base Section Styles */
.snap-section {
    scroll-snap-align: start;
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
    /* Offset for header */
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.hero {
    padding-top: 0;
    /* Hero needs to sit behind header */
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(10, 10, 12, 0.4),
            /* Lighter top for header visibility */
            rgba(10, 10, 12, 0.8) 70%,
            rgba(10, 10, 12, 1)
            /* Solid dark bottom to blend into next section */
        );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 0 var(--spacing-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.hero-logo-placeholder {
    width: 100%;
    max-width: 120px;
    height: auto;
    margin-bottom: var(--spacing-lg);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    animation: float 4s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
}

.hero-ctas {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

@media (max-width: 640px) {
    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }
}

/* Floating animation for the logo */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ==========================================================================
   2. NOSOTROS SECTION & OTHERS
   ========================================================================== */
.nosotros,
.cursos {
    background-color: transparent;
}

.contacto {
    background-color: var(--color-bg-base);
    height: 100vh;
    scroll-snap-align: start;
    padding-top: 0;
    /* Handled by flex-col in HTML */
}

.contacto-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.section-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.section-title {
    font-size: clamp(2rem, 3vw, 3rem);
    text-transform: uppercase;
    margin-bottom: var(--spacing-2xl);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--color-primary-brand);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

/* ==========================================================================
   DOT NAVIGATION (Fixed Scrollspy)
   ========================================================================== */
.dot-navigation {
    position: fixed;
    right: var(--spacing-xl);
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-index-nav);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.dot::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background-color: var(--color-bg-surface-light);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-family-sans);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.dot:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.dot.active {
    background-color: var(--color-primary-brand);
    box-shadow: 0 0 15px var(--color-primary-glow);
    transform: scale(1.2);
}

/* ==========================================================================
   CARDS & PANELS
   ========================================================================== */
.course-card {
    flex: 1 1 280px;
    max-width: 300px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: var(--spacing-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px 0 rgba(10, 92, 90, 0.4);
    border-color: #0a5c5a;
}

.course-card.highlight {
    border-color: var(--color-primary-brand);
    position: relative;
    overflow: hidden;
}

.course-card.highlight:hover {
    box-shadow: 0 10px 30px var(--color-primary-glow);
}

.badge-new {
    position: absolute;
    top: 20px;
    right: -30px;
    width: 130px;
    text-align: center;
    background-color: var(--color-primary-brand);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 5px 0;
    transform: rotate(45deg);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.promo-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(10, 92, 90, 0.5);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.promo-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px 0 rgba(10, 92, 90, 0.4);
    border-color: #0a5c5a;
}

.alliance-banner {
    margin-top: var(--spacing-xl);
    background-color: rgba(255, 255, 255, 0.02);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary-brand);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* ==========================================================================
   TRAYECTORIA & GALLERY
   ========================================================================== */
.trayectoria-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: stretch;
    width: 100%;
}

@media (max-width: 992px) {
    .trayectoria-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
}

.trayectoria-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gallery-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.mosaic-item {
    width: 100%;
    height: 150px;
    object-fit: cover;
    image-orientation: from-image;
    /* Force EXIF rotation */
    border-radius: 12px;
    cursor: pointer;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mosaic-item:hover {
    transform: scale(1.02);
    opacity: 0.8;
    border-color: var(--color-primary-brand);
}

@media (max-width: 768px) {
    .mosaic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-in-out;
}

.lightbox.hidden {
    opacity: 0;
    pointer-events: none;
}

#lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s, transform 0.3s;
}

.lightbox-close:hover {
    color: var(--color-primary-brand);
    transform: scale(1.1);
}

/* ==========================================================================
   MOBILE & FIXES (TAREA 3)
   ========================================================================== */
@media (max-width: 768px) {

    /* 1. Scroll Snapping (Desactivar en móvil para scroll normal) */
    .scroll-container {
        scroll-snap-type: none;
        overflow-y: auto;
    }

    .snap-section {
        height: auto;
        min-height: 100vh;
        scroll-snap-align: none;
        padding-top: 100px;
        padding-bottom: 3rem;
    }

    /* 2. Typography */
    .hero-title {
        font-size: clamp(2.5rem, 8vw, 3rem);
    }

    .section-title {
        font-size: clamp(1.8rem, 6vw, 2.2rem);
    }

    /* 3. Secciones Divididas & Tarjetas al 100% ancho */
    .trayectoria-grid {
        grid-template-columns: 1fr;
    }

    .course-card,
    .promo-panel {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .promo-panel {
        padding: 30px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        height: auto;
        min-height: 300px;
    }

    .course-card {
        flex: 0 0 auto;
        padding: 40px 20px 25px;
        text-align: center;
    }

    .course-card h3 {
        font-size: 2rem;
        margin-bottom: var(--spacing-md);
    }

    .promo-panel .btn {
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    .cursos .d-flex.flex-wrap {
        flex-direction: column;
    }

    /* 4. Social Icons Row Fix */
    .contacto-content .d-flex.gap-lg {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 20px;
        margin-bottom: 20px;
    }

    /* 4. Navegación Lateral (Ocultar) */
    .dot-navigation {
        display: none !important;
    }
}