:root {
    --red: #e30613;
    --red-dark: #c80511;
    --black: #080a0d;
    --dark: #11151a;
    --gray-900: #1d2126;
    --gray-700: #555b62;
    --gray-500: #858b91;
    --gray-200: #e7e9eb;
    --gray-100: #f5f6f7;
    --white: #ffffff;
    --radius: 18px;
    --container: 1180px;
    --shadow: 0 10px 30px rgba(8, 10, 13, .08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", Arial, Helvetica, sans-serif;
    color: var(--black);
    background: var(--white);
    line-height: 1.5;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

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

.section {
    padding: 90px 0;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--red);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: .9rem;
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn img {
    width: 19px;
    height: 19px;
    object-fit: contain;
}

.btn-primary {
    color: var(--white);
    background: var(--red);
}

.btn-primary:hover {
    background: var(--red-dark);
}

.btn-outline {
    color: var(--black);
    border-color: var(--red);
    background: var(--white);
}

.btn-outline img {
    filter: brightness(0);
}


/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--gray-200);
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    flex: 0 0 auto;
}

.brand img {
    width: 185px;
    height: auto;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.nav-link,
.nav-dropdown-toggle {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--black);
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -13px;
    height: 3px;
    border-radius: 5px;
    background: var(--red);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.nav-dropdown-toggle img {
    width: 13px;
    height: 13px;
    filter: brightness(0);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -8px);
    transition: .2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 600;
}

.nav-dropdown-menu a:hover {
    background: var(--gray-100);
    color: var(--red);
}

