/* ===========================
   NOVARA - Cursos Page CSS
   Page Transitions & Course Cards
   =========================== */

/* ===========================
   PAGE TRANSITION OVERLAY
   =========================== */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--navy);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    opacity: 1;
    visibility: visible;
}

.page-transition-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-transition-overlay.active {
    opacity: 1;
    visibility: visible;
}

.transition-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 3px;
}

.transition-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Body transition support */
body {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ===========================
   CURSOS HERO
   =========================== */
.cursos-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    padding: 140px 0 100px;
    overflow: hidden;
}

.cursos-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #3B5998 100%);
    z-index: 0;
}

.cursos-hero-bg::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(232, 132, 26, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.cursos-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cursos-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cursos-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(232, 132, 26, 0.2);
    color: var(--orange-light);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 28px;
    border: 1px solid rgba(232, 132, 26, 0.3);
    animation: fadeInDown 0.6s ease 0.2s both;
}

.cursos-hero-badge i {
    font-size: 18px;
}

.cursos-hero-title {
    font-size: clamp(36px, 5.5vw, 60px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    animation: fadeInDown 0.6s ease 0.3s both;
}

.cursos-hero-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.75);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
    animation: fadeInDown 0.6s ease 0.4s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tabs */
.cursos-hero-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInDown 0.6s ease 0.5s both;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--white);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
    box-shadow: 0 6px 24px rgba(232, 132, 26, 0.4);
}

.tab-btn i {
    font-size: 20px;
}

/* Hero BG Variants */
.cursos-hero-bg--blue {
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 50%, #3B82F6 100%);
}

.cursos-hero-bg--blue::before {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
}

.cursos-hero-bg--blue::after {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
}

.cursos-hero-bg--green {
    background: linear-gradient(135deg, #14532D 0%, #16A34A 50%, #22C55E 100%);
}

.cursos-hero-bg--green::before {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.25) 0%, transparent 70%);
}

.cursos-hero-bg--green::after {
    background: radial-gradient(circle, rgba(22, 163, 74, 0.2) 0%, transparent 70%);
}

/* Hero Badge Variants */
.cursos-hero-badge--blue {
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
    border-color: rgba(59, 130, 246, 0.3);
}

.cursos-hero-badge--green {
    background: rgba(34, 197, 94, 0.2);
    color: #86EFAC;
    border-color: rgba(34, 197, 94, 0.3);
}

/* Tab active color variants */
.cursos-hero-bg--blue ~ .cursos-hero-content .tab-btn.active,
.cursos-hero-content .tab-btn.active.tab-btn-blue {
    background: #3B82F6;
    border-color: #3B82F6;
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

.cursos-hero-bg--green ~ .cursos-hero-content .tab-btn.active,
.cursos-hero-content .tab-btn.active.tab-btn-green {
    background: #22C55E;
    border-color: #22C55E;
    box-shadow: 0 6px 24px rgba(34, 197, 94, 0.4);
}

/* Wave SVG */
.cursos-hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    z-index: 1;
}

.cursos-hero-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* ===========================
   CURSOS SECTIONS
   =========================== */
.cursos-section {
    padding: 80px 0 100px;
    background: var(--white);
}

.cursos-section-alt {
    background: var(--off-white);
}

/* Section Intro */
.section-intro {
    text-align: center;
    margin-bottom: 60px;
}

.section-intro .section-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.section-intro .section-icon i {
    font-size: 32px;
}

.section-intro .icon-orange {
    background: var(--orange-bg);
}

.section-intro .icon-orange i {
    color: var(--orange);
}

.section-intro .icon-blue {
    background: var(--blue-bg);
}

.section-intro .icon-blue i {
    color: #3B82F6;
}

.section-intro .icon-green {
    background: var(--green-bg);
}

.section-intro .icon-green i {
    color: #22C55E;
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===========================
   CURSO CARDS
   =========================== */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.curso-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    position: relative;
}

.curso-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(27, 42, 74, 0.12);
    border-color: transparent;
}

