/* ================================================================
   GESTORÍA CHRISTIAN SÁNCHEZ — Global Styles
   global.css · Ranking Online · 2025
   ================================================================ */

/* ── 1. Tokens ─────────────────────────────────────────────────── */
:root {
    --color-bg:      #F7F9FF;
    --color-primary: #0B60CD;
    --color-dark:    #2F2885;
    --color-accent:  #22D3EE;
    --color-cream:   #EEF2FA;
    --color-text:    #1A1F3C;
    --color-muted:   #5B6484;
    --color-border:  #D4DCEC;

    --gradient-brand: linear-gradient(135deg, var(--color-primary), var(--color-dark));

    --font-serif: 'DM Serif Display', Georgia, serif;
    --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

    --r-sm:   6px;
    --r-md:   12px;
    --r-lg:   20px;
    --r-pill: 100px;

    --sh-sm: 0 1px 3px rgb(26 34 50/.08), 0 1px 2px rgb(26 34 50/.05);
    --sh-md: 0 4px 14px rgb(26 34 50/.10), 0 2px 4px rgb(26 34 50/.06);
    --sh-lg: 0 12px 36px rgb(26 34 50/.13), 0 4px 10px rgb(26 34 50/.06);

    --ease:   200ms ease-out;
    --z-nav:  100;
    --z-float: 50;
}

/* ── 2. Reset ───────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

img, svg  { display: block; max-width: 100%; }
a         { color: inherit; text-decoration: none; }
ul, ol    { list-style: none; }
address   { font-style: normal; }

/* ── 3. Layout ──────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.section           { padding-block: clamp(4rem, 8vw, 7rem); }
.section--dark     { background-color: var(--color-primary); color: var(--color-cream); }
.section--cream    { background-color: var(--color-cream); }
.section--charcoal { background-color: var(--color-dark); color: var(--color-cream); }

.section-eyebrow {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-header {
    max-width: 640px;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    color: var(--color-primary);
}

.section--dark .section-header h2,
.section--charcoal .section-header h2 { color: var(--color-cream); }
.section--cream .section-header h2    { color: var(--color-dark); }

/* ── 4. Typography ──────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; }
p          { max-width: 65ch; line-height: 1.7; }

/* ── 5. Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.5rem;
    border-radius: var(--r-pill);
    font-family: var(--font-sans);
    font-size: .9375rem;
    font-weight: 500;
    letter-spacing: .01em;
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--ease), color var(--ease),
        border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.btn-lg { padding: .9rem 2rem; font-size: 1rem; }

.btn-accent {
    background-color: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-accent:hover {
    background-color: #0891B2;
    border-color: #0891B2;
    box-shadow: var(--sh-md);
}

.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    border-color: transparent;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0d6fe0, #3830a0);
    border-color: transparent;
    box-shadow: var(--sh-md);
}

.btn-ghost {
    background-color: transparent;
    color: rgba(245,240,232,.85);
    border-color: rgba(245,240,232,.3);
}
.btn-ghost:hover {
    background-color: rgba(245,240,232,.08);
    border-color: rgba(245,240,232,.55);
}

.btn-outline-primary {
    background: var(--gradient-brand);
    color: #fff;
    border-color: transparent;
}
.btn-outline-primary:hover {
    background: linear-gradient(135deg, #0d6fe0, #3830a0);
    border-color: transparent;
    box-shadow: var(--sh-md);
}

.btn-outline-accent {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-outline-accent:hover {
    background-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 8px 20px rgba(34, 211, 238, 0.3);
}

/* ── 6. Navigation ──────────────────────────────────────────────── */
.nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: var(--z-nav);
    padding-block: 1.125rem;
    transition: background-color var(--ease), box-shadow var(--ease), padding-block var(--ease);
}

