:root {
    --public-black: #0a1628;
    --public-red: #ff2235;
    --public-red-dark: #d4001a;
    --public-sabadell-blue: #1a72e8;
    --public-blue: #1e40af;
    --public-blue-dark: #1e3a8a;
    --public-text: #0a1628;
    --public-muted: #1e3a6e;
    --public-panel: rgba(255, 255, 255, 0.74);
    --public-line: rgba(255, 255, 255, 0.22);
    --public-shadow: 0 14px 42px rgba(0, 0, 0, 0.16);
    --public-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    color: var(--public-text);
    background: #fff;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.public-header {
    background: var(--public-sabadell-blue);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}

.public-header__inner,
.public-footer__inner,
.home-clients,
.home-why,
.home-steps__grid,
.public-section,
.public-page {
    width: min(calc(100% - 48px), var(--public-width));
    margin: 0 auto;
}

.public-header__inner {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.public-header__support {
    display: none;
}

.public-header__logo {
    flex-shrink: 0;
}

.public-header__logo img {
    height: 140px;
    width: auto;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.public-header__right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.public-nav a {
    text-decoration: none;
    color: #fff;
}

.public-nav a {
    font-size: 1rem;
    font-weight: 600;
}

.public-nav a.is-active {
    color: #111;
    font-weight: 800;
}

.public-nav a:hover,
.public-footer__links a:hover,
.home-step__text a:hover {
    color: var(--public-red);
}

.public-header__toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.public-header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
}

.home-hero {
    min-height: 400px;
    background:
        url('/assets/img/fondo3.png') center center / cover no-repeat;
}

.home-hero__inner {
    width: min(calc(100% - 48px), var(--public-width));
    min-height: 791px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
    padding-bottom: 40px;
    gap: 44px;
}

.home-hero__panel {
    display: none;
}

.home-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 12px 0;
}

.home-feature:not(:last-child) {
    border-bottom: 1px solid rgba(36, 52, 78, 0.2);
}

.home-feature__icon {
    font-size: 2rem;
    color: #1e40af;
    display: flex;
    justify-content: center;
    padding-top: 0;
}

.home-feature__title {
    margin: 0 0 6px;
    font-size: 1rem;
    line-height: 1.18;
    font-weight: 700;
    color: #1e3a8a;
}

.home-feature__text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.3;
    color: #24344e;
}

.home-hero__content {
    width: min(100%, 560px);
    margin-right: 0;
    color: #fff;
    text-align: left;
}

.home-hero__content h1 {
    font-family: 'Open Sans', Arial, sans-serif;
    margin: 0 0 45px;
    max-width: 620px;
    font-size: 52px;
    line-height: 1.1;
    font-weight: 800;
    white-space: nowrap;
    text-align: left;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
	color: #ffffff
}

.home-hero__content p.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.35;
    margin: 0 0 28px;
    opacity: 0.88;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

.public-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    padding: 15px 28px;
    border: 0;
    border-radius: 6px;
    background: #1A72E8;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.home-hero .public-button {
    min-width: 220px;
    min-height: 48px;
    border-radius: 8px;
    font-size: 0.92rem;
}

.public-button:hover,
.public-button:focus-visible {
    background: #2e2e2ed4;
    transform: translateY(-1px);
}

.public-band {
    background: rgba(0, 0, 0, 0.91);
    color: #fff;
    text-align: center;
    padding: 36px 16px;
}

.public-band strong,
.public-band span {
    display: block;
}

.public-band strong {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}

.public-band span {
    margin-top: 2px;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.4;
}

.home-features-strip {
    background: #f0f4ff;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding: 32px 40px;
    width: min(calc(100% - 0px), 100%);
}

.home-features-strip .home-feature {
    border-bottom: none;
    border-right: none;
    padding: 22px 71px;
    position: relative;
    background: #fff;
    border-radius: 10px;
    border: 4px solid var(--public-sabadell-blue);
    box-shadow: 0 2px 8px rgba(15, 34, 70, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.home-features-strip .home-feature:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(26, 114, 232, 0.2);
    border-color: var(--public-sabadell-blue);
}

.home-features-strip .home-feature::after {
    display: none;
}

.home-features-strip .home-feature:last-child::after {
    display: none;
}

.home-clients {
    padding: 28px 0 24px;
    text-align: center;
}

.home-clients h2,
.home-why__content h2,
.public-page__title,
.public-legal__title,
.public-form-card__title {
    margin: 0;
    color: #0d2137;
    font-weight: 800;
}

.home-clients h2 {
    font-size: 0.98rem;
    margin-bottom: 28px;
}

.home-clients__logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 38px;
    flex-wrap: wrap;
}

