/* =============================================================
   FunSL - Master Design System
   ============================================================= */

/* --- Tipografía: una sola familia, Inter (08/10/2026). Antes convivía con Nunito
       solo para los títulos: dos familias para un sitio de este tamaño es una de más,
       y son dos descargas. La carga el layout con <link>, no este @import. --- */

/* --- Variables CSS --- */
/* La paleta vive en paleta.css, que se carga antes que este archivo. */

/* --- Base --- */
html, body {
    /* `clip` y no `hidden`: con `hidden` el body pasa a ser contenedor de scroll y eso
       rompe el `position: sticky` del navbar, que deja de quedarse arriba al bajar. */
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--funsl-text);
    background-color: var(--funsl-bg);
    font-size: 0.97rem;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--funsl-navy);
    line-height: 1.3;
}

a { color: var(--funsl-cyan); transition: var(--transition); }
a:hover { color: var(--funsl-blue); }

/* --- Header --- */
/* --- Sticky Header/Navbar --- */
.funsl-header-nav {
    background: rgba(13, 33, 55, 0.97) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
    position: sticky;
    top: 0;
    z-index: 1040;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Integrated Navbar Search Bar --- */
.nav-search-group {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    max-width: 200px;
}
.nav-search-group:focus-within {
    background: rgba(255, 255, 255, 0.22);
    border-color: var(--funsl-cyan-lt);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.25);
    max-width: 260px;
}

.nav-search-input {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 0.85rem;
    padding-left: 0.8rem;
}
.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.65) !important;
}
.nav-search-input:focus {
    box-shadow: none !important;
}

.btn-nav-search {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}
.btn-nav-search:hover {
    color: var(--funsl-cyan-lt) !important;
}
.funsl-header-nav::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0,153,204,0.18) 0%, transparent 70%);
    pointer-events: none;
}
.funsl-header-nav img {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    transition: var(--transition);
}
.funsl-header-nav img:hover { transform: scale(1.04); }

.funsl-header-nav .navbar-nav .nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.8rem 1rem !important;
    position: relative;
    transition: var(--transition);
}
.funsl-header-nav .navbar-nav .nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 50%; right: 50%;
    height: 3px;
    background: var(--funsl-cyan-lt);
    transition: var(--transition);
    border-radius: 2px 2px 0 0;
}
.funsl-header-nav .navbar-nav .nav-link:not(.dropdown-toggle):hover::after,
.funsl-header-nav .navbar-nav .nav-link:not(.dropdown-toggle).active::after {
    left: 1rem; right: 1rem;
}
.funsl-header-nav .navbar-nav .nav-link:hover,
.funsl-header-nav .navbar-nav .nav-link.active {
    color: var(--funsl-white) !important;
}

