@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Lato:wght@300;400;700;900&display=swap');

:root {

    /* Paleta */
    --azul-oscuro: #1B3C53;
    --azul: #456882;
    --beige: #D2C1B6;
    --beige-claro: #F9F3EF;
    --text: #456882;
    --white: #fff;

    /* Layout */
    --container: 1100px;
    --radius: 12px;
    --shadow: 0 1px 0 rgba(27, 60, 83, .03);
}

html {
    scroll-behavior: smooth
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--white);
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1 {
    font-family: "Bebas Neue", sans-serif;
    color: var(--beige-claro);
}

h2 {
    font-family: "Bebas Neue", sans-serif;
    color: var(--azul-oscuro);
}

h3,
h4,
p,
li,
button,
label,
input,
textarea,
a {
    font-family: "Lato", system-ui, sans-serif;
}

h3 {
    color: var(--azul-oscuro);
}

h4 {
    color: var(--azul);
}

p {
    color: var(--text);
}

/*HOME*/
/* Componente NavBar*/
.navbar {
    background-color: var(--azul-oscuro);
    min-height: 64px;
}

.navbar-brand {
    letter-spacing: 0.5px;
    color: var(--beige-claro);
}

.navbar-brand img {
    height: clamp(62px, 8vw, 82px);
    width: auto;
}

.navbar-nav .nav-link {
    color: var(--beige-claro);
    transition: color 0.2s ease, border-bottom 0.2s ease;
    text-decoration: none;
    border-bottom: none;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--white) !important;
    text-decoration: underline;
    text-underline-offset: 12px;
    text-decoration-thickness: 2px;
}

.navbar-nav .nav-link.active {
    color: var(--white) !important;
    text-decoration: none;
    font-weight: 600;
}

.navbar-toggler {
    border-color: var(--beige-claro);
}

.navbar-toggler-icon {
    filter: brightness(1.8);
}

/*heroes carousel*/
.hero-carousel {
    position: relative;
    max-width: 100%;
}

.hero-carousel .carousel-item {
    height: clamp(320px, 60vh, 680px);
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(0.58);
}

.hero-caption {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 16px;
    color: var(--beige-claro);
    text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.hero-caption h1 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--beige-claro);
    letter-spacing: .5px;
    font-weight: 700;
}

.hero-caption h2 {
    margin: 6px 0 0;
    color: var(--beige-claro);
    font-size: clamp(1.25rem, 2.4vw, 1.5rem);
    opacity: .95;
}

.hero-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--beige-claro);
    opacity: .6;
}

.hero-carousel .carousel-indicators .active {
    opacity: 1;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4));
}

/*Auspiciantes*/
.auspiciadores {
    max-width: var(--container, 1100px);
    margin: 0 auto 28px;
    padding: 28px 16px;
    text-align: center;
    background: none;
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow, 0 1px 0 rgba(27, 60, 83, .03));
}

.auspiciadores h2 {
    margin: 0 0 10px;
    color: var(--azul-oscuro, #1B3C53);
}

.auspiciadores h3 {
    margin: 18px 0 12px;
    color: var(--azul, #456882);
    font-size: 1.05rem;
}

.auspiciadores .logos-grid {
    gap: clamp(16px, 2.5vw, 28px);
    margin-bottom: clamp(12px, 2vw, 24px);
}

.auspiciadores .logos-grid img {
    padding: clamp(10px, 1.2vw, 16px);
}

.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 150px));
    justify-content: center;
    gap: 12px;
}

.logos-grid--destacados {
    grid-template-columns: repeat(auto-fit, minmax(140px, 170px));
}

.logos-grid img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
    transition: transform .12s ease, box-shadow .12s ease;
}

.logos-grid img:hover,
.logos-grid img:focus-visible {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    border-color: var(--azul);
    filter: saturate(1.05);
    outline: none;
}

.resumen {
    background: none;
    padding: 28px 16px;
    max-width: var(--container, 1100px);
    margin: 0 auto 28px;
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow, 0 1px 0 rgba(27, 60, 83, .03));
}

