* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fff;
    color: var(--texto);
    font-family: var(--fuente);
    line-height: 1.6;
}

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

a:focus-visible,button:focus-visible {
    outline: 3px solid #FF7900;
    outline-offset: 4px;
}

button {
    font: inherit;
    cursor: pointer;
}

.skip {
    position: absolute;
    top: -60px;
    left: 12px;
    background: #fff;
    padding: 10px;
    z-index: 30;
}

.skip:focus {
    top: 10px;
}

.hero {
    height: 100vh;
    height: 100dvh;
    min-height: 540px;
    position: relative;
    background: #210039;
    color: white;
    overflow: hidden;
}

.hero video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,rgba(33,0,57,.84),rgba(33,0,57,.25)),linear-gradient(0deg,rgba(33,0,57,.5),transparent 60%);
    pointer-events: none;
}

.topbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    padding: 24px clamp(22px,5vw,90px);
    background: rgba(33,0,57,.36);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #ffffff29;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(16px,1.6vw,23px);
    font-weight: 300;
    white-space: nowrap;
}

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

.brand i {
    color: #FF7900;
    font-style: normal;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: clamp(10px,1.5vw,26px);
}

.topbar nav a {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    transition: color .2s;
}

.topbar nav a:hover {
    color: #FF7900;
}

#menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #ffffff55;
    color: white;
    padding: 8px 14px;
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: clamp(24px,9vw,160px);
    top: 50%;
    transform: translateY(-40%);
    max-width: 790px;
    pointer-events: none;
}

.hero-content a {
    pointer-events: auto;
}

.eyebrow {
    display: block;
    color: var(--color0);
    font-size: 12px;
    letter-spacing: .2em;
    font-weight: 700;
    text-transform: uppercase;
}

.hero .eyebrow,.contact .eyebrow {
    color: #FF7900;
}

.hero h1 {
    font-size: clamp(48px,6vw,100px);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -.055em;
    margin: 22px 0;
}

.hero h1 em,.intro h2 em,.contact h2 em {
    font-style: normal;
    color: #FF7900;
}

.hero-content p {
    max-width: 600px;
    font-size: clamp(17px,1.5vw,21px);
    color: #e2eeee;
}

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

.btn {
    display: inline-block;
    padding: 14px 22px;
    border: 1px solid #ffffff80;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}

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

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

.btn.ghost:hover {
    background: #ffffff22;
}

.scroll {
    position: absolute;
    bottom: 25px;
    right: 6%;
    z-index: 2;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .2em;
}

.intro,.section,.contact {
    padding: 100px clamp(24px,8vw,150px);
}

.intro {
    max-width: 1200px;
    margin: auto;
    text-align: center;
}

.intro h2 {
    font-size: clamp(32px,4vw,58px);
    line-height: 1.16;
    letter-spacing: -.04em;
    font-weight: 300;
    margin: 18px 0;
}

.intro h2 em {
    color: var(--color0);
}

.intro p {
    color: #5b5361;
    max-width: 730px;
    margin: auto;
}

.section {
    scroll-margin-top: 30px;
}

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

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 35px;
    margin-bottom: 42px;
}

.section-head h2 {
    font-size: clamp(32px,3.5vw,50px);
    font-weight: 300;
    letter-spacing: -.04em;
    line-height: 1.15;
    margin: 12px 0 0;
}

.section-head>p {
    max-width: 340px;
    color: #665d6b;
    margin: 0;
}

.cards {
    display: grid;
    gap: 18px;
}

.cards.three {
    grid-template-columns: repeat(3,minmax(0,1fr));
}

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

.card,.product {
    border: 1px solid var(--linea);
    padding: 35px;
    background: white;
    min-width: 0;
    transition: transform .2s,border-color .2s;
}

.card:hover,.product:hover {
    transform: translateY(-4px);
    border-color: var(--color0);
}

.number {
    font-size: 13px;
    color: var(--color0);
    font-weight: 700;
}

.card h3,.product h3 {
    font-size: 25px;
    line-height: 1.25;
    font-weight: 400;
    margin: 35px 0 12px;
}