.nav--scrolled {
    background-color: rgba(47,40,133,.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(255,255,255,.07);
    padding-block: .875rem;
}

.nav--solid {
    background-color: var(--color-dark);
}

.nav-inner { display: flex; align-items: center; gap: 1.5rem; }

.nav-logo  { display: flex; flex-direction: row; align-items: center; line-height: 1.2; flex-shrink: 0; }
.nav-logo-name    { font-family: var(--font-serif); font-size: 1.25rem; color: #fff; line-height: 1.1; }
.nav-logo-tagline { font-size: .68rem; color: rgba(245,240,232,.5); letter-spacing: .06em; text-transform: uppercase; }

.nav-logo-img {
    height: 34px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    transition: opacity var(--ease);
}
.nav-logo:hover .nav-logo-img { opacity: .85; }

.nav-links {
    display: flex;
    align-items: center;
    gap: .125rem;
    margin-left: auto;
}

.nav-links a {
    padding: .375rem .75rem;
    font-size: .875rem;
    font-weight: 500;
    color: rgba(245,240,232,.75);
    border-radius: var(--r-sm);
    transition: color var(--ease), background-color var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: #fff;
    background-color: rgba(245,240,232,.08);
}

.nav-cta { flex-shrink: 0; }

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .625rem;
    margin-left: auto;
}

.nav-hamburger span {
    display: block;
    height: 2px;
    background-color: rgba(245,240,232,.85);
    border-radius: 2px;
    transition: transform var(--ease), opacity var(--ease);
}

/* ── 7. Page Hero (inner pages) ─────────────────────────────────── */
.page-hero {
    position: relative;
    min-height: 62vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background-color: var(--color-dark);
    background-image:
        radial-gradient(ellipse 70% 60% at 100% 100%, rgba(11,96,205,.45), transparent),
        radial-gradient(ellipse 50% 60% at 0% 0%,   rgba(47,40,133,.7), transparent),
        radial-gradient(ellipse 40% 40% at 50% 100%, rgba(34,211,238,.06), transparent);
    padding-top: 5.5rem;
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    padding-block: clamp(3rem, 7vw, 5rem);
}

.page-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
    line-height: 1;
    animation: heroUp .75s ease-out .1s both;
}

.page-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5.5vw, 4.75rem);
    line-height: 1.03;
    letter-spacing: -.025em;
    color: #f5f0e8;
    margin-bottom: 1.375rem;
    max-width: 20ch;
    animation: heroUp .9s ease-out .25s both;
}

.page-hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.75;
    color: rgba(245,240,232,.6);
    max-width: 50ch;
    margin-bottom: 2.25rem;
    animation: heroUp .75s ease-out .4s both;
}

.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .875rem;
    animation: heroUp .75s ease-out .55s both;
}

@keyframes heroUp {
    from { opacity: 0; transform: translateY(1.5rem); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 8. Intro text block ────────────────────────────────────────── */
.intro-text p {
    font-size: 1.0625rem;
    color: var(--color-muted);
    line-height: 1.8;
    max-width: 70ch;
}

.intro-text p + p { margin-top: 1.25rem; }

/* ── 9. Numbered process list ───────────────────────────────────── */
.process-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    counter-reset: process;
}

.process-item {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    padding: clamp(1.75rem, 3vw, 2.25rem);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    counter-increment: process;
    transition: box-shadow var(--ease), transform var(--ease);
}

.process-item:hover {
    box-shadow: var(--sh-md);
    transform: translateY(-3px);
}

.process-num {
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--color-accent);
    opacity: .8;
}

.process-num::before { content: counter(process, decimal-leading-zero); }

.process-body p {
    font-size: 1rem;
    color: var(--color-muted);
    line-height: 1.7;
    max-width: none;
}

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

@media (max-width: 599px) {
    .process-list { grid-template-columns: 1fr; }
}

/* ── 10. Feature / bullet list ──────────────────────────────────── */
.feature-list { display: flex; flex-direction: column; gap: .875rem; }

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 1rem;
    color: var(--color-muted);
    line-height: 1.65;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--color-accent);
}

/* ── 11. Service blocks (titled paragraphs) ─────────────────────── */
.service-blocks {
    border-top: 1px solid var(--color-border);
}

.service-block {
    padding-block: clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--color-border);
}

.service-block h3 {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.12;
    color: var(--color-primary);
    margin-bottom: .875rem;
}

.service-block p {
    font-size: 1rem;
    color: var(--color-muted);
    line-height: 1.75;
}

