/* =========================================================
   SINTRAIT - WEB PÚBLICA
   CSS RESPONSIVE
========================================================= */

html {
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

/* HEADER */

.public-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--blanco);
    border-bottom: 1px solid var(--borde);
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}

.public-header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.public-brand img,
.brand-placeholder {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
}

.public-brand img {
    background: #fff;
}

.brand-placeholder {
    display: grid;
    place-items: center;
    background: var(--corporativo-principal);
    color: #fff;
    font-weight: 800;
    font-size: 24px;
}

.public-brand-text strong {
    display: block;
    color: var(--corporativo-principal);
    font-size: 18px;
}

.public-brand-text small {
    display: block;
    color: var(--texto-suave);
    margin-top: 2px;
}

.public-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.public-nav > a,
.nav-dropdown > button {
    border: 0;
    background: transparent;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--texto);
    font-weight: 600;
    cursor: pointer;
}

.public-nav > a:hover,
.public-nav > a.active,
.nav-dropdown > button:hover {
    background: #eef3f0;
    color: var(--corporativo-principal);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    padding: 8px;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: .18s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 7px;
}

.nav-dropdown-menu a:hover {
    background: #eef3f0;
    color: var(--corporativo-principal);
}

.nav-join {
    background: var(--corporativo-acento) !important;
    color: #111 !important;
    margin-left: 8px;
    padding-inline: 17px !important;
}

.nav-join:hover {
    background: var(--corporativo-principal) !important;
    color: #fff !important;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--corporativo-principal);
    font-size: 27px;
    cursor: pointer;
}

/* MAIN */

.public-main {
    min-height: calc(100vh - 76px);
}

/* HERO */

.public-hero {
    min-height: 480px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(31,77,59,.96), rgba(31,77,59,.78)),
        var(--corporativo-principal);
    color: #fff;
}

.hero-content {
    max-width: 760px;
    padding: 75px 0;
}

.hero-content .eyebrow {
    color: var(--corporativo-acento);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 14px;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.02;
}

.hero-content p {
    max-width: 680px;
    font-size: 19px;
    line-height: 1.7;
    opacity: .92;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

/* SECCIONES */

.public-section {
    padding: 70px 0;
}

.public-section.alt {
    background: var(--blanco);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 34px;
}

.section-heading h2 {
    margin: 0 0 10px;
    color: var(--corporativo-principal);
    font-size: clamp(28px, 4vw, 40px);
}

.section-heading p {
    margin: 0;
    color: var(--texto-suave);
    line-height: 1.7;
}

/* BOTONES */

.public-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
}

.public-btn-primary {
    background: var(--corporativo-acento);
    color: #111;
}

.public-btn-primary:hover {
    background: #fff;
}

.public-btn-outline {
    border-color: rgba(255,255,255,.7);
    color: #fff;
}

.public-btn-outline:hover {
    background: #fff;
    color: var(--corporativo-principal);
}

/* TARJETAS */

.public-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.public-card {
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 5px 20px rgba(0,0,0,.04);
}

.public-card h3 {
    margin: 0 0 10px;
    color: var(--corporativo-principal);
}

.public-card-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}


.public-card p {
    color: var(--texto-suave);
    line-height: 1.65;
}

/* FOOTER */

.public-footer {
    background: var(--corporativo-principal);
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
    padding: 50px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: rgba(255,255,255,.8);
}

.footer-grid a:hover {
    color: var(--corporativo-acento);
}

.footer-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
}

.footer-grid p {
    color: rgba(255,255,255,.75);
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.14);
    padding: 18px 0;
    color: rgba(255,255,255,.7);
    font-size: 14px;
}

/* =========================================================
   RESPONSIVE GENERAL
========================================================= */

@media (max-width: 1100px) {

    .public-header-inner {
        gap: 16px;
    }

    .public-nav {
        gap: 0;
    }

    .public-nav > a,
    .nav-dropdown > button {
        padding: 9px 8px;
        font-size: 14px;
    }

    .nav-join {
        padding-inline: 12px !important;
    }

    .footer-grid {
        gap: 24px;
    }
}

@media (max-width: 980px) {

    .public-header-inner {
        min-height: 68px;
    }

    .menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .public-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 68px);
        overflow-y: auto;
        padding: 10px 16px 16px;
        background: #fff;
        border-bottom: 1px solid var(--borde);
        box-shadow: 0 12px 25px rgba(0,0,0,.08);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .public-nav.is-open {
        display: flex;
    }

    .public-nav > a,
    .nav-dropdown > button {
        width: 100%;
        min-height: 44px;
        text-align: left;
    }

    .nav-dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        box-shadow: none;
        border: 0;
        padding: 0 0 4px 14px;
    }

    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-join {
        margin-left: 0;
        text-align: center !important;
    }

    .public-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-section {
        padding: 56px 0;
    }

    .hero-content {
        padding: 55px 0;
    }
}