.card p,.product p {
    color: #625b68;
}

.card a {
    display: inline-block;
    margin-top: 25px;
    color: var(--color0);
    font-weight: 700;
    font-size: 13px;
}

.tag {
    font-size: 11px;
    letter-spacing: .15em;
    font-weight: 700;
    color: var(--color0);
}

.product {
    min-height: 275px;
    display: flex;
    flex-direction: column;
}

.product h3 {
    margin: 20px 0 6px;
}

.product-bottom {
    margin-top: auto;
    border-top: 1px solid var(--linea);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--color1);
}

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

.steps>div {
    border-top: 3px solid var(--color0);
    padding-top: 20px;
}

.steps b {
    font-size: 38px;
    font-weight: 300;
    color: var(--color0);
}

.steps h3 {
    font-weight: 500;
}

.steps p {
    color: #625b68;
}

.contact {
    text-align: center;
    background: #4B0082;
    color: white;
}

.contact h2 {
    font-size: clamp(35px,5vw,70px);
    font-weight: 300;
    letter-spacing: -.05em;
    margin: 18px 0;
}

.contact p {
    color: #f4e9ff;
    margin: 0 auto 30px;
    max-width: 650px;
}

footer {
    background: #210039;
    color: #f4e9ff;
    padding: 32px clamp(24px,8vw,150px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 12px;
}

footer .brand {
    color: white;
}

footer .brand img {
    width: 28px;
    height: 28px;
}

@media (max-width:1000px) {
    .topbar {
        padding: 18px 24px;
    }

    .topbar nav {
        gap: 10px;
    }

    .topbar nav a {
        font-size: 11px;
    }

    .cards.three {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width:740px) {
    #menu-toggle {
        display: block;
    }

    .topbar nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #35005d;
        flex-direction: column;
        align-items: stretch;
        padding: 20px 24px;
        gap: 18px;
    }

    .topbar nav.open {
        display: flex;
    }

    .hero-content {
        top: 54%;
        transform: translateY(-40%);
        right: 24px;
    }

    .hero h1 {
        font-size: clamp(44px,11vw,70px);
    }

    .cards.three,.cards.two,.steps {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }

    .section-head>p {
        margin-top: 18px;
    }

    .intro,.section,.contact {
        padding: 65px 22px;
    }

    .card,.product {
        padding: 25px;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }

    .scroll {
        bottom: 12px;
    }
}

@media (prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}

/* JOCARSA IU · sistema visual común (web, administración, móvil) */

:root {
    color-scheme: light;
}

body {
    font-family: var(--fuente);
}

.hero {
    background: var(--color2);
}

.topbar {
    border-bottom: 2px solid rgba(255,121,0,.65);
}

.brand i,.hero h1 em,.contact h2 em {
    color: var(--naranja);
}

.topbar nav a {
    padding: 10px 12px;
    clip-path: polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,0 100%);
}

.topbar nav a:hover,.topbar nav a:focus-visible {
    background: var(--naranja);
    color: #111;
}

.btn,#menu-toggle,.card,.product,.steps>div {
    clip-path: polygon(0 0,calc(100% - var(--chaflan)) 0,100% var(--chaflan),100% 100%,0 100%);
    border-radius: 0;
}

.btn.primary {
    background: var(--naranja);
    border-color: var(--naranja);
    color: #111;
}

.btn.primary:hover {
    background: #e76c00;
    border-color: #e76c00;
}

.btn.ghost {
    border-color: #fff;
    color: #fff;
}

.btn.ghost:hover {
    background: rgba(255,255,255,.15);
}

.eyebrow,.hero .eyebrow,.contact .eyebrow,.tag {
    color: var(--naranja);
}

.card,.product {
    border-top: 3px solid var(--color0);
    box-shadow: 0 8px 22px rgba(75,0,130,.055);
}

.card:hover,.product:hover {
    border-top-color: var(--naranja);
}

.number,.card a {
    color: var(--color0);
}