/* ── 12. Callout / note (price callout) ────────────────────────── */
.content-note {
    position: relative;
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--r-lg);
    padding: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.75rem, 3.5vw, 2.75rem) clamp(4.5rem, 8vw, 6rem);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    max-width: 760px;
    margin-inline: auto;
    transition: box-shadow var(--ease), transform var(--ease);
}

/* Banda lateral con degradado de marca */
.content-note::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--color-accent), var(--color-primary));
}

/* Icono € decorativo */
.content-note::after {
    content: '€';
    position: absolute;
    inset-inline-start: clamp(1.5rem, 3vw, 2.25rem);
    inset-block-start: clamp(1.5rem, 3vw, 2rem);
    width: clamp(2.25rem, 4vw, 2.75rem);
    height: clamp(2.25rem, 4vw, 2.75rem);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(11, 96, 205, .2);
}

.content-note:hover {
    box-shadow: var(--sh-md);
    transform: translateY(-2px);
}

.content-note p {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.75;
    max-width: none;
}

.content-note p + p { margin-top: .875rem; }

@media (max-width: 599px) {
    .content-note {
        padding: clamp(1.5rem, 4vw, 2rem);
        padding-top: clamp(4.5rem, 12vw, 5.25rem);
    }
    .content-note::before {
        inset-inline-end: 0;
        inset-inline-start: 0;
        inset-block: 0 auto;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    }
    .content-note::after {
        inset-inline-start: clamp(1.5rem, 4vw, 2rem);
        inset-block-start: clamp(1.5rem, 4vw, 2rem);
    }
}

/* ── 13. Value cards ────────────────────────────────────────────── */
.value-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.value-card {
    background-color: #fff;
    border-radius: var(--r-md);
    padding: clamp(1.75rem, 3vw, 2.5rem);
    box-shadow: var(--sh-sm);
    border: 1px solid rgba(0,0,0,.04);
    transition: transform var(--ease), box-shadow var(--ease);
}

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

.value-card-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(34,211,238,.1);
    color: var(--color-accent);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: background-color var(--ease), color var(--ease);
}

.value-card:hover .value-card-icon {
    background-color: var(--color-accent);
    color: #fff;
}

.value-card h3 {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    color: var(--color-dark);
    margin-bottom: .625rem;
}

.value-card p {
    font-size: .9375rem;
    color: var(--color-muted);
    line-height: 1.65;
    max-width: none;
}

/* ── 14. Team grid ──────────────────────────────────────────────── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.team-card {
    background-color: #fff;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    border: 1px solid var(--color-border);
}

.team-photo {
    aspect-ratio: 4/5;
    background-color: var(--color-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-size: 2.5rem;
    font-family: var(--font-serif);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.team-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(11,96,205,.06));
}

.team-info { padding: 1.25rem; }

.team-name {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--color-text);
    margin-bottom: .25rem;
}

.team-role {
    font-size: .8125rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--color-accent);
}

/* ── 15. Contact form ───────────────────────────────────────────── */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: .5rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-label { font-size: .875rem; font-weight: 500; color: var(--color-text); }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--r-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text);
    background-color: #fff;
    transition: border-color var(--ease), box-shadow var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11,96,205,.1);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235a6a7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    padding-right: 2.75rem;
    cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 8rem; }

.form-legal {
    font-size: .8125rem;
    color: var(--color-muted);
    line-height: 1.55;
    max-width: none;
}

.form-legal a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── 16. CTA Banner ─────────────────────────────────────────────── */
.cta-banner {
    background-color: var(--color-dark);
    padding-block: clamp(4.5rem, 9vw, 6.5rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(11,96,205,.18), transparent);
    pointer-events: none;
}

.cta-banner .container { position: relative; }

.cta-banner h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    color: var(--color-cream);
    margin-bottom: 1rem;
}

.cta-banner p {
    font-size: 1.0625rem;
    color: rgba(245,240,232,.58);
    margin-bottom: 2.5rem;
    margin-inline: auto;
}