/* Ajustes mobile para el menú colapsado */
@media (max-width: 991.98px) {
    .funsl-header-nav .navbar-collapse {
        background: var(--funsl-navy);
        border-radius: var(--radius);
        padding: 1rem;
        margin-top: 0.8rem;
        box-shadow: var(--shadow-md);
        border: 1px solid rgba(255, 255, 255, 0.1);
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .funsl-header-nav .navbar-nav .nav-link::after {
        display: none;
    }
    .funsl-header-nav .navbar-nav .nav-link {
        padding: 0.6rem 0.5rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .funsl-header-nav .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Ajustes mobile para el Hero Banner (Vertical u Horizontal) */
@media (max-width: 767.98px) {
    .funsl-hero {
        min-height: 370px !important;
        background-size: 560% auto !important;
        background-position: 81% 6% !important;
        background-repeat: no-repeat !important;
    }
    .funsl-hero-badge {
        font-size: 0.72rem !important;
        padding: 0.3rem 0.75rem !important;
        letter-spacing: 0.5px !important;
        white-space: nowrap;
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .funsl-hero-content h1 {
        font-size: 1.65rem !important;
        line-height: 1.35 !important;
    }
    .news-card-img {
        width: 100% !important;
        max-height: 190px !important;
        height: auto !important;
        object-fit: cover !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 991.98px) and (orientation: landscape) {
    .funsl-hero {
        min-height: 330px !important;
        background-size: 280% auto !important;
        background-position: 85% 8% !important;
    }
}

.news-card-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.news-card-img:hover {
    transform: scale(1.04);
}
.funsl-header-nav .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 0.5rem;
    margin-top: 0.5rem;
    z-index: 1050;
}
.funsl-header-nav .dropdown-item {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: var(--funsl-navy);
    transition: var(--transition);
}
.funsl-header-nav .dropdown-item:hover {
    background: var(--funsl-bg);
    color: var(--funsl-cyan);
}

/* --- Hero Section --- */
.funsl-hero {
    position: relative;
    min-height: 420px;
    background-size: cover;
    background-position: center 18%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.funsl-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(13,33,55,0.85) 0%, rgba(10,61,107,0.60) 55%, rgba(0,153,204,0.25) 100%);
}
.funsl-hero-content {
    position: relative;
    z-index: 2;
    color: var(--funsl-white);
}
.funsl-hero-content h1 {
    color: var(--funsl-white);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.funsl-hero-content .lead {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
}
.funsl-hero-badge {
    display: inline-block;
    background: var(--funsl-gold);
    color: var(--funsl-navy);
    font-weight: 800;
    font-size: 0.72rem;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}
.funsl-hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2rem;
}
.funsl-hero-stats .stat-number {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--funsl-cyan-lt);
    line-height: 1;
}
.funsl-hero-stats .stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Section Titles --- */
.funsl-section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: var(--funsl-navy);
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.6rem;
    margin-bottom: 1.5rem;
}
.funsl-section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 45px; height: 4px;
    background: linear-gradient(90deg, var(--funsl-cyan), var(--funsl-cyan-lt));
    border-radius: 2px;
}

/* --- Cards Generales --- */
.funsl-card {
    background: var(--funsl-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--funsl-border);
    transition: var(--transition);
    overflow: hidden;
}
.funsl-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* --- News Cards --- */
.news-card {
    background: var(--funsl-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--funsl-border);
    border-left: 4px solid var(--funsl-cyan);
    transition: var(--transition);
    overflow: hidden;
}
.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-left-color: var(--funsl-gold);
}
.news-card .news-img {
    width: 100%; height: 100%;
    object-fit: cover;
    min-height: 180px;
    border-radius: 6px;
}
.news-card .news-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    background: var(--funsl-cyan);
    color: white;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    display: inline-block;
}
.news-card .news-date {
    color: var(--funsl-muted);
    font-size: 0.8rem;
}
.news-card h3, .news-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--funsl-navy);
    line-height: 1.4;
}
.news-card h3 a, .news-card h4 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}
.news-card h3 a:hover, .news-card h4 a:hover { color: var(--funsl-cyan); }

/* --- Section Buttons (Sidebar) --- */
/* Las tarjetas de sección del buscador lateral se quitaron el 08/10/2026: destacaban cuatro
   secciones sobre las demás. La navegación vive en el menú y en el pie. */

.sidebar-search-item {
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    background: #ffffff;
    border-color: #e2e8f0 !important;
}
.sidebar-search-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 153, 204, 0.15) !important;
    border-color: var(--funsl-cyan-lt) !important;
    background: #f8fafc !important;
}

/* --- Sidebar --- */
.funsl-sidebar .sidebar-section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--funsl-muted);
    margin-bottom: 0.75rem;
}
.funsl-sidebar .sidebar-nav-link {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    color: var(--funsl-text);
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.4px;
}
.funsl-sidebar .sidebar-nav-link:hover,
.funsl-sidebar .sidebar-nav-link.active {
    background: var(--funsl-bg);
    color: var(--funsl-cyan);
}
.funsl-sidebar .sidebar-nav-link.active { font-weight: 700; }