.steps>div {
    border-top-color: var(--naranja);
}

.contact {
    background: var(--color0);
}

footer {
    background: var(--color2);
}

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

@media (max-width:740px) {
    .topbar nav {
        background: var(--color1);
        border-bottom: 3px solid var(--naranja);
    }
}

/* JOCARSA: chaflán como rasgo corporativo global */

:root {
    --chaflan: 12px;
    --chaflan-grande: 22px;
}

button,.btn,input[type=submit],input[type=button],.topbar nav a,.catalog-filters button,.carousel-arrow,.quick-prompts button,.chat-head,.catalog-card,.brand-tile,.faq-list details {
    border-radius: 0 !important;
    clip-path: polygon(0 0,calc(100% - var(--chaflan)) 0,100% var(--chaflan),100% 100%,0 100%);
}

.topbar nav a {
    display: inline-flex;
    align-items: center;
    min-height: 43px;
    border: 1px solid #ffffff38;
    background: #ffffff0c;
    padding: 10px 15px;
}

.topbar nav a:hover,.topbar nav a:focus-visible {
    background: var(--naranja);
    color: #111;
    border-color: var(--naranja);
}

button {
    background: var(--color0);
    color: white;
    border: 0;
    padding: 12px 18px;
}

button:hover {
    background: var(--naranja);
    color: #111;
}

button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible {
    outline: 3px solid var(--naranja);
    outline-offset: 3px;
}

.catalog-toolbar {
    margin-bottom: 28px;
}

.catalog-toolbar label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.catalog-toolbar input,.assistant-chat input {
    padding: 15px;
    border: 1px solid #cfc7d6;
    font: inherit;
    width: 100%;
    min-width: 0;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.catalog-filters button {
    background: #fff;
    color: var(--color0);
    border: 1px solid #cfc7d6;
    font-size: 12px;
    padding: 9px 13px;
}

.catalog-filters button[aria-pressed=true],.catalog-filters button:hover {
    background: var(--color0);
    color: #fff;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
}

.catalog-card {
    background: white;
    border: 1px solid #ded7e5;
    border-top: 3px solid var(--naranja);
    padding: 23px;
    min-height: 160px;
}

.catalog-card h3 {
    font-size: 19px;
    font-weight: 500;
    line-height: 1.25;
    margin: 16px 0 10px;
}

.catalog-card p {
    font-size: 12px;
    color: #655e69;
}

.technologies {
    background: #fff;
}

.carousel-wrap {
    display: flex;
    gap: 12px;
    align-items: center;
}

.carousel-arrow {
    flex: none;
    font-size: 26px;
    min-width: 45px;
}

.brand-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    flex: 1;
    padding: 10px 0;
}

.brand-tile {
    flex: 0 0 195px;
    min-height: 100px;
    background: #f7f5f2;
    border: 1px solid #ded7e5;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 600;
    color: var(--color0);
    scroll-snap-align: start;
}

.assistant-section {
    background: #f7f5f2;
}

.assistant-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.assistant-copy,.assistant-chat {
    background: #fff;
    border: 1px solid #ded7e5;
    padding: 30px;
}

.assistant-copy h3 {
    font-size: 32px;
    font-weight: 400;
}

.quick-prompts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.quick-prompts button {
    font-size: 12px;
}

.chat-head {
    background: var(--color0);
    color: #fff;
    padding: 14px;
}

.chat-head small {
    display: block;
    opacity: .75;
}

.status-dot {
    display: inline-block;
    background: #ff7900;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 8px;
}

.chat-messages {
    min-height: 190px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 0;
}

.bubble {
    max-width: 88%;
    padding: 12px 16px;
    background: #f0ebf4;
    align-self: flex-start;
    clip-path: polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,0 100%);
}

.bubble.user {
    background: #4b0082;
    color: white;
    align-self: flex-end;
}

.assistant-chat form {
    display: flex;
    gap: 8px;
}

.assistant-chat form button {
    white-space: nowrap;
}

.assistant-chat small {
    color: #68616e;
}