.cta-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* ── 17. Footer ─────────────────────────────────────────────────── */
.footer {
    background-color: var(--color-text);
    color: rgba(245,240,232,.65);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    padding-block: 3.5rem;
}

.footer-logo-img {
    height: 48px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    opacity: .85;
    margin-bottom: .875rem;
}

.footer-brand-desc { font-size: .875rem; line-height: 1.65; max-width: 30ch; }

.footer-col-title {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(245,240,232,.38);
    margin-bottom: 1rem;
}

.footer-nav ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-nav a  { font-size: .9rem; transition: color var(--ease); }
.footer-nav a:hover { color: var(--color-cream); }

.footer-contact address { display: flex; flex-direction: column; gap: .5rem; }
.footer-contact p { font-size: .875rem; max-width: none; line-height: 1.5; }

.footer-bottom { border-top: 1px solid rgba(245,240,232,.08); padding-block: 1.375rem; }

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-bottom p  { font-size: .8125rem; max-width: none; }
.footer-bottom nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-bottom a  { font-size: .8125rem; transition: color var(--ease); }
.footer-bottom a:hover { color: var(--color-cream); }

/* ── 18. WhatsApp float ─────────────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: var(--z-float);
    display: flex;
    align-items: center;
    gap: .5rem;
    background-color: #25d366;
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: var(--r-pill);
    font-size: .9rem;
    font-weight: 500;
    box-shadow: 0 4px 18px rgba(37,211,102,.38);
    cursor: pointer;
    transition: background-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.whatsapp-float:hover {
    background-color: #1da853;
    box-shadow: 0 6px 28px rgba(37,211,102,.48);
    transform: translateY(-2px);
}

/* ── 19. Responsive ─────────────────────────────────────────────── */
@media (max-width: 899px) {

    /*
     * Z-INDEX FIX: .nav creates a stacking context (position:fixed, z-index:100).
     * .nav-links (overlay, z:99) is painted above normal-flow children inside that
     * context, hiding the logo and hamburger behind it. Giving logo and hamburger
     * explicit z-index as flex-items of .nav-inner lifts them above the overlay
     * within .nav's stacking context (100 > 99).
     *
     * SAFARI FIX: backdrop-filter on .nav--scrolled creates a containing-block for
     * position:fixed descendants in WebKit, constraining the overlay to the nav bar
     * height instead of the viewport. Remove it when the overlay is open.
     */

    /* Remove backdrop-filter when menu is open (Safari fixed-position bug) */
    .nav:has(.nav-hamburger[aria-expanded="true"]) {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: var(--color-dark);
        box-shadow: none;
        padding-block: 1.125rem;
    }

    /* Logo and X always float above the overlay (z:99) */
    .nav-logo      { z-index: 100; }
    .nav-hamburger { display: flex; z-index: 100; }

    /* Full-screen overlay */
    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: fixed;
        inset: 0;
        background-color: var(--color-dark);
        padding-top: 5.5rem;
        padding-inline: 1.75rem;
        padding-bottom: 3rem;
        gap: 0;
        z-index: 99;
        overflow-y: auto;
    }

    .nav-links.is-open {
        display: flex;
        animation: navOverlayIn .22s ease both;
    }

    @keyframes navOverlayIn {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Link rows with dividers */
    .nav-links li {
        border-bottom: 1px solid rgba(245,240,232,.1);
    }
    .nav-links li:first-child {
        border-top: 1px solid rgba(245,240,232,.1);
    }

    .nav-links a {
        display: block;
        font-size: 1.25rem;
        font-weight: 500;
        padding: 1.125rem 0;
        color: rgba(245,240,232,.75);
        background: none !important;
        border-radius: 0;
        transition: color var(--ease);
    }
    .nav-links a:hover { color: #fff; }
    .nav-links a[aria-current="page"] { color: var(--color-accent); }

    /* Hamburger → X animation */
    .nav-hamburger[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-hamburger[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .nav-hamburger[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-cta { display: none; }

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

@media (max-width: 639px) {
    .footer-inner     { grid-template-columns: 1fr; gap: 2rem; }
    .form-row         { grid-template-columns: 1fr; }
    .value-cards      { grid-template-columns: 1fr; }
}

/* ── 20. Focus & a11y ───────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

/* ── 21. Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── 22. Situaciones cards (¿Reconoces alguna...?) ──────────────── */
.situaciones-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.situacion-card {
    background-color: #fff;
    border-radius: var(--r-md);
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid var(--color-border);
    box-shadow: var(--sh-sm);
    transition: transform var(--ease), box-shadow var(--ease);
    position: relative;
    padding-left: clamp(2.5rem, 4vw, 3.25rem);
}

.situacion-card::before {
    content: '';
    position: absolute;
    left: clamp(1.25rem, 2.5vw, 1.5rem);
    top: clamp(1.5rem, 3vw, 2rem);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-accent);
}

.situacion-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
}

.situacion-card p {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
}

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

/* ── 23. Process list with titled steps ─────────────────────────── */
.process-step-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: .375rem;
    line-height: 1.25;
}

/* ── 24. Alerta / consecuencias block ───────────────────────────── */
.alerta-intro {
    background: rgba(34, 211, 238, .06);
    border: 1px solid rgba(34, 211, 238, .22);
    border-radius: var(--r-md);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.alerta-intro p {
    font-size: 1rem;
    color: var(--color-muted);
    line-height: 1.75;
    max-width: none;
}

.alerta-intro p + p { margin-top: .875rem; }

.alerta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.alerta-card {
    background-color: #fff;
    border-radius: var(--r-md);
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    display: flex;
    flex-direction: column;
}

.alerta-card:nth-child(2) { border-top-color: var(--color-dark); }
.alerta-card:nth-child(3) { border-top-color: var(--color-accent); }

.alerta-card h3 {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--color-primary);
    margin-bottom: .75rem;
    line-height: 1.2;
}

.alerta-card:nth-child(2) h3 { color: var(--color-dark); }
.alerta-card:nth-child(3) h3 { color: var(--color-accent); }

.alerta-card p {
    font-size: .9375rem;
    color: var(--color-muted);
    line-height: 1.7;
}

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

/* ── 24b. CTA intermedio entre secciones ───────────────────────── */
.section-cta {
    display: flex;
    justify-content: center;
    margin-top: clamp(2rem, 4vw, 3rem);
}

/* ── 25. Servicios relacionados ─────────────────────────────────── */
.relacionados-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
}

.relacionado-card {
    position: relative;
    background-color: #fff;
    border-radius: var(--r-md);
    padding: clamp(1.75rem, 3.2vw, 2.25rem);
    border: 1px solid var(--color-border);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

/* Acento superior — secuencia de colores igual que honorarios */
.relacionado-card::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    background: var(--color-primary);
    transition: height var(--ease);
}

.relacionado-card:nth-child(2)::before { background: var(--color-dark); }
.relacionado-card:nth-child(3)::before { background: var(--color-accent); }

.relacionado-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-lg);
    border-color: rgba(11, 96, 205, .25);
}