@media (max-width: 700px) {

    .container {
        width: min(100% - 24px, 1180px);
    }

    .public-brand {
        gap: 8px;
        min-width: 0;
        max-width: calc(100% - 48px);
    }

    .public-brand img,
    .brand-placeholder {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }

    .public-brand-text {
        min-width: 0;
    }

    .public-brand-text strong {
        font-size: 15px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .public-brand-text small {
        display: none;
    }

    .public-grid {
        grid-template-columns: 1fr;
    }

    .public-section {
        padding: 44px 0;
    }

    .section-heading {
        margin-bottom: 24px;
    }

    .section-heading h2 {
        font-size: clamp(25px, 7vw, 34px);
    }

    .hero-content {
        padding: 42px 0;
    }

    .hero-content h1 {
        font-size: clamp(32px, 9vw, 44px);
    }

    .hero-content p {
        font-size: 16px;
        line-height: 1.55;
    }

    .hero-actions {
        gap: 8px;
        margin-top: 20px;
    }

    .public-btn {
        min-height: 42px;
        padding: 9px 14px;
    }

    .public-card {
        padding: 18px;
        border-radius: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 38px 0;
    }
}

@media (max-width: 420px) {

    .container {
        width: calc(100% - 20px);
    }

    .public-header-inner {
        min-height: 62px;
    }

    .public-nav {
        top: 62px;
        max-height: calc(100vh - 62px);
        padding-inline: 10px;
    }

    .public-brand img,
    .brand-placeholder {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 8px;
    }

    .public-brand-text strong {
        font-size: 14px;
    }

    .menu-toggle {
        font-size: 24px;
    }

    .public-section {
        padding: 36px 0;
    }

    .public-card {
        padding: 16px;
    }

    .noticia-content {
        padding: 16px 18px 20px;
    }

    .noticia-content h2 {
        font-size: 20px;
    }

    .noticia-image {
        height: 190px;
    }
}

/* =========================================================
   CARRUSEL PRINCIPAL
========================================================= */

.public-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--corporativo-principal);
}

.public-carousel-track {
    position: relative;
    width: 100%;
    height: clamp(290px, 27vw, 360px);
}

.public-carousel-slide {
    position: absolute;
    inset: 0;

    width: 100%;
    height: clamp(290px, 27vw, 360px);

    display: flex;
    align-items: center;

    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    background-color: var(--corporativo-principal);
   

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.6s ease,
        visibility 0.6s ease;
}

.public-carousel-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}


/* =========================================================
   CONTENIDO
========================================================= */

.public-carousel-content {
    position: relative;
    z-index: 3;

    width: 100%;
    max-width: 760px;

    padding: 35px 20px;

    color: #fff;
}

.public-carousel-content h1 {
    margin: 0 0 18px;

    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.08;

    font-weight: 800;
}

.public-carousel-content p {
    max-width: 650px;

    margin: 0 0 28px;

    font-size: 17px;
    line-height: 1.5;
}


/* =========================================================
   BOTONES
========================================================= */

.public-carousel-content .public-btn {
    margin-right: 8px;
}


/* =========================================================
   FLECHAS
========================================================= */

.public-carousel-control {
    position: absolute;
    top: 50%;

    z-index: 20;

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.22);
    color: #fff;

    font-size: 27px;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.public-carousel-control:hover {
    background: var(--corporativo-acento);
    color: #111;

    transform:
        translateY(-50%)
        scale(1.05);
}

.public-carousel-prev {
    left: 20px;
}

.public-carousel-next {
    right: 20px;
}


/* =========================================================
   INDICADORES
========================================================= */

.public-carousel-indicators {
    position: absolute;

    left: 50%;
    bottom: 24px;

    z-index: 20;

    display: flex;
    align-items: center;
    gap: 8px;

    transform: translateX(-50%);
}

.public-carousel-indicator {
    width: 10px;
    height: 10px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.55);

    cursor: pointer;

    transition:
        width 0.2s ease,
        background 0.2s ease;
}

.public-carousel-indicator.is-active {
    width: 28px;

    border-radius: 10px;

    background: var(--corporativo-acento);
}


