:root {
  --primary: #0f4c81;
  --primary-dark: #0a3559;
  --accent: #f08a24;
  --text: #1b2a3a;
  --muted: #5f6f81;
  --bg: #f4f8fc;
  --card: #ffffff;
  --border: #d7e2ee;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

p {
  font-size: calc(1rem + 4px);
}

article {
  font-size: calc(1rem + 2px);
}

aside {
  font-size: calc(1rem + 2px);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1240px, 94%);
  margin: 0 auto;
}

.admin-wide {
  width: min(1080px, 91%);
}

.top-bar {
  background: var(--primary-dark);
  color: #fff;
  padding: 0.55rem 0;
  font-size: 1.05rem;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1b6db0);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.brand-name {
  font-size: calc(1.05rem + 2px);
  font-weight: 700;
  color: var(--primary-dark);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--primary-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-item {
  position: relative;
}

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 0.35rem 0;
  display: none;
  z-index: 1001;
}

.submenu a {
  display: block;
  padding: 0.55rem 0.8rem;
  border: 0;
}

.nav-item:hover .submenu,
.nav-item:focus-within .submenu {
  display: block;
}

.nav-links a {
  color: var(--text);
  font-weight: 600;
  font-size: calc(1rem + 2px);
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--primary);
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #0c3f6c;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #d77414;
}

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
}