.faq-list {
    max-width: 1000px;
    margin: auto;
    display: grid;
    gap: 12px;
}

.faq-list details {
    background: #f7f5f2;
    padding: 18px 24px;
    border-left: 4px solid var(--naranja);
}

.faq-list summary {
    cursor: pointer;
    font-weight: 600;
}

.faq-list p {
    color: #625b68;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

@media (max-width:1150px) {
    .catalog-grid {
        grid-template-columns: repeat(3,1fr);
    }

    .topbar nav {
        gap: 4px;
    }

    .topbar nav a {
        font-size: 11px;
        padding: 9px;
    }
}

@media (max-width:800px) {
    .catalog-grid {
        grid-template-columns: repeat(2,1fr);
    }

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

@media (max-width:540px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .assistant-chat form {
        flex-wrap: wrap;
    }

    .assistant-chat form button {
        width: 100%;
    }

    .brand-tile {
        flex-basis: 155px;
    }

    .carousel-arrow {
        min-width: 32px;
        padding: 8px;
    }

    .topbar nav a {
        width: 100%;
    }
}

/* JOCARSA IU — V3: superficies abiertas y chaflanes */

.assistant-section {
    background: linear-gradient(115deg,#f7f5f2 0%,#fff 70%);
    padding: 72px clamp(24px,8vw,150px);
    border-block: 1px solid #e5dce9;
    position: relative;
    overflow: hidden;
}

.assistant-section:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    border-top: 34px solid #4b0082;
    border-right: 34px solid transparent;
}

.assistant-inner {
    display: grid;
    grid-template-columns: minmax(230px,.75fr) minmax(0,1.6fr);
    gap: clamp(30px,5vw,95px);
    align-items: center;
}

.assistant-intro h2 {
    font-size: clamp(30px,3vw,50px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -.04em;
    margin: 15px 0;
}

.assistant-intro h2 em {
    font-style: normal;
    color: #ff7900;
}

.assistant-intro p {
    color: #645b69;
}

.assistant-workspace {
    min-width: 0;
}

.assistant-section .quick-prompts {
    margin: 0 0 18px;
}

.assistant-section .quick-prompts button {
    border: 1px solid #d9cddd;
    background: #fff;
    color: #4b0082;
    padding: 9px 14px;
}

.assistant-section .quick-prompts button:hover {
    background: #4b0082;
    color: white;
}

.assistant-section .chat-messages {
    min-height: 72px;
    max-height: 190px;
    padding: 8px 0 14px;
}

.assistant-section .bubble {
    font-size: 14px;
}

.assistant-section form {
    display: flex;
    min-height: 62px;
    background: #fff;
    border: 1px solid #cbbdd2;
    box-shadow: 0 9px 24px #4b00820d;
    clip-path: polygon(0 0,calc(100% - 18px) 0,100% 18px,100% 100%,0 100%);
}

.assistant-section form input {
    border: 0;
    flex: 1;
    min-width: 0;
    padding: 15px 20px;
    font: inherit;
    outline-offset: -3px;
}

.assistant-section form button {
    border: 0;
    background: #4b0082;
    color: white;
    padding: 0 27px;
    font-weight: 700;
}

.assistant-section form button:hover {
    background: #ff7900;
    color: #111;
}

.assistant-workspace>small {
    display: block;
    margin-top: 9px;
    color: #746b7a;
}

.brand-tile {
    flex: 0 0 150px;
    min-height: 126px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    background: white;
}

.brand-tile img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.clients-section {
    background: #faf8fb;
    display:none;
}

.client-tile {
    min-height: 116px;
}

.client-monogram {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 2px solid var(--client-color);
    color: var(--client-color);
    font-size: 20px;
    font-weight: 800;
    clip-path: polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,0 100%);
}

.case-card {
    background: #fff;
    border: 1px solid #e0d7e5;
    min-width: 0;
    clip-path: polygon(0 0,calc(100% - 20px) 0,100% 20px,100% 100%,0 100%);
}

.case-art {
    min-height: 195px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: linear-gradient(125deg,#4b0082,#7c399f);
}

.case-art span {
    align-self: start;
    background: #ff7900;
    color: #111;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
}

.case-art strong {
    font-size: 25px;
    line-height: 1.2;
    max-width: 270px;
}

.art-edu {
    background: linear-gradient(125deg,#4b0082,#1f4c86);
}

.art-sales {
    background: linear-gradient(125deg,#290044,#a64d1a);
}

.art-ai {
    background: linear-gradient(125deg,#3b0064,#1d6578);
}

.case-body {
    padding: 26px;
}

.case-body h3 {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 12px;
}

.case-body p {
    color: #655e69;
    min-height: 105px;
}

.case-link {
    background: #4b0082;
    color: #fff;
    border: 0;
    margin-top: 12px;
}

.case-link:hover {
    background: #ff7900;
    color: #111;
}

.demo-note {
    font-size: 12px;
    color: #706875;
    margin-top: 24px;
}

@media (max-width:850px) {
    .assistant-inner {
        grid-template-columns: 1fr;
    }

    .case-body p {
        min-height: 0;
    }
}

@media (max-width:740px) {
    .assistant-section {
        padding: 55px 22px;
    }

    .assistant-section form button {
        padding: 0 14px;
    }

    .brand-tile {
        flex-basis: 135px;
    }

    .case-art {
        min-height: 150px;
    }
}

/* V4 — megamenú, modalidades, testimonios y pie de navegación */

.topbar {
    overflow: visible;
    z-index: 50;
}

.mega-nav {
    display: flex;
    align-items: center;
    gap: 10px !important;
}

.nav-group {
    position: relative;
    color: white;
}

.nav-group summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 22px 12px 15px;
    border: 1px solid #ffffff55;
    background: #ffffff12;
    clip-path: polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,0 100%);
    font-size: 12px;
    letter-spacing: .09em;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group summary:after {
    content: "⌄";
    margin-left: 10px;
    color: #ff7900;
}

.nav-group[open] summary,.nav-group summary:hover {
    background: #ff7900;
    color: #210039;
}

.nav-group[open] summary:after,.nav-group summary:hover:after {
    color: #210039;
}

.nav-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 245px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    background: #2e064b;
    border-top: 3px solid #ff7900;
    box-shadow: 0 20px 35px #17002477;
    z-index: 100;
    clip-path: polygon(0 0,calc(100% - 16px) 0,100% 16px,100% 100%,0 100%);
}

.mega-nav .nav-panel a {
    display: block !important;
    width: 100%;
    font-size: 12px !important;
    letter-spacing: 0;
    text-transform: none;
    min-height: 0;
    padding: 11px 12px !important;
}

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

.modalities {
    background: #faf8fc;
}

.modality-card,.testimonial {
    margin: 0;
    background: #fff;
    border: 1px solid #e5d9ea;
    padding: 28px;
    clip-path: polygon(0 0,calc(100% - 22px) 0,100% 22px,100% 100%,0 100%);
}

.modality-card {
    border-top: 3px solid #ff7900;
}

.modality-card h3 {
    font-size: 22px;
    margin: 14px 0;
}

.modality-card p {
    color: #645b69;
    min-height: 58px;
}

.modality-card a {
    display: inline-block;
    margin-top: 14px;
    color: #4b0082;
    font-weight: 700;
}

.testimonials {
    background: #f6f1f8;
}

.testimonial {
    border-left: 4px solid #ff7900;
}

.testimonial blockquote {
    font-size: 20px;
    line-height: 1.5;
    margin: 0 0 28px;
    color: #3c2050;
}

.testimonial figcaption {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.testimonial figcaption span {
    color: #786e7e;
    font-size: 12px;
}

.site-footer {
    display: block !important;
    padding: 65px clamp(24px,8vw,150px) 25px !important;
    background: #210039 !important;
    text-align: left !important;
}

.footer-lead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border-bottom: 1px solid #ffffff33;
    padding-bottom: 35px;
}

.footer-logo {
    color: white;
    font-size: 24px;
    text-decoration: none;
}

.footer-logo span {
    color: #ff7900;
}

.footer-lead p {
    max-width: 410px;
    color: #d8c9e0;
    line-height: 1.6;
}

.footer-cta {
    background: #ff7900;
    color: #210039 !important;
    padding: 15px 20px;
    text-decoration: none;
    font-weight: 700;
    clip-path: polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,0 100%);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 32px;
    padding: 40px 0;
}

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

.footer-column h3 {
    color: #fff;
    font-size: 14px;
    margin: 0 0 8px;
}

.footer-column a {
    color: #c9b8d6;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.4;
}

.footer-column a:hover {
    color: #ff7900;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    border-top: 1px solid #ffffff33;
    padding-top: 24px;
    color: #bca8cb;
    font-size: 11px;
}

.footer-bottom a {
    color: #fff;
}

@media (max-width:1050px) {
    .modality-grid,.testimonial-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

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

    .footer-lead {
        flex-wrap: wrap;
    }
}

@media (max-width:740px) {
    .mega-nav {
        align-items: stretch !important;
    }

    .nav-group {
        width: 100%;
    }

    .nav-group summary {
        width: 100%;
    }

    .nav-panel {
        position: static;
        box-shadow: none;
        clip-path: none;
        width: 100%;
    }

    .modality-grid,.testimonial-grid,.footer-columns {
        grid-template-columns: 1fr;
    }

    .site-footer {
        padding: 45px 22px 24px !important;
    }

    .footer-lead {
        display: block;
    }

    .footer-cta {
        display: inline-block;
        margin-top: 16px;
    }
}

/* V5: mega menú único anclado a la cabecera; sin solapamientos entre desplegables */

.topbar {
    position: absolute;
    isolation: isolate;
    overflow: visible;
}

.topbar .mega-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 10px !important;
}

.topbar .nav-group {
    position: static;
}

.topbar .nav-group>summary {
    position: relative;
    z-index: 2;
}

.topbar .nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-height: min(70vh,680px);
    overflow-y: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
    padding: 28px clamp(22px,5vw,90px);
    background: #29083e;
    border-top: 2px solid #ff7900;
    box-shadow: 0 22px 42px #16002288;
    clip-path: none;
    z-index: 100;
}

.topbar .nav-group:not([open])>.nav-panel {
    display: none;
}

.topbar .nav-panel .mega-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    flex: 1;
}

