/* ============================================================
   TSM — Global Design System (shared across all pages)
   ============================================================ */

/* ---------- Variables ---------- */
:root {
    /* Brand palette — TSM official Pantone references
       (Pantone 1788 C / 279 C / 375 C / 1495 C / Neutral Black C) */
    --primary: #F02F43;        /* Pantone 1788 C — rojo TSM */
    --primary-light: #FFE3E6;
    --primary-dark: #C4162A;
    --blue: #1188F0;           /* Pantone 279 C */
    --blue-light: #DBEDFF;
    --blue-dark: #0A6BC4;
    --green: #8AD431;          /* Pantone 375 C */
    --green-light: #EAF8D0;
    --green-dark: #6DAA22;
    --orange: #FF973E;         /* Pantone 1495 C */
    --orange-light: #FFE8D0;
    --orange-dark: #D67220;
    --coral: #F02F43;
    --coral-light: #FFE3E6;
    /* Text-safe brand variants (≥4.5:1 sobre papel) — úsalos en texto pequeño
       (kickers, tags, labels). Los tonos vivos quedan para títulos grandes,
       fondos y acentos gráficos. */
    --red-text: #D9152A;
    --green-text: #4A7A12;
    --orange-text: #A8560F;
    --blue-text: #0A6BC4;
    --dark: #1A1A18;
    --dark-soft: #2A2A28;
    --gray-900: #111827;
    --gray-700: #374151;
    --gray-500: #6B7280;
    --gray-300: #D1D5DB;
    --gray-100: #F3F4F6;
    --white: #FFFFFF;
    /* Editorial paper tokens (warm, not stark) */
    --paper: #FAFAF7;
    --paper-tint: #F2EFE7;
    --paper-line: #E5E1D8;
    --ink: #0F172A;
    --ink-muted: #475569;
    /* Tu Parque (environmental) — uses brand green */
    --park-green: #8AD431;
    --park-green-dark: #6DAA22;
    --park-green-soft: #EAF8D0;
    /* Tu Parque sub-brand palette — Pantone 368 C / 1788 C / 137 C / 285 C */
    --tp-green: #76BC21;       /* 368 C — hoja / naturaleza */
    --tp-green-ink: #5A9119;
    --tp-coral: #F32735;       /* 1788 C — pétalo / comunidad */
    --tp-coral-ink: #CE1E28;
    --tp-sun:   #FFA400;       /* 137 C — sol / palapa */
    --tp-sun-ink:  #B87400;
    --tp-water: #0071CE;       /* 285 C — agua / fresco */
    --tp-water-ink: #005CA8;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 999px;
    --font: 'Inter', -apple-system, sans-serif;
    --font-display: 'DM Serif Display', Georgia, serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow: 0 4px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,.12);
    --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.05; }

/* A11y: visible focus ring across all interactive elements */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip link (visible sólo con foco de teclado) */
.skip-link {
    position: absolute;
    top: 8px; left: 8px;
    z-index: 1000;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--paper);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transform: translateY(-200%);
    transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); outline-color: var(--paper); }

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

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

.container {
    width: min(90%, 1200px);
    margin: 0 auto;
}

/* ---------- Reusable Components ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
}
.btn--primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn--primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(240,47,67,.3);
}
.btn--outline {
    background: transparent;
    color: var(--gray-900);
    border-color: var(--gray-300);
}
.btn--outline:hover {
    border-color: var(--gray-900);
    transform: translateY(-2px);
}
.btn--white {
    background: var(--white);
    color: var(--gray-900);
}
.btn--white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.4);
}
.btn--outline-white:hover { border-color: var(--white); }
.btn--lg { padding: 18px 40px; font-size: 18px; border-radius: var(--radius-lg); }
/* Tu Parque (sub-marca) */
.btn--park {
    background: var(--tp-coral);
    color: var(--white);
    border-color: var(--tp-coral);
    border-radius: 999px;
}
.btn--park:hover {
    background: var(--tp-coral-ink);
    border-color: var(--tp-coral-ink);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(243,39,53,.35);
}
/* WhatsApp (único uso del verde WA) */
.btn--wa {
    background: #25D366;
    border-color: #25D366;
    color: #0B2E19;
    border-radius: 999px;
    gap: 10px;
    font-weight: 700;
}
.btn--wa:hover { background: #1EBE5A; border-color: #1EBE5A; color: #0B2E19; transform: translateY(-2px); box-shadow: 0 10px 28px -10px rgba(37,211,102,.7); }

/* ============================================================
   SHARED EDITORIAL COMPONENTS (kicker, link-arrow, placeholders,
   sparks, watermarks) — una sola fuente para todas las páginas
   ============================================================ */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.4px;
    color: var(--ink-muted);
}
.kicker::before {
    content: '';
    width: 24px; height: 1px;
    background: currentColor;
    flex: none;
}
.kicker--green  { color: var(--green-text); }
.kicker--coral  { color: var(--red-text); }
.kicker--orange { color: var(--orange-text); }
.kicker--blue   { color: var(--blue-text); }
.kicker--light  { color: rgba(255,255,255,.72); }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
    transition: var(--transition);
}
.link-arrow:hover { color: var(--primary); gap: 12px; }
.link-arrow svg { transition: var(--transition); flex: none; }
.link-arrow--center { display: flex; width: max-content; margin: 48px auto 0; }