.header-contact img {
    filter: brightness(0) invert(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.menu-toggle img {
    width: 24px;
    height: 24px;
    margin: auto;
    filter: brightness(0);
}


/* HERO — composición según referencia */
.hero {
    position: relative;
    background: var(--white);
    overflow: hidden;
}

.hero-grid {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    min-height: 320px;
    display: grid;
    grid-template-columns: 48% 52%;
    align-items: stretch;
    position: relative;
}

/* El texto queda limpio sobre blanco y por encima de la fotografía. */
.hero-copy {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 36px 28px max(32px, calc((100vw - 1092px) / 2));
    background: linear-gradient(
        90deg,
        #fff 0%,
        #fff 70%,
        rgba(255,255,255,.98) 82%,
        rgba(255,255,255,.72) 94%,
        rgba(255,255,255,0) 100%
    );
}

.hero-copy h1 {
    max-width: 430px;
    font-size: clamp(2.65rem, 3.25vw, 3.15rem);
    line-height: 1.01;
    letter-spacing: -.055em;
    font-weight: 800;
}

.hero-copy h1 span,
.section-heading h2 span,
.cta-copy span,
.solution-card h3 span {
    color: var(--red);
}

.hero-copy p {
    max-width: 430px;
    margin-top: 16px;
    color: var(--gray-700);
    font-size: .88rem;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

/*
 * La fotografía se desplaza hacia la izquierda bajo el texto.
 * Así aparece el ambiente/vegetación de la imagen sin crear una
 * frontera vertical entre blanco y fotografía.
 */
.hero-visual {
    position: relative;
    z-index: 1;
    width: calc(100% + 170px);
    min-height: 320px;
    margin-left: -170px;
    overflow: hidden;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        #fff 0%,
        rgba(255,255,255,.98) 7%,
        rgba(255,255,255,.88) 16%,
        rgba(255,255,255,.58) 25%,
        rgba(255,255,255,.22) 34%,
        rgba(255,255,255,0) 46%
    );
}

.hero-visual img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    object-position: center center;
}


/* PILARES
   Los cuatro pilares ya están integrados dentro de hero.webp.
   Se oculta el bloque HTML adicional para evitar duplicarlos. */
.pillars {
    display: none;
}

.pillars-grid {
    min-height: 118px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.pillar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 22px 20px;
    border-right: 1px solid rgba(255, 255, 255, .25);
}

.pillar:last-child {
    border-right: 0;
}

.pillar > img {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.pillar div {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.pillar strong {
    font-size: .85rem;
}

.pillar span {
    font-size: .76rem;
    color: #dfe2e5;
}


/* SOLUCIONES */
.solutions {
    background: var(--white);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 34px;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.solutions-heading > p {
    max-width: 440px;
    color: var(--gray-700);
    font-size: .9rem;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.solution-card {
    min-height: 390px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 18px 24px;
    border: 1px solid var(--gray-200);
    border-radius: 15px;
    background: var(--white);
    text-align: center;
    box-shadow: 0 5px 18px rgba(8, 10, 13, .035);
    transition: transform .2s ease, box-shadow .2s ease;
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.solution-visual {
    width: 100%;
    min-height: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.solution-icon {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

.solution-character {
    width: 125px;
    height: 125px;
    object-fit: contain;
}

/* Ajuste visual exclusivo de SamyDrive:
   el personaje tiene más espacio transparente en su recurso,
   por eso necesita un ligero aumento para igualar el peso visual. */
.solution-card-active .solution-character {
    transform: scale(1.22);
}

.solution-card h3 {
    margin-top: 7px;
    font-size: 1.45rem;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.solution-card p {
    margin-top: 10px;
    color: var(--gray-700);
    font-size: .78rem;
    line-height: 1.55;
}

.solution-link,
.coming-soon {
    margin-top: auto;
    padding-top: 20px;
    font-size: .78rem;
    font-weight: 700;
}

.solution-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--red);
}

.solution-link img {
    width: 16px;
    height: 16px;
    filter: invert(18%) sepia(98%) saturate(4685%) hue-rotate(347deg) brightness(87%);
}

.coming-soon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--gray-700);
}

.coming-soon img {
    width: 15px;
    height: 15px;
    filter: brightness(0);
}


/* NOSOTROS */
.about {
    background: var(--gray-100);
}

.centered {
    display: block;
    max-width: 760px;
    margin-inline: auto;
    text-align: center;
}

.centered p {
    max-width: 700px;
    margin: 16px auto 0;
    color: var(--gray-700);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.about-card {
    position: relative;
    padding: 32px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 5px 18px rgba(8, 10, 13, .045);
}

.about-number {
    display: block;
    margin-bottom: 16px;
    color: var(--red);
    font-size: .78rem;
    font-weight: 800;
}

.about-card h3 {
    margin-bottom: 14px;
    font-size: 1.3rem;
}

.about-card p {
    margin-top: 10px;
    color: var(--gray-700);
    font-size: .86rem;
}


/* CTA */
.cta {
    background: var(--white);
    overflow: hidden;
}

.cta-inner {
    min-height: 180px;
    position: relative;
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 30px;
}

.cta-character {
    align-self: end;
    height: 180px;
    overflow: hidden;
}

.cta-character img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    object-position: center bottom;
}

.cta-copy h2 {
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    line-height: 1.05;
    letter-spacing: -.03em;
}

.cta-copy p {
    margin-top: 4px;
    font-size: 1.15rem;
    font-weight: 700;
}

.cta-button {
    min-width: 145px;
}

.cta-button img {
    filter: brightness(0) invert(1);
}


/* FOOTER */
.site-footer {
    padding: 55px 0 20px;
    background: var(--dark);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1.4fr;
    gap: 50px;
    padding-bottom: 38px;
}

.footer-brand img {
    width: 190px;
    max-height: 90px;
    object-fit: contain;
    object-position: left center;
}

.footer-brand p {
    max-width: 320px;
    margin-top: 18px;
    color: #c5c9cd;
    font-size: .82rem;
}

.socials {
    display: flex;
    gap: 9px;
    margin-top: 20px;
}

.socials a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #454a50;
    border-radius: 50%;
}

.socials img {
    width: 17px;
    height: 17px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column h3 {
    margin-bottom: 8px;
    font-size: .9rem;
}

.footer-column a,
.footer-column span {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #c5c9cd;
    font-size: .8rem;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-contact img {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid #30353a;
    color: #9da3a9;
    font-size: .72rem;
}

.footer-bottom > div {
    display: flex;
    gap: 10px;
}

.footer-bottom a:hover {
    color: var(--white);
}


/* RESPONSIVE */
@media (max-width: 1050px) {
    .main-nav {
        gap: 20px;
    }

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

    .solution-card {
        min-height: 350px;
    }

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

    .about-card {
        padding: 26px;
    }
}

@media (max-width: 820px) {
    /* Ajuste exclusivo móvil: reduce el espacio entre el Hero y Soluciones. */
    .solutions.section {
        padding-top: 24px;
    }

    .container {
        width: min(calc(100% - 32px), var(--container));
    }

    .header-inner {
        min-height: 70px;
    }

    .brand img {
        width: 160px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 16px;
        right: 16px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border: 1px solid var(--gray-200);
        border-radius: 14px;
        background: var(--white);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: .2s ease;
    }

    .main-nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link,
    .nav-dropdown-toggle {
        width: 100%;
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 12px;
        text-align: left;
    }

    .nav-link.active::after {
        display: none;
    }

    .nav-dropdown-menu {
        position: static;
        min-width: 0;
        padding: 0 0 5px 12px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
        transform: none !important;
    }

    .header-contact {
        margin-top: 8px;
    }

    .hero-grid {
        width: 100%;
        margin-left: 0;
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .hero-copy {
        width: 100%;
        padding: 48px 16px 34px;
        background: var(--white);
    }

    .hero-visual {
        width: calc(100% + 32px);
        margin-left: -16px;
        height: auto !important;
        min-height: 0 !important;
        overflow: hidden;
    }

    .hero-visual::before {
        display: none;
    }

    .hero-visual img {
        display: block;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: auto !important;
        object-fit: initial !important;
        object-position: center center;
    }

    .section {
        padding: 70px 0;
    }

    .section-heading {
        display: block;
    }

    .solutions-heading > p {
        margin-top: 15px;
    }

    .cta-inner {
        grid-template-columns: 140px 1fr;
        gap: 20px;
        padding: 20px 0;
    }

    .cta-character {
        width: 140px;
        height: 150px;
    }

    .cta-character img {
        width: 150px;
        height: 150px;
    }

    .cta-button {
        grid-column: 2;
        justify-self: start;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(calc(100% - 24px), var(--container));
    }

    .brand img {
        width: 145px;
    }

    .hero-copy h1 {
        width: 100%;
        max-width: 100%;
        font-size: clamp(2.35rem, 12vw, 3.3rem);
    }

    .hero-copy p {
        font-size: .92rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

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

    .solution-card {
        min-height: 340px;
    }

    .solution-visual {
        min-height: 115px;
    }

    .solution-character {
        width: 115px;
        height: 115px;
    }

    .solution-icon {
        width: 48px;
        height: 48px;
    }

    .about-grid {
        gap: 14px;
    }

    .about-card {
        padding: 24px 20px;
    }

    .cta-inner {
        grid-template-columns: 105px 1fr;
        gap: 12px;
    }

    .cta-character {
        width: 105px;
        height: 130px;
    }

    .cta-character img {
        width: 125px;
        height: 125px;
    }

    .cta-copy h2 {
        font-size: 1.35rem;
    }

    .cta-copy p {
        font-size: .95rem;
    }

    .cta-button {
        grid-column: 1 / -1;
        justify-self: stretch;
        width: 100%;
    }

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

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom > div {
        flex-wrap: wrap;
    }
}


/* SAMY MOBILE FINAL ALIGNMENT — 2026-08-09 */
@media (max-width: 560px) {
    .hero-copy {
        margin-inline: 0;
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-copy h1,
    .hero-copy p,
    .hero-actions {
        margin-left: 0;
        margin-right: 0;
    }

    /* Hero móvil a sangre: elimina únicamente el margen lateral derecho de la imagen. */
    .hero-visual {
        width: calc(100% + 24px);
        margin-left: 0;
        overflow: hidden;
    }

    .hero-visual img {
        width: 100%;
        max-width: none;
        object-position: 55% center;
    }
}