/* --- Course Cards --- */
.course-card-modern {
    background: var(--funsl-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--funsl-border);
    border-top: 4px solid var(--funsl-cyan);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.3rem;
}
.course-card-modern:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--funsl-cyan-lt); }
.course-card-modern:hover .cc-title { color: var(--funsl-cyan); }
.course-card-modern .cc-unit {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--funsl-cyan);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.4rem;
}
.course-card-modern .cc-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--funsl-navy);
    line-height: 1.4;
    margin-bottom: 0.7rem;
}
.course-card-modern .cc-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
}
.course-card-modern .cc-dates {
    background: #f0f9ff;
    border-radius: 7px;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
    color: var(--funsl-text);
    margin-top: auto;
}
.course-card-modern .cc-dates .label { color: var(--funsl-muted); font-size: 0.75rem; }

/* --- Service Cards --- */
.service-card {
    background: var(--funsl-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--funsl-border);
    transition: var(--transition);
    height: 100%;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--funsl-cyan), var(--funsl-cyan-lt));
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--funsl-cyan-lt); }
.service-card:hover .sv-title { color: var(--funsl-cyan); }
.service-card .sv-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, #e0f4fc, #b3e5fc);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    color: var(--funsl-cyan);
    margin-bottom: 1rem;
}
.service-card .sv-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--funsl-muted);
    margin-bottom: 0.4rem;
}
.service-card .sv-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--funsl-navy);
    line-height: 1.4;
}
.service-card .sv-unit {
    font-size: 0.8rem;
    color: var(--funsl-muted);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* --- Product Cards --- */
.product-card-modern {
    background: var(--funsl-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--funsl-border);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    cursor: pointer;
}
.product-card-modern:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-card-modern:hover .product-img { transform: scale(1.06); }
.product-img-wrap {
    height: 200px;
    overflow: hidden;
    background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
}
.product-img { max-height: 100%; max-width: 100%; object-fit: contain; transition: transform 0.35s ease; }
.product-card-modern .pc-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--funsl-navy);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.9rem 1rem;
    min-height: 58px;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
}

/* --- Buttons --- */
.btn-funsl-primary {
    background: linear-gradient(135deg, var(--funsl-cyan), var(--funsl-cyan-lt));
    color: white;
    border: none;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    border-radius: 50px;
    padding: 0.55rem 1.5rem;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(0,153,204,0.3);
}
.btn-funsl-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 16px rgba(0,153,204,0.4); color: white; }
.btn-funsl-outline {
    border: 2px solid var(--funsl-cyan);
    color: var(--funsl-cyan);
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    border-radius: 50px;
    padding: 0.45rem 1.4rem;
    transition: var(--transition);
}
.btn-funsl-outline:hover { background: var(--funsl-cyan); color: white; }

/* --- Footer --- */
.funsl-footer {
    background: linear-gradient(180deg, #111d2d 0%, #0d2137 100%);
    color: rgba(255,255,255,0.75);
    padding: 3.5rem 0 0;
}
.funsl-footer h6 {
    color: var(--funsl-cyan-lt);
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}
.funsl-footer a { color: rgba(255,255,255,0.65); text-decoration: none; transition: var(--transition); font-size: 0.88rem; }
.funsl-footer a:hover { color: var(--funsl-cyan-lt); }
.funsl-footer .footer-divider {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 2.5rem;
    padding: 1.2rem 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
}
.funsl-footer .footer-contact-item {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}
.funsl-footer .footer-contact-item i {
    color: var(--funsl-cyan);
    margin-top: 2px;
    flex-shrink: 0;
}

/* --- Breadcrumb --- */
.funsl-breadcrumb {
    background: transparent;
    padding: 0.3rem 0;
    margin-bottom: 1.5rem;
}
.funsl-breadcrumb .breadcrumb-item a {
    color: var(--funsl-muted);
    font-size: 0.82rem;
    text-decoration: none;
}
.funsl-breadcrumb .breadcrumb-item a:hover { color: var(--funsl-cyan); }
.funsl-breadcrumb .breadcrumb-item.active { font-size: 0.82rem; color: var(--funsl-text); }
.funsl-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--funsl-border); }