/* Ghost button (subrayado editorial) */
.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: transparent;
    padding-left: 8px; padding-right: 8px;
    border-bottom: 2px solid var(--ink);
    border-radius: 0;
}
.btn--ghost:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* Intentional placeholders (reemplazar con fotos reales) */
.ph {
    position: relative;
    width: 100%;
    background:
        repeating-linear-gradient(135deg, transparent 0 12px, rgba(15,23,42,.04) 12px 13px),
        var(--paper-tint);
    border: 1px dashed rgba(15,23,42,.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--ink-muted);
    overflow: hidden;
    border-radius: 4px;
}
.ph::before {
    content: '';
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(15,23,42,.08);
    pointer-events: none;
}
.ph__label {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    background: var(--ink);
    color: var(--paper);
    padding: 4px 10px;
    border-radius: 2px;
    position: relative;
}
.ph__hint {
    font-size: 13px;
    color: var(--ink-muted);
    text-align: center;
    padding: 0 16px;
    position: relative;
}
.ph--portrait { aspect-ratio: 4/5; }
.ph--park     { aspect-ratio: 21/9; min-height: 280px; }

/* Isotipo ghost watermarks on section backgrounds */
.tsm-watermark {
    position: absolute;
    z-index: -1;
    opacity: .05;
    pointer-events: none;
    user-select: none;
}

/* Brand sparks — confetti flotante en los cuatro colores.
   Posiciona cada instancia inline (top/left/right/bottom + animation-delay). */
.tsm-spark {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    animation: dot-float 7s ease-in-out infinite;
}
.tsm-spark--sm { width: 8px;  height: 8px; }
.tsm-spark--md { width: 12px; height: 12px; }
.tsm-spark--lg { width: 18px; height: 18px; }
.tsm-spark--red    { background: var(--primary); }
.tsm-spark--blue   { background: var(--blue); }
.tsm-spark--green  { background: var(--green); }
.tsm-spark--orange { background: var(--orange); }
.tsm-spark--ring { background: transparent; border: 3px solid; }
.tsm-spark--ring.tsm-spark--red    { border-color: var(--primary); }
.tsm-spark--ring.tsm-spark--blue   { border-color: var(--blue); }
.tsm-spark--ring.tsm-spark--green  { border-color: var(--green); }
.tsm-spark--ring.tsm-spark--orange { border-color: var(--orange); }
@keyframes dot-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Section spacing */
.section {
    padding: 120px 0;
}
.section--gray {
    background: var(--gray-100);
}
.section--dark {
    background: var(--dark);
    color: var(--white);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 32px), 1200px);
    z-index: 100;
    padding: 10px 14px 10px 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: 0 18px 44px -16px rgba(15, 23, 42, .14);
    transition: top .3s ease, padding .3s ease, box-shadow .3s ease, background .3s ease;
}
/* Gradient border (only the ring — uses mask-composite) */
.nav::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(90deg,
        var(--orange)  0 25%,
        var(--green)   25% 50%,
        var(--primary) 50% 75%,
        var(--blue)    75% 100%);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.nav--scrolled {
    top: 10px;
    padding: 8px 12px 8px 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 32px -10px rgba(15, 23, 42, .18);
}

.nav__inner {
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 36px;
    position: relative;
    z-index: 1;
}

.nav__logo { flex: none; }
.nav__logo img { height: 48px; width: auto; display: block; }
@media (max-width: 1200px) {
    .nav__inner { gap: 24px; }
    .nav__links { gap: 22px; }
}

.nav__links {
    display: flex;
    gap: 32px;
    margin-left: auto;
}

.nav__links a,
.nav__links .nav__parent {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition);
    position: relative;
}
.nav__links .nav__parent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}

