/* ==========================================================================
   Mascheroni Computación — hoja de estilos única del sitio
   --------------------------------------------------------------------------
   Todo el estilo propio del sitio vive acá. Las páginas NO llevan <style>
   ni atributos style="": sólo clases de este archivo (y la grilla de Bootstrap).

   Orden:
     1. Tokens (colores, tipografía, medidas) — misma paleta que Atlas
     2. Base
     3. Utilidades propias
     4. Botones
     5. Barra superior + encabezado + menú
     6. Hero y accesos rápidos
     7. Secciones y títulos
     8. Tarjetas (servicios, Tango, pasos, contacto)
     9. Nosotros
    10. Contacto / mapa
    11. Pie de página
    12. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Marca (idéntico a Atlas) */
  --ms-blue:        #2D6CB5;
  --ms-blue-dark:   #1F4F8A;
  --ms-blue-darker: #173B67;
  --ms-blue-light:  #EAF1FA;
  --ms-blue-focus:  #8FB2DC;

  /* Neutros estilo Fluent (Atlas) */
  --ms-bg:          #faf9f8;
  --ms-surface:     #ffffff;
  --ms-border:      #e1dfdd;
  --ms-text:        #201f1e;
  --ms-text-body:   #323130;
  --ms-text-muted:  #605e5c;
  --ms-hover:       #f3f2f1;

  /* Bootstrap: que sus componentes usen el azul de la marca */
  --bs-primary: #2D6CB5;
  --bs-primary-rgb: 45, 108, 181;
  --bs-link-color: #2D6CB5;
  --bs-link-color-rgb: 45, 108, 181;
  --bs-link-hover-color: #1F4F8A;
  --bs-link-hover-color-rgb: 31, 79, 138;
  --bs-body-font-family: var(--ms-font);
  --bs-body-color: var(--ms-text-body);

  /* Tipografía: la misma pila que Atlas (Segoe UI en Windows) */
  --ms-font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Medidas */
  --ms-radius:      6px;
  --ms-radius-lg:   10px;
  --ms-shadow-sm:   0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.05);
  --ms-shadow:      0 4px 16px rgba(32,31,30,.08);
  --ms-header-h:    72px;
  --ms-topbar-h:    36px;
}

/* 2. Base ------------------------------------------------------------------ */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--ms-header-h) + 12px); }

body {
  font-family: var(--ms-font);
  color: var(--ms-text-body);
  background: var(--ms-surface);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ms-font);
  color: var(--ms-text);
  font-weight: 600;
  line-height: 1.25;
}

a { color: var(--ms-blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--ms-blue-dark); }

img { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--ms-blue); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--ms-blue); color: #fff; padding: .5rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }

/* 3. Utilidades propias ------------------------------------------------------ */
.text-muted-ms { color: var(--ms-text-muted); }
.link-strong   { font-weight: 600; }
.bg-soft       { background: var(--ms-bg); }
.bg-brand-light{ background: var(--ms-blue-light); }

/* 4. Botones ----------------------------------------------------------------- */
.btn {
  font-weight: 600;
  border-radius: var(--ms-radius);
  padding: .6rem 1.2rem;
  font-size: .95rem;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-sm { padding: .4rem .85rem; font-size: .875rem; }

.btn-primary {
  --bs-btn-bg: var(--ms-blue); --bs-btn-border-color: var(--ms-blue);
  --bs-btn-hover-bg: var(--ms-blue-dark); --bs-btn-hover-border-color: var(--ms-blue-dark);
  --bs-btn-active-bg: var(--ms-blue-dark); --bs-btn-active-border-color: var(--ms-blue-dark);
  --bs-btn-disabled-bg: var(--ms-blue); --bs-btn-disabled-border-color: var(--ms-blue);
}
.btn-outline-primary {
  --bs-btn-color: var(--ms-blue); --bs-btn-border-color: var(--ms-blue);
  --bs-btn-hover-bg: var(--ms-blue); --bs-btn-hover-border-color: var(--ms-blue);
  --bs-btn-active-bg: var(--ms-blue-dark); --bs-btn-active-border-color: var(--ms-blue-dark);
}
.btn-light-ms {
  --bs-btn-bg: #fff; --bs-btn-color: var(--ms-blue-dark); --bs-btn-border-color: #fff;
  --bs-btn-hover-bg: var(--ms-blue-light); --bs-btn-hover-color: var(--ms-blue-dark);
  --bs-btn-hover-border-color: var(--ms-blue-light);
}

/* Botón "Ingresar a Atlas" */
.btn-atlas {
  --bs-btn-bg: var(--ms-blue-dark); --bs-btn-color: #fff; --bs-btn-border-color: var(--ms-blue-dark);
  --bs-btn-hover-bg: var(--ms-blue-darker); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--ms-blue-darker);
  --bs-btn-active-bg: var(--ms-blue-darker); --bs-btn-active-color: #fff;
}
.btn-atlas .atlas-mark {
  width: 20px; height: 20px; border-radius: 4px;
  background: #fff; color: var(--ms-blue-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; line-height: 1;
}

