@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --azul-principal: #004171;
    --azul-secundario1: #0d5575;
    --azul-secundario2: #297ba2;
    --azul-secundario3: #389eb0;
    --color-destacado: #FF9154;
    --gris-fondo: #f9f9f9;
    --gris-borde: #e5e5e5;
    --texto: #222222;
}

/* =========================
   HERO HOME
========================= */
.hero-home {
    width: 100%;
    overflow: hidden;
}

.hero-swiper,
.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide {
    min-height: 70vh;
    height: auto;
}

.hero-slide {
    width: 100%;
    height: 100%;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-image img {
    width: 95%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    box-shadow:
        0 10px 25px rgba(0,0,0,.15),
        0 30px 60px rgba(0,0,0,.12);
    transform: scale(.95);
    transition: all .8s ease;
}

.swiper-slide-active .hero-image img {
    transform: scale(1);
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    background: linear-gradient(
        135deg,
        var(--azul-principal),
        var(--azul-secundario1)
    );
    color: #fff;
}

.hero-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    margin-top: 1rem;
    border-radius: 999px;
    background: var(--azul-secundario3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: .9;
}

.hero-description {
    line-height: 1.7;
    opacity: .85;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    align-self: flex-start;
    margin-top: 2rem;
    padding: 1rem 2rem;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    backdrop-filter: blur(10px);
    transition: all .3s ease;
}

.hero-btn:hover {
    background: #fff;
    color: var(--azul-principal);
    transform: translateY(-3px);
}

.hero-image,
.hero-text {
    opacity: 0;
    transition:
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 1.2s ease;
}

.hero-image {
    transform: translateX(-80px);
}

.swiper-slide-active .hero-image,
.swiper-slide-active .hero-text {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================
   EQUIPO DE TRABAJO
========================== */
.equipo-trabajo{
    padding:6rem 0;
    background:var(--gris-fondo);
}

.section-title{
    text-align:center;
    font-size:clamp(2rem,4vw,3rem);
    color:var(--azul-principal);
    margin-top: 3rem;
}

.section-title-home{
    text-align:center;
    font-size:clamp(2rem,4vw,3rem);
    color:var(--azul-principal);
    margin-top: 3rem;
    margin-bottom: 5rem;
}

.section-title::after{
    content:'';
    display:block;
    width:80px;
    height:4px;
    margin:1rem auto 0;
    border-radius:999px;
    background:var(--azul-secundario3);
}

.equipo-trabajo{
    padding:6rem 0;
    background:var(--gris-fondo);
}

.equipo-introduccion{
    margin-top: 1rem;
    margin-bottom: 4rem;
    padding: 1rem;
    background: #fff;
    border-left: 5px;
    border-radius: 0 16px 16px 0;
    box-shadow:
        0 8px 20px rgba(0,0,0,.05);
    color: #555;
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
}

.equipo-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:3rem 2rem;
}

.equipo-card{
    position:relative;
    background:#fff;
    border-radius:24px;
    padding:4.5rem 2rem 2rem;
    text-align:center;
    box-shadow:
        0 15px 40px rgba(0,0,0,.08);
    transition:.35s ease;
}

.equipo-card:hover{
    transform:translateY(-8px);
}

.equipo-foto-wrapper{
    position:absolute;
    left:50%;
    top:-60px;
    transform:translateX(-50%);
}

.equipo-foto{
    width:120px;
    height:120px;
    border-radius:50%;
    overflow:hidden;
    border:5px solid #fff;
    box-shadow:
        0 10px 25px rgba(0,0,0,.15);
}

.equipo-foto img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.equipo-nombre{
    margin:1rem 0 .5rem;
    color:var(--azul-principal);
    font-size:1.4rem;
    font-weight:700;
}

.equipo-cargo{
    color:var(--texto);
    font-weight:700;
    margin-bottom:1rem;
}

.equipo-descripcion{
    color:#555;
    line-height:1.7;
    margin-bottom:1.5rem;
}

.equipo-contacto{
    display:flex;
    flex-direction:column;
    gap:.75rem;
    padding-top:1rem;
    border-top:1px solid #e5e5e5;
}

.equipo-email,
.equipo-telefono{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:.75rem;
    color:var(--texto);
    font-size:.9rem;
}

.equipo-email i,
.equipo-telefono i{
    color:var(--azul-principal);
}

.equipo-introduccion-home {
    margin: 2rem auto 4rem;
    color: #555;
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: center;
}

/* ==========================
   ACCESOS HOME
========================== */
.accesos-home {
    padding: 6rem 0;
    background: linear-gradient(
        135deg,
        var(--azul-principal),
        var(--azul-secundario1)
    );
}

.accesos-home .section-title {
    color: #fff;
    text-align: center;
    margin-bottom: 4rem;
}

.accesos-home .section-title::after {
    background: var(--azul-secundario3);
}

.accesos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.acceso-card {
    background: #fff;
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    opacity: 0;
    transform: translateX(60px);
    transition:
        transform .6s ease,
        opacity .6s ease,
        box-shadow .3s ease;
}

.acceso-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0,0,0,.18);
}

.acceso-icono {
    width: 72px;
    height: 72px;
    margin-bottom: 1.5rem;
}

