:root {
    --header-height: 104px;
}

.hero-programa {
    position: relative;
    min-height: 100vh;
    background: #000;
    overflow-x: hidden;
}

.hero-dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    transition: background 0.3s ease;
    pointer-events: none;
}

.hero-main-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: calc(var(--header-height) + 100px) 20px 60px;
    gap: 40px;
}

.hero-media-card {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.smart-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px) brightness(0.7);
    transform: scale(1.2);
}

.media-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.smart-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-category {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    display: inline-block;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
}

.hero-description {
    font-size: 18px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 24px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 24px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.hero-meta-item:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.hero-meta-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-meta {
        gap: 12px;
        justify-content: center;
    }

    .hero-meta-item {
        font-size: 12px;
        padding: 4px 10px;
    }

    .hero-meta-item svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .hero-meta {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .hero-meta-item {
        width: fit-content;
    }
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: white;
    color: black;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(109, 109, 110, 0.7);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(109, 109, 110, 0.9);
    transform: translateY(-2px);
}

.hero-scroll-content {
    position: relative;
    z-index: 3;
    background: white;
    border-radius: 32px 32px 0 0;
    margin-top: 40px;
    padding: 60px 20px 80px;
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.1);
}

.content-card {
    max-width: 1200px;
    margin: 0 auto;
}