/* --- Filter Sidebar --- */
.filter-sidebar-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--funsl-muted);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--funsl-border);
}
.filter-link {
    display: block;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 0.87rem;
    color: var(--funsl-text);
    text-decoration: none;
    transition: var(--transition);
}
.filter-link:hover, .filter-link.active {
    background: #e8f6fd;
    color: var(--funsl-cyan);
    font-weight: 600;
}

/* --- Pagination Premium (Compatible con CakePHP Default) --- */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    gap: 6px;
    margin-bottom: 0;
}
.pagination li {
    display: inline-block;
}
.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    color: var(--funsl-navy);
    background-color: var(--funsl-white);
    border: 1.5px solid var(--funsl-border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.pagination li a:hover {
    color: var(--funsl-white);
    background: linear-gradient(135deg, var(--funsl-cyan), var(--funsl-cyan-lt));
    border-color: var(--funsl-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,153,204,0.25);
}
.pagination li.active a {
    color: var(--funsl-white);
    background: linear-gradient(135deg, var(--funsl-navy), var(--funsl-blue));
    border-color: var(--funsl-navy);
    box-shadow: 0 4px 12px rgba(13,33,55,0.2);
    cursor: default;
}
.pagination li.next a, .pagination li.prev a, .pagination li.first a, .pagination li.last a {
    background-color: #f8fafc;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pagination li.disabled a {
    color: #cbd5e0;
    pointer-events: none;
    background-color: #f8fafc;
    border-color: #edf2f7;
    box-shadow: none;
}

/* --- Flash Messages --- */
.alert { border-radius: var(--radius); border: none; }
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #4caf50; }
.alert-danger  { background: #fde8e8; color: #c62828; border-left: 4px solid #ef5350; }
.alert-info    { background: #e3f4fc; color: #01579b; border-left: 4px solid #29b6f6; }

/* --- Contact Form --- */
.funsl-form-control {
    border: 1.5px solid var(--funsl-border);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    transition: var(--transition);
    font-size: 0.9rem;
}
.funsl-form-control:focus {
    border-color: var(--funsl-cyan);
    box-shadow: 0 0 0 3px rgba(0,153,204,0.12);
    outline: none;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeInUp 0.5s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* --- Utilities --- */
.text-cyan   { color: var(--funsl-cyan) !important; }
.text-navy   { color: var(--funsl-navy) !important; }
.text-funsl-red { color: var(--funsl-red) !important; }
.bg-funsl    { background-color: var(--funsl-bg); }
.divider-line { border: none; border-top: 1px solid var(--funsl-border); margin: 2rem 0; }

/* --- News Cards & Badges --- */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--radius);
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.news-category {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.badge-cat-institucional { background-color: #0d2137 !important; color: #ffffff !important; }
.badge-cat-becas         { background-color: #27ae60 !important; color: #ffffff !important; }
.badge-cat-cursos        { background-color: #0099cc !important; color: #ffffff !important; }
.badge-cat-capacitacion  { background-color: #8e44ad !important; color: #ffffff !important; }
.badge-cat-servicios     { background-color: #e67e22 !important; color: #ffffff !important; }

/* --- Hero Action Buttons --- */
.btn-hero-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.65rem 1.6rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.18) !important;
    text-decoration: none !important;
}
.btn-hero-pill:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.28) !important;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #00b8f0 0%, #0099cc 100%) !important;
    border: none !important;
    color: #ffffff !important;
}
.btn-hero-primary:hover {
    filter: brightness(1.08);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
    color: #ffffff !important;
    backdrop-filter: blur(4px);
}
.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* --- Featured Video & News Cards --- */
.featured-video-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(245, 166, 35, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14) !important;
}

.featured-video-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.5rem;
}

.news-thumb-zoom {
    transition: transform 0.3s ease, opacity 0.2s ease;
    cursor: pointer;
}
.news-thumb-zoom:hover {
    transform: scale(1.04);
    opacity: 0.9;
}

/* --- Service Card Hover --- */
.service-card {
    background: var(--funsl-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--funsl-border);
    border-top: 4px solid var(--funsl-cyan) !important;
    transition: var(--transition);
}
.service-card:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-3px);
    border-color: var(--funsl-cyan-lt) !important;
}
.service-card:hover .sv-title {
    color: var(--funsl-cyan) !important;
}

/* ── Buscador del sitio, en la fila de las migas de pan (08/10/2026) ──────────────
   Antes vivía en la columna lateral, que solo estaba en tres páginas. Acá está en
   todas, a la derecha de las migas, y no le quita protagonismo a ninguna sección. */
.funsl-buscador-global {
    position: relative;
    width: 100%;
    max-width: 320px;
}
.funsl-buscador-global .form-control {
    border-radius: 999px 0 0 999px;
    border-color: #e2e8f0;
    font-size: 0.86rem;
}
.funsl-buscador-global .form-control:focus {
    border-color: var(--funsl-cyan);
    box-shadow: 0 0 0 0.15rem rgba(0, 153, 204, 0.15);
}
.funsl-buscador-global .btn {
    border-radius: 0 999px 999px 0;
}
.funsl-buscador-panel {
    position: absolute;
    z-index: 1040;
    top: calc(100% + 6px);
    right: 0;
    width: min(380px, 92vw);
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(13, 33, 55, 0.14);
    padding: 0.6rem;
}
.funsl-buscador-titulo {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0.5rem 0 0.35rem 0.25rem;
}
.funsl-buscador-item {
    display: block;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.funsl-buscador-item:hover { background: #f1f5f9; }
.funsl-buscador-sub {
    display: block;
    font-size: 0.68rem;
    color: #64748b;
}
.funsl-buscador-nombre {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--funsl-navy);
    line-height: 1.3;
}
.funsl-buscador-mas {
    display: block;
    text-align: right;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--funsl-cyan);
    text-decoration: none;
    padding: 0.25rem 0.6rem 0.5rem;
}
.funsl-buscador-vacio {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0.4rem 0.6rem;
}
@media (max-width: 575.98px) {
    .funsl-buscador-global { max-width: none; }
}

/* Volver arriba: aparece al bajar, para no tener que arrastrar en páginas largas */
.funsl-arriba {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1030;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--funsl-navy);
    color: #fff;
    box-shadow: 0 6px 18px rgba(13, 33, 55, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}
.funsl-arriba.visible { opacity: 1; visibility: visible; }
.funsl-arriba:hover { transform: translateY(-2px); background: var(--funsl-blue); }
@media (prefers-reduced-motion: reduce) {
    .funsl-arriba, .funsl-buscador-item { transition: none; }
}

/* Resultado de búsqueda: la misma tarjeta del sitio, en versión enlace */
.funsl-resultado { transition: transform .15s ease, box-shadow .15s ease; }
.funsl-resultado:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
@media (prefers-reduced-motion: reduce) { .funsl-resultado { transition: none; } }


/* ═══════════════════════════════════════════════════════════════════════════════
   Componentes que antes vivían como style="…" dentro de las plantillas (08/10/2026)
   Ver docs/DISENO_SITIO.md §7: el estilo va acá, no en el HTML.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* — Encabezado de página: ícono, título, bajada y separador — */
.funsl-encabezado-icono {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--funsl-navy), var(--funsl-blue));
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.funsl-titulo-pagina { font-size: 2.5rem; font-weight: 800; color: var(--funsl-navy); }
.funsl-bajada { max-width: 580px; margin: 0 auto; }
.funsl-separador {
    width: 60px; border: none;
    border-top: 3px solid var(--funsl-cyan);
    opacity: 1; margin-top: 1rem;
}