/* 5. Barra superior + encabezado + menú -------------------------------------- */
.topbar {
  background: var(--ms-blue-darker);
  color: rgba(255,255,255,.85);
  font-size: .82rem;
  height: var(--ms-topbar-h);
  display: flex; align-items: center;
}
.topbar a { color: rgba(255,255,255,.9); }
.topbar a:hover { color: #fff; }
.topbar-items { display: flex; gap: 1.5rem; align-items: center; }
.topbar-items i { margin-right: .35rem; opacity: .8; }

.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: var(--ms-surface);
  border-bottom: 1px solid var(--ms-border);
  height: var(--ms-header-h);
  display: flex; align-items: center;
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: var(--ms-shadow); }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; }

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; display: block; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-nav a {
  display: block;
  padding: .5rem .75rem;
  color: var(--ms-text-body);
  font-size: .92rem;
  font-weight: 500;
  border-radius: 4px;
  position: relative;
}
.main-nav a:hover { background: var(--ms-hover); color: var(--ms-text); }
.main-nav a.active { color: var(--ms-blue-dark); font-weight: 600; }
.main-nav a.active::after {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: 0;
  height: 2px; background: var(--ms-blue); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: .5rem; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--ms-border); border-radius: var(--ms-radius);
  font-size: 1.4rem; line-height: 1; padding: .3rem .5rem; color: var(--ms-text);
}