.nav__links > .nav__item > a::after,
.nav__links > .nav__item > .nav__parent::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav__links a:hover,
.nav__links .nav__parent:hover { color: var(--gray-900); }
.nav__links > .nav__item > a:hover::after,
.nav__links > .nav__item > .nav__parent:hover::after { width: 100%; }
.nav__links a.is-active,
.nav__links .nav__parent.is-active { color: var(--gray-900); }
.nav__links > .nav__item > a.is-active::after,
.nav__links > .nav__item > .nav__parent.is-active::after { width: 100%; }

/* Dropdown submenu */
.nav__item { position: relative; list-style: none; }
.nav__item--cta { display: none; }
@media (max-width: 991px) { .nav__item--cta { display: block; } }
.nav__chevron { transition: transform .25s ease; }
.nav__item--dropdown:hover .nav__chevron,
.nav__item--dropdown:focus-within .nav__chevron,
.nav__item--dropdown.is-open .nav__chevron { transform: rotate(180deg); }

.nav__submenu {
    list-style: none;
    margin: 0;
    padding: 8px;
    position: absolute;
    top: calc(100% + 18px);
    left: -12px;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px;
    box-shadow: 0 18px 44px -14px rgba(15, 23, 42, .2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 10;
}
.nav__submenu::before {
    content: "";
    position: absolute;
    top: -18px; left: 0; right: 0;
    height: 18px;
}
.nav__item--dropdown:hover > .nav__submenu,
.nav__item--dropdown:focus-within > .nav__submenu,
.nav__item--dropdown.is-open > .nav__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav__submenu a {
    display: block;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
    transition: var(--transition);
}
.nav__submenu a::after { display: none; }
.nav__submenu a:hover { background: var(--paper-tint); color: var(--primary); }
.nav__submenu a.is-active { background: var(--paper-tint); color: var(--primary); }

.nav__cta {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    padding: 10px 22px;
    background: var(--primary);
    color: var(--white);
    border-radius: 999px;
    transition: var(--transition);
    flex: none;
}
.nav__cta:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -6px rgba(240, 47, 67, .5);
}
.nav--scrolled .nav__cta { padding: 8px 20px; }

.nav__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px; height: 44px;   /* target táctil mínimo */
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    transition: background .2s ease;
}
.nav__burger:hover { background: rgba(15,23,42,.05); }
.nav__burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--gray-900);
    border-radius: 2px;
    transition: var(--transition);
}
.nav__burger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   FOOTER — editorial light
   ============================================================ */
.footer {
    position: relative;
    padding: 80px 0 32px;
    background: var(--paper);
    color: var(--ink-muted);
}
.footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--orange)  0 25%,
        var(--green)   25% 50%,
        var(--primary) 50% 75%,
        var(--blue)    75% 100%
    );
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--paper-line);
}

.footer__logo {
    height: 64px;
    width: auto;
    margin-bottom: 20px;
    filter: none;
}

.footer__brand p {
    font-size: 15px;
    line-height: 1.6;
    max-width: 300px;
    color: var(--ink-muted);
}

.footer__col h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--ink);
    margin-bottom: 20px;
}

.footer__col ul { display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; }
.footer__col li { font-size: 15px; color: var(--ink-muted); }
.footer__col a { color: var(--ink); transition: var(--transition); }
.footer__col a:hover { color: var(--primary); }

.footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}
.footer__contact svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--primary);
}

.footer__social {
    display: flex;
    gap: 10px;
}
.footer__social + .footer__social-label { margin-top: 18px; }
.footer__social-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 8px;
}

.footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: var(--paper-tint);
    border: 1px solid var(--paper-line);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--ink);
    transition: var(--transition);
}
.footer__social a svg { width: 18px; height: 18px; display: block; }
.footer__social a svg[fill="currentColor"] { width: 15px; height: 15px; }
.footer__social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}
.footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
}
.footer__legal a { color: var(--ink); }
.footer__legal a:hover { color: var(--primary); }

.footer__bottom {
    padding-top: 32px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-muted);
}

/* ============================================================
   PROSE — contenido editable (posts, páginas genéricas, eventos)
   ============================================================ */