/* — Cuadritos de ícono, en sus tres tamaños — */
.funsl-ico {
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.funsl-ico-sm { width: 32px; height: 32px; border-radius: 50%;
                background: linear-gradient(135deg, var(--funsl-navy), var(--funsl-cyan)); }
.funsl-ico-md { width: 38px; height: 38px; border-radius: 9px; background: var(--funsl-cyan-soft); }
.funsl-ico-lg { width: 44px; height: 44px; border-radius: 10px; background: var(--funsl-bg); }

/* — Caja de datos dentro de una tarjeta (requisitos, contacto, avisos) — */
.funsl-caja-dato {
    background: var(--funsl-surface);
    border: 1px solid var(--funsl-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.funsl-caja-dato-titulo {
    font-size: 0.75rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--funsl-navy);
    margin-bottom: 0.8rem;
}

/* — Lista con tilde al margen — */
.funsl-lista-check { margin: 0; padding: 0; list-style: none; }
.funsl-lista-check li {
    font-size: 0.9rem; color: var(--funsl-text);
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
}
.funsl-lista-check li > i {
    position: absolute; left: 0; top: 6px;
    color: var(--funsl-cyan); font-size: 0.9rem;
}

/* — Becas: afiche, insignia y textos — */
.funsl-beca-afiche {
    min-height: 280px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 2rem 1.5rem; gap: 1rem;
}
.funsl-beca-afiche-img {
    max-width: 180px; max-height: 260px;
    object-fit: contain; border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease;
    cursor: zoom-in;
}
.funsl-beca-afiche-img:hover { transform: scale(1.03); }
.funsl-beca-icono { width: 80px; height: 80px; border-radius: 50%;
                    background: rgba(255, 255, 255, 0.15);
                    display: flex; align-items: center; justify-content: center; }
.funsl-beca-insignia {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.72rem; font-weight: 700;
    padding: 0.25rem 0.8rem; border-radius: 50px;
    text-transform: uppercase; letter-spacing: 1px;
}
.funsl-beca-pie { font-size: 0.7rem; color: rgba(255, 255, 255, 0.65);
                  margin-top: 0.5rem; letter-spacing: 0.5px; }
.funsl-beca-titulo { font-weight: 800; font-size: 1.6rem; color: var(--funsl-navy); margin: 0 0 0.2rem; }
.funsl-beca-subtitulo { font-size: 0.9rem; font-weight: 600; color: var(--funsl-muted); }
.funsl-beca-descripcion { font-size: 1rem; color: var(--funsl-text); line-height: 1.8; margin-bottom: 1.5rem; }

/* — Ampliación de imagen (modal) — */
.funsl-imagen-ampliada { max-height: 82vh; width: auto; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6); }

/* — Textos chicos que se repiten — */
.funsl-dato      { font-size: 0.82rem; font-weight: 700; color: var(--funsl-navy); }
.funsl-dato-sub  { font-size: 0.85rem; color: var(--funsl-muted); }
.funsl-dato-nota { font-size: 0.85rem; color: var(--funsl-muted); line-height: 1.6; }
.funsl-icono-cyan { color: var(--funsl-cyan); font-size: 1.3rem; }
@media (prefers-reduced-motion: reduce) { .funsl-beca-afiche-img { transition: none; } }

/* — Estatuto: visor del PDF y fila de dato con ícono al margen — */
.funsl-visor { border-top: 4px solid var(--funsl-cyan); }
.funsl-visor-barra {
    background: var(--funsl-navy);
    padding: 0.75rem 1.2rem;
    display: flex; align-items: center; justify-content: space-between;
}
.funsl-visor-enlace {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem; text-decoration: none;
    transition: color 0.2s;
}
.funsl-visor-enlace:hover { color: #fff; }
.funsl-visor-marco { border: none; display: block; }
.funsl-fila-dato { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.75rem; }
.funsl-fila-dato.mt-1rem { margin-top: 1rem; }
.funsl-fila-dato > i { margin-top: 2px; }
.funsl-ico-aviso {
    width: 72px; height: 72px;
    background: var(--funsl-red-soft);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.funsl-titulo-seccion-2 { font-size: 2rem; font-weight: 800; color: var(--funsl-navy); }
.funsl-subtitulo-caja { font-weight: 800; font-size: 1.05rem; color: var(--funsl-navy); }
.funsl-dato-chico  { font-size: 0.78rem; font-weight: 700; color: var(--funsl-navy); }
.funsl-dato-leve   { font-size: 0.83rem; color: var(--funsl-muted); }
.funsl-dato-leve-2 { font-size: 0.82rem; color: var(--funsl-muted); margin-top: 0.2rem; }
.funsl-parrafo-chico { font-size: 0.88rem; color: var(--funsl-text); line-height: 1.7; }
.funsl-icono-aviso-grande { font-size: 2.2rem; color: var(--funsl-red); }

/* — Cursos: textos de la ficha y bordes del encabezado — */
.funsl-texto-curso  { line-height: 1.6; font-size: 0.95rem; }
.funsl-dato-curso   { font-size: 0.8rem; color: var(--funsl-text); }
.funsl-dato-curso-2 { font-size: 0.82rem; color: var(--funsl-text); }
.funsl-etiqueta-leve  { font-size: 0.78rem; color: var(--funsl-muted); }
.funsl-etiqueta-leve-sep { font-size: 0.78rem; color: var(--funsl-muted); margin-bottom: 0.4rem; }
.funsl-rotulo {
    font-size: 0.75rem; font-weight: 700;
    color: var(--funsl-muted);
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 0.4rem;
}
.funsl-redondeo    { border-radius: 15px; }
.funsl-redondeo-sup { border-radius: 15px 15px 0 0; }
.funsl-clicable    { cursor: pointer; }
/* Tamaños de texto chicos que se repiten en varias páginas */
.funsl-fs-07 { font-size: 0.7rem; }
.funsl-fs-08 { font-size: 0.8rem; }
.funsl-fs-09 { font-size: 0.9rem; }

/* — Autoridades: el círculo de cada cargo. Siete variantes de la paleta institucional,
     en lugar de los violetas, verdes y naranjas que estaban escritos en la plantilla. — */
.funsl-cargo-circulo {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.funsl-cargo-cuadro { width: 44px; height: 44px; border-radius: 10px; }
.funsl-cargo-1 { background: linear-gradient(135deg, var(--funsl-navy), var(--funsl-blue)); }
.funsl-cargo-2 { background: linear-gradient(135deg, var(--funsl-blue), var(--funsl-cyan)); }
.funsl-cargo-3 { background: linear-gradient(135deg, var(--funsl-navy), var(--funsl-cyan)); }
.funsl-cargo-4 { background: linear-gradient(135deg, var(--funsl-blue), var(--funsl-navy)); }
.funsl-cargo-5 { background: linear-gradient(135deg, var(--funsl-cyan), var(--funsl-blue)); }
.funsl-cargo-6 { background: linear-gradient(135deg, var(--funsl-navy), var(--funsl-gold)); }
.funsl-cargo-7 { background: linear-gradient(135deg, var(--funsl-blue), var(--funsl-cyan-lt)); }

/* — Autoridades: textos y filas — */
.funsl-rotulo-leve {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--funsl-muted); margin-bottom: 0.75rem;
}
.funsl-rotulo-cyan {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--funsl-cyan); margin-bottom: 0.4rem;
}
.funsl-fila-lista {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--funsl-border);
    font-size: 0.88rem; color: var(--funsl-text);
}
.funsl-caja-contacto {
    display: flex; align-items: center; gap: 0.6rem;
    background: var(--funsl-bg);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
}
.funsl-nombre-cargo { font-size: 1.1rem; font-weight: 800; color: var(--funsl-navy); margin: 0; }
.funsl-nombre-persona { font-size: 0.88rem; font-weight: 600; color: var(--funsl-text); }
.funsl-nombre-persona-2 { font-weight: 700; font-size: 0.95rem; color: var(--funsl-navy); line-height: 1.4; }
.funsl-icono-cyan-sm { color: var(--funsl-cyan); font-size: 1.1rem; flex-shrink: 0; }
.funsl-fs-087 { font-size: 0.87rem; }
.funsl-dato-leve-3 { font-size: 0.82rem; color: var(--funsl-muted); }

/* — Servicios: enlaces del filtro, tarjeta del servicio y textos recortados — */
.funsl-filtro-enlace { text-decoration: none; font-size: 0.85rem; }
.funsl-filtro-enlace-hijo { padding-left: 1rem !important; }
.funsl-tarjeta-servicio {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
}
.funsl-titulo-servicio { font-size: 1.1rem; line-height: 1.3; min-height: 2.6rem; }
.funsl-resumen-2lineas {
    font-size: 0.85rem; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.funsl-redondeo-12 { border-radius: 12px; }
.funsl-fs-075 { font-size: 0.75rem; }
.funsl-rotulo-mini { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; }
.funsl-rotulo-mini-2 { font-size: 0.65rem; letter-spacing: 0.5px; }
/* El número de cada filtro, con tamaño propio.
   La categoría madre usa `funsl-rotulo-mini-2` (0.65rem) y la hija `funsl-filtro-enlace`
   (0.85rem), así que la insignia heredaba uno u otro y la de la madre se veía diminuta al
   lado de la de su propia hija. Con tamaño explícito las dos se ven igual. */
.funsl-filtro-cuenta { font-size: 0.8rem; font-weight: 500; letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { .funsl-tarjeta-servicio { transition: none; } }

/* — Noticias: imagen del listado, cuerpo de la nota y copete — */
.funsl-noticia-imagen { width: 100%; max-height: 320px; border-radius: 10px; object-fit: contain; }
.funsl-noticia-cuerpo-caja { padding: 1.3rem 1.4rem; }
.funsl-noticia-foto { max-height: 450px; width: auto; cursor: pointer; }
.funsl-noticia-texto { line-height: 1.85; color: var(--funsl-text); }
.funsl-noticia-titulo {
    font-size: 1.7rem; font-weight: 800;
    color: var(--funsl-navy); line-height: 1.3;
    margin-bottom: 1.5rem;
}
.funsl-noticia-copete {
    border-color: var(--funsl-cyan) !important;
    font-size: 1.05rem; color: var(--funsl-muted);
    font-style: italic; line-height: 1.8;
}
.funsl-fs-088 { font-size: 0.88rem; }

/* — Últimos sueltos: portada, layout y resultados de búsqueda — */
.funsl-resultado-titulo { line-height: 1.35; }
.funsl-img-full  { max-width: 100%; }
.funsl-img-90    { max-width: 90%; }
/* — Fichas anchas (servicios y cursos) — */
/* Las fichas tienen tres columnas, y en el ancho de Bootstrap (`modal-lg`, 800px) las tres
   quedaban en tiras de texto angostas con la ficha de datos rebalsando al lado. El ancho es el
   75% de la ventana que pidio Cristian, pero acotado por los dos lados:

     - piso 1140px (el `modal-xl` de Bootstrap), porque en una notebook de 1366 el 75% da 1024
       y la ficha habria quedado MAS angosta que antes;
     - techo 1500px, porque en un monitor grande el 75% pasa los 1900 y un parrafo de 6000
       caracteres en una sola linea no se puede leer.

   Abajo de 992px no se aplica: ahi las columnas se apilan solas (`col-lg-*`) y la ficha usa el
   ancho completo, que es lo correcto en un telefono. */
@media (min-width: 992px) {
    .funsl-modal-ancha { max-width: max(1140px, min(75vw, 1500px)); }
}

.funsl-modal-marco { border-radius: 16px; overflow: hidden; }
.funsl-modal-img   { max-height: 80vh; width: auto; }
.funsl-pie-texto   { font-size: 0.87rem; line-height: 1.7; }
.funsl-cerrar-modal {
    font-size: 1.8rem; background: transparent;
    padding: 0.2rem 0.5rem; outline: none; box-shadow: none;
}
.funsl-contenido-min { min-height: 60vh; }
