/* --- GENERAL --- */

:root {
    --text: #f8fafc;
    --accent: #38bdf8;
    --card-bg: #1e293b;
}

body {
     margin: 0;
    font-family: 'Inter', sans-serif;
    background: #2e2d2d;
    background: linear-gradient(135deg, rgba(46, 45, 45, 1) 0%, rgba(42, 74, 168, 1) 50%, rgba(250, 77, 77, 1) 100%);
    color: var(--text);
    scroll-behavior: smooth;
    background-size: 400% 400%;
    animation: degradeAnime 25s ease infinite;
    }
@keyframes degradeAnime {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


nav {
    position: fixed;
    top: 0; width: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    z-index: 100;
    box-sizing: border-box;
}

.lang-toggle button {
    background: none; border: 1px solid var(--accent);
    color: var(--accent); cursor: pointer; padding: 5px 10px;
    border-radius: 5px;
}

footer {
    position: fixed;
    bottom: 0; width: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);

    justify-content: space-between;
    padding: 1rem 2rem;
    z-index: 100;
    box-sizing: border-box;
    margin-top: 30px;
}
footer ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    color: var(--text);
    justify-content: center;
    align-items: center;
    text-align: center;
}
footer ul li a {
    color: var(--text);
    text-decoration: none;
    font-size: 2.2rem;
}
footer p {
    margin: 0;
    color: var(--text);
    text-align: center;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* --- SECCIONES --- */

.hero{
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.portal-grid{
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-top: 50px;
            width: 80%;
}
.portal-card{
        background: var(--card-bg);
        padding: 40px;
        border-radius: 15px;
        text-decoration: none;
        color: white;
        transition: transform 0.3s, border 0.3s;
        border: 1px solid transparent;
}
.portal-card:hover{
        transform: translateY(-10px);
        border-color: var(--accent);
}

/* --- About --- */

.about-wrapper {
            padding: 120px 10% 100px; /* Espacio para el nav fijo y el footer */
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .profile-img {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            border: 3px solid var(--accent);
            margin-bottom: 20px;
            object-fit: cover;
        }

        .portal-card.about-card {
            width: 100%;
            max-width: 800px;
            margin-bottom: 30px;
            text-align: left; 
        }

        .about-card h2 {
            border-bottom: 2px solid var(--accent);
            padding-bottom: 10px;
            margin-top: 0;
            color: var(--accent);
        }

        .about-card h3 {
            margin-top: 20px;
            margin-bottom: 5px;
            color: #e2e8f0;
        }

        .about-card ul {
            list-style-type: none;
            padding-left: 0;
        }

        .about-card ul li {
            margin-bottom: 10px;
            padding-left: 20px;
            position: relative;
        }

        .about-card ul li::before {
            content: "▹";
            position: absolute;
            left: 0;
            color: var(--accent);
            font-weight: bold;
        }

        .btn-download {
            display: inline-block;
            background: var(--accent);
            color: #0f172a; 
            padding: 15px 30px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: bold;
            font-size: 1.1rem;
            margin-top: 20px;
            transition: transform 0.2s, background 0.2s;
            margin-bottom: 50px;
        }

        .btn-download:hover {
            transform: scale(1.05);
            background: #e0f2fe;
        }
        
        .intro-text {
            text-align: center;
            font-size: 1.2rem;
            max-width: 800px;
            margin-bottom: 40px;
            line-height: 1.6;
        }

        /* --- Devlog --- */
        .devlog-wrapper {
            flex: 1;
            margin-left: 340px;
            padding: 70px 5% 100px 5%;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: calc(100% - 340px);
            box-sizing: border-box;
        }

        .portal-card.content-card {
            width: 100%;
            max-width: 600px;
            margin-bottom: 40px;
            text-align: left;
        }

        .content-card h1 {
            color: var(--accent);
            margin-top: 0;
            border-bottom: 2px solid var(--accent);
            padding-bottom: 10px;
        }

        /* --- ESTILOS DEL CARRUSEL --- */
        .carousel-container {
            position: relative;
            width: 100%;
            max-width: 450px;
            height: 700px;
            margin: 0 auto;
            overflow: hidden;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            background: var(--card-bg);
        }

        .carousel-track {
            display: flex;
            flex-wrap: nowrap;
            transition: transform 0.4s ease-in-out;
            height: 100%; /* Ocupar toda la altura del contenedor */
        }

        .carousel-slide {
            flex: 0 0 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%; /* Cada slide ocupe toda la altura */
        }

        /* Contenedor responsivo para el iframe de TikTok */
        .tiktok-embed-container {
            width: 100%; /* Cambiado a 100% para responsividad */
            max-width: 325px; /* Máximo ancho */
            min-height: 600px;
            display: flex;
            justify-content: center;
            overflow: hidden; /* Para cortar si es necesario */
        }

        .slide-title {
            margin-top: 15px;
            font-size: 1.1rem;
            font-weight: bold;
            color: var(--text);
            text-align: center;
            padding: 0 10px;
        }

        /* Botones de navegación */
        .carousel-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(15, 23, 42, 0.8);
            color: var(--accent);
            border: 2px solid var(--accent);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            cursor: pointer;
            z-index: 10;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.3s;
        }

        .carousel-btn:hover {
            background: var(--accent);
            color: var(--bg);
        }

        .btn-prev { left: 10px; }
        .btn-next { right: 10px; }

        /* Indicadores (puntitos) */
        .carousel-dots {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 15px;
        }

        .dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255,255,255,0.3);
            cursor: pointer;
            transition: 0.3s;
        }

        .dot.active {
            background: var(--accent);
            transform: scale(1.2);
        }

        /* --- CDC (Coups de Cœur) --- */
        .cdc-wrapper {
            padding: 120px 5% 100px 5%;
            display: grid;
            grid-template-columns: 1fr;
            gap: 40px;
        }

        .portal-card.content-card {
            width: 100%;
        }

        .cdc-container {
            display: grid;
            grid-template-columns: 180px 1fr;
            gap: 30px;
            width: 100%;
            box-sizing: border-box;
        }

        .cdc-sidebar {
            background: var(--card-bg);
            padding: 20px;
            border-radius: 15px;
            height: fit-content;
            border: 1px solid var(--accent);
        }

        .cdc-sidebar h3 {
            color: var(--accent);
            margin-top: 0;
            margin-bottom: 15px;
            font-size: 1rem;
            border-bottom: 2px solid var(--accent);
            padding-bottom: 10px;
        }

        .cdc-index {
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-height: calc(100vh - 300px);
            overflow-y: auto;
            width: 100%;
        }

        .cdc-index-item {
            padding: 8px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s;
            background: rgba(56, 189, 248, 0.1);
            border-left: 3px solid transparent;
            color: var(--text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .cdc-index-item:hover {
            background: rgba(56, 189, 248, 0.2);
            transform: translateX(5px);
        }

        .cdc-index-item.active {
            background: rgba(56, 189, 248, 0.3);
            border-left-color: var(--accent);
            font-weight: bold;
            color: var(--accent);
        }

        .cdc-main {
            display: flex;
            justify-content: center;
            width: 100%;
        }

        /* ==================== LAYOUT PRINCIPAL ==================== */
        .main-container {
            display: flex;
            min-height: 100vh;
            padding-top: 0;
        }

        /* ==================== SIDEBAR (CARTELERA) ==================== */
        .sidebar {
            width: 340px;
            background: rgba(15, 23, 42, 0.97);
            backdrop-filter: blur(12px);
            border-right: 1px solid rgba(56, 189, 248, 0.2);
            overflow-y: auto;
            position: fixed;
            top: 70px;
            left: 0;
            height: calc(100vh - 170px);
            flex-shrink: 0;
            z-index: 50;
        }

        .sidebar-header {
            padding: 1.8rem 1.5rem 1rem;
            border-bottom: 1px solid rgba(56, 189, 248, 0.15);
            position: sticky;
            top: 0;
            background: rgba(15, 23, 42, 0.97);
            z-index: 10;
        }

        .sidebar-header h2 {
            margin: 0 0 6px 0;
            color: var(--accent);
            font-size: 1.45rem;
        }

        .sidebar-header .subtitle {
            margin: 0;
            color: #94a3b8;
            font-size: 0.95rem;
        }

        .video-list {
            padding: 0.5rem 0;
            list-style: none;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .video-item {
            padding: 14px 1.5rem;
            color: #e2e8f0;
            text-decoration: none;
            display: flex;
            align-items: center;
            transition: all 0.25s ease;
            border-left: 3px solid transparent;
            background: transparent;
        }

        .video-item:hover {
            background: rgba(56, 189, 248, 0.12);
            color: white;
            transform: translateX(6px);
        }

        .video-item.active {
            background: rgba(56, 189, 248, 0.25);
            border-left-color: var(--accent);
            color: var(--accent);
            font-weight: 500;
        }

        .video-item > div {
            display: flex;
            flex-direction: column;
            width: 100%;
        }

        .video-item span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .video-item small {
            display: block;
            color: #64748b;
            font-size: 0.8rem;
            margin-top: 3px;
        }

        .sidebar::-webkit-scrollbar {
            width: 6px;
        }

        .sidebar::-webkit-scrollbar-thumb {
            background: rgba(56, 189, 248, 0.4);
            border-radius: 10px;
        }

        /* ==================== CDC WRAPPER ==================== */
        .cdc-wrapper {
            flex: 1;
            margin-left: 340px;
            padding: 70px 5% 100px 5%;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: calc(100% - 340px);
            box-sizing: border-box;
        }

        .portal-card.content-card {
            width: 100%;
            max-width: 600px;
        }

        .carousel-container {
            position: relative;
            width: 100%;
            max-width: 450px;
            height: 700px;
            margin: 0 auto;
            overflow: hidden;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            background: var(--card-bg);
        }

        /* ==================== RESPONSIVE ==================== */
        @media (max-width: 992px) {
            .sidebar {
                position: fixed;
                width: 100%;
                height: auto;
                max-height: 50vh;
                top: 70px;
                left: 0;
                z-index: 95;
                border-right: none;
                border-bottom: 1px solid rgba(56, 189, 248, 0.2);
                padding-bottom: 0;
                padding-top: 0;
                transform: translateY(-100%);
                transition: transform 0.4s ease;
            }

            .sidebar.open {
                transform: translateY(0);
            }

            .cdc-wrapper {
                margin-left: 0;
                width: 100%;
                padding: 120px 5% 100px 5%;
            }

            .devlog-wrapper {
                margin-left: 0;
                width: 100%;
                padding: 120px 5% 100px 5%;
            }

            .carousel-container {
                height: 600px;
            }
        }

        /* Responsive viejo */

            .cdc-container {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .cdc-sidebar {
                width: 100%;
                height: auto;
                max-height: none;
            }

            .cdc-index {
                flex-direction: row;
                overflow-x: auto;
                overflow-y: hidden;
                max-height: none;
                gap: 10px;
            }

            .cdc-index-item {
                flex-shrink: 0;
                min-width: 100px;
            }
        