.tsm-prose {
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink);
    max-width: 720px;
}
.tsm-prose > * + * { margin-top: 20px; }
.tsm-prose h2, .tsm-prose h3, .tsm-prose h4 {
    font-family: var(--font);
    font-weight: 800;
    letter-spacing: -.8px;
    color: var(--ink);
    line-height: 1.15;
    margin-top: 40px;
}
.tsm-prose h2 { font-size: clamp(26px, 3vw, 32px); }
.tsm-prose h3 { font-size: 22px; letter-spacing: -.5px; }
.tsm-prose h4 { font-size: 18px; letter-spacing: -.2px; }
.tsm-prose h2 + *, .tsm-prose h3 + *, .tsm-prose h4 + * { margin-top: 12px; }
.tsm-prose a {
    color: var(--red-text);
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: var(--transition);
}
.tsm-prose a:hover { color: var(--primary-dark); }
.tsm-prose strong { font-weight: 700; }
.tsm-prose ul, .tsm-prose ol { padding-left: 24px; }
.tsm-prose ul { list-style: disc; }
.tsm-prose ol { list-style: decimal; }
.tsm-prose li + li { margin-top: 8px; }
.tsm-prose li::marker { color: var(--primary); font-weight: 700; }
.tsm-prose blockquote {
    border-left: 3px solid var(--primary);
    padding: 4px 0 4px 22px;
    margin: 32px 0;
    font-size: 20px;
    line-height: 1.5;
    font-style: italic;
    color: var(--ink);
}
.tsm-prose blockquote cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; color: var(--ink-muted); }
.tsm-prose img, .tsm-prose figure {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-top: 32px;
    margin-bottom: 32px;
}
.tsm-prose figure img { margin: 0; }
.tsm-prose figcaption, .tsm-prose .wp-caption-text {
    font-size: 13px;
    color: var(--ink-muted);
    margin-top: 10px;
}
.tsm-prose .wp-block-image, .tsm-prose .aligncenter { margin-left: auto; margin-right: auto; }
.tsm-prose iframe, .tsm-prose video, .tsm-prose .wp-block-embed__wrapper { max-width: 100%; }
.tsm-prose .wp-block-embed iframe { width: 100%; aspect-ratio: 16/9; height: auto; border-radius: 6px; }
.tsm-prose hr { border: 0; border-top: 1px solid var(--paper-line); margin: 40px 0; }
.tsm-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tsm-prose th, .tsm-prose td { padding: 12px 14px; border-bottom: 1px solid var(--paper-line); text-align: left; }
.tsm-prose th { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-muted); }
.tsm-prose pre { background: var(--paper-tint); padding: 16px 20px; border-radius: 6px; overflow-x: auto; font-size: 14px; }
.tsm-prose > *:first-child { margin-top: 0; }

/* Alineaciones clásicas de WP */
.alignleft  { float: left;  margin: 8px 28px 16px 0; }
.alignright { float: right; margin: 8px 0 16px 28px; }
.alignfull, .alignwide { max-width: 100%; }
@media (max-width: 640px) {
    .alignleft, .alignright { float: none; margin: 24px 0; }
}

/* ============================================================
   GENERIC PAGE / 404 / WooCommerce wrapper — hereda la línea editorial
   ============================================================ */
.tsm-page__hero { padding: 160px 0 40px; }
.tsm-page__hero-inner { max-width: 820px; }
.tsm-page__title {
    font-family: var(--font);
    font-size: clamp(38px, 5.5vw, 72px);
    font-weight: 800;
    letter-spacing: -2.5px;
    line-height: 1.02;
    color: var(--ink);
    margin: 20px 0 0;
}
.tsm-page__title em { font-style: normal; color: var(--primary); }
.tsm-page__lede {
    font-size: clamp(17px, 1.4vw, 20px);
    line-height: 1.6;
    color: var(--ink-muted);
    max-width: 640px;
    margin: 20px 0 0;
}
.tsm-page__media { margin: 8px 0 0; }
.tsm-page__media img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--paper-line);
    background: var(--paper-tint);
}
.tsm-page__pages { margin-top: 32px; font-size: 14px; color: var(--ink-muted); }
.tsm-page__body { padding: 40px 0 120px; }
.tsm-page__body--wide .tsm-prose { max-width: none; }

/* 404 */
.tsm-404 { padding: 180px 0 120px; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.tsm-404__code {
    display: block;
    font-family: var(--font);
    font-size: clamp(120px, 22vw, 240px);
    font-weight: 800;
    letter-spacing: -.06em;
    line-height: .9;
    color: var(--ink);
}
.tsm-404__code em { font-style: normal; color: var(--primary); }
.tsm-404__title {
    font-family: var(--font);
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--ink);
    margin: 20px 0 12px;
}
.tsm-404__lede { font-size: 18px; color: var(--ink-muted); max-width: 520px; margin: 0 auto 32px; line-height: 1.6; }
.tsm-404__actions { display: flex; gap: 20px; justify-content: center; align-items: center; flex-wrap: wrap; }
.tsm-404__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 40px auto 0;
    max-width: 640px;
    padding-top: 32px;
    border-top: 1px solid var(--paper-line);
}
.tsm-404__links a {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--paper-line);
    background: var(--white);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    transition: var(--transition);
}
.tsm-404__links a:hover { border-color: var(--primary); color: var(--primary); }

