.home-page {
    background: #ffffff;
    min-height: 100vh;
    padding: 0 0 56px;
}

.home-inner {
    width: 100%;
    height: 10%;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   HERO / CARRUSEL
===================================================== */
.home-hero {
    margin-bottom: 20px;
}

.home-carousel {
    position: relative;
    overflow: hidden;
    background: #111111;
    width: 100%;
    height: 500px;
    aspect-ratio: 16 / 5.4;
}

.home-carousel__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .6s ease;
}

.home-carousel__slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    flex: 0 0 100%;
    background: #111111;
}

.home-carousel__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--slide-bg);
    background-size: cover;
    background-position: center center;
    transform: scale(1.06);
    filter: blur(12px);
    opacity: .8;
    z-index: 1;
}

.home-carousel__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .16);
    z-index: 2;
}

.home-carousel__link {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.home-carousel__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
}

.home-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #2b2b2b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: transform .18s ease, background-color .18s ease;
}

.home-carousel__nav:hover {
    transform: translateY(-50%) scale(1.04);
    background: #ffffff;
}

.home-carousel__nav--prev {
    left: 18px;
}

.home-carousel__nav--next {
    right: 18px;
}

.home-carousel__dots {
    position: absolute !important;
    left: 50% !important;
    bottom: 16px !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 5 !important;
}

.home-carousel__dot {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    max-width: 8px !important;
    max-height: 8px !important;
    flex: 0 0 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .55) !important;
    cursor: pointer !important;
    transition: transform .18s ease, background-color .18s ease !important;
}

.home-carousel__dot.is-active {
    background: #ffffff !important;
    transform: scale(1.3) !important;
}

/* =====================================================
   ACCESOS
===================================================== */
.home-actions {
    max-width: 1400px;
    margin: 0 auto 44px;
    padding: 0 32px;
    min-height: 140px;
    display: flex;
    align-items: center;
}

.home-actions__grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    padding-right: 16px;
}

.home-action-card {
    display: flex;
    align-items: stretch;
    min-height: 88px;
    color: #ffffff;
    text-decoration: none;
    background: #B80201;
    border: 1px solid #B80201;
    border-radius: 10px;
    transition: background-color .18s ease, border-color .18s ease;
}

.home-action-card:hover {
    color: #ffffff;
    background: #990101;
    border-color: #990101;
}

.home-action-card__inner {
    width: 100%;
    min-height: 88px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 16px;
}

.home-action-card__icon {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    line-height: 1;
}

.home-action-card__icon i {
    font-size: 42px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-action-card__icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}

.home-action-card__text {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .15px;
}

/* =====================================================
   SECCIONES
===================================================== */
.home-section {
    max-width: 1400px;
    margin: 0 auto 54px;
    padding: 0 32px;
}

.home-section__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    text-align: center;
}

.home-section__title {
    position: relative;
    margin: 0;
    padding-bottom: 12px;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.15;
    color: #242424;
}

.home-section__title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 54px;
    height: 4px;
    border-radius: 999px;
    background: #B80201;
    transform: translateX(-50%);
}

.home-section__subtitle {
    max-width: 100%;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #6a6a6a;
}

.convenios-grid,
.reconocimientos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    justify-content: center;
    gap: 20px;
}

.home-card-principal,
.home-card-principal2 {
    width: 100%;
    max-width: none;
    transition: border-color .18s ease;
}

.home-card-principal:hover,
.home-card-principal2:hover {
    border-color: #B80201;
}

.home-card-principal .cpl-card-principal__content,
.home-card-principal2 .cpl-card-principal__content {
    --home-card-content-space: 10px;
    display: grid !important;
    grid-template-rows: 2.7em 2.9em 40px;
    align-content: start;
    row-gap: var(--home-card-content-space) !important;
    padding: var(--home-card-content-space) 16px !important;
}

.home-card-principal .cpl-card-principal__actions,
.home-card-principal2 .cpl-card-principal__actions {
    margin-top: 0 !important;
}

.home-card-principal2 .cpl-card-principal__actions {
    grid-row: 3;
}

.home-card-principal2 {
    height: 390px !important;
}

.home-card-principal2 .cpl-card-principal__content {
    flex: 1 1 auto !important;
}

