/* ============================================ */
/* BASE - RESET Y TIPOGRAFÍA                    */
/* ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 50%, #f6e9d7 100%);
    min-height: 100vh;
    color: #2d3436;
    overflow-x: hidden;
}

/* ============================================ */
/* HEADER                                       */
/* ============================================ */
.header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24, #f0932b);
    padding: 40px 20px 60px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 8px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-text h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    display: block;
}

.header-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 4px;
    font-weight: 300;
    max-width: 500px;
}

.header-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

.header-wave svg {
    width: 100%;
    height: 60px;
    display: block;
}

/* ============================================ */
/* MAIN CONTENT                                 */
/* ============================================ */
.main-content {
    max-width: 1200px;
    margin: -30px auto 0;
    padding: 0 20px 40px;
    position: relative;
    z-index: 3;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 6px;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #f0932b);
    margin: 8px auto 0;
    border-radius: 2px;
}

.section-header p {
    font-size: 16px;
    color: #636e72;
    margin-top: 6px;
}

/* ============================================ */
/* CARDS GRID                                   */
/* ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

/* ============================================ */
/* LANGUAGE CARD                                */
/* ============================================ */
.language-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.language-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.language-card:active {
    transform: scale(0.97);
}

/* Bandera */
.card-flag {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.card-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.language-card:hover .card-flag img {
    transform: scale(1.05);
}

.flag-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 20px;
    color: white;
}

.language-name {
    font-family: 'Fredoka', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.language-sub {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 2px;
}

/* Card Body */
.card-body {
    padding: 18px 20px 20px;
}

.card-icon {
    font-size: 28px;
    color: #ff6b6b;
    margin-bottom: 6px;
    display: inline-block;
}

.card-body h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 4px;
}

.card-body p {
    font-size: 14px;
    color: #636e72;
    line-height: 1.5;
    margin-bottom: 14px;
}

.card-stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.stat {
    font-size: 12px;
    color: #636e72;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat i {
    color: #ff6b6b;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tag {
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 12px;
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    font-weight: 600;
}

/* Botones */
.btn-start {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-start i {
    transition: transform 0.3s ease;
}

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

/* ============================================ */
/* CARD: PRÓXIMAMENTE                          */
/* ============================================ */
.card-coming-soon {
    opacity: 0.7;
    cursor: default;
    border: 2px dashed #e2d1c3;
}

.card-coming-soon:hover {
    transform: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.coming-soon-badge {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #b2bec3;
}

.coming-soon-badge i {
    font-size: 40px;
}

.coming-soon-badge span {
    font-weight: 600;
    font-size: 16px;
}

.btn-coming-soon {
    width: 100%;
    padding: 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 12px;
    color: #b2bec3;
    font-weight: 700;
    font-size: 15px;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ============================================ */
/* MASCOTA                                      */
/* ============================================ */
.mascot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.mascot-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mascot-bubble span {
    font-size: 28px;
}

.mascot-bubble p {
    font-size: 14px;
    color: #2d3436;
    font-weight: 500;
}

.mascot-emoji {
    font-size: 40px;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* ============================================ */
/* FOOTER                                       */
/* ============================================ */
.footer {
    background: rgba(45, 52, 54, 0.95);
    padding: 16px 20px;
    margin-top: 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-logo {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    color: white;
    font-size: 18px;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.2);
}

.footer-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.footer-social {
    display: flex;
    gap: 14px;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: #ff6b6b;
    transform: translateY(-2px);
}

/* ============================================ */
/* RESPONSIVE - MOBILE FIRST                    */
/* ============================================ */

/* Tablet */
@media screen and (min-width: 768px) {
    .header {
        padding: 50px 30px 70px;
    }
    
    .logo-text h1 {
        font-size: 44px;
    }
    
    .logo-icon {
        width: 70px;
        height: 70px;
        font-size: 34px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    
    .section-header h2 {
        font-size: 36px;
    }
    
    .card-flag {
        height: 160px;
    }
}

/* Desktop */
@media screen and (min-width: 1024px) {
    .header {
        padding: 60px 40px 80px;
    }
    
    .logo-text h1 {
        font-size: 52px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .section-header h2 {
        font-size: 40px;
    }
    
    .card-flag {
        height: 170px;
    }
}

/* Móvil pequeño */
@media screen and (max-width: 480px) {
    .header {
        padding: 30px 16px 50px;
    }
    
    .logo-text h1 {
        font-size: 28px;
    }
    
    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .header-subtitle {
        font-size: 15px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .main-content {
        padding: 0 14px 30px;
        margin-top: -20px;
    }
    
    .section-header h2 {
        font-size: 26px;
    }
    
    .card-flag {
        height: 120px;
    }
    
    .card-body {
        padding: 14px 16px 16px;
    }
    
    .mascot {
        flex-direction: column;
        text-align: center;
        padding: 14px 18px;
        margin-top: 28px;
    }
    
    .mascot-bubble {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        justify-content: center;
    }
}

/* ============================================ */
/* ANIMACIONES DE CARGA                        */
/* ============================================ */
.language-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.language-card:nth-child(1) { animation-delay: 0.05s; }
.language-card:nth-child(2) { animation-delay: 0.10s; }
.language-card:nth-child(3) { animation-delay: 0.15s; }
.language-card:nth-child(4) { animation-delay: 0.20s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* SCROLLBAR                                    */
/* ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b6b, #f0932b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b6b;
}