.topbar .nav-panel h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #ff7900;
    margin: 0 0 12px;
}

.topbar .nav-panel a {
    width: 100%;
    min-height: 0;
    display: block !important;
    padding: 9px 12px !important;
    font-size: 12px !important;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
}

.topbar .nav-products .nav-panel {
    display: block;
}

.mega-products-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    border-bottom: 1px solid #ffffff33;
    padding-bottom: 14px;
}

.mega-products-head a {
    width: auto !important;
    max-width: max-content;
    background: #ff7900 !important;
    color: #210039 !important;
    font-weight: 700;
}

.mega-products-head span {
    font-size: 12px;
    color: #dbcbe3;
}

.mega-products-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 24px;
}

.mega-products-grid .mega-column {
    min-width: 0 !important;
}

.topbar .nav-group>summary:focus-visible {
    outline: 3px solid #ff7900;
    outline-offset: 3px;
}

@media (max-width:1050px) {
    .mega-products-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media (max-width:740px) {
    .topbar .mega-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        max-height: 80vh;
        overflow: auto;
    }

    .topbar .mega-nav.open {
        display: flex;
    }

    .topbar .nav-group {
        width: 100%;
    }

    .topbar .nav-panel {
        position: static;
        max-height: 55vh;
        box-shadow: none;
        padding: 18px;
        display: block;
    }

    .topbar .nav-panel .mega-column {
        margin-bottom: 18px;
    }

    .mega-products-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 12px;
    }
}