/* =====================================================
   HOME HEADER RESPONSIVE
===================================================== */
.home-public-header {
    position: relative;
    z-index: 1100;
}

.home-public-navbar {
    position: sticky;
    top: 0;
    z-index: 1200;
}

.home-public-navbar .navbar__toggle {
    border: 0;
    background: transparent;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 52px;
    height: 52px;
    margin-left: auto;
    cursor: pointer;
}

.home-public-navbar .navbar__toggle-icon--close {
    display: none;
}

.home-public-navbar .navbar__toggle.is-open .navbar__toggle-icon--open {
    display: none;
}

.home-public-navbar .navbar__toggle.is-open .navbar__toggle-icon--close {
    display: inline-flex;
}

.home-public-navbar .navbar__menu {
    transition: transform .24s ease, opacity .24s ease;
}

.home-public-navbar .navbar__item--has-submenu > .navbar__link .navbar__chevron {
    transition: transform .2s ease;
}

@media (min-width: 993px) {
    .home-public-navbar .navbar__menu {
        display: flex !important;
    }
}

@media (max-width: 992px) {
    .home-public-header .header__inner {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 16px;
        align-items: start;
    }

    .home-public-header .header__brand {
        width: 100%;
        align-items: center;
    }

    .home-public-header .header__logo {
        width: 56px;
        height: 56px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .home-public-header .header__title p {
        font-size: 14px;
        line-height: 1.2;
    }

    .home-public-header .header__search {
        width: 100%;
        order: 2;
    }

    .home-public-navbar {
        padding: 0;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        background: linear-gradient(180deg, #1f1f1f 0%, #101010 100%);
    }

    .home-public-navbar .container {
        justify-content: space-between;
        align-items: center;
    }

    .home-public-navbar .navbar__toggle {
        display: inline-flex;
    }

    .home-public-navbar .navbar__menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border-radius: 18px;
        background: rgba(17, 17, 17, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px) scale(0.985);
        max-height: calc(100vh - 220px);
        overflow-y: auto;
    }

    .home-public-navbar .navbar__menu--open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .home-public-navbar .navbar__item {
        width: 100%;
    }

    .home-public-navbar .navbar__link {
        width: 100%;
        justify-content: space-between;
        padding: 14px 16px;
        border-radius: 14px;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.03);
        border-bottom: 0;
    }

    .home-public-navbar .navbar__link:hover,
    .home-public-navbar .navbar__link--active {
        color: #f1d36a;
        background: rgba(255, 255, 255, 0.07);
    }

    .home-public-navbar .navbar__item--open > .navbar__link .navbar__chevron {
        transform: rotate(180deg);
    }

    .home-public-navbar .navbar__dropdown {
        position: static;
        display: none !important;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 0;
        margin-top: 8px;
        border-radius: 14px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.04);
        box-shadow: none;
    }

    .home-public-navbar .navbar__item--open .navbar__dropdown {
        display: block !important;
    }

    .home-public-navbar .navbar__dropdown-link {
        color: #f2f2f2;
        border-bottom-color: rgba(255, 255, 255, 0.08);
        padding: 13px 18px;
    }

    .home-public-navbar .navbar__dropdown-link:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
        padding-left: 18px;
    }

    .home-page {
        padding-bottom: 42px;
    }

    .home-hero {
        margin-bottom: 18px;
    }

    .home-actions {
        min-height: 0;
        margin-bottom: 38px;
        padding: 0 20px;
    }

    .home-actions__grid {
        gap: 16px;
        padding-right: 0;
    }

    .home-section {
        margin-bottom: 42px;
        padding: 0 20px;
    }

    .home-section__header {
        margin-bottom: 20px;
    }

    .home-card-principal2 {
        height: auto !important;
        min-height: 0;
    }

    .home-card-principal .cpl-card-principal__content,
    .home-card-principal2 .cpl-card-principal__content {
        grid-template-rows: auto auto auto;
    }
}

@media (max-width: 768px) {
    .home-public-header .header__brand {
        align-items: flex-start;
        gap: 10px;
    }

    .home-public-header .header__title p {
        font-size: 13px;
    }

    .home-public-navbar .navbar__menu {
        left: 10px;
        right: 10px;
    }
}

