:root {
    --bg-dark: #000000;
    --bg-light: #1a1a1a;
    --accent-cyan: #00f0ff;
    --accent-purple: #b026ff;
    --accent-gold: #ffd700;
    --text-main: #ffffff;
    --font-primary: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    text-transform: uppercase;
    font-weight: 900;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-cyan);
}

/* IMAGE PLACEHOLDERS */
.image-placeholder {
    background: linear-gradient(135deg, #2a2a2a 0%, #111111 100%);
    border: 2px dashed var(--accent-cyan);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 8px;
    font-weight: bold;
}

.image-placeholder h2,
.image-placeholder span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* PORTAL */
.portal-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.portal-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--bg-light) 15%, transparent 16%), radial-gradient(var(--bg-light) 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.portal-header {
    padding: 20px 40px;
    position: relative;
    z-index: 1;
}

.social-icons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: var(--accent-cyan);
    transition: all 0.3s;
}

.icon-placeholder:hover {
    background-color: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.portal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.hero-logo-container {
    text-align: center;
    margin-bottom: 60px;
}

.logo-placeholder {
    width: 100%;
    max-width: 400px;
    height: 200px;
    margin: 0 auto 20px;
    border-color: var(--accent-gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.tagline {
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    color: var(--accent-cyan);
}

.sedes-container {
    width: 100%;
    max-width: 1200px;
}

.sedes-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--text-main);
}

.sedes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* BUTTONS */
.btn-pill {
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-ubicacion {
    background-color: transparent;
    border: 2px solid var(--text-main);
    color: var(--text-main);
}

.btn-ubicacion:hover {
    background-color: var(--text-main);
    color: var(--bg-dark);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: 2px solid transparent;
}

.btn-whatsapp:hover {
    background-color: #1ebe57;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.5);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    transform: translateY(-1px);
}

/* MAIN SECTION */
.main-section {
    position: relative;
    padding-bottom: 0;
}

.main-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(26, 26, 26, 0.5) 10px, rgba(26, 26, 26, 0.5) 20px);
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
}

/* NAVIGATION */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: rgba(0, 0, 0, 0.97);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid #222;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    align-items: center;
}

.nav-menu li a {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-radius: 4px;
    position: relative;
    transition: color 0.3s ease, background 0.3s ease;
    color: #aaa;
}

.nav-menu li a:hover {
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.07);
}

/* Active nav indicator */
.nav-menu li a.active-nav {
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.1);
}

.nav-menu li a.active-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent-cyan);
}

/* HAMBURGER BUTTON */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    transition: border-color 0.3s;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    border-color: var(--accent-cyan);
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* MOBILE NAV DRAWER */
.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 300;
    pointer-events: none;
}

.mobile-nav-drawer.open {
    pointer-events: all;
}

.mobile-nav-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.mobile-nav-drawer.open .mobile-nav-overlay {
    opacity: 1;
}

.mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: #0d0d0d;
    border-left: 1px solid #333;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-nav-drawer.open .mobile-nav-panel {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #222;
}

.mobile-nav-header span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.mobile-nav-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.mobile-nav-close:hover {
    color: var(--text-main);
}

.mobile-nav-links {
    list-style: none;
    padding: 16px 0;
    flex: 1;
}

.mobile-nav-links li a {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #aaa;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-links li a:hover,
.mobile-nav-links li a.active-nav {
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.06);
    border-left-color: var(--accent-cyan);
}

