:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --primary: #0ea5e9;
  --primary-dark: #0369a1;
  --accent: #f59e0b;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --light: #f8fafc;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(15, 23, 42, .13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  background: #020617;
  color: #cbd5e1;
  font-size: .92rem;
}

.topbar .container {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar a {
  color: #e2e8f0;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.navbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--bg);
}

.brand img {
  width: 118px;
  max-height: 54px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  color: #334155;
  font-size: .92rem;
  font-weight: 700;
}

.nav-links a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--primary-dark);
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--white);
  color: var(--bg);
  border-color: rgba(255,255,255,.55);
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary);
}

.hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
  background: #020617;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, .90), rgba(2, 6, 23, .65), rgba(2, 6, 23, .26));
  z-index: 1;
}

.hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .78;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  align-items: center;
  padding: 86px 0;
  max-width: 780px;
}

.eyebrow {
  color: #bae6fd;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .8rem;
  margin-bottom: 12px;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 6vw, 4.55rem);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.hero p,
.page-hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #e2e8f0;
  max-width: 700px;
  margin-bottom: 26px;
}

.hero-actions,
.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 36px;
  max-width: 720px;
}

.stat {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, .58);
}

.stat strong {
  display: block;
  font-size: 1.45rem;
  color: var(--white);
}

.stat span {
  color: #cbd5e1;
  font-size: .92rem;
}

.section {
  padding: 84px 0;
}

.section-soft {
  background: var(--light);
}

.section-dark {
  background: var(--bg);
  color: var(--white);
}

.section-title {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-title.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-title h2 {
  margin: 0 0 12px;
  color: var(--bg);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.section-dark .section-title h2,
.section-dark h2,
.section-dark h3 {
  color: var(--white);
}

.section-title p {
  color: var(--muted);
  font-size: 1.04rem;
}

.section-dark .section-title p,
.section-dark p {
  color: #cbd5e1;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
}

.card:hover {
  box-shadow: var(--shadow);
}

.service-card {
  position: relative;
  min-height: 286px;
  overflow: hidden;
}

.service-card .icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e0f2fe;
  margin-bottom: 18px;
}

.service-card .icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.card h3 {
  margin: 0 0 10px;
  color: var(--bg);
  font-size: 1.25rem;
  line-height: 1.2;
}

.card p,
.card li {
  color: var(--muted);
}

.card-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--primary-dark);
  font-weight: 800;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding-left: 28px;
  margin: 12px 0;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-dark);
  font-weight: 900;
}

.media-block {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 42px;
  align-items: center;
}

.media-block img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.panel {
  padding: 34px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 16px;
  align-items: center;
}

.logo-item {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.logo-item img {
  max-height: 58px;
  object-fit: contain;
}

.page-hero {
  position: relative;
  color: var(--white);
  background: var(--bg);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, .90), rgba(2, 6, 23, .60));
  z-index: 1;
}

.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .52;
}

.page-hero .container {
  position: relative;
  z-index: 2;
  padding: 76px 0;
  min-height: 360px;
  display: grid;
  align-items: center;
}

.breadcrumb {
  color: #bae6fd;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  margin-bottom: 12px;
}

.content h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.14;
  color: var(--bg);
  margin: 0 0 16px;
}

.content h3 {
  color: var(--bg);
  margin-top: 0;
}

.content p {
  color: #475569;
}