.home-clients__logos img {
    height: 54px;
    width: auto;
    filter: grayscale(1);
}

.home-why {
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
    overflow: hidden;
}

.home-why__content h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #1a2e4a;
    margin-bottom: 1rem;
}

.home-step__text,
.public-copy,
.public-legal__content,
.public-form-card__intro,
.public-form-card label,
.public-result,
.auth-card__hint,
.auth-error {
    font-size: 0.92rem;
    line-height: 1.35;
}

.home-why__content p {
    font-size: 1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.home-why__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    opacity: 0.15;
    z-index: 0;
}

.home-why__content {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
}

.home-why__features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.home-why__feat {
    background: #fff;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

.home-why__feat:hover {
    background: #f0f6ff;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(24, 95, 165, 0.1);
    z-index: 1;
}

.home-why__feat:hover .home-why__feat-icon {
    background: #185fa5;
    color: #fff;
}

.home-why__feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e6f1fb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #185fa5;
    flex-shrink: 0;
    transition: background 0.25s ease, color 0.25s ease;
}

.home-why__feat-icon svg {
    width: 20px;
    height: 20px;
}

.home-why__feat span {
    font-size: 1rem;
    font-weight: 600;
    color: #1a2e4a;
    line-height: 1.3;
}

@media (max-width: 760px) {
    .home-why__features {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-features-strip {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .home-features-strip .home-feature {
        padding: 16px 12px;
    }
}

.home-steps {
    padding-bottom: 0;
}

.home-steps__title {
    background: var(--public-sabadell-blue);
    color: #fff;
    text-align: center;
    padding: 22px 16px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.home-steps__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 0;
    background: #f0f4fa;
}

.home-step {
    text-align: center;
    padding: 36px 24px 32px;
    max-width: none;
    margin: 0;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    border-bottom: 4px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.home-step__num {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(30,64,175,0.4);
}

.home-step h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 700;
    color: #0d2137;
}

.home-step__text {
    color: #2d4263;
    font-size: 0.88rem;
    line-height: 1.55;
}

.home-step:last-child {
    border-right: none;
}

.home-step:hover {
    border-bottom-color: #ff2235;
    box-shadow: 0 6px 24px rgba(255,34,53,0.12);
    z-index: 1;
}

.home-step__icon {
    display: block;
    font-size: 2rem;
    color: #1e40af;
    margin: 0 auto 14px;
    opacity: 0.75;
}

.home-step__text a {
    color: var(--public-red);
    font-weight: 700;
}

.public-footer {
    background: var(--public-sabadell-blue);
    color: #e8edf4;
    padding: 54px 0 36px;
    font-family: 'Open Sans', Arial, sans-serif;
}

.public-footer__inner {
    display: grid;
    grid-template-columns: 320px 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.public-footer__brand img {
    width: 220px;
    height: auto;
}

.public-footer__info ul,
.public-footer__links ul {
    list-style: disc;
    margin: 0;
    padding-left: 22px;
}

.public-footer__info li,
.public-footer__links li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #c8d4e8;
}

.public-footer__links a {
    color: #c8d4e8;
    text-decoration: none;
    transition: color 0.2s;
}

.public-whatsapp {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 60;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.public-whatsapp img {
    width: 34px;
    height: 34px;
}

.public-page {
    padding: 52px 0 64px;
}

.public-page--auth {
    width: 100%;
    min-height: calc(100vh - 188px);
    padding: 0;
    background:
        linear-gradient(rgba(6, 12, 22, 0.56), rgba(6, 12, 22, 0.56)),
        url('/assets/img/imagenlogin.png') center center / cover no-repeat;
    display: flex;
    align-items: center;
}

.auth-card,
.public-form-card,
.public-legal {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--public-shadow);
}

.auth-card {
    width: min(100%, 430px);
    margin: 72px auto;
    padding: 32px 30px;
    border-radius: 10px;
}

.auth-card__title {
    margin: 0 0 10px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #21344f;
}

.auth-card__hint {
    margin: 0 0 24px;
    color: var(--public-muted);
}

.auth-form,
.public-form {
    display: grid;
    gap: 16px;
}

.public-input,
.public-textarea {
    width: 100%;
    border: 1px solid #d4dce9;
    border-radius: 6px;
    background: #fff;
    color: var(--public-text);
    font: inherit;
}

.public-input {
    min-height: 48px;
    padding: 0 14px;
}

.public-textarea {
    min-height: 140px;
    padding: 12px 14px;
    resize: vertical;
}

.auth-error {
    color: #9d1d28;
    font-weight: 700;
    background: rgba(204, 68, 82, 0.12);
    border-radius: 6px;
    padding: 10px 12px;
}

.auth-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.auth-links a {
    color: var(--public-red);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.public-form-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.public-form-card {
    padding: 30px;
    border-radius: 10px;
}

.public-form-card__title {
    font-size: 2rem;
    margin-bottom: 12px;
}

.public-form-card__intro {
    margin: 0 0 22px;
    color: var(--public-muted);
}

.public-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.public-form-grid--single {
    grid-template-columns: 1fr;
}

.public-field {
    display: grid;
    gap: 7px;
}

.public-field--full {
    grid-column: 1 / -1;
}

.public-field label,
.public-check {
    color: #314768;
    font-size: 0.84rem;
    font-weight: 700;
}

.public-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    font-weight: 600;
}

.public-check input {
    margin-top: 2px;
}

.public-side-card {
    background: #f4f6fa;
    border-radius: 10px;
    padding: 24px 22px;
}

.public-side-card h3 {
    margin: 0 0 12px;
    font-size: 1.02rem;
    color: #24344f;
}

.public-side-card p,
.public-side-card li {
    margin: 0 0 10px;
    color: var(--public-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.public-side-card ul {
    margin: 0;
    padding-left: 18px;
}

.public-result {
    margin-top: 18px;
    border-radius: 8px;
    overflow: hidden;
}

.public-result--loading,
.public-result--error {
    padding: 14px 16px;
}

.public-result--loading {
    background: #eef3fb;
    color: #2d476c;
}

.public-result--error {
    background: rgba(204, 68, 82, 0.12);
    color: #9d1d28;
    font-weight: 700;
}

.public-legal {
    width: min(calc(100% - 48px), 1000px);
    margin: 40px auto 60px;
}

.public-legal__title {
    font-size: 28px;
    margin-bottom: 12px;
}

.public-legal__intro {
    margin: 0 0 22px;
    color: var(--public-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.public-legal__section {
    margin-bottom: 22px;
}

.public-legal__section h2 {
    font-size: 20px;
    margin-top: 26px;
    color: #2b4265;
}

.public-legal__content p,
.public-legal__content li {
    margin: 0 0 10px;
    color: var(--public-muted);
}

.public-legal__content ul {
    margin: 0;
    padding-left: 18px;
}

@media (max-width: 1100px) {
    .home-steps__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .public-footer__inner,
    .public-form-wrap,
    .home-why {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .public-header__inner {
        grid-template-columns: 1fr auto auto;
    }

    .public-header__support {
        grid-column: 1 / -1;
        order: 3;
        padding-bottom: 12px;
    }

    .public-header__logo {
        justify-self: start;
    }

    .public-header__toggle {
        display: block;
    }

    .public-nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 24px;
        min-width: 220px;
        padding: 16px;
        border-radius: 10px;
        background: rgba(2, 2, 2, 0.96);
        box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .public-nav.is-open {
        display: flex;
    }

    .home-hero__inner {
        flex-direction: column;
        justify-content: center;
        padding: 32px 0;
    }

    .home-hero__panel {
        margin-left: 0;
    }

    .home-hero__panel::after {
        display: none;
    }

    .home-hero__content {
        margin-right: 0;
    }

    .home-hero__content {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .public-header__inner,
    .public-footer__inner,
    .home-clients,
    .home-why,
    .home-steps__grid,
    .public-section,
    .public-page,
    .home-hero__inner {
        width: min(calc(100% - 28px), 1000px);
    }

    .home-steps__grid,
    .public-form-grid {
        grid-template-columns: 1fr;
    }

    .public-page--auth {
        background:
            linear-gradient(rgba(6, 12, 22, 0.62), rgba(6, 12, 22, 0.62)),
            url('/assets/img/imagen2x2.png') center top / cover no-repeat;
    }

    .auth-card,
    .public-form-card,
    .public-legal {
        padding: 24px 20px;
    }

    .public-whatsapp {
        width: 54px;
        height: 54px;
        left: 12px;
        bottom: 12px;
    }

    .public-whatsapp img {
        width: 30px;
        height: 30px;
    }

    .home-features-strip {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .home-features-strip .home-feature {
        padding: 16px 12px;
    }

    .home-steps {
        overflow: hidden;
    }

    .home-steps__grid {
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 520px) {
    html {
        font-size: 15px;
    }

    .public-header__inner {
        gap: 12px;
        padding: 10px 0 14px;
    }

    .public-header__logo img {
        height: 46px;
    }

    .home-hero {
        min-height: auto;
    }

    .home-hero__panel {
        padding: 22px 18px;
    }

    .home-feature__title {
        font-size: 1.72rem;
    }

    .home-feature__text {
        font-size: 0.94rem;
    }

    .home-hero .public-button {
        min-width: 240px;
        min-height: 52px;
        font-size: 1rem;
    }

    .public-button {
        width: 100%;
        min-width: 0;
    }

    .public-footer {
        padding-bottom: 84px;
    }

    .home-features-strip {
        grid-template-columns: 1fr;
    }
}


.public-legal-hero{
    position: relative;
    width: 100%;
    overflow: hidden;
}

.public-legal-hero img{
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.public-legal-hero__title{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    color:#fff;
    font-size:42px;
    font-weight:800;
    letter-spacing:2px;
}
/* ============================================================
   RESPONSIVE MEJORADO — PARTE PÚBLICA
   ============================================================ */

/* ── Tablet grande (≤ 960px) ── */
@media (max-width: 960px) {

    /* Header: soporte debajo, alineación correcta */
    .public-header__inner {
        grid-template-columns: 1fr auto auto;
        padding: 8px 0 10px;
        gap: 10px;
    }

    .public-header__support {
        display: none; /* Se oculta en móvil, ya se ve en footer */
    }

    /* Hero: panel a ancho completo */
    .home-hero__panel {
        width: 100%;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Why: imagen ocupa ancho completo */
    .home-why {
        grid-template-columns: 1fr;
        padding: 24px 0 28px;
    }

    .home-why__content h2 {
        font-size: 2rem;
    }

    /* Steps: 2 columnas en tablet */
    .home-steps__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer: columna única */
    .public-footer__inner {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .public-footer__info ul,
    .public-footer__links ul {
        padding-left: 0;
        list-style: none;
    }

    .public-footer__brand img {
        margin: 0 auto;
    }

    /* Título legal en hero */
    .public-legal-hero__title {
        font-size: 28px;
        letter-spacing: 1px;
        width: 90%;
        text-align: center;
    }
}

/* ── Móvil (≤ 640px) ── */
@media (max-width: 640px) {

    /* Hero: columna única, sin desbordamiento */
    .home-hero {
        min-height: auto;
    }

    .home-hero__inner {
        flex-direction: column;
        padding: 28px 0 36px;
        gap: 24px;
    }

    .home-hero__panel {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 18px 16px;
    }

    .home-hero__content {
        width: 100%;
        margin: 0;
        padding: 0 8px;
    }

    .home-hero__content h1 {
        font-size: clamp(1.6rem, 6vw, 2.4rem);
        margin-bottom: 18px;
    }

    /* Features: texto más pequeño en móvil */
    .home-feature__title {
        font-size: 1rem;
    }

    .home-feature__text {
        font-size: 0.82rem;
    }

    /* Banda roja */
    .public-band strong {
        font-size: 1rem;
    }

    .public-band span {
        font-size: 0.88rem;
    }

    /* Logos clientes */
    .home-clients__logos {
        gap: 20px;
    }

    .home-clients__logos img {
        height: 38px;
    }

    /* Why */
    .home-why__content h2 {
        font-size: 1.6rem;
    }

    .home-why__content p {
        max-width: 100%;
    }

    /* Steps: columna única en móvil */
    .home-steps__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        display: flex;
        padding: 28px 0 36px;
        align-items: center;
        justify-content: space-evenly;
        align-content: center;
        flex-wrap: wrap;
        flex-direction: row-reverse;
    }

    .home-step {
        max-width: 320px;
        padding: 0 12px;
    }

    /* Footer */
    .public-footer {
        padding: 28px 0 72px; /* espacio para whatsapp */
    }

    .public-footer__inner {
        gap: 20px;
    }

    /* Legal hero */
    .public-legal-hero__title {
        font-size: 20px;
        letter-spacing: 0;
    }

    /* Desplegable idioma en header */
    .pub-lang-btn span:nth-child(2) {
        display: none; /* Oculta el nombre, deja solo la bandera */
    }

    /* Formularios públicos en columna */
    .contact-form,
    .agency-register__form,
    .login-form {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .contact-field--full,
    .agency-register__field--full,
    .login-panel__actions,
    .contact-actions,
    .agency-register__actions {
        grid-column: 1 !important;
    }

    /* Botones a ancho completo */
    .contact-button,
    .agency-register__button,
    .login-panel__button,
    .recover-button,
    .public-button {
        width: 100%;
        min-width: 0;
    }

    /* Links de login */
    .login-panel__links {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .login-panel__links span {
        display: none;
    }

    /* Tabla de cookies */
    .cookie-service__meta {
        grid-template-columns: 1fr;
    }

    .cookie-service__row {
        min-width: 0;
        grid-template-columns: 1fr;
    }

    .cookie-service__row > div {
        border-right: 0;
        border-bottom: 1px solid #d8dde6;
        padding: 8px 12px;
    }

    .cookie-service__row--header {
        display: none; /* Ocultamos cabecera en móvil, cada celda se entiende sola */
    }
}

/* ── Móvil pequeño (≤ 400px) ── */
@media (max-width: 400px) {
    .public-header__logo img {
        height: 36px;
    }

    .home-hero__content h1 {
        font-size: 1.45rem;
    }

    .home-why__content h2 {
        font-size: 1.35rem;
    }

    .pub-lang-menu {
        right: -8px;
    }
}
/* ============================================================
   BOTÓN REGISTRO EN NAV
   ============================================================ */
.public-nav a.nav-btn-register {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 6px;
    border: 2px solid var(--public-red);
    background: transparent;
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    transition: background 0.2s, color 0.2s;
}
.public-nav a.nav-btn-register:hover {
    background: var(--public-red);
    color: #fff;
}

/* ============================================================
   MODAL PÚBLICO
   ============================================================ */
.pub-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(2, 2, 2, 0.62);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.pub-modal-overlay.is-open {
    display: flex;
}
.pub-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.28);
    width: min(92%, 720px);
    max-height: 90vh;
    min-height: 520px;
    overflow-y: auto;
    position: relative;
    padding: 36px 40px 40px;
    animation: pubModalIn 0.22s ease;
    display: flex;
    flex-direction: column;
}
@keyframes pubModalIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pub-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #8a9ab5;
    font-size: 1.4rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.pub-modal__close:hover {
    color: var(--public-red);
    background: rgba(204,68,82,0.08);
}
.pub-modal__title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #21344f;
}
.pub-modal__subtitle {
    margin: 0 0 22px;
    font-size: 0.9rem;
    color: var(--public-muted);
}
/* Tabs dentro del modal (Acceso / Registro) */
.pub-modal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e4e9f0;
    margin-bottom: 24px;
}
.pub-modal-tab {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    color: #b0bac8;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
    user-select: none;
    border-radius: 6px 6px 0 0;
    letter-spacing: 0.01em;
}
.pub-modal-tab:hover {
    color: var(--public-sabadell-blue);
    background: rgba(46, 127, 232, 0.04);
}
.pub-modal-tab.is-active {
    color: var(--public-sabadell-blue);
    border-bottom-color: var(--public-sabadell-blue);
    background: rgba(46, 127, 232, 0.06);
    font-size: 1rem;
}
.pub-modal-panel {
    display: none;
}
.pub-modal-panel.is-active {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ============================================================
   FORMULARIOS DENTRO DEL MODAL
   ============================================================ */
.pub-modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    justify-content: center;
}

.pub-modal-field {
    width: 100%;
}

.pub-modal-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pub-modal-field--full {
    grid-column: 1 / -1;
}

.pub-modal-submit {
    width: 100%;
    min-width: 0;
    margin-top: 4px;
}

.pub-modal-result {
    margin-top: 4px;
}

.pub-modal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 0.82rem;
}

.pub-modal-links a {
    color: var(--public-sabadell-blue);
    font-weight: 700;
    text-decoration: none;
}

.pub-modal-links a:hover {
    text-decoration: underline;
}

.pub-modal-links span {
    color: #c0cad8;
}

.pub-modal-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.84rem;
    color: #314768;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
}

.pub-modal-check input[type="checkbox"] {
    margin-top: 1px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--public-red);
    cursor: pointer;
    border: 2px solid #8a9ab5;
    border-radius: 3px;
}

.pub-modal-check a {
    color: var(--public-red);
    font-weight: 700;
    text-decoration: none;
}

.pub-modal-check a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .pub-modal-field-row {
        grid-template-columns: 1fr;
    }

    .pub-modal {
        padding: 28px 20px 24px;
    }
}

.pub-modal-result--error,
.pub-modal-result--warning {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 8px;
    margin-top: 12px;
}

.pub-modal-result--error {
    background: #fff2f2;
    border: 1px solid #fcd0d0;
    color: #b91c1c;
}

.pub-modal-result--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.pub-modal-result--error .material-icons,
.pub-modal-result--warning .material-icons {
    font-size: 2rem;
}

.pub-modal-result--error p,
.pub-modal-result--warning p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.pub-modal-recover-link {
    margin-top: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #185fa5;
    text-decoration: underline;
    cursor: pointer;
}