.relacionado-card:hover::before { height: 4px; }

.relacionado-card h3 {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: .75rem;
}

.relacionado-card:nth-child(2) h3 { color: var(--color-dark); }
.relacionado-card:nth-child(3) h3 { color: var(--color-accent); }

.relacionado-card a.relacionado-card-title {
    color: var(--color-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: flex-start;
    gap: .5rem;
    transition: color var(--ease);
}

.relacionado-card:nth-child(2) a.relacionado-card-title { color: var(--color-dark); }
.relacionado-card:nth-child(3) a.relacionado-card-title { color: var(--color-accent); }

.relacionado-card a.relacionado-card-title::after {
    content: '→';
    font-family: var(--font-sans);
    font-size: 1.125rem;
    color: var(--color-accent);
    transition: transform var(--ease), color var(--ease);
    display: inline-block;
}

.relacionado-card:hover a.relacionado-card-title {
    color: var(--color-dark);
}

.relacionado-card:hover a.relacionado-card-title::after {
    transform: translateX(5px);
    color: var(--color-primary);
}

.relacionado-card p {
    font-size: .9375rem;
    color: var(--color-muted);
    line-height: 1.7;
    margin-top: .25rem;
    max-width: none;
}

@media (max-width: 767px) {
    .relacionados-list { grid-template-columns: 1fr; }
}

/* ── 26. FAQ block (reusable) ───────────────────────────────────── */
.faq-inner { max-width: 820px; margin-inline: auto; }

.faq-list { margin-top: 2rem; }

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
    border-top: 1px solid var(--color-border);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding-block: 1.375rem;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    transition: color var(--ease);
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2322D3EE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform var(--ease);
}