.highlight-box {
  border-left: 5px solid var(--primary);
  background: #f0f9ff;
  padding: 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.cta-band {
  background: linear-gradient(135deg, #075985, #0f172a);
  color: var(--white);
  border-radius: 28px;
  padding: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.cta-band h2 {
  margin: 0 0 8px;
  color: var(--white);
}

.cta-band p {
  margin: 0;
  color: #dbeafe;
}

.contact-wrap {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 30px;
  align-items: start;
}

.contact-card {
  background: var(--bg);
  color: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.contact-card h3 {
  color: var(--white);
}

.contact-card p,
.contact-card li {
  color: #cbd5e1;
}

.contact-card a {
  color: #e0f2fe;
  font-weight: 800;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-field label {
  display: block;
  font-weight: 800;
  color: var(--bg);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
}

.sr-only,
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  background: #020617;
  color: #cbd5e1;
  padding: 44px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 26px;
  margin-bottom: 24px;
}

.site-footer h3,
.site-footer h4 {
  color: var(--white);
  margin-top: 0;
}

.site-footer a {
  color: #e2e8f0;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin: 8px 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 18px;
  color: #94a3b8;
  font-size: .9rem;
}

@media (max-width: 980px) {
  .navbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 12px;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .media-block,
  .contact-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .topbar .container {
    justify-content: center;
    text-align: center;
  }

  .hero-content {
    min-height: 520px;
    padding: 68px 0;
  }

  .section {
    padding: 60px 0;
  }

  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-band {
    padding: 28px;
  }
}


.brand {
  flex-shrink: 0;
}

.brand img {
  width: 186px;
  max-height: 64px;
}

.nav-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff !important;
  border-bottom: 0 !important;
  box-shadow: 0 10px 24px rgba(37, 211, 102, .22);
}

.nav-wa:hover,
.nav-wa[aria-current="page"] {
  color: #ffffff !important;
  background: #1daa53;
  border-color: transparent !important;
}

.floating-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
}

.floating-whatsapp:hover {
  background: #1daa53;
  color: #ffffff;
}

.wa-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.16);
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 960px) {
  .brand img {
    width: 168px;
  }

  .nav-wa {
    min-height: 36px;
    padding: 8px 12px;
  }
}

@media (max-width: 640px) {
  .floating-whatsapp {
    right: 12px;
    bottom: 12px;
    min-height: 52px;
    padding: 12px 16px;
  }

  .wa-text {
    font-size: .95rem;
  }
}


/* MGS v4: mejoras visuales, WhatsApp y portada */
.site-header {
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .08);
}

.navbar {
  min-height: 88px;
}

.brand {
  padding: 8px 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(14, 165, 233, .16);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.brand img {
  width: 220px;
  max-height: 72px;
}

.nav-links {
  gap: 8px;
}

.nav-links a:not(.nav-wa) {
  padding: 10px 12px;
  border-radius: 999px;
  border-bottom: 0;
}

.nav-links a:not(.nav-wa):hover,
.nav-links a:not(.nav-wa)[aria-current="page"] {
  color: var(--primary-dark);
  background: #e0f2fe;
  border-color: transparent;
}

.nav-wa,
.btn-whatsapp,
.floating-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c3f);
  color: #ffffff !important;
  border: 0 !important;
}

.nav-wa {
  gap: 7px;
  min-height: 42px;
  padding: 10px 15px;
}

.wa-img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.btn-whatsapp {
  box-shadow: 0 14px 28px rgba(37, 211, 102, .24);
}

.btn-whatsapp:hover,
.nav-wa:hover,
.floating-whatsapp:hover {
  background: linear-gradient(135deg, #1ebc59, #0f7c38);
  color: #ffffff !important;
}

.hero::before {
  background: linear-gradient(90deg, rgba(2, 6, 23, .94), rgba(2, 6, 23, .70), rgba(2, 6, 23, .30));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 72% 34%, rgba(14, 165, 233, .28), transparent 32%), radial-gradient(circle at 88% 80%, rgba(245, 158, 11, .14), transparent 28%);
  pointer-events: none;
}

.hero-content {
  max-width: 1120px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .72fr);
  gap: 42px;
}

.hero-content > div:first-child,
.hero-panel {
  animation: mgsFadeUp .72s ease both;
}

.hero-panel {
  align-self: center;
  padding: 30px;
  border-radius: 28px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 24px 70px rgba(2, 6, 23, .36);
  backdrop-filter: blur(14px);
}

.hero-panel-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(14, 165, 233, .18);
  color: #bae6fd;
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .10em;
}

.hero-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.12;
  color: #ffffff;
}

.hero-panel p,
.hero-panel li {
  color: #dbeafe;
}

.hero-panel ul {
  margin: 0 0 22px;
  padding-left: 20px;
}

.card,
.logo-item,
.panel,
.contact-card,
.form-card,
.media-block img {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover,
.logo-item:hover,
.panel:hover {
  transform: translateY(-4px);
}

.cta-band-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.floating-whatsapp {
  min-height: 58px;
  padding: 13px 18px;
  border: 2px solid rgba(255,255,255,.28) !important;
}

@keyframes mgsFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .hero-content {
    grid-template-columns: 1fr;
    max-width: 820px;
  }

  .hero-panel {
    max-width: 640px;
  }
}

