:root {
    --bg: #ffffff;
    --paper: #fbf7f4;
    --ink: #1f2937;
    --muted: #6b7280;
    --brand: #284359;
    /* terracota -> blue */
    --brand-2: #1c3040;
    --border: rgba(31, 41, 55, .12);
    --shadow: 0 12px 30px rgba(0, 0, 0, .08);
    --radius: 20px;
}

body {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

h1,
h2,
h3,
.serif {
    font-family: "Playfair Display", Georgia, serif;
}

.text-muted2 {
    color: var(--muted);
}

.btn-brand {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-2);
    --bs-btn-hover-border-color: var(--brand-2);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    border-radius: 999px;
    padding: .7rem 1.1rem;
    font-weight: 600;
}

.btn-outline-brand {
    border: 1px solid rgba(255, 255, 255, .55);
    color: #fff;
    border-radius: 999px;
    padding: .7rem 1.1rem;
    font-weight: 600;
    background: transparent;
}

.btn-outline-brand:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

/* Navbar */
.navbar {
    backdrop-filter: saturate(140%) blur(10px);
    background: #284359;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, .88);
    font-weight: 500;
}

.navbar .nav-link:hover {
    color: #fff;
}

.brand-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    letter-spacing: .5px;
}

/* Hero */
.hero {
    position: relative;
    min-height: 78vh;
    display: grid;
    align-items: center;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25)),
        url("../Img/Portada.png?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
}

.hero-card {
    max-width: 100%;
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 46rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .88);
}

/* Sections */
section {
    padding: 72px 0;
}

.section-title {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    margin-bottom: .6rem;
}

.section-lead {
    color: var(--muted);
    max-width: 60ch;
}

.card-soft {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.icon-pill {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(40, 67, 89, .12);
    color: var(--brand);
    font-weight: 700;
}

.bg-paper {
    background: var(--paper);
}

.statbar {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.stat {
    display: flex;
    gap: 10px;
    align-items: center;
}

.stat b {
    font-size: 1.05rem;
}

.stat small {
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

.divider {
    height: 1px;
    background: var(--border);
}

/* Footer */
footer {
    background: #284359;
    color: rgba(255, 255, 255, .82);
    /*padding: 36px 0;*/
}

footer a {
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Anchors offset for fixed navbar */
.anchor {
    scroll-margin-top: 84px;
}

/* Loader Overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #284359;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loader-text {
    font-family: Inter, sans-serif;
    font-weight: 600;
    color: #284359;
    font-size: 1.1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* About Images Grid */
.about-image-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 17px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Contenedor de cada logo */
.about-image-grid .logo-box {
    height: 90px;
    /* ALTURA VISUAL UNIFICADA */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Imagen */
.about-img {
    max-height: 103px;
    /* tamaño interno */
    width: auto;
    object-fit: contain;
    display: block;
}

.about-img.efm {
    max-height: 60px;
}

.logo-box a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-box a:hover {
    outline: 3px solid #284359;
    /* azul Bootstrap */
    outline-offset: 2px;
    opacity: 0.80;
}

.logo-box a:focus-visible {
    outline: 2px solid #284359;
    outline-offset: 4px;
    border-radius: 4px;
}

.hero-mini-carousel {
    margin: 14px 0 18px;
    max-width: 75%;
}

.hero-mini-track {
    position: relative;
    min-height: 22px;
    /* asegura estabilidad al cambiar textos */
}

.hero-mini-item {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s ease, transform .25s ease;
    color: rgba(255, 255, 255, .85);
    font-size: 1.05rem;
    line-height: 1.35;
}

.hero-mini-item.is-active {
    opacity: 1;
    transform: translateY(0);
}

.hero-mini-dots {
    display: flex;
    justify-content: left;
    gap: 10px;
    margin-top: 5%;
}

.hero-mini-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, .55);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}

.hero-mini-dot.is-active {
    background: rgba(255, 255, 255, .95);
    border-color: rgba(255, 255, 255, .95);
    transform: scale(1.05);
}

/* Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce) {

    .hero-mini-item,
    .hero-mini-dot {
        transition: none;
    }
}