:root {
    --navy:#111f36;
    --ink:#1f2d43;
    --muted:#617189;
    --teal:#087f70;
    --mint:#e8f7f2;
    --line:#dfe8ef;
    --bg:#f7f9fc;
    --white:#fff;
    --shadow:0 15px 40px rgba(19,45,74,.06);
}
* {
    box-sizing:border-box;
}
html {
    scroll-behavior:smooth;
}
body {
    margin:0;
    font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color:var(--ink);
    background:var(--bg);
    line-height:1.65;
}
h1,h2,h3,h4,.brand {
    font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    letter-spacing:-.035em;
}
h1,h2,h3 {
    line-height:1.2;
    color:var(--navy);
}
a {
    color:var(--teal);
}
a:hover {
    text-decoration:underline;
}
button,input,select {
    font:inherit;
}
button {
    cursor:pointer;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
    outline:3px solid #74cab5;
    outline-offset:3px;
}
.wrap {
    width:min(1120px,calc(100% - 40px));
    margin:auto;
}
.site-header {
    background:#fff;
    border-bottom:1px solid var(--line);
    position:sticky;
    top:0;
    z-index:10;
}
.nav {
    display:flex;
    justify-content:space-between;
    align-items:center;
    min-height:77px;
    gap:20px;
}
.brand {
    display:flex;
    align-items:center;
    gap:11px;
    font-weight:800;
    color:var(--navy);
    font-size:22px;
    text-decoration:none;
}
.brand-mark {
    display:grid;
    place-items:center;
    background:var(--teal);
    color:#fff;
    border-radius:12px;
    width:37px;
    height:37px;
    font-size:23px;
}
.nav-links {
    display:flex;
    align-items:center;
    gap:29px;
    flex-wrap:wrap;
}
.nav-links a {
    text-decoration:none;
    color:#43536b;
    font-size:14px;
    font-weight:700;
}
.nav-links a:hover,.nav-links a[aria-current] {
    color:var(--teal);
}
.nav-cta {
    border:1px solid #c3e8df;
    padding:10px 16px;
    border-radius:9px;
    color:var(--teal)!important;
}
.hero {
    background:radial-gradient(ellipse at 78% 40%,#d8f4eb 0,transparent 47%),linear-gradient(120deg,#f3faf8,#f4f7ff);
    padding:87px 0 92px;
    border-bottom:1px solid var(--line);
}
.hero-inner {
    display:grid;
    grid-template-columns:1.1fr .9fr;
    align-items:center;
    gap:55px;
}
.eyebrow {
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:#e1f3ed;
    color:#087766;
    text-transform:uppercase;
    letter-spacing:.12em;
    font-size:11px;
    font-weight:800;
    border-radius:40px;
    padding:8px 13px;
}
.hero h1 {
    font-size:clamp(37px,4.5vw,59px);
    margin:22px 0 20px;
    line-height:1.1;
}
.hero h1 span {
    color:var(--teal);
}
.lead {
    font-size:17px;
    color:var(--muted);
    max-width:570px;
    line-height:1.85;
}
.actions {
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:26px;
}
.btn {
    border:0;
    background:var(--teal);
    color:white;
    text-decoration:none;
    display:inline-flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    border-radius:10px;
    font-size:14px;
    font-weight:800;
    padding:15px 23px;
    transition:transform .2s,background .2s;
}
.btn:hover {
    text-decoration:none;
    transform:translateY(-2px);
    background:#06695d;
}
.btn-secondary {
    color:var(--navy);
    background:#fff;
    border:1px solid var(--line);
}
.btn-secondary:hover {
    background:#f2f8f6;
}
.trust {
    margin-top:24px;
    font-size:13px;
    color:var(--muted);
}
.trust strong {
    color:var(--teal);
}
.preview {
    background:#fff;
    border:1px solid var(--line);
    box-shadow:0 28px 75px rgba(24,67,82,.11);
    border-radius:19px;
    padding:27px;
    transform:rotate(1deg);
}
.preview-top {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
}
.preview-label {
    font-size:12px;
    color:var(--muted);
    font-weight:700;
}
.preview-chip {
    background:#e7f7ef;
    color:#0b7666;
    border-radius:40px;
    padding:5px 10px;
    font-size:11px;
    font-weight:800;
}
.preview .big {
    font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-weight:800;
    font-size:38px;
    letter-spacing:-.05em;
    color:var(--navy);
    margin:15px 0 5px;
}
.preview .tiny {
    color:var(--muted);
    font-size:12px;
}
.bar-chart {
    display:flex;
    align-items:end;
    gap:8px;
    height:120px;
    margin:22px 0;
}
.bar-chart span {
    background:linear-gradient(#42c9ad,#0a8d7b);
    flex:1;
    border-radius:5px 5px 2px 2px;
}
.bar-chart span:nth-child(1) {
    height:39%;
}
.bar-chart span:nth-child(2) {
    height:52%;
}
.bar-chart span:nth-child(3) {
    height:46%;
}
.bar-chart span:nth-child(4) {
    height:68%;
}
.bar-chart span:nth-child(5) {
    height:63%;
}
.bar-chart span:nth-child(6) {
    height:79%;
}
.bar-chart span:nth-child(7) {
    height:100%;
}
.preview-bottom {
    display:flex;
    justify-content:space-between;
    padding-top:16px;
    border-top:1px solid var(--line);
    font-size:13px;
}
.preview-bottom strong {
    color:var(--teal);
}
.section {
    padding:77px 0;
}
.section-soft {
    background:#fff;
}
.section-head {
    text-align:center;
    max-width:670px;
    margin:0 auto 35px;
}
.section-head h2 {
    font-size:clamp(27px,3.4vw,38px);
    margin:12px 0;
}
.section-head p,.page-intro {
    color:var(--muted);
}
.cards {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:21px;
}
.card {
    background:#fff;
    border:1px solid var(--line);
    box-shadow:var(--shadow);
    border-radius:15px;
    padding:27px;
    display:flex;
    flex-direction:column;
}
.card h3 {
    font-size:20px;
    margin:17px 0 8px;
}
.card p {
    color:var(--muted);
    font-size:14px;
    flex:1;
}
.card .inline-link {
    font-weight:800;
    font-size:14px;
    text-decoration:none;
    margin-top:14px;
}
.icon-tile {
    background:#e5f5ef;
    color:var(--teal);
    font-size:23px;
    width:51px;
    height:51px;
    display:grid;
    place-items:center;
    border-radius:12px;
}
.pill {
    font-weight:700;
    color:#617189;
    font-size:11px;
    border:1px solid var(--line);
    border-radius:20px;
    padding:4px 9px;
    align-self:flex-start;
    margin-top:12px;
}
.features {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:40px;
}
.feature h3 {
    font-size:18px;
}
.feature p {
    color:var(--muted);
    font-size:14px;
}
.feature-num {
    color:var(--teal);
    font-size:13px;
    font-weight:800;
}
.banner {
    background:#102d3d;
    border-radius:20px;
    padding:43px 48px;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}
.banner h2 {
    color:#fff;
    margin:0;
}
.banner p {
    color:#c2dae1;
    margin-bottom:0;
}
.page-hero {
    padding:57px 0 40px;
    background:linear-gradient(135deg,#f3faf7,#f4f7fc);
    border-bottom:1px solid var(--line);
}
.page-hero h1 {
    font-size:clamp(32px,4vw,47px);
    margin:15px 0 12px;
}
.page-hero p {
    max-width:740px;
    color:var(--muted);
}
.breadcrumbs {
    font-size:13px;
    color:var(--muted);
}
.breadcrumbs a {
    text-decoration:none;
}
.layout {
    display:grid;
    grid-template-columns:minmax(0,1fr) 290px;
    gap:30px;
    align-items:start;
    padding:43px 0 75px;
}
.panel {
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:var(--shadow);
    padding:32px;
    margin-bottom:25px;
}
.panel h2 {
    margin:0 0 8px;
    font-size:23px;
}
.panel .sub {
    color:var(--muted);
    font-size:14px;
    margin:0 0 25px;
}
.fields {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:19px;
}
.field {
    display:flex;
    flex-direction:column;
    gap:7px;
}
.field label {
    font-weight:800;
    font-size:13px;
    color:#2d4058;
}
.field input,.field select {
    width:100%;
    min-height:48px;
    border:1px solid #cfdae4;
    border-radius:9px;
    padding:11px 13px;
    background:#fff;
    color:var(--navy);
}
.field small {
    color:var(--muted);
    font-size:11px;
}
.form-actions {
    margin-top:22px;
}
.result {
    background:#eff9f5;
    border:1px solid #d0eee3;
    border-radius:14px;
    padding:24px;
    margin-top:24px;
}
.result[hidden] {
    display:none;
}
.result h3 {
    margin:0 0 16px;
    font-size:19px;
}
.result-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
}
.metric {
    background:#fff;
    border:1px solid #d4eadf;
    border-radius:10px;
    padding:15px;
}
.metric small {
    display:block;
    color:var(--muted);
    font-weight:700;
    margin-bottom:5px;
}
.metric strong {
    font-size:clamp(16px,2vw,24px);
    font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color:#096c5d;
    overflow-wrap:anywhere;
}
.note {
    color:var(--muted);
    font-size:12px;
    margin:14px 0 0;
}
.error {
    color:#a52a2a;
    font-size:13px;
    margin-top:12px;
}
.error[hidden] {
    display:none;
}
.content h2 {
    margin:29px 0 10px;
    font-size:24px;
}
.content h3 {
    font-size:18px;
    margin:24px 0 8px;
}
.content p,.content li {
    color:#57677a;
}
.content ul {
    padding-left:23px;
}
.content li {
    margin-bottom:7px;
}
.formula {
    background:#f1f7fc;
    padding:17px;
    border-left:4px solid var(--teal);
    border-radius:6px;
    overflow-wrap:anywhere;
}
.aside h3 {
    font-size:17px;
    margin-top:0;
}
.aside a {
    display:block;
    padding:12px 0;
    border-bottom:1px solid var(--line);
    font-size:14px;
    text-decoration:none;
    font-weight:700;
}
.aside a:last-child {
    border:0;
}
.muted {
    color:var(--muted);
}
.legal {
    max-width:830px;
    margin:50px auto 85px;
}
.legal h2 {
    margin-top:30px;
}
.legal p,.legal li {
    color:#586a7f;
}
.site-footer {
    background:#102339;
    color:#bbcad8;
    padding:53px 0 22px;
}
.footer-grid {
    display:grid;
    grid-template-columns:1.6fr 1fr 1fr;
    gap:35px;
}
.site-footer .brand,.site-footer h3 {
    color:#fff;
}
.site-footer a {
    display:block;
    color:#cad8e3;
    text-decoration:none;
    font-size:14px;
    margin:10px 0;
}
.site-footer p {
    max-width:330px;
    font-size:13px;
}
.footer-bottom {
    border-top:1px solid #304053;
    margin-top:35px;
    padding-top:21px;
    font-size:12px;
    display:flex;
    justify-content:space-between;
    gap:15px;
}
.badge {
    color:#087766;
    background:#e6f6ee;
    padding:6px 11px;
    border-radius:50px;
    font-size:12px;
    font-weight:800;
    display:inline-block;
}
@media(max-width:820px) {
    .hero-inner,.layout {
        grid-template-columns:1fr;
    }
    .preview {
        max-width:540px;
        transform:none;
    }
    .cards,.features {
        grid-template-columns:repeat(2,1fr);
    }
    .aside {
        display:none;
    }
}
@media(max-width:600px) {
    .nav {
        align-items:flex-start;
        flex-direction:column;
        padding:15px 0;
    }
    .nav-links {
        gap:15px;
    }
    .nav-links a {
        font-size:13px;
    }
    .hero {
        padding:60px 0;
    }
    .hero h1 {
        font-size:38px;
    }
    .section {
        padding:55px 0;
    }
    .cards,.features,.fields,.result-grid,.footer-grid {
        grid-template-columns:1fr;
    }
    .panel {
        padding:22px;
    }
    .banner {
        padding:29px;
        flex-direction:column;
        align-items:flex-start;
    }
    .footer-bottom {
        flex-direction:column;
    }
    .preview .big {
        font-size:32px;
    }
}
@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior:auto;
    }
    .btn {
        transition:none;
    }
}