@media (max-width: 960px) {
  .brand img {
    width: 190px;
  }
}

@media (max-width: 640px) {
  .brand {
    padding: 6px 8px;
  }

  .brand img {
    width: 170px;
  }

  .nav-links a:not(.nav-wa),
  .nav-wa {
    padding: 8px 10px;
  }

  .hero-panel {
    padding: 22px;
  }

  .floating-whatsapp .wa-text {
    display: none;
  }

  .floating-whatsapp {
    width: 58px;
    height: 58px;
    justify-content: center;
    padding: 0;
  }
}


/* MGS v6: ajuste de logo y reducción de repetición visual de WhatsApp */
.navbar {
  min-height: 76px;
}

.brand {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand img {
  width: 178px;
  max-height: 52px;
  object-fit: contain;
}

.site-header {
  background: rgba(255, 255, 255, .98);
}

.nav-links {
  gap: 6px;
}

.floating-whatsapp {
  right: 20px;
  bottom: 20px;
}

@media (max-width: 960px) {
  .brand img {
    width: 160px;
    max-height: 48px;
  }
}

@media (max-width: 640px) {
  .navbar {
    min-height: 70px;
  }

  .brand img {
    width: 148px;
  }
}


/* v9 guardias gallery */
.guardias-gallery {
  align-items: stretch;
}

.guardia-photo-card {
  padding: 18px;
}

.guardia-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
}

.guardia-photo-card h3 {
  margin-top: 0;
}


/* v10: destaque de guardias en portada */
.guardias-home-highlight .media-block img {
  min-height: 360px;
}

.guardias-home-highlight .hero-actions {
  margin-top: 22px;
}

@media (max-width: 640px) {
  .guardias-home-highlight .media-block img {
    min-height: 260px;
  }
}


/* v11: uploaded MGS logo */
.brand img {
  width: 250px;
  max-height: 72px;
  object-fit: contain;
}

@media (max-width: 960px) {
  .brand img {
    width: 210px;
    max-height: 64px;
  }
}

@media (max-width: 640px) {
  .brand img {
    width: 180px;
    max-height: 56px;
  }
}


/* v12: larger header logo and refreshed guard photos */
.brand img {
  width: 310px !important;
  max-height: 86px !important;
  object-fit: contain;
}

.navbar {
  min-height: 88px;
}

@media (max-width: 960px) {
  .brand img {
    width: 250px !important;
    max-height: 72px !important;
  }
}

@media (max-width: 640px) {
  .brand img {
    width: 200px !important;
    max-height: 60px !important;
  }
  .navbar {
    min-height: 78px;
  }
}


/* v14: servicios en submenú */
.nav-links {
  gap: 10px;
  overflow: visible;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: #334155;
  font-weight: 800;
  line-height: 1.2;
  user-select: none;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: "▾";
  font-size: .78rem;
  color: var(--primary-dark);
  transition: transform .15s ease;
}