.curso-card-featured {
    border: 2px solid var(--orange);
    box-shadow: 0 8px 30px rgba(232, 132, 26, 0.12);
}

.curso-card-featured:hover {
    box-shadow: 0 20px 60px rgba(232, 132, 26, 0.2);
}

/* Card Header */
.curso-card-header {
    position: relative;
    padding: 32px 28px 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.taller-gradient {
    background: linear-gradient(135deg, #E8841A 0%, #F5A623 100%);
}

.curso-gradient {
    background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
}

.programa-gradient {
    background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%);
}

.curso-card-category {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.curso-card-badge {
    position: absolute;
    top: 12px;
    right: 16px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--orange);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.curso-card-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.curso-card:hover .curso-card-icon {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.curso-card-icon i {
    font-size: 28px;
    color: var(--white);
}

/* Card Body */
.curso-card-body {
    padding: 28px;
}

.curso-card-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
    line-height: 1.3;
}

.curso-card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.curso-card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.curso-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.curso-card-meta i {
    font-size: 18px;
    color: var(--orange);
}

/* Tags */
.curso-card-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.tag-orange {
    background: var(--orange-bg);
    color: var(--orange);
}

.tag-blue {
    background: var(--blue-bg);
    color: #3B82F6;
}

.tag-green {
    background: var(--green-bg);
    color: #22C55E;
}

.tag-navy {
    background: rgba(27, 42, 74, 0.08);
    color: var(--navy);
}

/* Modules list (for Programas) */
.curso-card-modules {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--off-white);
    border-radius: var(--radius-sm);
}

.curso-card-modules h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.curso-card-modules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.curso-card-modules li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.curso-card-modules li i {
    color: #22C55E;
    font-size: 18px;
}

/* Card Button */
.curso-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    background: var(--orange);
    color: var(--white);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(232, 132, 26, 0.2);
}

.curso-card-btn:hover {
    background: #D47316;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 132, 26, 0.35);
}

.curso-card-btn i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.curso-card-btn:hover i {
    transform: translateX(4px);
}

.curso-card-btn.btn-blue {
    background: #3B82F6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.curso-card-btn.btn-blue:hover {
    background: #2563EB;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.curso-card-btn.btn-green {
    background: #22C55E;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2);
}

.curso-card-btn.btn-green:hover {
    background: #16A34A;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

/* ===========================
   CTA EXTRA
   =========================== */
.cta-sub {
    color: rgba(255, 255, 255, 0.7);
    font-size: 17px;
    margin-bottom: 32px;
}

/* ===========================
   SCROLL REVEAL ANIMATION
   =========================== */
.cursos-section .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cursos-section .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.curso-card.reveal:nth-child(1) { transition-delay: 0s; }
.curso-card.reveal:nth-child(2) { transition-delay: 0.15s; }
.curso-card.reveal:nth-child(3) { transition-delay: 0.3s; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    .cursos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cursos-hero {
        min-height: 450px;
        padding: 130px 0 80px;
    }

    .cursos-hero-title {
        font-size: 34px;
    }

    .cursos-hero-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .cursos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cursos-section {
        padding: 60px 0 80px;
    }
}

@media (max-width: 600px) {
    .cursos-hero {
        min-height: 420px;
        padding: 120px 0 70px;
    }

    .cursos-hero-title {
        font-size: 28px;
    }

    .cursos-hero-description {
        font-size: 16px;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .tab-btn i {
        display: none;
    }

    .curso-card-body h3 {
        font-size: 18px;
    }

    .curso-card-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==========================================================================
   Contacto Submenu / CTA positioning overrides
   ========================================================================== */
.contact-submenu {
    top: calc(100% + 16px) !important;
    bottom: auto !important;
    transform: translateX(-50%) translateY(-10px) !important;
}

.contact-submenu.open {
    transform: translateX(-50%) translateY(0) !important;
}

.contact-submenu-arrow {
    top: -8px !important;
    bottom: auto !important;
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05) !important;
}

.cta-section {
    overflow: visible !important;
    padding-bottom: 160px !important;
}

.cta-section::before {
    pointer-events: none !important;
}

