/*
Theme Name: NetMonitor
Theme URI: http://localhost/netmonitor
Author: NetMonitor
Description: Tema institucional para un sistema de mantenimiento de equipos municipales.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.6
Text Domain: netmonitor
*/

:root {
  --ink: #17212f;
  --muted: #5f6e7f;
  --line: #d9e2ec;
  --paper: #ffffff;
  --soft: #f4f8fb;
  --brand: #0c6b6f;
  --brand-dark: #084c50;
  --accent: #d18b20;
  --ok: #2e8b57;
  --danger: #b84a4a;
  --shadow: 0 18px 42px rgba(20, 34, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 226, 236, 0.8);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--brand-dark);
}

.nav-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(12, 107, 111, 0.35);
  border-radius: 8px;
  color: var(--brand-dark);
  background: #eef8f8;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.submenu-toggle span {
  display: block;
  transform: translateY(-1px);
  transition: transform 0.18s ease;
}

.submenu-toggle:hover {
  color: var(--brand-dark);
  border-color: var(--brand);
  background: #fff;
}

.nav-group.is-open .submenu-toggle span {
  transform: rotate(180deg) translateY(1px);
}

.submenu {
  position: absolute;
  top: calc(100% + 14px);
  left: -14px;
  min-width: 178px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(20, 34, 48, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.submenu a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
}

.submenu a:hover {
  color: var(--brand-dark);
  background: var(--soft);
}

.nav-group.is-open .submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-dark);
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: #f8fbfc;
}