.content-card h2 {
    font-size: 32px;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.content-card p {
    font-size: 18px;
    line-height: 1.6;
    color: #4a4a4a;
    margin-bottom: 24px;
}

.program-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 48px;
    padding-bottom: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.tab-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.tab-btn:hover {
    color: #1f2937;
    background: #f9fafb;
}

.tab-btn:hover svg {
    transform: translateY(-2px);
}

.tab-btn.active {
    color: #000;
    background: #f9fafb;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #000;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-panel.active {
    display: block;
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .hero-main-container {
        padding: calc(var(--header-height) + 20px) 16px 40px;
        gap: 30px;
    }

    .smart-frame {
        padding-bottom: 75%;
    }

    .hero-category {
        font-size: 10px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-meta {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .hero-meta span::before {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .hero-scroll-content {
        padding: 40px 16px 60px;
        border-radius: 24px 24px 0 0;
    }

    .content-card h2 {
        font-size: 24px;
    }

    .content-card p {
        font-size: 16px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smart-frame {
    animation: fadeInUp 0.8s ease-out;
}

.program-section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 38px;
    font-weight: 400;
    margin-bottom: 32px;
    letter-spacing: -1.5px;
    line-height: 1;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    font-size: 32px;
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.objective-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.objective-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.objective-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

.objective-card:hover::before {
    transform: scaleX(1);
}

.objective-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: inline-block;
}

.objective-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1f2937;
}

.objective-card p {
    font-size: 16px;
    line-height: 1.5;
    color: #4b5563;
}

.target-audience {
    background: #f9fafb;
    border-radius: 24px;
    padding: 32px;
    border: 1px solid #e5e7eb;
}

.target-description {
    font-size: 18px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 32px;
}

.audience-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.audience-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.audience-item:hover {
    transform: translateX(4px);
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.audience-icon {
    font-size: 24px;
    min-width: 40px;
    text-align: center;
}

.audience-text {
    font-size: 16px;
    color: #1f2937;
    font-weight: 500;
}

.loading-state,
.error-state,
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-state svg,
.error-state svg,
.empty-state svg {
    margin-bottom: 20px;
    color: #9ca3af;
}

.loading-state p,
.error-state p,
.empty-state p {
    color: #6b7280;
    margin-top: 12px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e7eb;
    border-top-color: #000;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.retry-btn {
    margin-top: 24px;
    padding: 10px 24px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.error-state svg,
.empty-state svg {
    color: #ef4444;
}

.empty-state svg {
    color: #9ca3af;
}

@media (max-width: 768px) {
    .hero-scroll-content {
        padding: 40px 16px 60px;
        border-radius: 24px 24px 0 0;
    }

    .program-tabs {
        gap: 8px;
        margin-bottom: 32px;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .tab-btn svg {
        width: 18px;
        height: 18px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .title-icon {
        font-size: 28px;
    }

    .objectives-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .objective-card {
        padding: 20px;
    }

    .target-audience {
        padding: 24px;
    }

    .target-description {
        font-size: 16px;
    }

    .audience-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .audience-item {
        padding: 12px;
    }
}

.related-programs-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.related-programs-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content {
    flex: 1;
}

.title-icon {
    font-size: 36px;
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(15deg);
    }
}

.section-subtitle {
    font-size: 18px;
    color: #6b7280;
    line-height: 1.5;
}

.section-controls {
    display: flex;
    gap: 12px;
}

.carousel-loading {
    text-align: center;
    padding: 60px 20px;
}

.carousel-loading .spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e7eb;
    border-top-color: #000;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

.carousel-loading p {
    color: #6b7280;
    font-size: 14px;
}

.empty-related-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 24px;
    margin: 20px 0;
}

.empty-related-state svg {
    color: #9ca3af;
    margin-bottom: 20px;
}

.empty-related-state h3 {
    font-size: 18px;
    color: #374151;
    margin-bottom: 8px;
}

.empty-related-state p {
    color: #6b7280;
    font-size: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #374151;
}

.carousel-btn:hover {
    background: #000;
    border-color: #000;
    color: white;
    transform: scale(1.05);
}

.carousel-btn:active {
    transform: scale(0.95);
}

/* Wrapper del carrusel */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
    margin: 0 -10px;
    padding: 10px;
}

.programs-carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    padding: 8px 4px 20px;
    cursor: grab;
}

.programs-carousel:active {
    cursor: grabbing;
}

.programs-carousel::-webkit-scrollbar {
    height: 6px;
}

.programs-carousel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.programs-carousel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.programs-carousel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Tarjetas de programa */
.program-card {
    flex: 0 0 320px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Imagen de la tarjeta */
.card-image {
    position: relative;
    padding-bottom: 70.25%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #f3f4f6;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease;
}

.program-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.program-card:hover .card-overlay {
    opacity: 1;
}

.view-details-btn {
    padding: 10px 24px;
    background: white;
    color: black;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.program-card:hover .view-details-btn {
    transform: translateY(0);
    opacity: 1;
}

.view-details-btn:hover {
    background: #000;
    color: white;
    transform: scale(1.05);
}

/* Contenido de la tarjeta */
.card-content {
    padding: 0 20px;
}

.program-category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #667eea;
    display: inline-block;
    margin-bottom: 12px;
}

.program-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
    text-transform: uppercase;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.program-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #6b7280;
}

.program-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.program-meta svg {
    flex-shrink: 0;
}

.program-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #6b7280;
}

.start-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.spots {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Indicadores del carrusel */
.carousel-indicators {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s ease;
    cursor: pointer;
}

.indicator.active {
    width: 24px;
    border-radius: 4px;
    background: #000;
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.program-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.program-card:nth-child(1) {
    animation-delay: 0.1s;
}

.program-card:nth-child(2) {
    animation-delay: 0.2s;
}

.program-card:nth-child(3) {
    animation-delay: 0.3s;
}

.program-card:nth-child(4) {
    animation-delay: 0.4s;
}

.program-card:nth-child(5) {
    animation-delay: 0.5s;
}

.program-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Responsive */
@media (max-width: 768px) {

    .section-title {
        font-size: 24px;
    }

    .title-icon {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    .section-controls {
        display: none;
        /* Ocultar botones en móvil, usar scroll nativo */
    }

    .carousel-indicators {
        display: flex;
    }

    .program-card {
        flex: 0 0 280px;
    }

    .program-meta {
        font-size: 12px;
        gap: 12px;
    }

    .program-footer {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .program-card {
        flex: 0 0 260px;
    }

    .card-content {
        padding: 16px;
    }
}

.save-program-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 32px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
}

.program-card:hover .save-program-btn {
    opacity: 1;
    transform: translateY(0);
}

.save-program-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.save-program-btn:active {
    transform: scale(0.95);
}

.save-program-btn.is-saved {
    background: #000;
    color: #ffd700;
}

.save-program-btn.is-saved .svg--bookmark svg {
    fill: #ffd700;
    stroke: #ffd700;
}

.save-program-btn .svg--bookmark svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
    transition: all 0.3s ease;
}

.save-program-btn.is-saved .svg--bookmark svg {
    fill: #ffd700;
    stroke: #ffd700;
}

.save-program-btn .button-option-like__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.save-program-btn .Content_button-pill-content__label__1cy-p {
    font-size: 12px;
    font-weight: 500;
}

.button-pill-primary.save-btn.is-saved {
    background: #000;
    border-color: #ffd700;
}

.button-pill-primary.save-btn.is-saved .svg--bookmark svg {
    fill: #ffd700;
    stroke: #ffd700;
}

.button-pill-primary.save-btn .svg--bookmark svg {
    fill: none;
    stroke: currentColor;
    transition: all 0.3s ease;
}

.button-pill-primary.save-btn[data-loading="1"] {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.button-pill-primary.save-btn[data-loading="1"] .button-pill-content__label::after {
    content: " ...";
}

@media (max-width: 768px) {
    .save-program-btn {
        opacity: 1;
        transform: translateY(0);
        background: rgba(0, 0, 0, 0.7);
        padding: 6px 12px;
    }

    .save-program-btn .Content_button-pill-content__label__1cy-p {
        font-size: 11px;
    }

    .save-program-btn .svg--bookmark svg {
        width: 12px;
        height: 12px;
    }
}

@keyframes bookmarkPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.save-program-btn.saved-animation {
    animation: bookmarkPop 0.4s ease;
}

.save-program-btn[data-loading="1"] {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.save-program-btn[data-loading="1"] .Content_button-pill-content__label__1cy-p::after {
    content: " ...";
}