/* ==========================================================================
   SAV Entertainment Group — hoja de estilos
   Se carga DESPUÉS de Bootstrap (ver <head> de cada .html), así que estas
   reglas sobreescriben lo necesario para que el sitio no se vea como una
   plantilla genérica de Bootstrap. La marca vive en las variables de :root.
   ========================================================================== */

:root {
  --navy: #10233f;
  --navy-2: #172f52;
  --blue: #4f74ff;
  --purple: #7657e8;
  --lavender: #f0edff;
  --sky: #edf5ff;
  --text: #1c2430;
  --muted: #5d6877;
  --white: #ffffff;
  --border: #dfe5ef;
  --success: #16794c;
  --danger: #b22a36;
  --shadow: 0 18px 50px rgba(27, 46, 88, 0.12);

  /* Acento "Tlaxcala": tono ocre/volcánico usado en Historia y detalles. */
  --ocre: #b3702e;
  --ocre-light: #fbf1e4;

  /* Verde de WhatsApp, solo para el botón/CTA de cotización. */
  --whatsapp: #22a35a;

  --font-display: "Sora", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-lg: 22px;

  /* -- Redefinición de variables de Bootstrap para heredar nuestra marca -- */
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--text);
  --bs-primary: var(--blue);
  --bs-primary-rgb: 79, 116, 255;
  --bs-secondary: var(--navy);
  --bs-link-color: var(--blue);
  --bs-link-hover-color: var(--purple);
  --bs-border-radius: .8rem;
  --bs-border-radius-lg: 1.1rem;
  --bs-border-color: var(--border);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 42%, #f7f5ff 100%);
  line-height: 1.65;
}
a { color: var(--blue); }
img { max-width: 100%; }
.container { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }

/* Bootstrap trae su propio .btn con box-shadow de foco azul genérico;
   lo dejamos, pero nuestras clases .btn-primary/.btn-secondary de marca
   tienen mayor especificidad por ir después, así que siguen mandando. */
