/* ============================================================
   modelos/style.css
   Dos partes:
   1. La página (galería y vista completa): misma familia visual que
      /portfolio y /presupuestos, para no cambiar de mundo.
   2. Las vistas de cada modelo (.wf) viven en wire.css: todo lo
      del modelo va adentro de .wf y se adapta con @container, no
      con @media: el mismo HTML se ve de computadora en un lienzo
      de 1440px y de celular en uno de 390px.
   ============================================================ */

:root {
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --blue: #2563EB;
    --blue-text: #1D4ED8;
    --blue-glow: rgba(37, 99, 235, 0.15);
    --blue-border: rgba(37, 99, 235, 0.25);
    --text: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    --border: rgba(15, 23, 42, 0.08);
    --border-2: rgba(15, 23, 42, 0.14);
    --font: 'Inter', system-ui, sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 3px; border-radius: 4px; }

/* ── Header (el del portfolio) ── */
.pf-header {
    position: fixed; inset: 0 0 auto; z-index: 200;
    height: 64px; padding: 0 clamp(1rem, 4vw, 2rem);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.pf-header .brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; letter-spacing: -0.02em; }
.pf-header .brand img { height: 30px; width: auto; }
.btn-back {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
    padding: 0.45rem 0.2rem; transition: color 0.2s;
}
.btn-back:hover { color: var(--text); }
.btn-back svg { width: 16px; height: 16px; }

.pf-footer {
    text-align: center; padding: 2rem 1.5rem;
    font-size: 0.78rem; color: var(--text-muted);
    border-top: 1px solid var(--border); margin-top: 2rem;
}
.pf-footer a { color: var(--blue-text); font-weight: 600; }

.chip {
    padding: 0.42rem 0.85rem; border-radius: 999px;
    border: 1.5px solid var(--border-2); background: var(--bg-card);
    color: var(--text-muted); font-family: var(--font);
    font-size: 0.82rem; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: border-color 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.chip:hover { border-color: var(--blue-border); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--blue-text); border-color: var(--blue-text); color: #fff; }
.chip .chip-n { opacity: 0.6; font-weight: 700; margin-left: 0.25rem; font-size: 0.75rem; }

.tag {
    padding: 0.15rem 0.5rem; border-radius: 6px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.01em;
    background: var(--blue-glow); color: var(--blue-text);
}

/* ── Galería ── */
.md-main { max-width: 1100px; margin: 0 auto; padding: 5.6rem clamp(1rem, 4vw, 2rem) 3rem; }
.md-intro h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.md-intro p { color: var(--text-muted); margin-top: 0.55rem; max-width: 660px; line-height: 1.55; font-size: 0.98rem; }
.md-filtros { margin: 1.4rem 0 1.8rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.md-herramientas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 310px) auto; gap: 0.8rem; align-items: end; margin-bottom: 1.6rem; }
.md-herramientas label { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.md-herramientas input, .md-herramientas select { width: 100%; height: 42px; padding: 0 0.75rem; border: 1px solid var(--border-2); border-radius: 9px; background: #fff; color: var(--text); font: 500 0.88rem var(--font); }
.md-herramientas input:focus, .md-herramientas select:focus { border-color: var(--blue); outline: 3px solid var(--blue-glow); }
.md-resultado { padding-bottom: 0.7rem; white-space: nowrap; color: var(--text-muted); font-size: 0.78rem; font-weight: 700; }
.md-vacio { padding: 2rem; border: 1px dashed var(--border-2); border-radius: 12px; text-align: center; color: var(--text-muted); }

.md-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 1.5rem; }
.md-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    scroll-margin-top: 84px;
}
.md-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12); }
.md-card[hidden] { display: none; }
.md-card.resaltada { box-shadow: 0 0 0 3px var(--blue-border), 0 10px 24px rgba(15, 23, 42, 0.12); }