/* =====================================================
   PUBLICIDAD FLOTANTE – CARRUSEL ÚNICO DERECHA
===================================================== */
.floating-ad {
    position: fixed;
    top: 120px;
    right: 16px;
    width: 280px;
    min-width: 240px;
    background: transparent;
    z-index: 99999;
    transition: all 0.3s ease;
}

.floating-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.floating-carousel__track {
    display: flex;
    transition: transform 0.5s ease;
}

.floating-carousel__slide {
    flex: 0 0 100%;
    aspect-ratio: 3 / 4;
}

.floating-carousel__slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.floating-carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.floating-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: background 0.2s;
}

.floating-carousel__nav:hover {
    background: rgba(0,0,0,0.8);
}

.floating-carousel__nav--prev {
    left: 8px;
}

.floating-carousel__nav--next {
    right: 8px;
}

.floating-carousel__dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.floating-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.floating-carousel__dot.is-active {
    background: #d60000;
    transform: scale(1.2);
}

/* Botones de control (cerrar, minimizar, maximizar) */
.floating-ad__controls {
    position: absolute;
    top: -12px;
    right: -8px;
    display: flex;
    gap: 8px;
    z-index: 20;
}

.floating-ad__btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #d60000;
    color: white;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.floating-ad__btn:hover {
    background: #9c0000;
    transform: scale(1.05);
}

/* Estado minimizado */
.floating-ad.is-minimized {
    width: 52px;
    min-width: 52px;
    height: 52px;
    right: 20px;
    bottom: 20px;
    top: auto;
    background: #d60000;
    border-radius: 50%;
    cursor: pointer;
}

.floating-ad.is-minimized .floating-carousel,
.floating-ad.is-minimized .floating-carousel__nav,
.floating-ad.is-minimized .floating-carousel__dots {
    display: none;
}