/* Fallback WooCommerce (tienda, producto, mi cuenta…) */
.tsm-woo { padding: 150px 0 100px; }
.tsm-woo .woocommerce-products-header__title,
.tsm-woo h1 { font-family: var(--font); font-weight: 800; letter-spacing: -1.5px; font-size: clamp(32px, 4vw, 48px); color: var(--ink); margin-bottom: 24px; }
.tsm-woo .button, .tsm-woo button.button {
    background: var(--primary); color: var(--white); border-radius: 999px; padding: 12px 24px; font-weight: 700; border: 0;
}
.tsm-woo .button:hover { background: var(--primary-dark); color: var(--white); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .tsm-page__hero { padding: 130px 0 32px; }
    .tsm-page__body { padding: 32px 0 80px; }
    .tsm-404 { padding: 140px 0 80px; }
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .section { padding: 80px 0; }
}

@media (max-width: 991px) {
    .nav { padding: 6px 6px 6px 14px; }
    .nav__inner { gap: 12px; }
    .nav__logo img { height: 40px; }

    /* Drawer: panel opaco, items con altura táctil, CTA incluido */
    .nav__links {
        display: none;
        position: absolute;
        top: calc(100% + 10px); left: 0; right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(22px) saturate(1.5);
        -webkit-backdrop-filter: blur(22px) saturate(1.5);
        flex-direction: column;
        gap: 0;
        padding: 8px 8px 12px;
        max-height: calc(100vh - 100px);
        max-height: calc(100dvh - 100px);
        overflow-y: auto;
        box-shadow: 0 18px 44px -14px rgba(15, 23, 42, .22);
        border: 1px solid rgba(15, 23, 42, .08);
        border-radius: 20px;
    }
    .nav__links.is-open { display: flex; animation: nav-drawer .22s ease both; }
    @keyframes nav-drawer {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .nav__item + .nav__item { border-top: 1px solid var(--paper-line); }
    .nav__links > .nav__item > a,
    .nav__links .nav__parent {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 10px 12px;
        font-size: 16px;
        font-weight: 600;
        color: var(--ink);
        border-radius: 10px;
    }
    .nav__links > .nav__item > a::after,
    .nav__links > .nav__item > .nav__parent::after { display: none; }
    .nav__links > .nav__item > a.is-active { color: var(--primary); }
    .nav__links > .nav__item > a.is-active::before {
        content: '';
        width: 6px; height: 6px;
        border-radius: 50%;
        background: var(--primary);
        margin-right: 10px;
    }
    /* En móvil el padre "Proyectos" es sólo etiqueta de grupo */
    .nav__links .nav__parent {
        min-height: 0;
        padding: 12px 12px 4px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 1.8px;
        text-transform: uppercase;
        color: var(--ink-muted);
        cursor: default;
        pointer-events: none;
    }
    .nav__cta { display: none; }
    .nav__burger { display: flex; }

    /* Submenu: flatten inline on mobile */
    .nav__submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 0 0 4px;
        margin-top: 0;
        min-width: 0;
    }
    .nav__submenu::before { display: none; }
    .nav__submenu a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 12px 8px 24px;
        font-size: 15px;
        font-weight: 500;
    }
    .nav__item--dropdown .nav__chevron { display: none; }

    /* CTA principal dentro del drawer (en desktop vive fuera del ul) */
    .nav__item--cta { border-top: 0 !important; padding: 10px 4px 0; }
    .nav__item--cta a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 48px;
        padding: 12px 20px;
        background: var(--primary);
        color: var(--white) !important;
        font-size: 15px;
        font-weight: 700;
        border-radius: 999px;
    }
    .nav__item--cta a:hover { background: var(--primary-dark); }
}

@media (max-width: 767px) {
    .section { padding: 60px 0; }
    .page-hero { padding: 120px 0 60px; }
    .tsm-page__hero { padding: 110px 0 24px; }
    .tsm-page__title { font-size: clamp(34px, 10vw, 56px); letter-spacing: -1.5px; overflow-wrap: anywhere; }
    .tsm-page__body { padding: 24px 0 64px; }
    .tsm-prose { font-size: 16px; }
    .tsm-404 { padding: 120px 0 64px; }
    .footer { padding: 56px 0 24px; }
    .footer__grid { grid-template-columns: 1fr; gap: 32px; }
    .footer__brand p { max-width: 100%; }
    .footer__col ul:not(.footer__contact) { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
}
