:root {
    --primary: #AA151B;
    --secondary: #F1BF00;
    --text: #0f172a;
    --light-text: #64748b;
    --bg: #ffffff;
    --gray: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 50px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

.top-flag-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 33%, var(--secondary) 33%, var(--secondary) 66%, var(--primary) 66%, var(--primary) 100%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 2001;
}

header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 1.2rem 5%;
    position: fixed;
    width: 100%;
    top: 6px;
    z-index: 2000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
    opacity: 0.8;
    text-transform: uppercase;
}

.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* Language Dropdown - MEJORADO */
.lang-dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 10px; /* Evita que el menú desaparezca al mover el ratón */
    margin-bottom: -10px;
}

.dropbtn {
    background: var(--secondary); /* Resaltado en amarillo */
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    transition: transform 0.2s;
}

.dropbtn:hover {
    transform: scale(1.05);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1;
    overflow: hidden;
    margin-top: 0; /* Pegado para evitar el gap */
}

.dropdown-content a {
    color: var(--text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
}

.dropdown-content a:hover {
    background-color: var(--gray);
    color: var(--primary);
}

.lang-dropdown:hover .dropdown-content {
    display: block;
}

.btn-courses-nav {
    background: var(--primary);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 5px 15px rgba(170, 21, 27, 0.2);
    text-transform: uppercase;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 5% 60px;
    position: relative;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    color: var(--text);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--light-text);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 1.2rem 3rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
}

/* Stats */
.stats {
    display: flex;
    justify-content: space-around;
    max-width: 1200px;
    margin: 40px auto;
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-item h2 { font-size: 2.5rem; color: var(--primary); font-weight: 900; }
.stat-item p { font-weight: 700; color: var(--light-text); text-transform: uppercase; font-size: 0.75rem; }

/* Page Content */
.page-content {
    padding: 150px 10% 100px;
    text-align: center;
}

.page-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    color: var(--primary);
}

/* Cookie Bar (Horizontal Bottom) */
.cookie-modal-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: white;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    border-top: 4px solid var(--secondary);
}

.cookie-modal-overlay.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.cookie-modal {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    text-align: left;
}

#cookie-main-view {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

.cookie-main-btns {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}

.cookie-modal h2 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--primary);
    font-weight: 900;
}

.cookie-modal p {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 0;
}

.cookie-settings-panel {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-options-group {
    display: flex;
    gap: 1.5rem;
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cookie-option label {
    font-size: 0.85rem;
    font-weight: 700;
}

.cookie-settings-actions {
    display: flex;
    gap: 0.8rem;
}

.cookie-btn {
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
    white-space: nowrap;
}

.cookie-btn.primary { background: var(--primary); color: white; }
.cookie-btn.secondary { background: var(--gray); color: var(--text); }
.cookie-btn.outline { background: transparent; border: 2px solid var(--secondary); color: var(--text); }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ddd; transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary); }
input:checked:disabled + .slider { background-color: var(--primary); opacity: 0.5; }
input:checked + .slider:before { transform: translateX(18px); }

@media (max-width: 900px) {
    .cookie-modal, #cookie-main-view, .cookie-settings-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .cookie-main-btns, .cookie-options-group, .cookie-settings-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .cookie-btn { width: 100%; }
}

/* Footer */
footer { padding: 4rem 5%; text-align: center; background: var(--gray); }
.footer-logo { font-size: 1.5rem; font-weight: 900; color: var(--primary); margin-bottom: 1rem; }
footer p { font-weight: 700; color: var(--light-text); font-size: 0.85rem; }

@media (max-width: 1000px) {
    .hero-content h1 { font-size: 3rem; }
    .nav-links { display: none; }
}