.resumen h2 {
    margin: 0 0 14px;
    color: var(--azul-oscuro, #1B3C53);
}

.resumen__intro {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: clamp(14px, 3vw, 28px);
    align-items: center;
    margin-bottom: clamp(16px, 3vw, 28px);
}

.resumen__intro p {
    margin: 0;
    color: var(--text, #456882);
}

.resumen__media {
    margin: 0;
}

.resumen__media img {
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    max-height: 300px;
    margin: 0 auto;
}

.resumen__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(14px, 2.4vw, 22px);
    justify-items: stretch;
    align-items: start;
}

.resumen__card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.resumen__card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
    border-color: rgba(0, 0, 0, .10);
}

.resumen__card h3,
.resumen__card h4 {
    margin: 0 0 6px;
    color: var(--azul, #456882);
    font-size: 1.05rem;
}

.resumen__card p {
    margin: 0;
    color: var(--text, #456882);
    line-height: 1.55;
}

.resumen__why {
    margin-top: clamp(16px, 3vw, 28px);
}

.resumen__why>h3 {
    margin: 0 0 10px;
    color: var(--azul-oscuro, #1B3C53);
    font-size: 1.15rem;
}

/*------HOME------*/


/* Secciones comunes */
.presentacion,
.auspiciadores,
.falkor {
    padding: 28px 16px;
    max-width: var(--container);
    margin: 0 auto 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: none;
}

/* FOOTER */
.footer {
    font-family: "Lato", sans-serif;
    background: var(--azul-oscuro);
    color: var(--beige-claro);
    width: 100%;
    border-top: 1px solid rgba(249, 243, 239, .10);
}

.footer p {
    color: var(--beige-claro);
}

.footer-contenedor {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px 16px;
    display: grid;
    grid-template-columns: auto auto;
    gap: 16px;
    align-items: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--beige-claro);
    width: 50%;
}

.footer-brand img {
    height: clamp(42px, 5vw, 54px);
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}

.footer-brand span {
    font-weight: 700;
    letter-spacing: .4px;
}

.footer-redes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-redes a {
    color: var(--beige-claro);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: transform .12s ease, opacity .2s ease, border-color .2s ease;
}

.footer-redes a:hover,
.footer-redes a:focus-visible {
    transform: translateY(-1px);
    border-color: var(--beige-claro);
    opacity: .95;
    outline: none;
}

.footer-bottom {
    border-top: 1px solid rgba(249, 243, 239, .15);
    padding: 10px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container);
    margin: 0 auto;
    opacity: .9;
    font-size: .95rem;
}

.to-top {
    color: var(--beige-claro);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    text-underline-offset: 10px;
    transition: border-color .2s ease, opacity .2s ease, transform .12s ease;
}

.to-top:hover,
.to-top:focus-visible {
    border-color: var(--beige-claro);
    opacity: .95;
    transform: translateY(-1px);
    outline: none;
}


/* TRANSMISIONES */
/* componente Card */
.card-media {
    border: 1.5px solid var(--beige);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    background: #fff;
}

.card-media .card-title {
    color: var(--azul-oscuro);
    font-weight: 700;
}

.card-media .btn-outline-primary {
    --bs-btn-color: var(--azul);
    --bs-btn-border-color: var(--azul);
    --bs-btn-hover-bg: var(--azul);
    --bs-btn-hover-border-color: var(--azul);
    --bs-btn-active-bg: var(--azul);
    --bs-btn-active-border-color: var(--azul);
    color: var(--azul);
    border-color: var(--azul);
}

.card,
.card-media {
    transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover,
.card:focus-within,
.card-media:hover,
.card-media:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    border-color: rgba(0, 0, 0, .10);
}

#youtube h2,
#tweets h2,
#clips h2,
#podcasts h2,
#galeria h2 {
    margin: 0 0 8px;
}

/* sacar márgenes grandes por defecto del blockquote y centrar cada tarjeta */
#tweets .twitter-tweet {
    margin: 0 auto !important;
    /* centra dentro de su columna */
    max-width: 100% !important;
    /* no exceder columna */
}

/*  galeria multimedia  */
#galeria {
    padding-inline: 16px;
}

#galeria h2 {
    margin: 0 0 8px;
    color: var(--azul-oscuro);
}

.gal-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: var(--shadow);
    text-decoration: none;
    isolation: isolate;
    transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
    will-change: transform;
    animation: gal-fade-in .35s ease both;
}

