body {
    background: #f3f6f8;
}

/* ================= NAVBAR ================= */
.navbar-custom {
    background-color: #f3f6f8;
    box-shadow: none;
    transition: background-color 0.3s ease;
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: all .3s ease;
}

.navbar-custom .navbar-brand span,
.navbar-custom .nav-link {
    color: #474747;
    font-weight: 500;
    font-family: Manrope, sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

/* Logo y textos */
.logo-title {
    color: #06068F !important;
    font-family: Outfit, sans-serif;
    font-weight: 800 !important;
}

.logo-subtitle {
    color: #474747 !important;
    font-family: Manrope, sans-serif;
    font-weight: 500;
}

/* Botón hamburguesa */
.navbar-toggler-custom {
    padding: 0.6rem 1rem;
    font-size: 1.5rem;
    border: none;
    box-shadow: none;
    color: #212529 !important;
}

.navbar .nav-link.active {
    color:#212529 !important;
    background-color: #f3f6f8;
    border-radius: 0;
    border-bottom: 2px solid #06068F;
}

.navbar .nav-link:hover {
    color:#17A3DF !important;
}

/* --- Efecto encogido del navbar --- */
.navbar-shrink {
    padding-top: .45rem !important;
    padding-bottom: .45rem !important;
}

.navbar-shrink .logo-apulia {
    max-width: 140px;
}

.navbar-shrink .logo-title {
    font-size: 1.3rem !important;
}

.navbar-shrink .logo-subtitle {
    font-size: 0.5rem !important;
}

.navbar-shrink .nav-link {
    font-size: 0.95rem !important;
}

/* Margen para compensar navbar fijo */
section { scroll-margin-top: 100px; }

/* Tamaño general del logo */
.logo-apulia {
    max-width: 180px;
    height: auto;
    transition: max-width 0.3s ease;
}

.logo-text span {
    display: block;
    margin: 0;
}

.logo-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem) !important;
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

.logo-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem) !important;
    line-height: 1.2;
    margin-top: 0;
    text-transform: none !important;
}

/* Responsive navbar */
@media (max-width: 992px) {
    .navbar-brand img {
        max-width: 120px !important;
        margin-right: 10px;
    }

    .navbar-brand span {
        font-size: 1.2rem !important;
        line-height: 1.2;
    }

    .navbar-brand span:last-child {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 700px) {
    .navbar-brand > div {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .logo-apulia {
        max-width: 120px;
        margin-bottom: 5px;
    }

    .logo-title {
        font-size: 1.2rem;
        margin-bottom: 0.05rem;
    }

    .logo-subtitle {
        font-size: 0.85rem;
    }
}

.logo-subtitle {
    font-size: 0.7rem !important;
}

/* ================= SELECTOR DE IDIOMA ================= */
.lang-switch {
    display: flex;
    align-items: center;
}

.navbar .lang-switch .lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .9rem !important;
    border: 1px solid #cfd9df;
    border-radius: 999px;
    background: #fff;
    color: #06068F !important;
    font-family: Manrope, sans-serif;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .04em;
    line-height: 1.2;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.navbar .lang-switch .lang-toggle:hover,
.navbar .lang-switch .lang-toggle[aria-expanded="true"] {
    border-color: #17A3DF;
    box-shadow: 0 4px 12px rgba(23, 163, 223, .15);
    color: #06068F !important;
}

.lang-switch .lang-toggle .fa-globe {
    color: #17A3DF;
}

.lang-switch .dropdown-menu {
    min-width: 11rem;
    padding: .4rem;
    margin-top: .4rem;
    border: 1px solid #e3ecef;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

.lang-switch .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .75rem;
    border-radius: 8px;
    font-family: Manrope, sans-serif;
    font-weight: 500;
    color: #474747;
}

.lang-switch .dropdown-item:hover,
.lang-switch .dropdown-item:focus {
    background: #f3f6f8;
    color: #06068F;
}

.lang-switch .dropdown-item.active,
.lang-switch .dropdown-item:active {
    background: #e8f7fa;
    color: #06068F;
    font-weight: 700;
}

.lang-switch .dropdown-item .fa-check {
    color: #17A3DF;
    font-size: .85rem;
}

@media (min-width: 992px) {
    .lang-switch {
        margin-left: .5rem;
    }
}

@media (max-width: 991.98px) {
    .lang-switch {
        flex-direction: column;
        align-items: flex-start;
        padding: .5rem 0 1rem;
    }
    .lang-switch .dropdown-menu {
        position: static;
        width: 100%;
    }
}