/* LANGUAGE SWITCHER */

.language-switcher {
    display: flex;
    align-items: center;
}

.language-switcher select {
    max-width: 160px;
    padding: 10px 30px 10px 12px;
    border: 1px solid #d7e3df;
    border-radius: 9px;
    background-color: #ffffff;
    color: #163b35;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.language-switcher select:hover {
    border-color: #087f70;
}

.language-switcher select:focus-visible {
    outline: 2px solid #087f70;
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .language-switcher {
        width: 100%;
        justify-content: center;
    }
}


/* MOBILE NAVIGATION IMPROVEMENTS */

@media (max-width: 768px) {

    .site-header .nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .site-header .brand {
        flex-shrink: 0;
    }

    .site-header .nav-links {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
    }

    .site-header .nav-links > a {
        font-size: 13px;
    }

    .site-header .nav-cta {
        padding: 9px 12px;
    }

    .language-switcher {
        width: auto;
        justify-content: center;
    }

    .language-switcher select {
        max-width: 140px;
        padding: 9px 25px 9px 10px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {

    .site-header .nav-links {
        gap: 8px;
    }

    .site-header .nav-links > a {
        font-size: 12px;
    }
}


/* ====================================
   RESPONSIVE NAVIGATION
==================================== */

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #d7e3df;
    border-radius: 10px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #163b35;
    border-radius: 2px;
}

.menu-toggle:focus-visible {
    outline: 2px solid #087f70;
    outline-offset: 3px;
}

@media (min-width: 769px) {
    .site-header .nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

    .site-header .nav-links {
        width: auto;
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    .site-header .nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .site-header .brand {
        flex-shrink: 0;
    }

    .nav-controls {
        margin-left: auto;
    }

    .menu-toggle {
        display: flex;
    }

    .site-header .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 6px;
        padding: 15px 0;
        border-top: 1px solid #e2e8f0;
    }

    .site-header .nav-links.is-open {
        display: flex;
    }

    .site-header .nav-links > a {
        display: block;
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    .site-header .nav-links > a:hover {
        background: #e8f7f2;
    }

    .language-switcher {
        width: auto;
    }

    .language-switcher select {
        max-width: 120px;
        font-size: 13px;
    }
}


/* =========================================
   EUROFACIL - MOBILE HEADER FIX
========================================= */

@media (max-width: 768px) {

    .site-header .nav {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .site-header .brand {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        min-width: 0;
        font-size: 17px;
        white-space: nowrap;
    }

    .site-header .brand-mark {
        flex-shrink: 0;
    }

    .site-header .nav-controls {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-shrink: 0;
        gap: 8px;
        margin-left: auto;
    }

    .site-header .language-switcher {
        display: flex;
        width: auto;
        flex-shrink: 0;
    }

    .site-header .language-switcher select {
        width: 112px;
        max-width: 112px;
        min-width: 0;
        padding: 9px 20px 9px 8px;
        font-size: 12px;
    }

    .site-header .menu-toggle {
        display: flex;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    /* El menú obert ocupa una fila inferior */
    .site-header .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        padding: 15px 20px;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
        z-index: 100;
    }

    .site-header .nav-links.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .site-header {
        position: relative;
        z-index: 100;
    }
}

/* EXTRA SMALL SCREENS */

@media (max-width: 360px) {

    .site-header .brand {
        font-size: 15px;
    }

    .site-header .language-switcher select {
        width: 92px;
        max-width: 92px;
        font-size: 11px;
    }

    .site-header .nav-controls {
        gap: 5px;
    }

    .site-header .menu-toggle {
        width: 36px;
        height: 36px;
    }
}

/* =========================================
   EUROFACIL - EXTRA SPACING MOBILE HEADER
========================================= */

@media (max-width: 768px) {
    .site-header {
        padding-left: 10px;
        padding-right: 10px;
    }

    .site-header .nav {
        padding-top: 10px;
        padding-bottom: 10px;
        gap: 12px;
    }

    .site-header .brand {
        margin-right: 10px;
    }

    .site-header .nav-controls {
        gap: 10px;
    }

    .site-header .language-switcher select {
        padding-left: 12px;
        padding-right: 26px;
    }

    .site-header .menu-toggle {
        margin-left: 2px;
    }
}

@media (max-width: 360px) {
    .site-header {
        padding-left: 8px;
        padding-right: 8px;
    }

    .site-header .nav {
        gap: 8px;
    }

    .site-header .brand {
        margin-right: 6px;
    }

    .site-header .nav-controls {
        gap: 6px;
    }
}