.gal-card .gal-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f7f7f7;
}

.gal-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform .35s ease, filter .35s ease;
}

.gal-card:hover,
.gal-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    border-color: rgba(0, 0, 0, .10);
    outline: none;
}

.gal-card:hover img,
.gal-card:focus-visible img {
    transform: scale(1.06);
    filter: contrast(1.04) saturate(1.02);
}

/* Animación de aparición sutil */
@keyframes gal-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respeto por usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {

    .gal-card,
    .gal-card img,
    .gal-card .gal-overlay {
        transition: none !important;
        animation: none !important;
    }
}

/*------TRANSMISIONES------*/


/*  CONTACTO */
.contacto {
    text-align: center;
    padding: 4rem 1rem;
}

.contacto h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.formulario-contacto {
    background: #ffffff;
    color: #222;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.formulario-contacto label {
    display: block;
    margin-top: 1rem;
    font-weight: 500;
}

.formulario-contacto input,
.formulario-contacto textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: "Lato", sans-serif;
    font-size: 1rem;
    color: var(--azul);
    padding: 12px 14px;
    border: 1.5px solid var(--beige);
    border-radius: 10px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.formulario-contacto textarea {
    min-height: 140px;
    max-height: 200px;
    resize: vertical;
}

.formulario-contacto input::placeholder,
.formulario-contacto textarea::placeholder {
    color: var(--azul);
}

.formulario-contacto input:focus,
.formulario-contacto textarea:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(69, 104, 130, .15);
}

.formulario-contacto button {
    display: block;
    margin: 1.5rem auto 0;
    background-color: var(--azul-oscuro);
    color: var(--beige-claro);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.formulario-contacto button:hover {
    background-color: var(--azul);
}

.redes-sociales {
    text-align: center;
    padding: 4rem 1rem;
    color: #fff;
}

.redes-sociales h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.redes-sociales ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0;
}

.redes-sociales li img {
    width: 60px;
    height: 60px;
    transition: transform 0.3s, filter 0.3s;
}

.redes-sociales li img:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/*-------CONTACTO--------*/


/* EXPEDICION */
.expedicion {
    padding: 28px 16px;
    max-width: var(--container);
    margin: 0 auto;
}

.expedicion h2 {
    font-family: "Bebas Neue", sans-serif;
    font-weight: 700;
    color: var(--azul-oscuro);
    margin: 0 0 8px;
}

.expedicion p {
    font-family: "Lato", sans-serif;
    color: var(--azul-oscuro);
    margin: 0;
}

.team {
    padding: 28px 16px;
    background: var(--beige-claro);
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    align-items: start;
}

/* titulos ocupan todo el ancho del grid */
.team h2,
.team h3,
.team>h4 {
    grid-column: 1 / -1;
}

.team h2 {
    color: var(--azul-oscuro);
    margin: 0 0 8px;
    font-weight: 750;
}

.team h3 {
    color: var(--azul-oscuro);
    font-weight: 650;
    margin: 8px 0 6px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--beige);
}

.team>h4 {
    color: var(--azul-oscuro);
    margin: 4px 0 0;
}

.team article:hover,
.team article:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .06), 0 0 0 3px rgba(69, 104, 130, .08);
    border-color: var(--azul);
}

/* tarjetas de los cientificos */
.team article {
    background: #fff;
    border: 1.5px solid var(--beige);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    transition: transform .1s ease, box-shadow .2s ease, border-color .2s ease;
}

/* nombres dentro del article */
.team article h4 {
    color: var(--azul-oscuro);
    margin: 0 0 4px;
}

.team article p {
    font-family: "Lato", sans-serif;
    color: var(--azul);
    margin: 0;
}

/* Falkor */
.falkor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: clamp(14px, 2.2vw, 22px);
    margin-top: clamp(12px, 2vw, 18px);
}

.falkor h2 {
    margin: 0 0 8px;
    font-weight: 600;
    color: var(--azul-oscuro);
}

.falkor-grid article {
    padding-left: 12px;
    border-left: 3px solid var(--beige);
}

.falkor-grid h3 {
    margin: 0 0 6px;
    color: var(--azul-oscuro);
    font-weight: 700;
    letter-spacing: .2px;
}