.acceso-icono img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.acceso-card h3 {
    margin: 0 0 1rem;
    color: var(--azul-principal);
    font-size: 1.4rem;
    line-height: 1.3;
}

.acceso-descripcion {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.acceso-descripcion p {
    margin: 0 0 1rem;
}

.acceso-link {
    margin-top: 2rem;
    align-self: flex-start;
    padding: .8rem 1.25rem;
    border-radius: 999px;
    background: var(--azul-principal);
    color: #fff;
    font-weight: 600;
    transition: .3s ease;
}

.acceso-card:hover .acceso-link {
    background: var(--color-destacado);
}

.acceso-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.accesos-home a,
.accesos-home a * {
    text-decoration: none;
}

/* ==========================
    BOLETINES HOME
========================== */
.noticias-home {
    padding: 6rem 0;
    background: var(--gris-fondo);
}

.noticias-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4rem;
    position: relative;
    margin-top: 4rem;
}

.noticias-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: var(--azul-principal);
    text-align: center;
}

.noticias-link {
    margin-left: auto;
    color: var(--azul-principal);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: .3s ease;
}

.noticias-link:hover {
    color: var(--color-destacado);
    transform: translateX(4px);
}

.noticias-home .noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.noticia-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: all .3s ease;
}

.noticia-card a:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0,0,0,.15);
}

.noticia-img {
    width: 100%;
    height: 180px;
    background: #f0f0f0;
}

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

.noticia-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.noticia-title {
    font-size: 1.1rem;
    color: var(--azul-principal);
    margin-bottom: .75rem;
    line-height: 1.3;
    min-height: 2.6em;
}

.noticia-excerpt {
    color: #555;
    line-height: 1.6;
    flex: 1;
    min-height: 4.5em;
}

.noticia-date {
    margin: 10px 0;
    font-size: 14px;
    font-weight: 500;
    color: #777;
}

.boletin-suscripcion {
    margin-top: 45px;
    padding: 35px 30px;
    text-align: center;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.boletin-suscripcion-contenido {
    max-width: 1200px;
    margin: 0 auto;
}

.boletin-suscripcion h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #1e293b;
}

.boletin-suscripcion p {
    margin: 0 0 25px;
    color: #64748b;
    line-height: 1.6;
}

.boletin-suscripcion-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--azul-secundario2);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.boletin-suscripcion-boton:hover {
    background: var(--azul-secundario3);
    color: #fff;
    transform: translateY(-2px);
}

/* =========================
   MOBILE
========================= */
@media (max-width: 992px) {
    .noticias-home .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-swiper,
    .hero-swiper .swiper-wrapper,
    .hero-swiper .swiper-slide {
        height: auto;
    }

    .hero-layout {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: 1;
        padding: 2rem 2rem 0;
    }

    .hero-image img {
        width: 100%;
        max-width: 700px;
    }

    .hero-text {
        order: 2;
        padding: 2rem;
        text-align: center;
    }

    .hero-title::after {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-btn {
        align-self: center;
    }
    .section-title {
        margin-top: 0;
    }
}

@media(max-width:768px){
    .equipo-trabajo{
        padding:4rem 0;
    }

    .equipo-grid{
        gap:4rem;
    }

    .equipo-card{
        padding:
            4rem
            1.5rem
            1.5rem;
    }

    .equipo-foto{
        width:100px;
        height:100px;
    }

    .equipo-foto-wrapper{
        top:-50px;
    }

    .equipo-nombre{
        font-size:1.25rem;
    }

    .equipo-cargo{
        font-size:.9rem;
    }

    .equipo-descripcion{
        font-size:.95rem;
        line-height:1.6;
    }

    .equipo-email,
    .equipo-telefono{
        font-size:.85rem;
        word-break:break-word;
    }

    .accesos-home {
        padding: 4rem 0;
    }

    .accesos-grid {
        gap: 1.5rem;
    }

    .acceso-card {
        min-height: auto;
    }

    .acceso-card h3 {
        font-size: 1.2rem;
    }
    .accesos-grid {
        grid-template-columns: 1fr;
    }

    .acceso-card {
        transform: none;
        opacity: 1;
    }
    .noticia-img {
        height: 160px;
    }
    .section-title {
        margin-top: 0;
    }
}

@media (max-width: 576px) {
    .hero-image {
        padding: 1rem;
    }

    .hero-text {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: .95rem;
        line-height: 1.6;
    }

    .hero-btn {
        width: 100%;
        max-width: 280px;
    }
    .noticias-home .noticias-grid {
        grid-template-columns: 1fr;
    }

    .noticias-title {
        position: static;
        transform: none;
        text-align: center;
        margin-bottom: 1rem;
    }

    .noticias-header {
        flex-direction: column;
        gap: 1rem;
    }

    .noticias-link {
        margin-left: 0;
    }
    .section-title {
        margin-top: 1rem;
    }
}

@media (max-width: 480px){
    .equipo-card{
        border-radius:20px;
        padding:
            3.8rem
            1.25rem
            1.25rem;
    }

    .equipo-foto{
        width:90px;
        height:90px;
    }

    .equipo-nombre{
        font-size:1.15rem;
    }

    .equipo-email,
    .equipo-telefono{
        font-size:.8rem;
    }
}