:root {
    --verde-oscuro: #034753;
    --verde: #03796D;
    --verde-claro: #18C598;
    --coral: #E37178;
    --coral-oscuro: #97373F;
    --texto: #202424;
    --blanco: #fff;
    --max-width: 1160px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--texto);
    background: #fff;
    line-height: 1.35;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(100% - 48px, var(--max-width));
    margin: 0 auto;
}

/* ================= NAVBAR ================= */

header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 28px;
    transition: justify-content 0.3s ease;
}

header.scrolled .navbar {
    justify-content: space-between;
}

.nav-logo {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease, width 0.3s ease;
}

header.scrolled .nav-logo {
    opacity: 1;
    visibility: visible;
    width: 120px; 
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 16px;
}

.nav-links a {
    position: relative;
    padding: 8px 0;
    transition: font-weight 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    font-weight: 700;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1px;
    height: 3px;
    background: var(--verde-claro);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-cta {
    background: var(--coral);
    color: white;
    padding: 7px 24px !important;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 700;
}

.nav-cta::after {
    display: none !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background: var(--verde-oscuro);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animación del botón a icono de "X" cuando está activo */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 850px) {
    .menu-toggle {
        display: flex;
    }

    .navbar {
        justify-content: space-between !important;
    }

    .nav-logo {
        opacity: 1 !important;
        visibility: visible !important;
        width: 110px !important;
    }

    .nav-links {
        position: absolute;
        top: 68px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: center;
        padding: 24px 0;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-links.active {
        max-height: 350px;
        opacity: 1;
        visibility: visible;
    }

    .nav-cta {
        margin-top: 5px;
    }
}

/* ================= HERO ================= */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: calc(480px + 68px); 
    width: calc(100% - 24px);
    margin-left: auto;
    margin-right: 0;
    padding-top: 68px; 
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: max(0px, calc((100vw - var(--max-width)) / 2));
    padding-right: 42px;
    padding-top: 40px;
    padding-bottom: 40px;
}

.logo {
    width: 145px;
    height: auto;
    object-fit: contain;
    margin-bottom: 38px;
}

.badge {
    display: inline-block;
    width: fit-content;
    background: var(--coral);
    color: white;
    border-radius: 15px 0 15px 0;
    padding: 4px 12px;
    font-size: 14px;
    margin-bottom: 8px;
}

h1 {
    color: var(--verde-oscuro);
    font-size: clamp(30px, 3.2vw, 43px);
    line-height: 1.08;
    max-width: 590px;
    margin-bottom: 24px;
}

h1 span {
    color: var(--verde-claro);
}

.hero-text {
    max-width: 575px;
    font-size: 17px;
    color: #444;
    margin-bottom: 27px;
    font-weight: 300;
}

.hero-text strong {
    color: var(--verde-oscuro);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 7px;
    border: 0;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: .92;
}

.btn-green {
    color: #fff;
    background: var(--verde);
}

.hero-image {
    min-height: 480px;
    overflow: hidden;
    border-radius: 0 0 0 46px;
    width: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    min-height: 480px;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* ================= CTA ================= */

.commercial-cta {
    margin: 27px auto 0;
    background: var(--coral);
    color: white;
    min-height: 155px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.commercial-cta h2 {
    font-size: clamp(23px, 2.4vw, 31px);
    line-height: 1.12;
    max-width: 900px;
    margin-bottom: 18px;
}

.btn-white {
    background: white;
    color: var(--coral-oscuro);
}

/* ================= MÓDULOS ================= */

.modules {
    border-top: 10px solid var(--verde-claro);
    border-bottom: 10px solid var(--verde-claro);
    padding: 62px 0 70px;
    background: #fff;
    text-align: center;
}

.modules h2 {
    color: var(--verde-claro);
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.1;
    margin-bottom: 28px;
    font-weight: 700;
}

.modules-grid {
    display: grid;
    grid-template-columns: 1fr 330px 1fr;
    align-items: center;
    gap: 35px;
    max-width: 1080px;
    margin: 0 auto;
}

.module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.module-logo {
    width: 170px;
    height: 65px;
    object-fit: contain;
    margin-bottom: 12px;
}

.module-description {
    max-width: 310px;
    color: #246879;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 300;
}

.module-main-image {
    width: 330px;
    height: 330px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.leyex-box {
    width: min(100%, 680px);
    min-height: 108px;
    margin: 28px auto 0;
    border: 2px solid var(--verde);
    border-radius: 30px 0 30px 0;
    display: grid;
    grid-template-columns: 45% 55%;
    align-items: center;
    padding: 10px 24px;
    color: #246879;
}

.leyex-logo {
    width: 220px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    justify-self: center;
}

.leyex-text {
    font-size: 17px;
    line-height: 1.22;
    padding-left: 12px;
}

/* ================= ROLES ================= */

.roles-section {
    background-color: #08796f;
    /* Imagen de fondo isologo-opacity centrada y cubriendo la sección */
    background-image: url('assets/isologo-opacity.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 70px 0 65px;
    position: relative;
    overflow: hidden;
}

.roles-header {
    text-align: center;
    margin-bottom: 45px;
    position: relative;
    z-index: 1;
}

.roles-header h2 {
    font-size: clamp(28px, 3vw, 36px);
    color: white;
    margin-bottom: 10px;
}

.roles-header p {
    color: rgba(255,255,255,.82);
    font-size: 16px;
}

.roles-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 55px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Tarjeta del director */

.director-card {
    background: white;
    color: var(--texto);
    border-radius: 18px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
}

.director-main {
    padding: 35px 30px 30px;
}

.director-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 17px;
    border-radius: 50%;
    background: var(--verde-claro);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 31px;
}

.director-card h3 {
    color: #008474;
    font-size: 20px;
    margin-bottom: 7px;
}

.director-card .director-description {
    color: #35616a;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 300;
}

.director-info {
    background: #10000f;
    color: white;
    padding: 18px 22px;
    display: grid;
    grid-template-columns: 95px 1fr;
    gap: 15px;
    align-items: center;
    text-align: left;
}

.alicia-logo-img {
    width: 100%;
    max-width: 90px;
    height: auto;
    object-fit: contain;
}

.director-info p {
    font-size: 13px;
    line-height: 1.35;
    margin: 0;
    font-weight: 300;
}

.director-info strong {
    font-size: 14px;
    font-weight: 600;
}

/* Lista de roles */

.roles-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.role-item {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 20px;
    align-items: center;
}

.role-icon {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    color: var(--verde-claro);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 29px;
    flex-shrink: 0;
}

.role-content h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 5px;
}

.role-content p {
    color: rgba(255,255,255,.82);
    font-size: 14px;
    line-height: 1.3;
    max-width: 620px;
}

.roles-note {
    text-align: center;
    margin-top: 45px;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

/* ================= VIDEO ================= */

.demo {
    padding: 34px 0 50px;
    text-align: center;
}

.demo h2 {
    color: var(--verde);
    font-size: clamp(27px, 3vw, 36px);
    margin-bottom: 22px;
}

.video-wrapper {
    width: min(100%, 800px);
    aspect-ratio: 16 / 9;
    margin: auto;
    background: #171717;
    border: 4px solid var(--verde);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    overflow: hidden;
}

.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-placeholder {
    font-size: 16px;
}

/* ================= FOOTER ================= */

.site-footer {
    background-color: #00534e;
    color: white;
    border-top: 4px solid var(--verde-claro, #08796f);
}

.footer-main {
    padding: 45px 0 35px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.2fr .75fr;
    gap: 0;
    align-items: center;
}

/* ---------- LOGO / EMPRESA ---------- */

.footer-brand {
    min-height: 110px;
    padding-right: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-brand-logo {
    width: 245px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 12px;
}

.footer-copy {
    font-size: 13px;
    color: rgba(255, 255, 255, .85);
    margin: 0;
}

/* ---------- CONTACTO ---------- */

.footer-contact {
    min-height: 110px;
    border-left: 1px solid rgba(255, 255, 255, .16);
    border-right: 1px solid rgba(255, 255, 255, .16);
    padding: 0 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.footer-contact-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .95);
    font-size: 14px;
}

.footer-contact-icon {
    color: var(--verde-claro, #08796f);
    font-size: 20px;
    line-height: 1;
    text-align: center;
}

.footer-contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.footer-contact-item a:hover {
    color: var(--verde-claro, #08796f);
}

/* ---------- REDES ---------- */

.footer-social {
    min-height: 110px;
    padding-left: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.footer-social h3 {
    color: var(--verde-claro, #08796f);
    font-size: 15px;
    margin-bottom: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, opacity .2s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: .8;
}

.social-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.social-link .material-symbols-outlined {
    font-size: 26px;
    color: white;
}

/* ---------- FRANJA LEGAL ---------- */

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 20px 20px 18px;
    text-align: center;
}

.footer-bottom p {
    max-width: 780px;
    margin: 0 auto;
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
    line-height: 1.35;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 850px) {
    .container {
        width: min(100% - 32px, 700px);
    }

    .navbar {
        justify-content: center;
        gap: 15px;
        min-height: auto;
        padding: 13px 0;
    }

    .nav-links {
        gap: 16px;
        font-size: 13px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-cta {
        padding: 6px 12px;
    }

    .hero {
        grid-template-columns: 1fr;
        width: min(100% - 32px, 700px);
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content {
        padding: 25px 0 30px;
    }

    .logo {
        margin-bottom: 25px;
        width: 125px;
    }

    h1 {
        font-size: 30px;
    }

    .hero-text {
        font-size: 15px;
    }

    .hero-image {
        min-height: 330px;
        border-radius: 0 0 35px 35px;
    }

    .hero-image img {
        min-height: 330px;
    }

    .commercial-cta {
        margin-top: 20px;
        min-height: 140px;
    }

    .commercial-cta h2 {
        font-size: 21px;
    }

    .modules {
        padding: 45px 0 55px;
    }

    .modules-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .module-main-image {
        width: 300px;
        height: 300px;
        margin: 0 auto;
        order: 2;
    }

    .module-card {
        order: 1;
    }

    .module-card:last-child {
        order: 2;
    }

    .leyex-box {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 18px;
    }

    .leyex-text {
        padding-left: 0;
        font-weight: 300;
    }

    .roles-section {
        padding: 50px 0;
    }

    .roles-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .director-card {
        max-width: 430px;
        margin: 0 auto;
    }

    .roles-list {
        max-width: 650px;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        row-gap: 30px;
    }

    .footer-brand {
        padding-right: 25px;
    }

    .footer-contact {
        padding: 0 25px;
        border-right: 0;
    }

    .footer-social {
        grid-column: 1 / -1;
        border-top: 1px solid rgba(255, 255, 255, .12);
        padding: 25px 0 0;
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 500px);
    }

    .navbar {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .nav-links {
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .hero-content {
        padding-top: 20px;
    }

    h1 {
        font-size: 28px;
    }

    .hero-image {
        min-height: 270px;
    }

    .hero-image img {
        min-height: 270px;
    }

    .commercial-cta {
        padding: 20px 15px;
    }

    .commercial-cta h2 {
        font-size: 19px;
    }

    .demo {
        padding-top: 28px;
    }

    .demo h2 {
        font-size: 19px;
    }

    .modules h2 {
        font-size: 27px;
    }

    .module-main-image {
        width: 260px;
        height: 260px;
    }

    .module-logo {
        width: 150px;
    }

    .module-description,
    .leyex-text {
        font-size: 15px;
    }

    .leyex-box {
        border-radius: 24px 0 24px 0;
    }

    .roles-layout {
        gap: 30px;
    }

    .role-item {
        grid-template-columns: 58px 1fr;
        gap: 15px;
    }

    .role-icon {
        width: 55px;
        height: 55px;
        font-size: 23px;
    }

    .role-content h3 {
        font-size: 17px;
    }

    .role-content p {
        font-size: 14px;
    }

    .director-main {
        padding: 30px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-brand {
        min-height: auto;
        padding: 0;
    }

    .footer-contact {
        min-height: auto;
        padding: 25px 0;
        border-left: 0;
        border-right: 0;
        border-top: 1px solid rgba(255, 255, 255, .12);
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }

    .footer-social {
        grid-column: auto;
        border-top: 0;
        padding: 0;
        align-items: center;
        text-align: center;
    }
}