.hero {
  background: linear-gradient(120deg, #eaf3fb, #f8fbff);
  padding: 4rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  margin-top: 0;
  text-transform: capitalize;
}

h1 {
  font-size: clamp(2rem, 2.8vw, 3rem);
  margin-bottom: 0.75rem;
}

.lead {
  color: var(--muted);
  max-width: 62ch;
}

.hero-actions {
  margin-top: 1.3rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 10px 30px rgba(15, 76, 129, 0.09);
}

.quick-stats {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quick-stats li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.quick-stats li:last-child {
  border-bottom: 0;
}

section {
  padding: 3.2rem 0;
}

.section-head {
  max-width: 70ch;
  margin-bottom: 1.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.services-grid.services-grid--featured {
  grid-template-columns: repeat(3, 1fr);
}

.services-grid.services-grid--featured > .service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.services-grid.services-grid--featured > .service-card .muted {
  flex: 1 1 auto;
}

.services-grid.services-grid--featured > .service-card .btn {
  margin-top: 0.85rem;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  min-width: 0;
}

.icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e8f2fb;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.muted {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.testimonial {
  border-left: 4px solid var(--accent);
}

.quote {
  font-style: italic;
}

.google-stars {
  color: #f4b400;
  font-size: 1.4rem;
  letter-spacing: 0.1rem;
  margin: 0.25rem 0 0.5rem;
}

.card .services-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0.8rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

label {
  font-weight: 600;
  font-size: 0.92rem;
}

input, textarea, select {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.site-form label {
  font-size: calc(0.92rem + 2px);
  text-transform: capitalize;
}

.site-form input,
.site-form textarea,
.site-form select {
  font-size: calc(1rem + 2px);
}

.site-form .btn {
  font-size: calc(1rem + 2px);
  text-transform: capitalize;
}

.contact-map {
  margin: 0.9rem auto 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  min-height: 320px;
  width: min(100%, 560px);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
}

.cta-band {
  background: var(--primary);
  color: #fff;
}

.cta-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer {
  background: #0e2235;
  color: #d7e2ee;
  padding: 2.2rem 0;
  font-size: calc(1rem + 4px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr minmax(64px, 88px);
  gap: 1rem;
  align-items: start;
}

.footer-grid > div {
  padding: 0 0.9rem;
}

.footer-grid > div:not(:last-child) {
  border-right: 1px solid rgba(232, 242, 251, 0.28);
}

.footer-gas-safe {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.footer-gas-safe-link {
  display: inline-block;
  line-height: 0;
}

.footer-gas-safe-link:focus-visible {
  outline: 2px solid #e8f2fb;
  outline-offset: 4px;
  border-radius: 6px;
}

.footer-gas-safe img {
  width: 100%;
  max-width: 80px;
  height: auto;
  display: block;
}

.footer a {
  color: #e8f2fb;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.social-center {
  justify-content: center;
  margin-top: 0.8rem;
}

.social-icons a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.social-icons a svg {
  width: 20px;
  height: 20px;
}

.social-icons a.instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.social-icons a.facebook {
  background: #1877f2;
}

.social-icons a.whatsapp {
  background: #25d366;
}

.social-icons a:hover {
  transform: translateY(-1px);
}

.footer-bottom {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(232, 242, 251, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-bottom .social-icons {
  justify-content: center;
}

.small {
  font-size: calc(0.87rem + 4px);
}

.quick-call {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 900;
  padding: 0.8rem 1rem;
}

.page-hero {
  background: #f5f9fd;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-signed-in {
  font-size: 18px;
  margin: 0.2rem 0 0.25rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.admin-dashboard {
  padding: 0.75rem 0 2.5rem;
  min-height: calc(100vh - 120px);
  background: linear-gradient(180deg, #eef4fa 0%, var(--bg) 28%, var(--bg) 100%);
}

.admin-dashboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.admin-dashboard-head-text h1 {
  margin-bottom: 0.35rem;
}

.admin-dashboard-lead {
  margin: 0;
  max-width: 52ch;
}

.admin-dashboard-signin {
  margin: 0;
  padding: 0.55rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: calc(0.95rem + 2px);
  box-shadow: 0 2px 8px rgba(15, 76, 129, 0.06);
  align-self: center;
}

.admin-dashboard-panel {
  margin-bottom: 0.5rem;
}

.admin-dashboard-panel--actions {
  margin-top: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.admin-dashboard-heading {
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  color: var(--primary-dark);
}

.admin-dashboard-sub {
  margin: 0 0 0.6rem;
  max-width: 60ch;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.85rem;
  align-items: center;
  box-shadow: 0 4px 14px rgba(15, 76, 129, 0.06);
}

.admin-stat-card .icon {
  grid-row: 1 / -1;
  margin: 0;
  align-self: center;
}

.admin-stat-value {
  margin: 0;
  font-size: clamp(1.65rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.admin-stat-label {
  margin: 0;
  font-size: calc(0.88rem + 2px);
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
}

.admin-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.admin-dash-card {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  box-shadow: 0 4px 14px rgba(15, 76, 129, 0.05);
}

.admin-dash-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.alert {
  margin: 0 0 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  font-weight: 600;
}

.alert.success {
  background: #e8f7ee;
  border: 1px solid #bfe8cd;
  color: #1f6a3a;
}

.alert.error {
  background: #fff1f1;
  border: 1px solid #f1c8c8;
  color: #9b2a2a;
}

.table-wrap {
  overflow-x: visible;
}

.admin-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: calc(0.92rem + 2px);
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--border);
  padding: 0.6rem;
  vertical-align: top;
}

.admin-table th {
  background: #edf5fc;
  text-align: left;
}

@media (max-width: 960px) {
  .admin-stats-grid,
  .admin-shortcuts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-dashboard-head {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-dashboard-signin {
    align-self: stretch;
    text-align: center;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid, .split, .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid > div {
    padding: 0;
  }
  .footer-grid > div:not(:last-child) {
    border-right: 0;
    border-bottom: 1px solid rgba(232, 242, 251, 0.2);
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }
  .nav-links.open {
    max-height: 85vh;
    overflow-y: auto;
  }
  .nav-links a {
    width: 100%;
    padding: 0.9rem 4%;
    border-top: 1px solid #eef4fa;
  }
  .nav-links .btn {
    margin: 0.9rem 4%;
    width: auto;
    display: inline-block;
  }
  .nav-item {
    width: 100%;
  }
  .submenu {
    position: static;
    display: none;
    border: 0;
    box-shadow: none;
    min-width: 0;
    border-radius: 0;
    padding: 0;
  }
  .nav-item.open-submenu .submenu {
    display: block;
  }
  .submenu a {
    padding-left: 8%;
    border-top: 1px solid #eef4fa;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .admin-stats-grid,
  .admin-shortcuts-grid {
    grid-template-columns: 1fr;
  }
  .admin-dash-card {
    min-height: 0;
  }

  section {
    padding: 2.25rem 0;
  }

  .services-grid,
  .services-grid.services-grid--featured {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .card .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-map,
  .contact-map iframe {
    min-height: 230px;
  }

  article.service-card,
  .service-card {
    padding: 1.1rem 1.15rem;
  }

  article.service-card h3,
  .service-card h3 {
    font-size: clamp(1.05rem, 4.2vw, 1.28rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  article.service-card .muted,
  .service-card .muted {
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  article.service-card .btn,
  .service-card .btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.72rem 1rem;
    box-sizing: border-box;
  }
}
