/* ============================================================
   Modalidades · concepto nov-2026
   Marco: PROMOCIÓN DELEGADA (terracota). Modalidades: BUILD TO SELL (azul)
   y BUILD TO RENT (oro oscuro). Mismo código de color que el dosier v4.
   Se carga en la home y en las tres páginas de /servicios/.
   Clases .mod-sell / .mod-rent / .mod-pd definen --mod (relleno, blanco encima
   con contraste >= 4,5:1), --mod-ink (texto sobre claro) y --mod-l (texto sobre oscuro).
   ============================================================ */

.mod-sell { --mod: #2b5a8c; --mod-ink: #2b5a8c; --mod-l: #9cc0e6; }
.mod-rent { --mod: #7a5c24; --mod-ink: #7a5c24; --mod-l: #d8b565; }
.mod-pd   { --mod: #a8482f; --mod-ink: #a8482f; --mod-l: #f0a68f; }

/* ---------- Filete superior (solo páginas de modalidad) ---------- */
.mod-page::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--mod); z-index: 101; pointer-events: none;
}

/* ---------- Pestaña fija en el margen derecho ---------- */
.mod-tab {
  position: fixed; right: 0; top: 0; bottom: 0; margin: auto 0; height: max-content;
  z-index: 90; width: 38px; padding: 20px 0;
  background: var(--mod); color: #fff;
  writing-mode: vertical-rl; transform: rotate(180deg);
  border-radius: 0 10px 10px 0;           /* tras el giro, redondeada por el lado izquierdo */
  font: 700 12px/38px var(--sans); letter-spacing: .22em; text-transform: uppercase; white-space: nowrap;
  text-align: center; pointer-events: none; user-select: none;
  box-shadow: -4px 0 18px rgba(17,24,39,.18);
}
.mod-tab .t-short { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .mod-tab { animation: mod-tab-in .7s .5s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes mod-tab-in { from { translate: -100% 0; opacity: 0; } to { translate: 0 0; opacity: 1; } }
}

/* ---------- Color de la modalidad dentro de la página ---------- */
.mod-page .section-label,
.mod-page .label { color: var(--mod-ink); }
.mod-page .sv-sec.dark .section-label,
.mod-page .on-dark .label,
.mod-page .sv-hero .section-label { color: var(--mod-l); }

.mod-page .sv-hero,
.mod-page .hero { border-bottom: 4px solid var(--mod); }
.mod-page .sv-hero .tag {
  background: rgba(255,255,255,.06); border-color: var(--mod-l); color: var(--mod-l);
}
.mod-page .sv-hero h1 em,
.mod-page .on-dark h1 em { color: var(--mod-l); }
.m-em, .mod-page h2 em, .mod-page .pd-em { font-style: italic; font-weight: 500; color: var(--mod-ink); }
.mod-page .sv-sec.dark .m-em, .mod-page .sv-sec.dark .pd-em, .mod-page .on-dark h2 em { color: var(--mod-l); }

.mod-page .sv-card,
.mod-page .fact { border-left-color: var(--mod); }
.mod-page .card,
.mod-page .who .col,
.mod-page .sv-role { border-top-color: var(--mod); }
.mod-page .sv-card dt,
.mod-page .sv-role .who,
.mod-page .sv-step .rec b,
.mod-page .sv-step::after,
.mod-page .fact b,
.mod-page .others a.opt span,
.mod-page .sv-next em { color: var(--mod-ink); }
.mod-page .sv-role.pg .who { color: #fff; }
.mod-page .sv-role.pg { border-top-color: var(--mod); }
.mod-page .sv-step::before { border-color: var(--mod); }
.mod-page .sv-step::after { border-color: var(--mod); }
.mod-page .sv-list li::before { border-color: var(--mod); }
.mod-page .sv-role li::before { background: var(--mod); }
.mod-page .sv-band,
.mod-page .pd-tell { border-left-color: var(--mod); }
.mod-page .sv-card .pd-more a { color: var(--mod-ink); }
.mod-page .card .n { color: var(--mod); }
.mod-page .sv-sec.dark .sv-card .badge,
.mod-page .sv-card .badge { color: #fff; background: var(--mod); }
.mod-page .sv-sec.dark .sv-card .badge { color: var(--dark); background: var(--mod-l); }

/* tarjetas y enlaces que llevan SU propia modalidad dentro de otra página */
.mod-page .sv-card.mod-sell, .mod-page .sv-card.mod-rent, .mod-page .sv-card.mod-pd { border-left-color: var(--mod); }
.mod-page .sv-card.mod-sell .pd-more a,
.mod-page .sv-card.mod-rent .pd-more a { color: var(--mod-ink); }
.mod-page .sv-card .m-tag,
.m-tag {
  display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: 3px;
  background: var(--mod); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.mod-page .sv-card.mod-sell .badge, .mod-page .sv-card.mod-rent .badge { background: var(--mod); color: #fff; }
.mod-page .sv-next a.mod-sell, .mod-page .sv-next a.mod-rent, .mod-page .sv-next a.mod-pd { border-top-color: var(--mod); }
.mod-page .sv-next a.mod-sell em, .mod-page .sv-next a.mod-rent em, .mod-page .sv-next a.mod-pd em { color: var(--mod-ink); }
.mod-page .others a.opt.mod-sell, .mod-page .others a.opt.mod-rent, .mod-page .others a.opt.mod-pd { border-left-color: var(--mod); }
.mod-page .others a.opt.mod-sell span, .mod-page .others a.opt.mod-rent span, .mod-page .others a.opt.mod-pd span { color: var(--mod-ink); }

/* subtítulo de la modalidad y enlace al marco */
.sv-sub-mod { display: block; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mod-l); margin: -4px 0 18px; }
.frame-note { margin-top: 22px; font-size: 15.5px; color: rgba(255,255,255,.72); max-width: 640px; }
.frame-note a { color: #fff; font-weight: 700; text-underline-offset: 3px; text-decoration-color: #f0a68f; }
.frame-note a:hover { color: #f0a68f; }

/* ---------- Barra de subnavegación: punto de color por modalidad ---------- */
.sv-switch a::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; margin-right: 9px; flex: none; background: var(--mod-l, #fff);
}
.sv-switch a[aria-current="page"] { background: var(--mod); border-color: var(--mod); color: #fff; }
.sv-switch a[aria-current="page"]::before { background: #fff; }
.sv-switch a[aria-current="page"]:hover { background: var(--mod); }

/* ---------- Home: tarjetas de modalidad y franja del marco ---------- */
.sv-line { border-top-color: var(--mod); }
.sv-line-tag { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-bottom: 16px; padding: 5px 11px; border-radius: 3px; background: var(--mod); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sv-line h3 small { display: block; margin-top: 6px; font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mod-ink); }
.sv-line .sv-line-for, .sv-line:hover .sv-line-go { color: var(--mod-ink); }

.sv-frame {
  max-width: 1240px; margin: 24px auto 0; display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: center;
  background: var(--mod); color: #fff; border-radius: 6px; padding: 30px 34px; text-decoration: none;
  box-shadow: 0 6px 28px rgba(168,72,47,.22); transition: transform .3s ease, box-shadow .3s ease;
}
.sv-frame:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(168,72,47,.32); }
.sv-frame-tag { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #fff; opacity: .92; margin-bottom: 8px; }
.sv-frame h3 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; font-weight: 600; letter-spacing: -.5px; margin-bottom: 8px; color: #fff; }
.sv-frame p { font-size: 16.5px; line-height: 1.6; color: #fff; max-width: 70ch; }
.sv-frame-go { font-weight: 600; white-space: nowrap; padding: 12px 24px; gap: 10px; border: 1.5px solid rgba(255,255,255,.7); border-radius: 12px; transition: background .25s, color .25s; }
.sv-frame:hover .sv-frame-go { background: #fff; color: var(--mod); }

@media (max-width: 860px) {
  .sv-frame { grid-template-columns: 1fr; padding: 26px 24px; }
  .sv-frame-go { justify-self: start; }
}

/* ---------- Móvil: chapa de 28 px con la inicial; el contenido deja su sitio ---------- */
@media (max-width: 700px) {
  .mod-tab {
    top: auto; bottom: 96px; margin: 0; width: 28px; height: 28px; padding: 0;
    writing-mode: horizontal-tb; transform: none; border-radius: 6px 0 0 6px;
    font: 800 11px/28px var(--sans); letter-spacing: 0;
  }
  .mod-tab .t-long { display: none; }
  .mod-tab .t-short { display: inline; }
  @media (prefers-reduced-motion: no-preference) { .mod-tab { animation-name: mod-tab-in-m; }
    @keyframes mod-tab-in-m { from { translate: 100% 0; opacity: 0; } to { translate: 0 0; opacity: 1; } } }
  .mod-page .sv-hero, .mod-page .sv-sec, .mod-page .sv-switch, .mod-page .sv-cta { padding-right: 34px; }
  .mod-page .wrap { width: auto; margin: 0 34px 0 6%; }
  .mod-page .others .cols, .mod-page .cta .wrap { margin-right: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-frame { transition: none; }
}

/* ---------- Proyectos: etiqueta de modalidad (solo donde consta) ---------- */
.project-mod {
  align-self: flex-start; display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--mod); color: #fff;
}