.mobile-nav-footer {
    padding: 20px 24px;
    border-top: 1px solid #222;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* HERO */
.hero-slider {
    width: 100%;
    padding: 0;
}

.hero-placeholder {
    width: 100%;
    height: 70vh;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-color: var(--accent-cyan);
}

/* SECTIONS */
.services-section,
.gallery-section {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.services-section h2,
.gallery-section h2 {
    margin-bottom: 40px;
    color: var(--accent-cyan);
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-card {
    height: 350px;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: scale(1.02);
    border-color: var(--accent-purple);
}

/* FEEDBACK */
.feedback-section {
    background-color: var(--bg-light);
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 80px 40px;
    text-align: center;
}

.feedback-section h2 {
    margin-bottom: 40px;
    color: var(--accent-cyan);
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #444;
}

.feedback-form input,
.feedback-form select {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #555;
    background: var(--bg-dark);
    color: white;
    font-family: var(--font-primary);
}

.rating {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.rating label {
    font-weight: bold;
    color: var(--text-main);
}

.rating select {
    flex: 1;
    cursor: pointer;
}

/* FORM FOCUS + VALIDATION */
.feedback-form input:focus,
.feedback-form select:focus,
.enroll-form input:focus,
.enroll-form select:focus,
.enroll-form textarea:focus {
    outline: none;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

.enroll-form input:invalid:not(:placeholder-shown),
.enroll-form textarea:invalid:not(:placeholder-shown) {
    border-color: #ff4466 !important;
}

.enroll-form input:valid:not(:placeholder-shown),
.enroll-form textarea:valid:not(:placeholder-shown) {
    border-color: #00cc88 !important;
}

/* FOOTER */
.main-footer {
    background-color: #0a0a0a;
    padding: 60px 40px;
    text-align: center;
    border-top: 1px solid #222;
    position: relative;
}

.footer-logo {
    width: 200px;
    height: 80px;
    margin: 0 auto 20px;
    border-color: var(--accent-gold);
}

.footer-content p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.footer-content a {
    color: var(--accent-cyan);
}

/* FLOATING WHATSAPP */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #25D366;
    background-color: rgba(37, 211, 102, 0.1);
    color: #25D366;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.floating-wa:hover {
    transform: scale(1.15);
    background-color: rgba(37, 211, 102, 0.25);
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
}

/* HORARIOS */
.horarios-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.horarios-img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.horarios-img-right {
    height: auto;
    object-fit: contain;
    align-self: flex-start;
}

/* TARIFAS */
.tarifas-floating-buttons {
    max-width: 1200px;
    margin: 35px auto 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.tarifas-floating-btn {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    animation: tarifasFloat 3s ease-in-out infinite;
    transition: transform 0.25s ease;
}

.tarifas-floating-btn:hover {
    transform: translateY(-6px) scale(1.04);
}

.tarifas-floating-img {
    height: 156px;
    width: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

.tarifas-floating-btn:nth-child(2) {
    animation-delay: 0.4s;
}

.tarifas-floating-btn:nth-child(3) {
    animation-delay: 0.8s;
}

@keyframes tarifasFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* PAGE TABS */
.page-tab {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page-tab.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .nav-menu {
        display: none;
    }

    .hamburger-btn {
        display: flex;
    }

    .mobile-nav-drawer {
        display: block;
    }

    .main-nav {
        flex-direction: row;
        gap: 10px;
        padding: 12px 20px;
    }

    .portal-header {
        padding: 15px 20px;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .horarios-grid {
        grid-template-columns: 1fr;
    }

    .horarios-img,
    .horarios-img-right {
        height: auto;
        object-fit: contain;
    }

    .tarifas-floating-buttons {
        gap: 12px;
    }

    .tarifas-floating-img {
        height: 118px;
    }

    .feedback-form {
        padding: 24px 20px;
    }

    .feedback-section {
        padding: 60px 20px;
    }
}

@media (max-width: 600px) {
    .main-nav {
        padding: 10px 16px;
    }

    .tagline {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }

    .sedes-title {
        font-size: 1.4rem;
    }

    .tarifas-floating-img {
        height: 90px;
    }
}

/* =============================================
   MOBILE FIXES
   ============================================= */

/* NAV: logo pequeño + "Cambiar Sede" + hamburguesa */
@media (max-width: 900px) {
    .main-nav {
        padding: 8px 14px !important;
        flex-wrap: nowrap !important;
        overflow: hidden;
        gap: 0 !important;
    }

    .nav-logo video {
        width: 90px !important;
        height: 40px !important;
        flex-shrink: 0;
    }

    /* Ocultar íconos sociales del nav */
    .main-nav .social-icons {
        display: none !important;
    }

    /* Cambiar Sede: visible, compacto, entre logo y hamburguesa */
    #btn-cambiar-sede {
        display: block !important;
        font-size: 0.68rem !important;
        padding: 7px 10px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Contenedor derecho: cambiar sede + hamburger */
    .main-nav>div:last-child {
        display: flex !important;
        align-items: center;
        gap: 8px !important;
    }
}

/* Quitar botón Cambiar Sede del drawer móvil */
@media (max-width: 900px) {
    .mobile-nav-footer {
        display: none !important;
    }
}

/* PORTAL MOBILE */
@media (max-width: 768px) {
    .portal-header {
        padding: 12px 16px;
    }

    .social-icons {
        gap: 10px;
    }

    .portal-main {
        padding: 16px 16px 32px;
        justify-content: flex-start;
    }

    .hero-logo-container {
        margin-bottom: 28px;
    }

    .main-logo-container video {
        max-height: 220px !important;
        width: 100% !important;
        border-radius: 6px;
    }

    .tagline {
        font-size: 0.82rem !important;
        letter-spacing: 1px;
        margin-top: 12px;
    }

    .sedes-container {
        width: 100%;
    }

    .sedes-title {
        font-size: 1.1rem;
        margin-bottom: 22px;
        letter-spacing: 1px;
    }

    #sedes-list>div {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
    }

    #sedes-list img[alt="XTEVO 1.0"],
    #sedes-list img[alt="XTEVO 2.0"],
    #sedes-list img[alt="XTEVO 3.0"] {
        max-height: 90px !important;
    }

    #sedes-list img[alt="Ubicación"],
    #sedes-list img[alt="Escríbenos"] {
        max-height: 52px !important;
    }

    #sedes-list {
        gap: 32px !important;
    }
}

@media (max-width: 400px) {
    .main-logo-container video {
        max-height: 180px !important;
    }

    .tagline {
        font-size: 0.75rem !important;
    }

    .sedes-title {
        font-size: 1rem;
    }

    #sedes-list img[alt="XTEVO 1.0"],
    #sedes-list img[alt="XTEVO 2.0"],
    #sedes-list img[alt="XTEVO 3.0"] {
        max-height: 78px !important;
    }

    #sedes-list img[alt="Ubicación"],
    #sedes-list img[alt="Escríbenos"] {
        max-height: 46px !important;
    }

    #sedes-list {
        gap: 24px !important;
    }
}