@media (max-width:440px) {
    .mega-products-grid {
        grid-template-columns: 1fr;
    }
}

/* V6 — menús compactos por filas y transición segura del puntero */

@media (min-width:741px) {
    .topbar .nav-panel {
        top: calc(100% - 1px);
        max-height: min(72vh,650px);
        overflow: auto;
        overscroll-behavior: contain;
        gap: 20px;
        padding: 20px clamp(22px,4.5vw,80px);
    }

    .topbar .nav-group:not(.nav-products)>.nav-panel {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
        align-items: start;
    }

    .topbar .nav-group:not(.nav-products)>.nav-panel .mega-column {
        display: grid;
        grid-template-columns: repeat(3,minmax(0,1fr));
        gap: 7px;
        min-width: 0;
        align-content: start;
    }

    .topbar .nav-group:not(.nav-products)>.nav-panel h3 {
        grid-column: 1/-1;
        margin: 0 0 6px;
    }

    .topbar .nav-group:not(.nav-products)>.nav-panel a {
        padding: 10px 12px !important;
    }

    .topbar .nav-products .nav-panel {
        display: block;
    }

    .mega-products-grid {
        display: grid;
        grid-template-columns: repeat(4,minmax(0,1fr));
        gap: 14px 22px;
    }

    .mega-products-grid .mega-column {
        display: flex;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-content: start;
        align-items: start;
        gap: 4px !important;
    }

    .mega-products-grid .mega-column h3 {
        width: 100%;
        margin: 0 0 4px;
    }

    .topbar .mega-products-grid .mega-column a {
        width: auto !important;
        flex: 0 1 auto;
        display: inline-flex !important;
        align-items: center;
        padding: 5px 8px !important;
        font-size: 10px !important;
        line-height: 1.25;
        min-height: 24px;
        background: #ffffff0b;
        border: 1px solid #ffffff24;
        clip-path: polygon(0 0,calc(100% - 7px) 0,100% 7px,100% 100%,0 100%);
    }

    .topbar .mega-products-grid .mega-column a:hover {
        background: #ff7900;
        color: #210039;
    }
}