.nav-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.nav-dropdown summary:hover,
.nav-dropdown.is-current summary {
  color: var(--primary-dark);
  background: #e0f2fe;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 120;
  min-width: 245px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.nav-submenu a {
  display: flex;
  width: 100%;
  padding: 11px 12px !important;
  border-radius: 12px !important;
  border-bottom: 0 !important;
  color: #334155;
  white-space: nowrap;
}

.nav-submenu a:hover,
.nav-submenu a[aria-current="page"] {
  color: var(--primary-dark);
  background: #e0f2fe;
}

@media (hover: hover) and (min-width: 861px) {
  .nav-dropdown:not([open]) .nav-submenu {
    display: none;
  }

  .nav-dropdown:hover .nav-submenu,
  .nav-dropdown:focus-within .nav-submenu {
    display: block;
  }
}

@media (max-width: 860px) {
  .nav-links {
    justify-content: center;
    gap: 8px;
  }

  .nav-dropdown {
    width: auto;
  }

  .nav-submenu {
    left: 50%;
    transform: translateX(-50%);
    min-width: min(300px, calc(100vw - 32px));
  }
}

@media (max-width: 520px) {
  .nav-submenu {
    position: fixed;
    top: 128px;
    left: 16px;
    right: 16px;
    transform: none;
    width: auto;
    min-width: 0;
  }

  .nav-submenu a {
    white-space: normal;
  }
}


/* v15: contraste botón contacto y logo 50% más grande */
.contact-card .btn-secondary,
.contact-card a.btn-secondary,
a.btn.btn-secondary[href^="mailto:"] {
  background: #0ea5e9 !important;
  color: #ffffff !important;
  border-color: #0ea5e9 !important;
}

.contact-card .btn-secondary:hover,
.contact-card a.btn-secondary:hover,
a.btn.btn-secondary[href^="mailto:"]:hover {
  background: #0369a1 !important;
  color: #ffffff !important;
  border-color: #0369a1 !important;
}

.brand img {
  width: 465px !important;
  max-height: 129px !important;
  object-fit: contain;
}

.navbar {
  min-height: 118px !important;
}

@media (max-width: 1100px) {
  .brand img {
    width: 390px !important;
    max-height: 108px !important;
  }

  .navbar {
    min-height: 106px !important;
  }
}

@media (max-width: 960px) {
  .brand img {
    width: 330px !important;
    max-height: 94px !important;
  }

  .navbar {
    min-height: 98px !important;
  }
}

@media (max-width: 640px) {
  .brand img {
    width: 270px !important;
    max-height: 80px !important;
  }

  .navbar {
    min-height: 88px !important;
  }
}

@media (max-width: 420px) {
  .brand img {
    width: 230px !important;
    max-height: 70px !important;
  }
}


/* v17: logo header vuelve al tamaño anterior */
.brand img {
  width: 310px !important;
  max-height: 86px !important;
  object-fit: contain;
}

.navbar {
  min-height: 88px !important;
}

@media (max-width: 960px) {
  .brand img {
    width: 250px !important;
    max-height: 72px !important;
  }

  .navbar {
    min-height: 82px !important;
  }
}

@media (max-width: 640px) {
  .brand img {
    width: 200px !important;
    max-height: 60px !important;
  }

  .navbar {
    min-height: 76px !important;
  }
}

@media (max-width: 420px) {
  .brand img {
    width: 180px !important;
    max-height: 54px !important;
  }
}


/* v21 SEO: secciones de contenido optimizadas */
.seo-local-section {
  background: #ffffff;
}

.seo-service-section .panel h2 {
  margin-top: 0;
}

.seo-service-section .panel p {
  color: var(--muted);
  margin-bottom: 0;
}


/* v22 empresa: mejora página MGS basada en carta de presentación */
.section-dark .cta-band {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
}

.section-dark .cta-band h2,
.section-dark .cta-band p {
  color: #ffffff;
}

.section-dark .btn-secondary {
  color: #0f172a;
  background: #ffffff;
  border-color: #ffffff;
}

.section-dark .btn-secondary:hover {
  color: #0f172a;
  background: #e2e8f0;
}


/* v-camaras-premium */
.premium-panel {
  background: linear-gradient(135deg, rgba(2,132,199,.06), rgba(255,255,255,1));
  border: 1px solid rgba(2,132,199,.12);
}

.premium-panel h2 {
  margin-bottom: 12px;
}

.section-dark .cta-band {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}

.section-dark .cta-band h2,
.section-dark .cta-band p {
  color: #ffffff;
}

.section-dark .btn-secondary {
  color: #0f172a;
  background: #ffffff;
  border-color: #ffffff;
}

.section-dark .btn-secondary:hover {
  color: #0f172a;
  background: #e2e8f0;
}


/* ===== Premium homepage refresh ===== */
.home-premium {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 40%, #ffffff 100%);
}

.home-premium .hero.hero-premium::before {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, .92) 0%, rgba(2, 6, 23, .78) 42%, rgba(2, 6, 23, .48) 68%, rgba(2, 6, 23, .32) 100%),
    radial-gradient(circle at top left, rgba(14, 165, 233, .22), transparent 34%);
}

.home-premium .hero-premium .hero-bg {
  opacity: .9;
}

.home-premium .hero-premium-grid {
  max-width: none;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 410px);
  gap: 34px;
}

.home-premium .hero-copy {
  max-width: 760px;
}

.home-premium .hero-copy p {
  max-width: 720px;
}