.falkor-grid p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.falkor img {
    display: block;
    margin: 0 auto 12px;
}

/* ROV */
.tecnologia {
    position: relative;
    padding: 80px 20px;
    color: #fff;
    text-align: center;
    overflow: hidden;
    z-index: 0;
}

.tecnologia::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.65)),
        url("../medios/ROV.jpg") center/cover no-repeat;
    z-index: -1;
    filter: brightness(0.95);
}

.tecnologia>h2 {
    margin-bottom: 2.5rem;
    font-weight: 800;
    color: var(--beige-claro);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.tecnologia .tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.tecnologia article {
    background: none;
    padding: 0;
    text-align: left;
}

.tecnologia h3 {
    color: var(--beige-claro);
    font-weight: 700;
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.tecnologia p {
    color: #f5f5f5;
    line-height: 1.6;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* area de investigación  */
.area-investigacion {
    max-width: var(--container);
    margin: 0 auto 28px;
    padding: clamp(22px, 3vw, 28px) 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.area-investigacion h2 {
    margin: 0 0 10px;
    font-weight: 600;
    color: var(--azul-oscuro);
}

.area-investigacion p {
    margin: 0 0 16px;
    color: var(--text);
    line-height: 1.6;
}

.area-investigacion .btn-earth {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-weight: 700;
    color: var(--azul-oscuro);
    border: 1.5px solid var(--beige);
    border-radius: 999px;
    background: #fff;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}

.area-investigacion .btn-earth:hover,
.area-investigacion .btn-earth:focus-visible {
    transform: translateY(-2px);
    border-color: var(--azul);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    background: rgba(255, 255, 255, .95);
    outline: none;
}

/* modelo tridimensional */
.modelo-tridimensional {
    max-width: var(--container);
    margin: 0 auto 28px;
    padding: clamp(22px, 3vw, 28px) 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: none;
    border: 1px solid rgba(0, 0, 0, .06);
}

.modelo-tridimensional h2 {
    margin: 0 0 12px;
    font-weight: 600;
    color: var(--azul-oscuro);
}

/* Wrapper para que el iframe sea 100% responsive con proporción 16:9 */
.modelo-tridimensional .viewer {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.modelo-tridimensional .viewer::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.modelo-tridimensional .viewer iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .area-investigacion .btn-earth {
        transition: none;
    }
}

/*-----EXPEDICION-------*/


/*------ MEDIA QUERIES -----------*/
/* ≤992px  */
@media (max-width: 992px) {
    .hero-carousel .carousel-item {
        height: clamp(300px, 50vh, 560px);
    }

    .hero-caption {
        padding: 12px;
    }

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

    .resumen__media img {
        max-height: 260px;
    }

    .footer-contenedor {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-brand {
        width: 100%;
    }

    .footer-redes {
        justify-content: flex-start;
    }

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

    .tecnologia .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* ≤768px */
@media (max-width: 768px) {

    /*  afino clickeabilidad */
    .navbar {
        min-height: 58px;
    }

    .navbar-brand img {
        height: clamp(54px, 9vw, 70px);
    }

    /* texto respira un poco menos */
    .hero-caption h1 {
        letter-spacing: .2px;
    }

    .hero-caption h2 {
        opacity: .95;
    }

    .resumen__card {
        padding: 12px 14px;
    }

    .auspiciadores .logos-grid {
        gap: 10px;
    }

    .logos-grid img {
        padding: 8px;
    }

    .team article:hover,
    .team article:focus-within {
        transform: translateY(-2px);
    }

    .gal-card .gal-media {
        aspect-ratio: 16 / 9;
    }
}

/* ≤576px */
@media (max-width: 576px) {

    /* más bajo */
    .hero-carousel .carousel-item {
        height: clamp(260px, 45vh, 420px);
    }

    /* indicadores más chicos o escondidos si molestan */
    .hero-carousel .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }

    /* bajar un toque densidad en el texto */
    .resumen__card h3,
    .resumen__card h4 {
        font-size: 1rem;
    }

    .resumen__card p,
    .falkor-grid p {
        line-height: 1.5;
    }

    .tecnologia .tech-grid {
        grid-template-columns: 1fr;
    }

    .btn-earth {
        padding: 10px 14px;
        font-size: 0.95rem;
        display: inline-block;

    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}