@media (min-width:741px) and (max-width:1100px) {
    .mega-products-grid {
        grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    }

    .topbar .nav-group:not(.nav-products)>.nav-panel .mega-column {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width:740px) {
    .topbar .nav-group:not(.nav-products)>.nav-panel {
        display: block;
    }

    .topbar .nav-panel .mega-column {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .topbar .nav-panel .mega-column h3 {
        width: 100%;
    }

    .topbar .nav-panel .mega-column a {
        width: auto !important;
        padding: 7px 10px !important;
        font-size: 11px !important;
    }

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

    .topbar .nav-products .nav-panel {
        display: block;
    }
}

/* JOCARSA V7: elementos de anchura uniforme y contacto */

.brand img {
    width: auto !important;
    max-width: 300px !important;
    height: 42px !important;
    object-fit: contain !important;
}

.mega-products-grid .mega-column {
    min-width: 0;
}

.mega-products-grid .mega-column a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: top;
    box-sizing: border-box;
    width: calc(33.333% - 5px) !important;
    min-width: 0 !important;
    min-height: 27px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 4px !important;
    margin: 0 3px 4px 0 !important;
    font-size: 10px !important;
}

.nav-panel:not(.unused) .mega-column:not(.mega-products-grid .mega-column)>a {
    box-sizing: border-box;
}

.contact {
    padding: clamp(50px,7vw,110px) max(4vw,24px) !important;
    text-align: left !important;
    background: linear-gradient(125deg,#260b42,#4b0082) !important;
}

.contact-layout {
    max-width: 1450px;
    margin: auto;
    display: grid;
    grid-template-columns: minmax(260px,.85fr) minmax(350px,1.15fr);
    gap: clamp(30px,6vw,100px);
    align-items: start;
}

.contact-intro h2 {
    font-size: clamp(38px,5vw,76px);
    line-height: 1.07;
    margin: 24px 0;
}

.contact-intro h2 em {
    color: #ff7900;
    font-style: normal;
}

.contact-intro p {
    font-size: clamp(17px,1.4vw,21px);
    max-width: 530px;
    line-height: 1.7;
}

.contact-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.contact-benefits span {
    border: 1px solid #ffffff55;
    padding: 10px 14px;
    font-size: 13px;
    clip-path: polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,0 100%);
}

.contact-form {
    background: #ffffff;
    color: #27103e;
    padding: clamp(22px,3vw,44px);
    clip-path: polygon(0 0,calc(100% - 24px) 0,100% 24px,100% 100%,0 100%);
    box-shadow: 0 15px 50px #10021d44;
}

.contact-form-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    margin-bottom: 25px;
    border-bottom: 1px solid #ded7e5;
    padding-bottom: 20px;
}