.home-premium .hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.home-premium .hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: #e2e8f0;
  font-size: .92rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.home-premium .hero-panel-premium {
  align-self: center;
  padding: 28px 26px;
  border-radius: 24px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 28px 50px rgba(2, 6, 23, .28);
  backdrop-filter: blur(14px);
}

.home-premium .hero-panel-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #7dd3fc;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.home-premium .hero-panel-premium h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.55rem;
  line-height: 1.15;
}

.home-premium .hero-panel-premium p {
  color: #dbeafe;
  font-size: 1rem;
  margin-bottom: 16px;
}

.home-premium .hero-panel-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.home-premium .hero-panel-list li {
  position: relative;
  padding-left: 22px;
  margin: 10px 0;
  color: #e2e8f0;
}

.home-premium .hero-panel-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #38bdf8;
  font-size: 1.2rem;
  line-height: 1;
}

.home-premium .hero-panel-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-premium .hero-panel-link {
  color: #e2e8f0;
  font-weight: 700;
}

.home-premium .service-card,
.home-premium .premium-card,
.home-premium .company-home-section .metric-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.home-premium .service-card:hover,
.home-premium .premium-card:hover,
.home-premium .company-home-section .metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, .14);
}

.home-premium .service-card {
  border-color: #dbeafe;
}

.home-premium .service-card .icon {
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  box-shadow: inset 0 0 0 1px rgba(14,165,233,.12);
}

.home-premium .company-home-section {
  padding-top: 20px;
}

.home-premium .company-home-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 38px;
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
}

.home-premium .company-home-visual img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: 22px;
}

.home-premium .company-home-content h2 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 3.5vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  color: var(--bg);
}

.home-premium .company-home-content > p {
  font-size: 1.05rem;
  color: #475569;
}

.home-premium .company-home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.home-premium .metric-card {
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .08);
}

.home-premium .metric-card strong {
  display: block;
  color: var(--bg);
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.home-premium .metric-card span {
  color: #64748b;
  font-size: .92rem;
}

.home-premium .guardias-home-highlight,
.home-premium .premium-media-section {
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 100%);
}

.home-premium .media-block img {
  border-radius: 24px;
  box-shadow: 0 22px 44px rgba(15, 23, 42, .12);
}

.home-premium .cta-band {
  background: linear-gradient(120deg, #0f172a, #0b2742 55%, #123a63);
  border: 1px solid rgba(14,165,233,.18);
  box-shadow: 0 20px 46px rgba(15, 23, 42, .18);
}

.home-premium .logo-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

@media (max-width: 960px) {
  .home-premium .hero-premium-grid,
  .home-premium .company-home-grid,
  .home-premium .company-home-metrics {
    grid-template-columns: 1fr;
  }

  .home-premium .company-home-visual img {
    min-height: 280px;
  }
}


/* ===== Home hero Dahua refresh ===== */
.home-premium .hero.hero-premium::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.78) 34%, rgba(255,255,255,.38) 62%, rgba(15,23,42,.16) 100%),
    radial-gradient(circle at top left, rgba(255,255,255,.28), transparent 38%);
}

.home-premium .hero-premium .hero-copy,
.home-premium .hero-premium .hero-copy p,
.home-premium .hero-premium .hero-copy .eyebrow,
.home-premium .hero-premium .hero-pill,
.home-premium .hero-premium .stat strong,
.home-premium .hero-premium .stat span {
  color: #0f172a;
}

.home-premium .hero-premium .hero-pill {
  background: rgba(255,255,255,.7);
  border-color: rgba(15,23,42,.08);
}

.home-premium .hero-premium .eyebrow {
  color: #0369a1;
}

.home-premium .hero-premium .hero-heading-sm {
  font-size: clamp(1.95rem, 4.7vw, 3.55rem);
  line-height: 1.02;
  max-width: 760px;
}

.home-premium .hero-premium .hero-copy p {
  max-width: 760px;
  color: #334155;
}