.md-vista-wrap { position: relative; border-bottom: 1px solid var(--border); }
.md-vista {
    display: block; aspect-ratio: 16 / 10;
    overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: rgba(15, 23, 42, 0.3) transparent;
    /* El ancho de la caja define la escala: que la barra no lo haga saltar. */
    scrollbar-gutter: stable;
    background: linear-gradient(145deg, #f1f5f9, #fff);
}
/* El lienzo mide 1440px y se achica con transform; .md-alto le devuelve al
   contenedor el alto ya achicado (transform no cambia el layout). */
.md-alto { position: relative; overflow: hidden; }
.md-lienzo { position: absolute; left: 0; top: 0; width: 1440px; transform-origin: 0 0; }
.md-letra {
    position: absolute; left: 12px; top: 12px; z-index: 2;
    min-width: 42px; height: 42px; padding: 0 8px; border-radius: 10px;
    display: grid; place-items: center;
    background: var(--text); color: #fff; font-weight: 800; font-size: 1.25rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.28); pointer-events: none;
}
.md-info { padding: 0.85rem 1rem 1rem; }
.md-nombre { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.01em; margin: 0.45rem 0 0.6rem; }
.md-rubros { margin: -0.25rem 0 0.65rem; color: var(--text-light); font-size: 0.75rem; line-height: 1.4; }
.md-acciones { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.9rem; font-size: 0.86rem; font-weight: 700; }
.md-acciones a { color: var(--blue-text); }
.md-acciones a:hover { text-decoration: underline; }

.md-cierre {
    margin-top: 3rem; padding: 1.6rem 1.25rem; border-radius: 16px;
    background: var(--bg-card); border: 1px solid var(--border); text-align: center;
}
.md-cierre h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.md-cierre p { color: var(--text-muted); font-size: 0.92rem; margin: 0.4rem auto 1.1rem; max-width: 520px; line-height: 1.5; }
.md-cierre-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.2rem; align-items: center; }
.btn-wsp {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.3rem; border-radius: 999px;
    background: #16a34a; color: #fff; font-weight: 800; font-size: 0.92rem;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-wsp:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25); }
.btn-wsp svg { width: 18px; height: 18px; }
.link-azul { color: var(--blue-text); font-weight: 700; font-size: 0.9rem; }
.link-azul:hover { text-decoration: underline; }

/* ── Vista completa ── */
body.ver { padding-top: 64px; }
.ver-barra {
    position: sticky; top: 64px; z-index: 150;
    background: rgba(248, 250, 252, 0.95); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.ver-barra-in {
    max-width: 1280px; margin: 0 auto; padding: 0.6rem clamp(1rem, 4vw, 2rem);
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem;
}
.ver-titulo { display: flex; align-items: center; gap: 0.6rem; margin-right: auto; min-width: 0; }
.ver-titulo b {
    flex-shrink: 0; min-width: 34px; height: 34px; padding: 0 5px; border-radius: 9px;
    display: grid; place-items: center; background: var(--text); color: #fff; font-size: 1.05rem;
}
.ver-titulo span { font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ver-rubro { padding: 0.3rem 0.55rem; border-radius: 999px; background: var(--blue-glow); color: var(--blue-text); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.ver-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(15, 23, 42, 0.06); }
.ver-seg button {
    border: 0; background: none; padding: 0.42rem 0.95rem; border-radius: 999px; cursor: pointer;
    font: 600 0.82rem var(--font); color: var(--text-muted);
}
.ver-seg button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12); }

.ver-main { max-width: 1520px; margin: 0 auto; padding: 1.2rem clamp(1rem, 4vw, 2rem) 3rem; }

.ver-escenario { display: flex; justify-content: center; }
.ver-pc {
    /* 1442 = el lienzo de 1440 más el borde: a tamaño real no se achica. */
    width: 100%; max-width: 1442px; border-radius: 12px; overflow: hidden;
    background: #fff; border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}
.ver-navegador {
    display: flex; align-items: center; gap: 0.4rem; height: 38px; padding: 0 0.9rem;
    background: #eef2f7; border-bottom: 1px solid var(--border);
}
.ver-navegador i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.ver-navegador span {
    margin-left: 0.8rem; flex: 1; max-width: 420px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; padding: 0 0.7rem;
    background: #fff; font-size: 0.72rem; color: var(--text-light);
}
.ver-cel {
    width: 454px; border-radius: 54px; padding: 12px;
    background: #0f172a; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
/* Tamaño de un teléfono grande (430 × 932), sin atarlo al alto de la ventana:
   con 100vh quedaba chato y chico apenas la ventana era baja (16-sep). */
.ver-cel-pantalla {
    height: 932px;
    border-radius: 34px; overflow-y: auto; overflow-x: hidden;
    background: #fff; scrollbar-width: none;
}
.ver-cel-pantalla::-webkit-scrollbar { display: none; }

.ver-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.ver-nav a {
    display: flex; flex-direction: column; gap: 0.15rem; min-width: 0;
    padding: 0.8rem 1rem; border-radius: 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 0.78rem; color: var(--text-muted);
    transition: border-color 0.2s var(--ease);
}
.ver-nav a:hover { border-color: var(--blue-border); }
.ver-nav a b { font-size: 0.92rem; color: var(--text); }
.ver-nav a.sig { text-align: right; margin-left: auto; }

@media (max-width: 720px) {
    .md-herramientas { grid-template-columns: 1fr 1fr; }
    .md-busqueda { grid-column: 1 / -1; }
    .md-resultado { align-self: center; padding: 0; white-space: normal; }
    .md-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .ver-titulo { flex: 1 1 100%; margin-right: 0; font-size: 1.05rem; }
    .ver-titulo span { white-space: normal; }
}
/* En un celular de verdad el marco de teléfono sobra: el modelo ocupa el ancho. */
@media (max-width: 520px) {
    .ver-cel { width: 100%; padding: 0; border-radius: 0; background: none; box-shadow: none; }
    .ver-cel-pantalla { height: auto; min-height: 0; overflow: visible; border-radius: 12px; border: 1px solid var(--border); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition-duration: 0.01ms !important; }
}