.floating-ad.is-minimized::after {
    content: "📢";
    font-size: 28px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.floating-ad.is-minimized .floating-ad__controls {
    top: -8px;
    right: -8px;
}

.floating-ad.is-minimized .floating-ad__minimize {
    display: none !important;
}

.floating-ad.is-minimized .floating-ad__maximize {
    display: flex !important;
}

/* =====================================================
   PUBLICIDAD FLOTANTE – RESPONSIVE (SIN display:none)
===================================================== */

@media (max-width: 1500px) {
    .floating-ad {
        width: 240px;
    }
}

@media (max-width: 1200px) {
    .floating-ad {
        width: 200px;
        top: 100px;
    }
}

@media (max-width: 992px) {
    .floating-ad {
        width: 240px;
        top: auto;
        bottom: 72px;
        right: 12px;
        min-width: 0;
    }

    .floating-carousel {
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    }

    .floating-carousel__nav {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .floating-carousel__nav--prev { left: 4px; }
    .floating-carousel__nav--next { right: 4px; }

    .floating-carousel__dots { bottom: 8px; gap: 5px; }
    .floating-carousel__dot { width: 6px; height: 6px; }

    .floating-ad__controls { top: -10px; right: -6px; gap: 5px; }

    .floating-ad__btn {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .floating-ad.is-minimized {
        width: 44px;
        min-width: 44px;
        height: 44px;
        right: 14px;
        bottom: 14px;
    }

    .floating-ad.is-minimized::after {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .floating-ad {
        width: 200px;
        bottom: 65px;
        right: 10px;
    }

    .floating-carousel__nav {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .floating-carousel__dot { width: 5px; height: 5px; }

    .floating-ad__btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .floating-ad.is-minimized {
        width: 40px;
        min-width: 40px;
        height: 40px;
        right: 10px;
        bottom: 10px;
    }

    .floating-ad.is-minimized::after {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .floating-ad {
        width: 180px;
        bottom: 60px;
        right: 8px;
    }

    .floating-carousel { border-radius: 10px; }

    .floating-carousel__nav {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .floating-carousel__nav--prev { left: 2px; }
    .floating-carousel__nav--next { right: 2px; }

    .floating-carousel__dots { bottom: 5px; gap: 4px; }
    .floating-carousel__dot { width: 4px; height: 4px; }

    .floating-ad__controls { top: -8px; right: -5px; gap: 4px; }

    .floating-ad__btn {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .floating-ad.is-minimized {
        width: 36px;
        min-width: 36px;
        height: 36px;
        right: 8px;
        bottom: 8px;
    }

    .floating-ad.is-minimized::after {
        font-size: 17px;
    }
}

/* =====================================================
   GRIDS Y CARDS – RESPONSIVE
===================================================== */

@media (max-width: 1180px) {
    .convenios-grid,
    .reconocimientos-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
    }
}

@media (max-width: 900px) {
    .home-actions__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-carousel {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 700px) {
    .home-page {
        background: #fafafa;
    }

    .home-actions,
    .home-section {
        padding: 0 16px;
    }

    .home-actions__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .convenios-grid,
    .reconocimientos-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .home-carousel {
        min-height: 0;
        aspect-ratio: 1 / 1;
        border-radius: 0 0 18px 18px;
    }

    .home-carousel__slide::before {
        filter: blur(10px);
        transform: scale(1.08);
    }

    .home-action-card {
        min-height: 82px;
        border-radius: 14px;
        box-shadow: 0 12px 22px rgba(184, 2, 1, 0.14);
    }

    .home-action-card__inner {
        min-height: 82px;
        justify-content: flex-start;
        padding: 14px 16px;
        gap: 14px;
    }

    .home-action-card__icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .home-action-card__icon i {
        font-size: 34px;
    }

    .home-action-card__icon img {
        width: 52px;
        height: 52px;
    }

    .home-action-card__text {
        flex: 1;
        text-align: left;
        font-size: 16px;
        line-height: 1.18;
    }

    .home-section__title {
        font-size: 24px;
    }

    .home-section__subtitle {
        font-size: 16px;
        line-height: 1.5;
    }

    .home-card-principal,
    .home-card-principal2 {
        width: 100% !important;
        border-radius: 14px !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    }

    .home-card-principal .cpl-card-principal__image,
    .home-card-principal2 .cpl-card-principal__image {
        height: 178px !important;
        flex-basis: 178px !important;
    }

    .home-card-principal .cpl-card-principal__content,
    .home-card-principal2 .cpl-card-principal__content {
        padding: 14px 14px 16px !important;
        row-gap: 12px !important;
    }

    .home-card-principal .cpl-card-principal__title,
    .home-card-principal2 .cpl-card-principal__title {
        font-size: 16px;
        min-height: 0;
        max-height: none;
        height: auto;
    }

    .home-card-principal .cpl-card-principal__subtitle,
    .home-card-principal2 .cpl-card-principal__subtitle {
        font-size: 16px;
        min-height: 0;
        max-height: none;
        height: auto;
    }

    .home-card-principal .cpl-card-principal__actions,
    .home-card-principal2 .cpl-card-principal__actions {
        gap: 8px;
    }

    .home-card-principal .cpl-card-principal__actions > a,
    .home-card-principal .cpl-card-principal__actions > button,
    .home-card-principal2 .cpl-card-principal__actions > a,
    .home-card-principal2 .cpl-card-principal__actions > button {
        min-height: 44px !important;
        height: 44px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 560px) {
    .home-carousel {
        min-height: 0;
        height: auto;
        aspect-ratio: 1 / 1.08;
    }

    .home-carousel__nav {
        width: 44px;
        height: 44px;
    }

    .home-section__title {
        font-size: 24px;
    }

    .home-carousel__dots {
        bottom: 12px;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .home-carousel {
        min-height: 0;
        aspect-ratio: 1 / 1.12;
    }

    .home-carousel__nav {
        width: 36px;
        height: 36px;
    }

    .home-carousel__dots {
        bottom: 10px;
        gap: 6px;
    }

    .home-section__subtitle {
        font-size: 16px;
    }

    .home-action-card__text {
        font-size: 16px;
    }
}

/* ── Banner/Carrusel slide caption overlay with blur & bottom gradient ── */
.home-carousel__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 32px 32px 48px 32px; /* Espacio inferior extra para dar espacio a los puntitos */
    text-align: center;
    color: #FFFFFF;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4;
}

.home-carousel__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    max-width: 850px;
    line-height: 1.35;
    font-family: 'Outfit', 'Inter', sans-serif;
    letter-spacing: -0.2px;
}

@media (max-width: 768px) {
    .home-carousel__caption {
        padding: 20px 20px 36px 20px;
    }
    
    .home-carousel__title {
        font-size: 15px;
        line-height: 1.3;
        max-width: 100%;
    }
}