.home-premium .hero-premium .stats-row .stat {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

@media (max-width: 860px) {
  .home-premium .hero-premium .hero-heading-sm {
    font-size: clamp(1.7rem, 8vw, 2.55rem);
  }
}


/* ===== Ajuste legibilidad home: Evaluación inicial ===== */
.home-premium .hero-panel-premium .hero-panel-kicker,
.hero-panel-premium .hero-panel-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #ffffff !important;
  background: linear-gradient(135deg, #0b2f5f, #1565c0);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 8px 18px rgba(5, 32, 72, 0.22);
}


/* ===== Menú móvil tipo hamburguesa MGS ===== */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(14, 165, 233, .22);
  border-radius: 999px;
  background: linear-gradient(135deg, #0f5fb8, #0b3f88);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 95, 184, .18);
}

.mobile-menu-toggle .hamburger-lines {
  position: relative;
  width: 22px;
  height: 16px;
  display: inline-block;
}

.mobile-menu-toggle .hamburger-lines::before,
.mobile-menu-toggle .hamburger-lines::after,
.mobile-menu-toggle .hamburger-lines span {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform .18s ease, opacity .18s ease, top .18s ease;
}

.mobile-menu-toggle .hamburger-lines::before {
  top: 0;
}

.mobile-menu-toggle .hamburger-lines span {
  top: 7px;
}

.mobile-menu-toggle .hamburger-lines::after {
  top: 14px;
}

.mobile-menu-open .mobile-menu-toggle .hamburger-lines::before {
  top: 7px;
  transform: rotate(45deg);
}

.mobile-menu-open .mobile-menu-toggle .hamburger-lines span {
  opacity: 0;
}

.mobile-menu-open .mobile-menu-toggle .hamburger-lines::after {
  top: 7px;
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  body.mobile-menu-open {
    overflow: hidden;
  }

  body.mobile-menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(2, 6, 23, .54);
    backdrop-filter: blur(2px);
  }

  .site-header {
    z-index: 150;
  }

  .navbar {
    min-height: 76px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    padding: 10px 0 !important;
  }

  .brand {
    max-width: calc(100% - 110px);
  }

  .brand img {
    width: 190px !important;
    max-height: 58px !important;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 170;
    flex: 0 0 auto;
  }

  .nav-links {
    position: fixed !important;
    top: 0;
    right: 0;
    z-index: 160;
    width: min(86vw, 360px);
    height: 100vh;
    padding: 108px 22px 28px;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    overflow-y: auto;
    background: #ffffff;
    border-left: 1px solid rgba(15, 23, 42, .08);
    box-shadow: -24px 0 55px rgba(2, 6, 23, .24);
    transform: translateX(104%);
    transition: transform .22s ease;
  }

  .mobile-menu-open .nav-links {
    transform: translateX(0);
  }

  .nav-links > a,
  .nav-dropdown summary {
    width: 100%;
    min-height: 46px;
    padding: 13px 14px !important;
    border-radius: 14px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0 !important;
    font-weight: 900;
  }

  .nav-links > a:hover,
  .nav-links > a[aria-current="page"],
  .nav-dropdown summary:hover,
  .nav-dropdown.is-current summary {
    color: #075985 !important;
    background: #e0f2fe !important;
    border-color: rgba(14, 165, 233, .35) !important;
  }

  .nav-dropdown {
    width: 100% !important;
    display: block !important;
  }

  .nav-submenu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 8px;
    padding: 8px !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
  }

  .nav-submenu a {
    white-space: normal !important;
    padding: 11px 12px !important;
    border-radius: 12px !important;
    background: #ffffff;
    margin: 4px 0;
  }

  .topbar .container {
    justify-content: center;
    text-align: center;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .brand img {
    width: 168px !important;
    max-height: 52px !important;
  }

  .mobile-menu-toggle {
    padding: 9px 12px;
  }

  .mobile-menu-toggle .menu-label {
    display: none;
  }

  .nav-links {
    width: min(90vw, 340px);
    padding-top: 98px;
  }
}


/* ===== Cobertura y alcance en página principal ===== */
.home-coverage-card {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
}

.home-coverage-card > img {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.home-coverage-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 32px 30px;
  border-top: 1px solid rgba(15, 23, 42, .08);
  background: linear-gradient(135deg, #ffffff, #f0f7ff);
}

.home-coverage-note > div {
  max-width: 820px;
}

.home-coverage-note h3 {
  margin: 6px 0 10px;
  color: #0f3f78;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

.home-coverage-note p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}

.home-coverage-note .btn {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .home-coverage-card {
    border-radius: 22px;
  }

  .home-coverage-note {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 22px 26px;
  }

  .home-coverage-note .btn {
    width: 100%;
  }
}
