/* ============================================
   DESDE ABAJO PODCAST - ESTILOS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF0000;
    --primary-dark: #CC0000;
    --secondary: #282828;
    --dark: #0F0F0F;
    --light: #F1F1F1;
    --text: #0F0F0F;
    --text-light: #606060;
    --border: #E5E5E5;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #FFF;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.header {
    background: var(--dark);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header-socials {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.social-icon img {
    height: 30px;
    width: auto;
    display: block;
}

.social-icon:hover {
    transform: scale(1.1);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

/* Hamburguesa oculta en desktop */
.hamburger {
    display: none;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    height: 500px;
    background: url('../img/hero-bg.png') center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ============================================
   PATROCINADORES
   ============================================ */

.sponsors-section {
    background: #FFF;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.sponsors-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.sponsors-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.sponsor-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: grayscale(30%);
}

.sponsor-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.3);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.badge-new {
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ============================================
   ÚLTIMO EPISODIO
   ============================================ */

.latest-episode {
    background: var(--light);
    padding-top: 1rem;
}

.latest-container {
    max-width: 1000px;
    margin: 0 auto;
}

.video-card-large {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
}

.video-card-large:hover {
    transform: translateY(-5px);
}

.video-thumbnail-large {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--dark);
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail-large img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-card-large:hover .video-thumbnail-large img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.play-overlay::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent white;
    margin-left: 4px;
}

.video-card-large:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--primary);
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.video-info-large {
    padding: 2rem;
}

.video-title-large {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--text);
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.video-views,
.video-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-description {
    color: var(--text-light);
    line-height: 1.6;
    max-height: 100px;
    overflow: hidden;
}

/* ============================================
   EPISODIOS POPULARES
   ============================================ */

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--dark);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-info {
    padding: 1.25rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   ACERCA DE
   ============================================ */

.about-section {
    background: var(--dark);
    color: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.social-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.3);
}

/* ============================================
   LOADING
   ============================================ */

.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--secondary);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 2rem;
}

.footer-note {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0.6;
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-video {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}

.modal-video .close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s;
}

.modal-video .close-btn:hover {
    transform: scale(1.1);
}

#modalVideoContainer {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

#modalVideoContainer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
    .hero {
        height: 400px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* ========== MENÚ HAMBURGUESA ========== */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 35px;
        height: 35px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        z-index: 1001;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: white;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Header móvil */
    .header .container {
        position: relative;
        flex-direction: row;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .logo h1 {
        font-size: 1.3rem;
        text-align: center;
    }

    /* Nav desplegable */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 280px;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        padding: 80px 2rem 2rem;
        gap: 0;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .nav.active {
        right: 0;
        left: auto;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .nav-link.active::after {
        display: none;
    }

    /* Hero más pequeño para ver foto completa */
    .hero {
        height: 200px;
        background-position: center center;
        background-size: cover;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    /* Container padding móvil */
    .container {
        padding: 0 1rem;
    }

    /* Secciones */
    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Patrocinadores */
    .sponsors-container {
        gap: 1.5rem;
    }

    .sponsor-logo {
        height: 40px;
    }

    /* Grid episodios */
    .episodes-grid {
        grid-template-columns: 1fr;
    }

    /* Stats */
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1.25rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.95rem;
    }

    /* Shorts grid */
    .shorts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Video info */
    .video-info-large {
        padding: 1.25rem;
    }

    .video-title-large {
        font-size: 1.3rem;
    }

    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Social buttons */
    .social-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    /* About socials */
    .about-socials {
        gap: 1.25rem;
    }

    .about-socials .social-icon img {
        height: 35px;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 1rem;
    }

    .footer p {
        font-size: 0.85rem;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .hero {
        height: 250px;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .badge-new {
        font-size: 0.7rem;
        padding: 0.2rem 0.75rem;
    }

    .shorts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .short-info {
        padding: 0.75rem;
    }

    .short-title {
        font-size: 0.85rem;
    }

    .video-title-large {
        font-size: 1.1rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }
}

/* ============================================
   SHORTS SECTION
   ============================================ */

.shorts-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}

.shorts-section .section-title {
    color: white;
}

.shorts-section .loading {
    color: rgba(255, 255, 255, 0.7);
}

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.short-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.short-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 0, 0, 0.2);
    border-color: var(--primary);
}

.short-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 177.78%;
    background: var(--dark);
    overflow: hidden;
}

.short-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.short-card:hover .short-thumbnail img {
    transform: scale(1.05);
}

.short-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.short-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
}

.short-play-overlay::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent white;
    margin-left: 3px;
}

.short-card:hover .short-play-overlay {
    opacity: 1;
}

.short-info {
    padding: 1rem;
}

.short-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

/* ============================================
   MODAL VIDEO IFRAME STYLES
   ============================================ */

#modalVideoContainer .modal-iframe {
    border: none;
    border-radius: 12px;
}

/* Soporte para Shorts verticales (9:16) */
#modalVideoContainer:has(.modal-iframe-short) {
    padding-bottom: 0;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.modal-iframe-short {
    position: relative !important;
    width: 350px !important;
    height: 622px !important;
    max-height: 85vh;
    border: none;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.4);
}

@media (max-width: 480px) {
    .modal-iframe-short {
        width: 100% !important;
        height: 80vh !important;
    }
}

/* ============================================
   RRSS SOCIALS EN ABOUT (HORIZONTAL)
   ============================================ */

.about-socials {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.about-socials .social-icon {
    transition: transform 0.3s ease;
}

.about-socials .social-icon:hover {
    transform: translateY(-5px);
}

.about-socials .social-icon img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.4));
}

/* ============================================
   PAGINACIÓN
   ============================================ */

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 1rem 0;
}

.btn-pagination {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.2);
}

.btn-pagination:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 0, 0, 0.3);
}

.btn-pagination:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination-info {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .pagination-controls {
        gap: 1rem;
        margin-top: 2rem;
    }

    .btn-pagination {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
}