details[open] > .faq-question::after { transform: rotate(180deg); }

details[open] > .faq-question { color: var(--color-primary); }

.faq-answer { padding-bottom: 1.375rem; }

.faq-answer p {
    font-size: .9375rem;
    color: var(--color-muted);
    line-height: 1.7;
}

.faq-answer p + p { margin-top: .75rem; }

/* ── Para quién es — 2-col card grid ───────────────────────────── */
.paraquien-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.paraquien-item {
    display: flex;
    flex-direction: column;
    gap: .625rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: var(--r-md);
    border-top: 3px solid var(--color-primary);
    box-shadow: var(--sh-sm);
    transition: box-shadow var(--ease), transform var(--ease);
}

.paraquien-item:hover {
    box-shadow: var(--sh-md);
    transform: translateY(-3px);
}

.paraquien-who,
.paraquien-what {
    font-size: .9375rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.paraquien-who {
    font-weight: 600;
    color: var(--color-text);
}

.paraquien-what {
    color: var(--color-muted);
}

/* Center last card when total is odd */
.paraquien-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.625rem);
    margin-inline: auto;
}

@media (max-width: 639px) {
    .paraquien-list { grid-template-columns: 1fr; }
    .paraquien-item:last-child:nth-child(odd) { max-width: 100%; grid-column: auto; }
}

/* ── Feature list — 2-column large variant ──────────────────────── */
.feature-list--large {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .875rem;
}

.feature-list--large li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin-inline: auto;
}

@media (max-width: 599px) {
    .feature-list--large { grid-template-columns: 1fr; }
    .feature-list--large li:last-child:nth-child(odd) { max-width: 100%; }
}

/* ── Section header — compact variant ───────────────────────────── */
.section-header--compact {
    margin-bottom: 1.5rem;
}

/* ── Intro two-column layout ────────────────────────────────────── */
.intro-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.intro-two-col-img {
    border-radius: var(--r-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.intro-two-col-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 767px) {
    .intro-two-col { grid-template-columns: 1fr; }
    .intro-two-col-img { order: -1; aspect-ratio: 16/9; }
}

/* ── Precio / Honorarios — factors grid ─────────────────────────── */
.precio-factors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.precio-factor-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: var(--r-md);
    padding: clamp(1.5rem, 3vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: .625rem;
    box-shadow: var(--sh-sm);
}

.precio-factor-card:nth-child(2) { border-top-color: var(--color-dark); }
.precio-factor-card:nth-child(3) { border-top-color: var(--color-accent); }

.precio-factor-icon {
    width: 2.25rem;
    height: 2.25rem;
    background-color: rgba(11, 96, 205, .08);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.precio-factor-card:nth-child(2) .precio-factor-icon {
    background-color: rgba(47, 40, 133, .08);
    color: var(--color-dark);
}

.precio-factor-card:nth-child(3) .precio-factor-icon {
    background-color: rgba(34, 211, 238, .1);
    color: var(--color-accent);
}

.precio-factor-card h3 {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--color-primary);
    line-height: 1.2;
}

.precio-factor-card:nth-child(2) h3 { color: var(--color-dark); }
.precio-factor-card:nth-child(3) h3 { color: var(--color-accent); }

.precio-factor-card p {
    font-size: .9375rem;
    color: var(--color-muted);
    line-height: 1.65;
    max-width: none;
}

.precio-cta-note {
    background: var(--color-cream);
    border-radius: var(--r-md);
    padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.precio-cta-note p {
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 55ch;
}

@media (max-width: 767px) {
    .precio-factors { grid-template-columns: 1fr; }
    .precio-cta-note { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}
