/* ============================================================
   Campus Triskal — main.css
   Estilos globales compartidos por todas las páginas
   ============================================================ */

/* --- VARIABLES --- */
:root {
    --bg: #ffffff;
    --bg-alt: #f1f5f9;
    --text-main: #1e293b;
    --text-muted: #475569;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.05);
    --accent-cyan: #23a4b5;
    --accent-purple: #8b5cf6;
    --accent-green: #23b895;
    --accent-orange: #f59e0b;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --border: rgba(0,0,0,0.08);
}

.dark-mode {
    --bg: #0f172a;
    --bg-alt: #0b1120;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(15, 23, 42, 0.95);
    --border: rgba(255,255,255,0.1);
}

/* --- RESET --- */
* { box-sizing: border-box; margin: 0; padding: 0; transition: background-color 0.3s, color 0.3s; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
}

/* --- NAVBAR --- */
nav {
    position: fixed;
    top: 0; width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    border-bottom: 1px solid var(--border);
    height: 100px;
}

.logo img { height: 70px; cursor: pointer; }

.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-item { position: relative; }
.nav-link {
    text-decoration: none;
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: color 0.2s;
}
.dark-mode .nav-link { color: var(--text-main); }
.nav-link:hover, .dark-mode .nav-link:hover { color: var(--accent-green); }

/* Mega Menú Desktop */
.mega-menu {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--card-bg);
    width: 420px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    opacity: 0; visibility: hidden;
    transition: 0.3s ease;
    border: 1px solid var(--border);
}
.mega-menu.mega-cursos {
    width: 680px;
    grid-template-columns: 1fr 1fr 1fr;
}
@media (hover: hover) and (min-width: 993px) {
    .nav-item:hover .mega-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(10px); }
}

.mega-col h4 {
    font-family: 'Poppins';
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
}
.mega-col h4 a { transition: opacity 0.2s; }
.mega-col h4 a:hover { opacity: 0.7; }
.mega-col ul { list-style: none; }
.mega-col ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 6px 0;
    display: block;
    transition: 0.2s;
}
.mega-col ul li a:hover { color: var(--accent-cyan); padding-left: 5px; }

.nav-pill {
    display: inline-block;
    font-size: 0.5rem;
    font-weight: 900;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 1.6;
}
.nav-pill.pill-free { background: rgba(35,184,149,0.15); color: var(--accent-green); }
.nav-pill.pill-new  { background: rgba(245,158,11,0.15);  color: var(--accent-orange); }

/* Triángulo hueco del navbar — mismo estilo que el favicon */
.nav-arrow {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 1.8px solid var(--accent-cyan);
    border-bottom: 1.8px solid var(--accent-cyan);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.3s ease, border-color 0.2s;
    flex-shrink: 0;
}
.nav-link:hover .nav-arrow       { border-color: var(--accent-green); }
.dark-mode .nav-link .nav-arrow  { border-color: var(--text-main); }
.dark-mode .nav-link:hover .nav-arrow { border-color: var(--accent-green); }

.nav-controls { display: flex; align-items: center; gap: 15px; }
.theme-btn, .mobile-toggle {
    background: none; border: none;
    color: var(--accent-cyan);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.theme-btn:hover, .mobile-toggle:hover { background: var(--bg-alt); }
.dark-mode .theme-btn, .dark-mode .mobile-toggle { color: var(--text-main); }
.mobile-toggle { display: none; }

/* --- HERO --- */
.hero {
    padding: 140px 5% 60px;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 40px; align-items: center;
    max-width: 1400px; margin: 0 auto;
}
.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}
.hero-image img { width: 100%; filter: drop-shadow(0 20px 50px rgba(0,0,0,0.1)); }