.hero {
  background:
    linear-gradient(90deg, rgba(244, 248, 251, 0.96), rgba(244, 248, 251, 0.74)),
    repeating-linear-gradient(135deg, rgba(12, 107, 111, 0.08) 0 1px, transparent 1px 18px);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 54px 0 64px;
  gap: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 620px;
  gap: 12px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.metric strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dashboard {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-visual {
  position: relative;
  min-height: 430px;
}

.hero-photo {
  display: block;
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero-visual::before {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 148px;
  height: 148px;
  border: 1px solid rgba(12, 107, 111, 0.22);
  border-radius: 8px;
  background: rgba(12, 107, 111, 0.08);
}

.dashboard-float {
  position: absolute;
  left: -26px;
  right: 26px;
  bottom: 0;
}

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfc;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px;
}

.panel {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.ticket:first-of-type {
  border-top: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.warning {
  color: #7a4f0b;
  background: #fff0d8;
}

.badge.danger {
  color: #842c2c;
  background: #ffe2e2;
}

.badge.ok {
  color: #17643a;
  background: #dff5e9;
}

.bars {
  display: grid;
  gap: 10px;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef3;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.section {
  padding: 76px 0;
}

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

.institutional {
  background:
    linear-gradient(180deg, #fff 0%, #f8fbfc 100%);
}

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

.section-head {
  max-width: 720px;
  margin-bottom: 30px;
}

.section-head h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.08;
}

.section-head p {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  min-height: 228px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.image-card {
  overflow: hidden;
  padding: 0;
}

.image-card > img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.image-card .icon,
.image-card h3,
.image-card p,
.image-card .text-link {
  margin-left: 22px;
  margin-right: 22px;
}

.image-card .icon {
  margin-top: -21px;
  border: 3px solid #fff;
}

.image-card .text-link {
  margin-bottom: 22px;
}

.icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.card h3 {
  margin-bottom: 10px;
}

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

.text-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--brand-dark);
  font-weight: 800;
}

.text-link:hover {
  color: var(--accent);
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mission-card {
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 34, 48, 0.08);
}

.mission-card.highlight {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.mission-card.highlight p {
  color: rgba(255, 255, 255, 0.84);
}

.mission-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

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

.values-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 22px;
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.values-panel h3 {
  margin-bottom: 0;
}

.value-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.value-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(12, 107, 111, 0.2);
  border-radius: 8px;
  color: var(--brand-dark);
  background: #eef8f8;
  font-weight: 800;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  counter-reset: step;
}

.step {
  position: relative;
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.step p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: start;
  gap: 32px;
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ok);
  font-weight: 900;
}

.cta {
  padding: 34px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-dark);
}

.cta p {
  color: rgba(255, 255, 255, 0.82);
}

.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}

.contact-item {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.site-footer {
  margin-top: 70px;
  padding: 58px 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: #f8fbfc;
  font-size: 0.94rem;
  font-weight: 700;
}

.page-hero {
  padding: 72px 0 54px;
  background:
    linear-gradient(90deg, rgba(244, 248, 251, 0.96), rgba(244, 248, 251, 0.82)),
    repeating-linear-gradient(135deg, rgba(12, 107, 111, 0.08) 0 1px, transparent 1px 18px);
}

.page-hero h1 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.page-content {
  max-width: 980px;
}

.page-feature-image {
  display: block;
  width: 100%;
  max-height: 380px;
  margin: -22px 0 34px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.page-content h2 {
  margin: 34px 0 12px;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
}

.page-content h3 {
  margin: 24px 0 8px;
}

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

.page-content ul,
.page-content ol {
  padding-left: 22px;
}

.page-institutional {
  margin-top: 42px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.info-block {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.info-block strong {
  display: block;
  margin-bottom: 8px;
}

.info-block span {
  color: var(--muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1fr 0.7fr;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  gap: 28px;
}

.footer-brand p,
.footer-column p {
  margin: 12px 0 0;
  color: var(--ink);
  font-weight: 700;
}

.footer-column h3 {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 1.05rem;
  font-weight: 900;
}

.footer-column a {
  display: block;
  margin: 8px 0;
  color: var(--ink);
  font-weight: 800;
}

.footer-column a:hover {
  color: var(--brand-dark);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  gap: 16px;
  color: var(--ink);
  font-weight: 800;
}

.whatsapp-widget {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 60;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.whatsapp-toggle {
  position: relative;
  display: grid;
  width: 62px;
  min-width: 62px;
  height: 62px;
  place-items: center;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.28), transparent 26%),
    linear-gradient(145deg, #2ee06e, #11a846);
  box-shadow: 0 18px 36px rgba(12, 107, 64, 0.34), 0 8px 16px rgba(20, 34, 48, 0.18);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  animation: whatsapp-breathe 2.4s ease-in-out infinite;
}

.whatsapp-toggle::before {
  content: "";
  position: absolute;
  inset: -9px;
  border: 2px solid rgba(37, 211, 102, 0.35);
  border-radius: 50%;
  animation: whatsapp-ring 2.4s ease-out infinite;
}

.whatsapp-toggle::after {
  content: "";
  position: absolute;
  inset: 8px 9px auto auto;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f6c343;
}

.whatsapp-toggle:hover {
  transform: translateY(-3px) scale(1.04);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.32), transparent 26%),
    linear-gradient(145deg, #34ea77, #0d963d);
  box-shadow: 0 22px 42px rgba(12, 107, 64, 0.4), 0 10px 20px rgba(20, 34, 48, 0.2);
}

.whatsapp-toggle:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.34);
  outline-offset: 4px;
}

.whatsapp-toggle svg {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #17212f;
  background: #fff;
  box-shadow: 0 10px 26px rgba(20, 34, 48, 0.16);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: #fff;
}

.whatsapp-form {
  display: none;
  width: min(350px, calc(100vw - 32px));
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(37, 211, 102, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(20, 34, 48, 0.18);
}

.whatsapp-widget.is-open .whatsapp-form {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
  animation: whatsapp-form-in 0.2s ease-out;
}

.whatsapp-widget.is-open .whatsapp-tooltip {
  display: none;
}

.whatsapp-form-head {
  display: block;
  margin: 0 -16px 2px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, #25d366, #108c3e);
}

.whatsapp-form-head strong {
  display: block;
  margin-bottom: 2px;
  color: #fff;
  font-size: 1rem;
}

.whatsapp-form-head small {
  display: block;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.35;
}

.whatsapp-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.whatsapp-form input,
.whatsapp-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--ink);
  font: inherit;
}

.whatsapp-form input:focus,
.whatsapp-form textarea:focus {
  outline: 3px solid rgba(37, 211, 102, 0.16);
  border-color: #25d366;
  background: #fff;
}

.whatsapp-form textarea {
  resize: vertical;
}

.whatsapp-form button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #25d366, #108c3e);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.25);
}

.whatsapp-form button:hover {
  background: linear-gradient(135deg, #2ee06e, #0d963d);
}

@keyframes whatsapp-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

@keyframes whatsapp-ring {
  0% {
    opacity: 0.7;
    transform: scale(0.82);
  }

  80%,
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@keyframes whatsapp-form-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero-inner,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
  }

  .cards,
  .steps,
  .info-grid,
  .mission-grid,
  .values-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 14px;
  }

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

  .hero-visual {
    min-height: auto;
    padding-bottom: 0;
  }
}

@media (max-width: 620px) {
  .metrics,
  .cards,
  .steps,
  .info-grid,
  .mission-grid,
  .values-panel,
  .panel-grid,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .panel.wide {
    grid-column: auto;
  }

  .hero-inner,
  .section {
    padding-top: 44px;
    padding-bottom: 48px;
  }

  .hero-photo {
    height: 280px;
  }

  .footer-inner {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .whatsapp-widget {
    right: 16px;
    bottom: 82px;
  }

  .whatsapp-toggle {
    min-width: 62px;
    width: 62px;
    padding: 0;
    border-radius: 50%;
  }

  .whatsapp-toggle::before {
    border-radius: 50%;
  }

  .whatsapp-tooltip {
    display: none;
  }
}
