/* =========================================
   1. VARIABLES Y BASE
   ========================================= */
:root {
    --brand-navy: #0E1525;
    --brand-red: #D64045;
    --brand-yellow: #FFC845;
    --bg-body: #ffffff;
    --bg-light: #F4F6F9;
    --text-main: var(--brand-navy);
    --text-light: #5A6478;
    --fab-size: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Manrope', sans-serif; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { background-color: var(--bg-body); color: var(--text-main); overflow-x: hidden; line-height: 1.6; }
img { content-visibility: auto; }

/* COMPONENTES */
.btn { padding: 14px 32px; font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; border: none; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border-radius: 6px; }
.btn-primary { background-color: var(--brand-red); color: #fff; box-shadow: 0 4px 15px rgba(214, 64, 69, 0.25); }
.btn-primary:hover { background-color: var(--brand-navy); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--brand-navy); background: transparent; color: var(--brand-navy); }
.btn-outline:hover { background: var(--brand-navy); color: #fff; }

/* =========================================
   HEADER DESKTOP
   ========================================= */
header {
    padding: 15px 0; position: fixed; top: 0; width: 100%;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    z-index: 1000; border-bottom: 2px solid rgba(14, 21, 37, 0.05);
}
.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.nav-desktop { display: flex; gap: 30px; align-items: center; }
.nav-link { text-decoration: none; color: var(--text-light); font-weight: 700; font-size: 0.95rem; transition: 0.3s; }
.nav-link:hover { color: var(--brand-red); }
.logo-img { height: 45px; width: auto; }

/* DROPDOWN */
.nav-item-dropdown { position: relative; height: 100%; display: flex; align-items: center; }
.dropdown-trigger { cursor: pointer; display: flex; align-items: center; gap: 5px; }
.nav-item-dropdown:hover .dropdown-trigger i { transform: rotate(180deg); color: var(--brand-red); }
.dropdown-menu {
    position: absolute; top: 100%; left: 0; background: #fff; min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-radius: 8px; padding: 15px 0;
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all 0.3s ease; border-top: 3px solid var(--brand-red); z-index: 1100;
}
.nav-item-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: block; padding: 8px 20px; color: var(--text-main); text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: 0.2s; border-left: 3px solid transparent; }
.dropdown-item:hover { background: var(--bg-light); color: var(--brand-navy); border-left-color: var(--brand-yellow); padding-left: 25px; }
.dropdown-category { font-size: 0.75rem; text-transform: uppercase; color: var(--text-light); padding: 10px 20px 5px; font-weight: 800; letter-spacing: 1px; margin-top: 5px; }
.dropdown-divider { height: 1px; background: rgba(0,0,0,0.05); margin: 8px 0; }

/* =========================================
   FAB MULTINIVEL (ESTILO PREMIUM OSCURO)
   ========================================= */
.fab-container {
    position: fixed; bottom: 30px; right: 25px; z-index: 2000;
    display: none; flex-direction: column-reverse; align-items: flex-end; gap: 15px;
}

/* Botón Principal */
.fab-main {
    width: var(--fab-size); height: var(--fab-size);
    background: var(--brand-yellow); border-radius: 50%; border: none;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2); cursor: pointer; z-index: 2001;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fab-main i { font-size: 1.5rem; color: var(--brand-navy); transition: 0.4s; }

.fab-container.open .fab-main { 
    background: var(--brand-navy); transform: rotate(360deg); 
    border: 2px solid var(--brand-red); box-shadow: 0 0 15px rgba(214, 64, 69, 0.4);
}
.fab-container.open .fab-main i { color: #fff; transform: rotate(-90deg); }

/* Listas */
.fab-list { display: flex; flex-direction: column; align-items: flex-end; gap: 15px; pointer-events: none; transition: 0.3s; }
.hidden-level { display: none !important; }
.fab-item { 
    display: flex; align-items: center; gap: 12px; opacity: 0; 
    transform: translateY(20px) scale(0.8); 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fab-container.open .fab-list:not(.hidden-level) { pointer-events: auto; }
.fab-container.open .fab-list:not(.hidden-level) .fab-item { opacity: 1; transform: translateY(0) scale(1); }

/* Delay escalonado */
.fab-container.open .fab-item:nth-child(1) { transition-delay: 50ms; }
.fab-container.open .fab-item:nth-child(2) { transition-delay: 100ms; }
.fab-container.open .fab-item:nth-child(3) { transition-delay: 150ms; }
.fab-container.open .fab-item:nth-child(4) { transition-delay: 200ms; }

/* ETIQUETAS: Estilo Oscuro Premium */
.fab-label { 
    background: var(--brand-navy); color: #fff; padding: 6px 14px; border-radius: 6px; 
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); border-right: 3px solid var(--brand-red);
    text-transform: uppercase;
}

/* BOTONES MINI: Estilo Oscuro Premium */
.fab-btn-mini { 
    width: 45px; height: 45px; border-radius: 50%; cursor: pointer; 
    display: flex; justify-content: center; align-items: center; text-decoration: none;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--brand-navy); color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 5px 15px rgba(14, 21, 37, 0.4);
}
.fab-btn-mini:hover { 
    background: var(--brand-red); border-color: var(--brand-red); color: #fff; 
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(214, 64, 69, 0.4);
}
.fab-trigger-sub { color: var(--brand-yellow); border-color: rgba(255, 200, 69, 0.2); }
.fab-trigger-sub:hover { 
    background: var(--brand-yellow); color: var(--brand-navy); 
    box-shadow: 0 8px 20px rgba(255, 200, 69, 0.4);
}
.fab-back-btn { background: #333 !important; color: #ccc !important; border-color: #444 !important; }
.fab-back-btn:hover { background: #555 !important; color: #fff !important; }

/* Backdrop */
.backdrop { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(14, 21, 37, 0.5); backdrop-filter: blur(3px); 
    z-index: 1500; display: none; opacity: 0; transition: opacity 0.3s ease;
}
.fab-container.open ~ .backdrop { display: block; opacity: 1; }

/* =========================================
   SECCIONES GENERALES
   ========================================= */
.hero { padding-top: 150px; padding-bottom: 80px; min-height: 90vh; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.hero-label { display: inline-block; background: #FFF8E1; color: #9C7B16; padding: 8px 16px; border-radius: 4px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 25px; border-left: 4px solid var(--brand-yellow); }
.hero h1 { font-size: clamp(2.8rem, 5vw, 4.2rem); margin-bottom: 25px; line-height: 1.1; }
.highlight { position: relative; white-space: nowrap; z-index: 1; }
.highlight::after { content: ''; position: absolute; bottom: 5px; left: -2px; width: 105%; height: 30%; background: var(--brand-yellow); z-index: -1; opacity: 0.5; transform: skewX(-12deg); }
.hero-img { width: 100%; height: 500px; object-fit: cover; border-radius: 12px; box-shadow: 20px 20px 0px rgba(14, 21, 37, 0.05); }

.sectors-section { padding: 100px 0; background: var(--brand-navy); color: #fff; position: relative; }
.sectors-section::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 5px; background: var(--brand-red); }
.section-head-dark h2 { color: #fff; font-size: 2.5rem; }
.section-head-dark span { color: var(--brand-yellow); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 0.85rem; }
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.sector-card { background: rgba(255,255,255,0.03); padding: 40px 30px; border-radius: 8px; transition: 0.3s; border: 1px solid rgba(255,255,255,0.05); }
.sector-card:hover { border-color: var(--brand-red); transform: translateY(-10px); }
.sector-icon { font-size: 2.5rem; color: var(--brand-yellow); margin-bottom: 25px; }
.sector-title { font-size: 1.5rem; margin-bottom: 15px; color: #fff; }

.value-section { padding: 100px 0; background: var(--bg-light); }
.value-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.value-item { background: #fff; padding: 25px; margin-bottom: 20px; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); border-left: 4px solid transparent; transition: 0.3s; }
.value-item:hover { border-left-color: var(--brand-yellow); transform: translateX(5px); }

footer { background: var(--brand-navy); color: #fff; padding: 70px 0 30px; border-top: 4px solid var(--brand-red); }
.footer-logo-img { height: 40px; width: auto; margin-bottom: 20px; filter: brightness(0) invert(1); }

@media (max-width: 960px) {
    .nav-desktop { display: none; }
    .fab-container { display: flex; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-img { height: 320px; }
    .sector-grid { grid-template-columns: 1fr; }
    .value-grid { grid-template-columns: 1fr; }
}

/* =========================================
   MEJORAS UI/UX - ACADEMIA & LISTAS
   ========================================= */

/* --- Tarjetas de Cursos --- */
.course-card {
    background: #fff;
    border: 1px solid rgba(14, 21, 37, 0.08);
    border-radius: 12px;
    padding: 35px 25px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; flex-direction: column; align-items: flex-start; height: 100%;
}
.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(14, 21, 37, 0.1);
    border-color: var(--brand-red);
}
.course-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 0%; height: 4px; background: var(--brand-red);
    transition: 0.3s ease; border-radius: 12px 12px 0 0;
}
.course-card:hover::before { width: 100%; }

.course-icon-box {
    width: 60px; height: 60px;
    background: var(--bg-light);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    color: var(--brand-navy); font-size: 1.8rem; transition: 0.3s;
}
.course-card:hover .course-icon-box { background: var(--brand-navy); color: var(--brand-yellow); }

.course-badge {
    position: absolute; top: 20px; right: 20px;
    background: #FFF3E0; color: #E65100;
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
    padding: 4px 10px; border-radius: 20px; letter-spacing: 0.5px;
}

.course-link-ui {
    margin-top: auto; padding-top: 20px;
    font-weight: 700; font-size: 0.9rem;
    color: var(--brand-red); text-decoration: none;
    display: flex; align-items: center; gap: 8px; transition: 0.3s;
}
.course-link-ui:hover { gap: 12px; color: var(--brand-navy); }

/* --- Mejoras en Lista de Productos --- */
.product-highlight { color: var(--brand-yellow); font-weight: 700; }
.sector-list li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sector-list li:last-child { border-bottom: none; }