/* --- VITRINA --- */
.vitrina-section {
    padding: 0 5% 60px;
    max-width: 1400px;
    margin: 0 auto;
}
.vitrina-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 200px;
}
.vitrina-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px var(--card-shadow); }
.vitrina-card-image {
    width: 360px; min-width: 360px; height: 200px;
    overflow: hidden; background: var(--bg-alt);
}
.vitrina-card-image img { width: 100%; height: 100%; object-fit: cover; }
.vitrina-card-body {
    padding: 22px 26px; flex-grow: 1;
    display: flex; flex-direction: column;
    justify-content: center; gap: 7px;
}
.vitrina-tag {
    font-size: 0.68rem; font-weight: 700;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase; letter-spacing: 1px;
    padding: 3px 10px; border-radius: 5px;
    display: inline-block; width: fit-content;
}
.vitrina-tag.tag-masterclass { background: rgba(245,158,11,0.1);  color: var(--accent-orange); }
.vitrina-tag.tag-nuevo       { background: rgba(35,184,149,0.1);  color: var(--accent-green); }
.vitrina-tag.tag-destacado   { background: rgba(139,92,246,0.1);  color: var(--accent-purple); }
.vitrina-tag.tag-promo       { background: rgba(35,164,181,0.1);  color: var(--accent-cyan); }
.vitrina-card-body h3 { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.vitrina-card-body p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* --- ZONAS TALLERES / CURSOS --- */
.zone-talleres { background: var(--bg-alt); padding-bottom: 80px; }
.zone-cursos   { background: var(--bg); padding-bottom: 40px; }
.zone-label {
    max-width: 1400px; margin: 0 auto;
    padding: 40px 5% 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2.5px;
    color: var(--text-muted); opacity: 0.5;
}

/* --- CARRUSELES --- */
.section-container { position: relative; padding: 40px 5%; max-width: 1400px; margin: 0 auto; }
.section-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.section-header h2 a { transition: color 0.2s; }
.section-header h2 a:hover { color: var(--accent-cyan) !important; }
.line { flex-grow: 1; height: 2px; background: linear-gradient(to right, var(--accent-cyan), transparent); }

/* --- CARDS --- */
.card {
    background: var(--card-bg); border-radius: 15px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px var(--card-shadow);
    overflow: hidden; display: flex; flex-direction: column; height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px var(--card-shadow); }
.card-image { width: 100%; height: 130px; background: var(--bg-alt); overflow: hidden; position: relative; }
.card-pill {
    position: absolute; top: 8px; right: 8px;
    font-size: 0.6rem; font-weight: 800;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.8px; padding: 2px 7px;
    border-radius: 4px; text-transform: uppercase; z-index: 5;
}
.card-pill.pill-free { background: var(--accent-green);  color: #fff; }
.card-pill.pill-new  { background: var(--accent-orange); color: #fff; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px; flex-grow: 1; display: flex; flex-direction: column; }

.badge { font-size: 0.65rem; font-weight: bold; padding: 3px 8px; border-radius: 5px; margin-bottom: 8px; display: inline-block; }
.badge-tec  { background: rgba(32, 203, 149, 0.1); color: var(--accent-green); }
.badge-tia  { background: rgba(245,158,11,0.1);    color: var(--accent-orange); }
.badge-cet  { background: rgba(34, 211, 238, 0.1); color: var(--accent-cyan); }
.badge-ceia { background: rgba(245,158,11,0.1);    color: var(--accent-orange); }
.badge-ctp  { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); }

.card-body h3 { font-size: 0.85rem; font-weight: 700; margin-bottom: 5px; line-height: 1.3; }
.card-body p  { font-size: 0.78rem; color: var(--text-muted); flex-grow: 1; }

.btn-sm {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 10px; padding: 5px 11px;
    font-size: 0.7rem; font-weight: 700;
    font-family: 'Poppins', sans-serif; letter-spacing: 0.5px;
    color: var(--accent-cyan); border: 1.5px solid var(--accent-cyan);
    border-radius: 6px; text-decoration: none;
    transition: background 0.2s, color 0.2s; width: fit-content;
}
.btn-sm:hover { background: var(--accent-cyan); color: #fff; }

/* --- FOOTER --- */
footer {
    background: var(--bg-alt);
    padding: 80px 5% 40px;
    margin-top: 80px;
    border-top: 1px solid var(--border);
}
.footer-grid {
    max-width: 1400px; margin: 0 auto;
    display: grid;
    grid-template-columns: 1.8fr 1.6fr 1fr 1fr;
    gap: 40px; margin-bottom: 60px;
}
.footer-col h4 { margin-bottom: 25px; font-family: 'Poppins'; }
.footer-col p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { text-decoration: none; color: var(--text-muted); font-size: 0.88rem; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--accent-cyan); }

/* --- REDES SOCIALES CON COLORES DE MARCA --- */
.footer-socials { 
    display: flex; 
    gap: 12px; 
    margin-top: 15px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background-color: var(--accent-cyan);
    color: var(--bg) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

/* Hover específico por red social */
.yt-hover:hover { background-color: #FF0000 !important; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3); }
.ig-hover:hover { background-color: #E1306C !important; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(225, 48, 108, 0.3); }
.wa-hover:hover { background-color: #25D366 !important; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3); }
.tg-hover:hover { background-color: #00FFFF !important; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3); }

/* --- LINKS EXTERNOS CON ELEVACIÓN (ESTILO NAVBAR) --- */
.footer-external-link {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-external-link.text-link {
    color: inherit;
}

.footer-external-link.text-link:hover {
    color: var(--accent-cyan) !important;
    transform: translateY(-3px); /* Efecto de elevación recuperado */
}

.footer-bottom {
    max-width: 1400px; margin: 0 auto;
    padding-top: 30px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.85rem; color: var(--text-muted);
}

.br-mobile { display: none; }

/* --- BOTÓN CAMPUS (desktop) --- */
.nav-campus-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 7px 18px;
    border-radius: 8px;
    border: 1.5px solid var(--accent-cyan);
    color: var(--accent-cyan);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.nav-campus-btn:hover {
    background: var(--accent-cyan);
    color: #fff;
    transform: translateY(-2px);
}

/* Campus mobile — oculto en desktop, visible en menú hamburger */
.nav-item-campus { display: none; }

/* Megamenús de una sola columna (Academia y Legal) */
.mega-menu.mega-academia,
.mega-menu.mega-legal {
    width: 220px;
    grid-template-columns: 1fr;
}

/* Colores de encabezado por sección */
.mega-h4-green {
    border-bottom-color: var(--accent-green);
    color: var(--accent-green);
}
.mega-h4-purple {
    border-bottom-color: var(--accent-purple);
    color: var(--accent-purple);
}

/* --- RESPONSIVE --- */
@media (min-width: 993px) {
    .nav-links { position: absolute; left: 50%; transform: translateX(-50%); }
}

@media (max-width: 992px) {
    nav { height: 75px; }
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: 100px; }
    .hero-content h1 { font-size: 2.5rem; }
    .logo img { height: 45px; cursor: pointer; margin-top: 5px; }

    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-col { display: flex; flex-direction: column; align-items: center; }
    .footer-col div { justify-content: center; }

    .nav-links {
        position: fixed; top: 70px; left: -100%;
        flex-direction: column; background: var(--bg);
        width: 100%; height: calc(100vh - 70px);
        padding: 20px; transition: 0.4s; overflow-y: auto;
        align-items: stretch;
    }
    .nav-links.active { left: 0; }

    .mega-menu {
        position: static; transform: none; width: 100%;
        display: none; grid-template-columns: 1fr;
        padding: 5px 0 10px 10px;
        box-shadow: none; border: none;
        border-left: 3px solid var(--accent-cyan);
        opacity: 1; visibility: visible;
        background: transparent; transition: none;
    }
    .mega-menu.mega-cursos { width: 100%; grid-template-columns: 1fr; }
    .nav-item.active .mega-menu { display: grid; }
    .mega-col { margin-bottom: 20px; padding: 0 10px; }
    .mega-col h4 { border-bottom: 1px solid var(--border); margin-bottom: 10px; }

    .mobile-toggle { display: flex; }
    .nav-controls { order: 2; }
    .nav-link {
        font-size: 1.1rem; padding: 15px 0;
        border-bottom: 1px solid var(--border);
        width: 100%; justify-content: space-between;
    }
    .nav-campus-btn { display: none; }
    .nav-item-campus { display: block; }
}

@media (max-width: 600px) {
    .vitrina-card { flex-direction: column; }
    .vitrina-card-image { width: 100%; min-width: unset; height: 150px; }
}

@media (max-width: 480px) {
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    .br-mobile { display: block; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .section-header h2 { font-size: 1.6rem; line-height: 1.3; max-width: 100%; }
    .line { width: 100%; flex-grow: unset; }
}