.btn:focus, .btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 .2rem rgba(79,116,255,.22);
  border-color: var(--blue);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(223,229,239,.9);
  backdrop-filter: blur(14px);
}
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; font-weight: 800; font-family: var(--font-display); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--blue), var(--purple)); color: white; box-shadow: 0 10px 22px rgba(79,116,255,.28); font-family: var(--font-display); }
.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.nav-links a { text-decoration: none; color: var(--navy); font-weight: 650; padding: 10px 12px; border-radius: 10px; transition: background .18s ease, color .18s ease; }
.nav-links a:hover, .nav-links a:focus-visible { background: var(--lavender); }
.nav-cta { background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff !important; }
.nav-cta:hover { background: linear-gradient(135deg, #3f63f0, #6a4bd9); }

/* ==========================================================================
   HERO — con forma orgánica de fondo (nada de emojis, ícono real de Bootstrap
   Icons dentro de la etiqueta "eyebrow").
   ========================================================================== */
.hero { position: relative; padding: 92px 0 76px; overflow: hidden; }
.hero-blob {
  position: absolute;
  top: -160px;
  right: -160px;
  width: 560px;
  height: 560px;
  z-index: 0;
  background: radial-gradient(circle, rgba(118,87,232,.14), rgba(79,116,255,.05) 60%, transparent 72%);
  border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 52px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid #d9d2ff; background: var(--lavender); color: #4e3aac; border-radius: 999px; font-size: .9rem; font-weight: 750; }
.eyebrow i { font-size: 1rem; }
h1 { margin: 18px 0 20px; color: var(--navy); font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; letter-spacing: -.03em; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 690px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; font-weight: 700; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; font-size: 1rem; }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff; box-shadow: 0 12px 28px rgba(91, 90, 230, .28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(91, 90, 230, .36); color: #fff; }
.btn-secondary { border-color: var(--border); background: #fff; color: var(--navy); }
.btn-secondary:hover { transform: translateY(-2px); border-color: #c7d0e2; color: var(--navy); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 12px 26px rgba(34,163,90,.3); }
.btn-whatsapp:hover { transform: translateY(-2px); background: #1c8c4c; color: #fff; }
.hero-card { background: linear-gradient(145deg, var(--navy), #253f6c); border-radius: 32px; color: white; padding: 34px; box-shadow: var(--shadow); transform: rotate(2deg); }

.section { padding: 76px 0; position: relative; }
.section-alt { background: rgba(238,243,255,.62); border-top: 1px solid #e5eaf4; border-bottom: 1px solid #e5eaf4; }
.section h2, .legal h1 { margin: 0 0 14px; color: var(--navy); font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; letter-spacing: -.02em; }
.section-intro { color: var(--muted); max-width: 760px; margin-bottom: 34px; font-size: 1.05rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: 0 10px 28px rgba(20,42,82,.06); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(20,42,82,.1); }
.card h3 { margin: 9px 0 8px; color: var(--navy); font-family: var(--font-display); font-weight: 650; }
.card p { color: var(--muted); margin: 0; }
.icon-box { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, var(--sky), var(--lavender)); color: var(--purple); font-size: 1.3rem; }

.notice { border-left: 5px solid var(--blue); background: var(--sky); padding: 18px 20px; border-radius: 0 14px 14px 0; }
.notice.warning { border-color: #e3a01a; background: #fff7df; }
.notice.danger { border-color: var(--danger); background: #fff0f2; }
.notice.ocre { border-color: var(--ocre); background: var(--ocre-light); }
.notice i { margin-right: 6px; }

.legal { width: min(900px, calc(100% - 36px)); margin: 0 auto; padding: 68px 0 90px; }
.legal .meta { color: var(--muted); margin-bottom: 30px; }
.legal h2 { color: var(--navy); margin-top: 36px; font-family: var(--font-display); font-weight: 650; font-size: 1.5rem; }
.legal h3 { color: var(--navy); margin-top: 26px; font-family: var(--font-display); font-weight: 600; }
.legal li { margin-bottom: 8px; }
.legal table { width: 100%; border-collapse: collapse; margin: 22px 0; background: white; }
.legal th, .legal td { border: 1px solid var(--border); padding: 12px; text-align: left; vertical-align: top; }
.legal th { background: var(--sky); color: var(--navy); }
.codebox { background: #111827; color: #eef2ff; padding: 18px; border-radius: 14px; overflow-wrap: anywhere; }

.contact-box { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; border-radius: 24px; padding: 30px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: white; }
.contact-box h2 { color: white; }
.contact-box p { color: #dbe5f5; }

footer { background: var(--navy); color: #dce5f2; padding: 34px 0; }
.footer-wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer a { color: white; }

/* Botón flotante de WhatsApp, visible en todas las páginas */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 14px 30px rgba(34,163,90,.38);
  text-decoration: none;
  transition: transform .18s ease;
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.04); color: #fff; }

@media (max-width: 850px) {
  .hero-grid, .grid, .contact-box { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .hero-card { max-width: 520px; }
  .nav-wrap { align-items: flex-start; padding: 14px 0; }
  .nav-links { gap: 2px; }
  .nav-links a { font-size: .82rem; padding: 8px; }
}

@media (max-width: 560px) {
  .brand span:last-child { display: none; }
  .nav-links a:nth-child(3) { display: none; }
  .section { padding: 58px 0; }
  .legal table, .legal thead, .legal tbody, .legal th, .legal td, .legal tr { display: block; }
  .legal th { border-bottom: 0; }
  .legal td { margin-bottom: 12px; }
  .whatsapp-float { width: 52px; height: 52px; font-size: 1.4rem; right: 16px; bottom: 16px; }
}

/* Portafolio principal (tarjeta del hero) */
.portfolio-preview {
  background: #fff;
  color: var(--text);
  border-radius: 24px;
  padding: 24px;
  transform: rotate(-2deg);
}
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.preview-heading strong { display: block; color: var(--navy); font-size: 1.25rem; }
.preview-label { display: block; color: var(--muted); font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.preview-dot { width: 12px; height: 12px; border-radius: 50%; background: #47c98b; box-shadow: 0 0 0 6px rgba(71,201,139,.14); }
.preview-project {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  margin-top: 10px;
  border: 1px solid #e7ebf4;
  border-radius: 15px;
  background: linear-gradient(135deg, #fbfcff, #f5f2ff);
}
.preview-project strong, .preview-project small { display: block; }
.preview-project strong { color: var(--navy); }
.preview-project small { color: var(--muted); margin-top: 1px; }
.preview-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; border-radius: 12px; background: #fff; box-shadow: 0 6px 14px rgba(20,42,82,.08); color: var(--purple); font-size: 1.15rem; }

/* ==========================================================================
   SECCIÓN HISTORIA — línea de tiempo con acento ocre/volcánico (Tlaxcala)
   ========================================================================== */
.historia { position: relative; overflow: hidden; }
.historia-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 260px at 88% 8%, rgba(179,112,46,.09), transparent 70%),
    linear-gradient(180deg, transparent, rgba(179,112,46,.03));
}
.historia-bg::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -40px;
  width: 420px;
  height: 220px;
  background: radial-gradient(circle at 30% 100%, rgba(179,112,46,.10), transparent 60%);
  clip-path: polygon(0% 100%, 38% 30%, 46% 40%, 55% 18%, 68% 42%, 100% 100%);
}
.historia .container { position: relative; z-index: 1; }
.historia .section-kicker { color: var(--ocre); }

.timeline { display: grid; gap: 0; margin-top: 12px; border-left: 2px solid #ecdcc4; padding-left: 28px; }
.timeline-item { position: relative; padding: 22px 0; }
.timeline-item:not(:last-child) { border-bottom: 1px dashed #e7ebf4; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 27px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ocre);
  box-shadow: 0 0 0 5px var(--ocre-light);
}
.timeline-year {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--ocre);
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: .04em;
  font-size: .95rem;
}
.timeline-content h3 { margin: 0 0 6px; color: var(--navy); font-family: var(--font-display); font-weight: 650; font-size: 1.2rem; }
.timeline-content p { margin: 0; color: var(--muted); max-width: 640px; }

@media (max-width: 560px) {
  .timeline { padding-left: 22px; }
  .timeline-item::before { left: -28px; }
}

.section-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #5945bc;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* ==========================================================================
   PROYECTOS — cada tarjeta ahora lleva una foto real arriba (o el marcador
   de posición img/placeholder-photo.svg mientras no se sube la foto).
   ========================================================================== */
.featured-projects { padding-top: 84px; }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 14px 34px rgba(20,42,82,.07);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.project-photo { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--sky); }
.project-card-body { position: relative; padding: 26px 28px 28px; flex: 1; display: flex; flex-direction: column; }
.project-card::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -58px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--project-glow, rgba(79,116,255,.09));
  z-index: 0;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: #cfd7e7;
  box-shadow: 0 22px 46px rgba(20,42,82,.12);
}
.project-meditime { --project-glow: rgba(118,87,232,.13); }
.project-mipos { --project-glow: rgba(79,116,255,.13); }
.project-abarrotes { --project-glow: rgba(41,177,118,.13); }
.project-cafe { --project-glow: rgba(187,115,54,.14); }
.project-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.project-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, var(--sky), var(--lavender)); color: var(--purple); font-size: 1.35rem; }
.project-badge { padding: 6px 10px; border: 1px solid #ddd8f8; border-radius: 999px; background: #f7f5ff; color: #5845ad; font-size: .76rem; font-weight: 750; }
.project-card h3 { position: relative; z-index: 1; margin: 18px 0 8px; color: var(--navy); font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; }
.project-card-body > p { position: relative; z-index: 1; color: var(--muted); margin: 0 0 18px; }
.project-features { position: relative; z-index: 1; list-style: none; padding: 0; margin: 0 0 22px; }
.project-features li { position: relative; margin-top: 7px; padding-left: 24px; color: #3e4857; }
.project-features li i { position: absolute; left: 0; top: 3px; color: var(--success); font-size: .95rem; }
.project-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; color: #4d58cc; font-weight: 780; text-decoration: none; margin-top: auto; }
.project-link:hover { text-decoration: underline; color: #4d58cc; }
.project-link-static { position: relative; z-index: 1; color: var(--muted); font-size: .9rem; margin-top: auto; }
.grid-two { grid-template-columns: repeat(2, 1fr); }
.more-projects { padding-top: 66px; }

@media (max-width: 850px) {
  .projects-grid { grid-template-columns: 1fr; }
  .grid-two { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .preview-project { padding: 11px; }
  .preview-project small { font-size: .76rem; }
  .project-card-body { padding: 22px; }
  .project-topline { align-items: flex-start; }
  .project-badge { max-width: 145px; text-align: center; }
}

/* ==========================================================================
   SITIOS WEB PERSONALIZADOS — sección de servicio
   ========================================================================== */
.servicios { position: relative; overflow: hidden; }
.servicios-blob {
  position: absolute;
  left: -180px;
  bottom: -180px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(79,116,255,.10), transparent 68%);
  border-radius: 55% 45% 60% 40% / 40% 55% 45% 60%;
  z-index: 0;
  pointer-events: none;
}
.servicios .container { position: relative; z-index: 1; }
.servicio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stack-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 10px;
}
.stack-note .icon-box { flex: none; }
.stack-note h3 { margin: 0 0 6px; color: var(--navy); font-family: var(--font-display); font-weight: 650; font-size: 1.1rem; }
.stack-note p { margin: 0; color: var(--muted); }
.stack-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stack-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--lavender); color: #4e3aac; font-size: .82rem; font-weight: 700; }

@media (max-width: 850px) {
  .servicio-grid { grid-template-columns: 1fr; }
  .stack-note { grid-template-columns: 1fr; }
}

/* Galería de ejemplos de sitios web personalizados */
.showcase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.showcase-card { border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--border); box-shadow: 0 10px 28px rgba(20,42,82,.06); transition: transform .2s ease, box-shadow .2s ease; }
.showcase-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(20,42,82,.1); }
.showcase-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--sky); }
.showcase-body { padding: 18px 20px 22px; }
.showcase-body h3 { margin: 0 0 4px; color: var(--navy); font-family: var(--font-display); font-weight: 650; font-size: 1.05rem; }
.showcase-body p { margin: 0; color: var(--muted); font-size: .92rem; }

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

/* ==========================================================================
   COTIZAR — cuestionario que arma un mensaje y abre WhatsApp
   ========================================================================== */
.cotizar { position: relative; overflow: hidden; }
.cotizar-blob {
  position: absolute;
  right: -160px;
  top: -120px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(34,163,90,.10), transparent 68%);
  border-radius: 48% 52% 40% 60% / 55% 45% 55% 45%;
  z-index: 0;
  pointer-events: none;
}
.cotizar .container { position: relative; z-index: 1; }
.quote-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 36px;
  box-shadow: 0 20px 50px rgba(20,42,82,.08);
}
.quote-card label { font-weight: 650; color: var(--navy); margin-bottom: 6px; }
.quote-card .form-control,
.quote-card .form-select {
  border-radius: .8rem;
  border-color: var(--border);
  padding: .65rem .9rem;
}
.quote-card .form-check { padding-left: 1.9em; }
.quote-fieldset {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
}
.quote-fieldset legend {
  float: none;
  width: auto;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  padding: 0 4px;
}
.quote-price-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--sky);
  border-radius: 16px;
  padding: 16px 18px;
  color: #2f3f56;
  font-size: .95rem;
}
.quote-price-note i { color: var(--blue); font-size: 1.2rem; margin-top: 2px; }

@media (max-width: 560px) {
  .quote-card { padding: 24px; }
}