/* 6. Hero y accesos rápidos ---------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, var(--ms-blue-light) 0%, var(--ms-surface) 100%);
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--ms-border);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ms-blue-dark);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--ms-blue); }
.hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; margin-bottom: 1.25rem; }
.hero .lead { font-size: 1.15rem; color: var(--ms-text-muted); max-width: 34rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-photo {
  border-radius: var(--ms-radius-lg);
  overflow: hidden;
  box-shadow: var(--ms-shadow);
  border: 1px solid var(--ms-border);
}
.hero-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* Variante "afiche" (imagen vertical con fondo propio, ej. 50 años): se muestra entera */
.hero-photo--poster { max-width: 440px; margin: 0 auto; background: #fff; }
.hero-photo--poster img { aspect-ratio: auto; object-fit: contain; }

.quick-access { margin-top: -1px; padding: 0 0 3rem; background: var(--ms-surface); }
.quick-card {
  display: flex; gap: 1rem; align-items: flex-start;
  height: 100%;
  padding: 1.25rem 1.25rem;
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-left: 3px solid var(--ms-blue);
  border-radius: var(--ms-radius);
  box-shadow: var(--ms-shadow-sm);
  color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.quick-card:hover { box-shadow: var(--ms-shadow); transform: translateY(-2px); color: inherit; }
.quick-card i { font-size: 1.5rem; color: var(--ms-blue); line-height: 1; margin-top: .15rem; }
.quick-card h3 { font-size: 1rem; margin: 0 0 .25rem; }
.quick-card p { font-size: .88rem; color: var(--ms-text-muted); margin: 0; }

/* 7. Secciones y títulos ---------------------------------------------------- */
.section { padding: 5rem 0; }
.section-title { max-width: 46rem; margin: 0 auto 3rem; text-align: center; }
.section-title .eyebrow { justify-content: center; }
.section-title h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .75rem; }
.section-title p { color: var(--ms-text-muted); margin: 0; }

/* 8. Tarjetas ----------------------------------------------------------------- */
.card-ms {
  height: 100%;
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius-lg);
  box-shadow: var(--ms-shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .15s;
}
.card-ms:hover { box-shadow: var(--ms-shadow); }
.card-ms-img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; display: block; border-bottom: 1px solid var(--ms-border); }
.card-ms-body { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-ms-body h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.card-ms-body p { color: var(--ms-text-muted); font-size: .95rem; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: .4rem; font-size: .92rem; }
.check-list li::before {
  content: "\F26A"; /* bi-check-circle-fill */
  font-family: "bootstrap-icons";
  position: absolute; left: 0; top: .05rem;
  color: var(--ms-blue); font-size: .95rem;
}

.icon-tile {
  width: 48px; height: 48px; border-radius: var(--ms-radius);
  background: var(--ms-blue-light); color: var(--ms-blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0; margin-bottom: 1rem;
}
.card-link {
  margin-top: auto; padding-top: .5rem;
  font-weight: 600; font-size: .9rem;
  display: inline-flex; align-items: center; gap: .35rem;
}
.card-link i { transition: transform .15s; }
.card-link:hover i { transform: translateX(3px); }

/* Pasos (Ayudame) */
.step-card { position: relative; overflow: visible; margin-top: 18px; }
.step-card .card-ms-body { padding-top: 2.5rem; }
.step-number {
  position: absolute; top: -18px; left: 1.5rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ms-blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; box-shadow: 0 0 0 4px var(--ms-bg);
}
.step-list { padding-left: 1.2rem; margin: .5rem 0 1rem; font-size: .92rem; }
.step-shots { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: auto; }
.step-shots figure { margin: 0; }
.step-shots img { border: 1px solid var(--ms-border); border-radius: var(--ms-radius); display: block; }
.step-shots figcaption { font-size: .78rem; color: var(--ms-text-muted); margin-top: .3rem; text-align: center; }

/* 9. Nosotros ------------------------------------------------------------------ */
.about-text h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 1rem; }
.about-text .lead { color: var(--ms-text-muted); font-size: 1.08rem; }
.about-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-gallery img {
  aspect-ratio: 1 / 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: var(--ms-radius-lg); border: 1px solid var(--ms-border);
}
.about-gallery .tall { grid-row: span 2; }
.about-gallery--single { grid-template-columns: 1fr; }
.about-gallery--single img { aspect-ratio: 4 / 3; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.stat { border-left: 3px solid var(--ms-blue); padding: .25rem 0 .25rem 1rem; }
.stat strong { display: block; font-size: 1.6rem; color: var(--ms-blue-dark); line-height: 1.2; }
.stat span { font-size: .85rem; color: var(--ms-text-muted); }

.partners {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center;
  padding: 1.5rem 0 0; margin-top: 3rem; border-top: 1px solid var(--ms-border);
  color: var(--ms-text-muted); font-weight: 600; font-size: .9rem;
}

/* 10. Contacto --------------------------------------------------------------- */
.contact-card { padding: 1.5rem; }
.contact-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.contact-card p, .contact-card dl { margin: 0; font-size: .95rem; }
.contact-card dt { font-weight: 600; color: var(--ms-text); font-size: .85rem; margin-top: .5rem; }
.contact-card dd { margin: 0; }
.map-frame {
  width: 100%; height: 100%; min-height: 320px; border: 0; display: block;
  border-radius: var(--ms-radius-lg);
}
.map-wrap { border: 1px solid var(--ms-border); border-radius: var(--ms-radius-lg); overflow: hidden; height: 100%; }

.cta-band {
  background: var(--ms-blue);
  color: #fff;
  border-radius: var(--ms-radius-lg);
  padding: 2rem 2.25rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
  margin-top: 3rem;
}
.cta-band h3 { color: #fff; margin: 0 0 .25rem; font-size: 1.25rem; }
.cta-band p { margin: 0; color: rgba(255,255,255,.85); }

/* 11. Pie de página ---------------------------------------------------------- */
.site-footer { background: var(--ms-blue-darker); color: rgba(255,255,255,.78); font-size: .92rem; }
.site-footer .footer-top { padding-top: 3.5rem; padding-bottom: 2.5rem; }
.site-footer h4 {
  color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem;
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.footer-logo img { height: 36px; width: auto; margin-bottom: 1rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1.25rem; padding-bottom: 1.25rem;
  font-size: .82rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
}

.scroll-top {
  position: fixed; right: calc(1rem + 7px); bottom: 5.5rem; z-index: 1020;
  width: 42px; height: 42px; border-radius: var(--ms-radius);
  background: var(--ms-blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  box-shadow: var(--ms-shadow);
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--ms-blue-dark); color: #fff; }

/* Botón flotante de WhatsApp (abajo a la derecha, siempre visible) */
.whatsapp-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 1025;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.85rem; line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  transition: transform .15s, background .15s;
}
.whatsapp-float:hover, .whatsapp-float:focus-visible { background: #1EBE5A; color: #fff; transform: scale(1.07); }
@media print { .whatsapp-float, .scroll-top { display: none; } }

/* 12. Responsive ----------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    position: fixed; top: calc(var(--ms-header-h)); left: 0; right: 0; bottom: 0;
    background: rgba(32,31,30,.35);
    display: none;
    margin: 0;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column; gap: 0;
    background: var(--ms-surface);
    border-bottom: 1px solid var(--ms-border);
    padding: .5rem 1rem 1rem;
    box-shadow: var(--ms-shadow);
  }
  .main-nav a { padding: .75rem .5rem; border-bottom: 1px solid var(--ms-hover); border-radius: 0; }
  .main-nav a.active::after { display: none; }
  .header-actions { margin-left: auto; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 767.98px) {
  :root { --ms-header-h: 64px; }
  .topbar { display: none; }
  .brand img { height: 32px; }
  .btn-atlas .atlas-pre { display: none; }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 3.5rem 0; }
  .stats { grid-template-columns: 1fr; }
  .cta-band { padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