.contact-form-head span {
    color: #7d578e;
    font-size: 12px;
}

.contact-form-head strong {
    font-size: 20px;
}

.contact-form label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 20px;
}

.contact-form input:not([type=checkbox]),.contact-form select,.contact-form textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin-top: 9px;
    padding: 15px 13px;
    border: 1px solid #cfc4d8;
    background: #faf8fc;
    color: #241038;
    font: inherit;
    font-weight: 400;
    border-radius: 0;
}

.contact-form :is(input,select,textarea):focus-visible {
    outline: 3px solid #ff7900;
    outline-offset: 2px;
}

.form-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.contact-form .consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    line-height: 1.5;
}

.consent input {
    margin-top: 4px;
    accent-color: #4b0082;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.form-actions button {
    cursor: pointer;
    border: 0;
}

.form-actions span {
    font-size: 12px;
    color: #6b5877;
    max-width: 220px;
}

.form-feedback {
    color: #4b0082;
    font-size: 13px;
    margin-top: 14px;
}

@media (max-width:900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .form-two {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .mega-products-grid .mega-column a {
        width: calc(50% - 5px) !important;
    }
}

/* ============================================================
   CATÁLOGO DE PRODUCTOS · TARJETAS
   Cabecera independiente y contenido horizontal (logo + textos)
   ============================================================ */

.catalog-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.catalog-product-head {
    display: block;
    padding-bottom: 12px;
    border-bottom: 1px solid #ded7e5;
}

.catalog-product-head .tag {
    display: inline-block;
    margin: 0;
}

.catalog-product-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.catalog-product-logo {
    display: block;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    object-fit: contain;
}

.catalog-product-info {
    flex: 1;
    min-width: 0;
}

.catalog-card .catalog-product-info h3 {
    margin: 0 0 7px;
    font-size: 19px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.catalog-card .catalog-product-info p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

@media (max-width: 540px) {
    .catalog-product-body {
        gap: 14px;
    }

    .catalog-product-logo {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }
}

/* Blog */
.blog-toolbar{margin-bottom:24px}.blog-toolbar label{display:block;margin-bottom:8px;font-weight:600}.blog-toolbar input{padding:14px;width:100%;max-width:480px;border:1px solid var(--linea);font:inherit}.blog-card{overflow-wrap:anywhere;display:flex;flex-direction:column;gap:12px}.blog-card h3{margin:6px 0}.blog-card p{white-space:pre-line;overflow-wrap:anywhere;flex:1}.blog-card button{align-self:flex-start}.blog-pagination{display:flex;gap:8px;margin-top:24px;flex-wrap:wrap}.blog-pagination button:disabled{opacity:.5;cursor:default}

.contact-trap{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

/* Infinite 3D wall as hero background */
.hero .hero-wall-frame{position:absolute;inset:0;width:100%;height:100%;border:0;display:block;pointer-events:none;}
.hero .shade{z-index:1}
.hero .topbar{z-index:4}
.hero .hero-content,.hero .scroll{z-index:2}

/* ERP product color shared with the 3D wall */
.catalog-card{border-top:4px solid var(--product-color,white);position:relative}
.catalog-product-logo{background:color-mix(in srgb,var(--product-color,white) 12%,transparent);padding:7px}
.catalog-product-head .tag{color:var(--product-color,#555)}
.catalog-card:hover{border-color:var(--product-color,#777)}