/* =========================================================
   CARRUSEL RESPONSIVE
========================================================= */

@media (max-width: 1024px) {

    .public-carousel-track,
    .public-carousel-slide {
        height: 315px;
    }

    .public-carousel-content {
        max-width: 680px;
        padding: 28px 24px 45px;
    }

    .public-carousel-content h1 {
        font-size: clamp(28px, 5vw, 44px);
    }

    .public-carousel-content p {
        max-width: 560px;
        font-size: 17px;
        line-height: 1.5;
    }

    .public-carousel-control {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .public-carousel-prev {
        left: 12px;
    }

    .public-carousel-next {
        right: 12px;
    }
}

@media (max-width: 768px) {

    .public-carousel-track,
    .public-carousel-slide {
        height: 260px;
    }

    .public-carousel-slide {
        background-position: center center;
        background-size: contain;
        background-color: var(--corporativo-principal);
    }

    .public-carousel-content {
        max-width: 70%;
        padding: 20px 18px 38px;
    }

    .public-carousel-content h1 {
        margin-bottom: 10px;
        font-size: clamp(24px, 5.8vw, 34px);
        line-height: 1.08;
    }

    .public-carousel-content p {
        margin-bottom: 16px;
        font-size: 15px;
        line-height: 1.45;
    }

    .public-carousel-content .public-btn {
        margin-right: 4px;
        margin-bottom: 6px;
    }

    .public-carousel-control {
        width: 34px;
        height: 34px;
        font-size: 19px;
    }

    .public-carousel-prev {
        left: 8px;
    }

    .public-carousel-next {
        right: 8px;
    }

    .public-carousel-indicators {
        bottom: 12px;
        gap: 6px;
    }

    .public-carousel-indicator {
        width: 8px;
        height: 8px;
    }

    .public-carousel-indicator.is-active {
        width: 22px;
    }
}

@media (max-width: 480px) {

    .public-carousel-track,
    .public-carousel-slide {
        height: 215px;
    }

    .public-carousel-content {
        max-width: 74%;
        padding: 22px 14px 42px;
    }

    .public-carousel-content h1 {
        margin-bottom: 7px;
        font-size: clamp(21px, 7vw, 29px);
    }

    .public-carousel-content p {
        margin-bottom: 11px;
        font-size: 13px;
        line-height: 1.35;
    }

    .public-carousel-content .public-btn {
        min-height: 36px;
        padding: 7px 11px;
        font-size: 13px;
        border-radius: 6px;
    }

    .public-carousel-control {
        width: 29px;
        height: 29px;
        font-size: 16px;
    }

    .public-carousel-prev {
        left: 5px;
    }

    .public-carousel-next {
        right: 5px;
    }

    .public-carousel-indicators {
        bottom: 8px;
    }
}

@media (max-width: 360px) {

    .public-carousel-track,
    .public-carousel-slide {
        height: 190px;
    }

    .public-carousel-content {
        max-width: 76%;
        padding: 18px 12px 35px;
    }

    .public-carousel-content h1 {
        font-size: 20px;
    }

    .public-carousel-content p {
        font-size: 12px;
    }

    .public-carousel-content .public-btn {
        min-height: 33px;
        padding: 6px 9px;
        font-size: 12px;
    }

    .public-carousel-control {
        width: 27px;
        height: 27px;
        font-size: 15px;
    }
}

/* =========================================================
   NOTICIAS
========================================================= */

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.noticia-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   IMAGEN
========================================================= */

.noticia-image {
    width: 100%;
    height: 230px;
    overflow: hidden;
    background: #f3f4f6;
}

.noticia-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   CONTENIDO
========================================================= */

.noticia-content {
    padding: 20px 24px 24px;
}

.noticia-date {
    margin-bottom: 12px;
    font-size: 14px;
    color: #64748b;
}

.noticia-content h2 {
    margin: 0 0 14px;
    font-size: 23px;
    line-height: 1.25;
}

.noticia-content p {
    margin: 0 0 20px;
    color: #64748b;
    line-height: 1.6;
}

.noticia-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-decoration: none;
    color: var(--corporativo-principal);
}

.noticia-link:hover {
    text-decoration: underline;
}

/* =========================================================
   SIN IMAGEN
========================================================= */

.noticia-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

/* =========================================================
   SIN NOTICIAS
========================================================= */

.noticias-empty {
    text-align: center;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    .noticias-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 650px) {

    .noticias-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .noticia-image {
        height: 200px;
    }

}
