/* Hortens Solutions — hoja única, sin dependencias. */

:root {
  --primary: #367f92;
  --primary-dark: #2b6879;
  --accent: #0e9c99;
  --ink: #0e1a35;
  --text: #5f6b85;
  --soft: #f4f9fe;
  --line: #dbe3ee;
  --white: #fff;
  --radius: 6px;
  --wrap: 1140px;
  --gutter: 16px;
  --font: Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 15px/1.8 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .6em; }
p { margin: 0 0 1.2em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius); }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.icon { flex: none; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: var(--white);
  font: 500 14px/1 var(--font);
  padding: 13px 28px; border: 0; border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s;
}
.btn:hover { background: var(--primary-dark); color: var(--white); }
.btn .icon { width: 16px; height: 16px; }
.btn-sm { padding: 9px 20px; font-size: 13px; }
.btn-light { background: var(--white); color: var(--primary); }
.btn-light:hover { background: var(--soft); color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.btn-ghost:hover { background: var(--soft); color: var(--primary-dark); }

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-top: 3px solid var(--soft);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand img { width: 150px; }

.nav ul { display: flex; gap: 4px; }
.nav a {
  display: block; padding: 8px 12px;
  color: #444; font-weight: 500; font-size: 16px; text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--primary); }

.nav-toggle { display: none; }

@media (max-width: 767px) {
  .nav-toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px; margin-right: -8px;
    background: none; border: 0; cursor: pointer;
  }
  .bars, .bars::before, .bars::after {
    display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -7px; }
  .bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

  .js .nav { display: none; }
  .js .nav.open { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); box-shadow: 0 8px 16px rgba(14, 26, 53, .08);
    border-top: 1px solid var(--line);
  }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--soft); }
}

/* ---------- Secciones ---------- */

.section { padding: 72px 0; }
.section + .section { padding-top: 24px; }

.section-title { font-weight: 300; font-size: clamp(28px, 4vw, 40px); margin-bottom: .9em; }
.center { text-align: center; }

.accent-title { color: var(--accent); font-weight: 300; font-size: clamp(32px, 4.5vw, 45px); margin-bottom: .45em; }

/* Inicio */

.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 {
  max-width: 820px; margin: 0 auto 36px;
  font-weight: 300; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.3;
}

.carousel { padding-bottom: 24px; }
.carousel .wrap { position: relative; }
.carousel-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 24px) / 3);
  gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 8px 2px 20px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.carousel-track > li { scroll-snap-align: start; }
.carousel-controls { display: flex; justify-content: center; gap: 12px; }
.carousel-controls[hidden] { display: none; }
.carousel-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1.5px solid var(--line); background: var(--white);
  color: var(--ink); cursor: pointer;
}
.carousel-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.carousel-btn:disabled { opacity: .35; cursor: default; }

@media (max-width: 991px) { .carousel-track { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 599px) { .carousel-track { grid-auto-columns: 85%; gap: 16px; } }

.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(14, 26, 53, .06), 0 6px 20px rgba(14, 26, 53, .07);
  display: flex; flex-direction: column;
}
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card-body { padding: 22px 24px 8px; }
.card h3 { font-size: 18px; font-weight: 500; margin-bottom: .5em; }
.card p { font-size: 14.5px; line-height: 1.7; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-text p { margin-bottom: 1.6em; }
.split-media { border-radius: var(--radius); width: 100%; }

.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  margin-bottom: 64px;
}
.feature:last-child { margin-bottom: 0; }
.feature img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 10; object-fit: cover; }
.feature h3 { font-size: 20px; font-weight: 500; }
.feature-reverse img { order: 2; }

.partners { padding-bottom: 88px; }
.partner-list {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; align-items: center;
}
.partner-list img { width: 100%; max-width: 220px; margin: 0 auto; mix-blend-mode: multiply; }

@media (max-width: 991px) {
  .partner-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .section { padding: 52px 0; }
  .split, .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature-reverse img { order: 0; }
  .feature { margin-bottom: 48px; }
  .partner-list { grid-template-columns: repeat(2, 1fr); }
}

/* Cabecera de páginas internas */

.page-head { padding-top: 40px; }
.head-box {
  position: relative; overflow: hidden;
  background: var(--soft); border-radius: var(--radius);
  padding: 56px 64px;
}
.head-box h1 { font-weight: 500; font-size: clamp(36px, 5vw, 50px); margin-bottom: 0; }
.head-box h1::after {
  content: ""; display: block; width: 110px; height: 4px; margin: 22px 0 28px;
  background: var(--primary); border-radius: 2px;
}
.head-box p { margin: 0; }

.head-map { background: var(--soft) url("../img/bg-img-1.png") no-repeat right center / auto 100%; }
.head-map .head-text { max-width: 54%; }

.head-split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }

.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mosaic img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.mosaic img:nth-child(2) { transform: translateY(28px); }
.mosaic img:nth-child(4) { transform: translateY(28px); }

@media (max-width: 991px) {
  .head-map { background-image: none; }
  .head-map .head-text { max-width: none; }
  .head-split { grid-template-columns: 1fr; gap: 36px; }
  .mosaic { padding-bottom: 28px; }
}
@media (max-width: 599px) {
  .page-head { padding-top: 16px; }
  .head-box { padding: 36px 24px; }
}

/* Nosotros */

.statement {
  display: grid; grid-template-columns: 1fr 2fr; gap: 48px;
  padding: 40px 0; border-bottom: 1px dashed var(--line);
}
.statement:first-child { padding-top: 0; }
.statement:last-child { border-bottom: 0; }
.statement p { margin: 0; }
.statement-values { grid-template-columns: 1fr 1fr; align-items: start; }
.statement-values p { margin-bottom: 0; }

.values {
  background: var(--soft); border-radius: var(--radius); padding: 18px 40px;
  counter-reset: v;
}
.values li {
  color: var(--ink); font-weight: 500; font-size: 16px;
  padding: 16px 0; border-bottom: 1px dashed #c9d3e1;
  display: flex; align-items: center; gap: 14px;
}
.values li:last-child { border-bottom: 0; }
.values li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
}

@media (max-width: 767px) {
  .statement, .statement-values { grid-template-columns: 1fr; gap: 8px; padding: 32px 0; }
  .statement-values { gap: 24px; }
  .values { padding: 10px 24px; }
}

/* Servicios */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 991px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .card-grid { grid-template-columns: 1fr; } }

.feature .accent-title { font-size: clamp(28px, 3.4vw, 36px); }

.cta { background: var(--soft); padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { font-weight: 300; font-size: clamp(24px, 3vw, 32px); margin: 0; }
.cta .btn-light { background: var(--primary); color: var(--white); }
.cta .btn-light:hover { background: var(--primary-dark); color: var(--white); }

/* Contacto */

.map { padding-top: 40px; }
.map iframe {
  display: block; width: 100%; height: 420px; border: 0;
  border-radius: var(--radius); background: var(--soft);
}
@media (max-width: 599px) { .map { padding-top: 16px; } .map iframe { height: 300px; } }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 991px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 599px) { .form-row { grid-template-columns: 1fr; gap: 0; } }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: 400 15px/1.5 var(--font); color: var(--ink);
  background: var(--soft); border: 1.5px solid transparent; border-radius: var(--radius);
  padding: 10px 14px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: var(--white); }
.field [aria-invalid="true"] { border-color: #c0392b; }
.field-error { color: #b03a2e; font-size: 13.5px; margin: 6px 0 0; }

.notice { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; font-size: 15px; line-height: 1.6; }
.notice-ok { background: #e7f6f1; color: #17624a; }
.notice-error { background: #fbecea; color: #8c2a20; }

.contact-box { background: var(--soft); border-radius: var(--radius); padding: 44px 48px; }
.contact-list li { display: flex; align-items: center; gap: 16px; padding: 8px 0; font-size: 16px; }
.contact-list .icon { color: var(--primary); }
.contact-list a { color: var(--text); text-decoration: none; }
.contact-list a:hover { color: var(--primary); }
@media (max-width: 599px) { .contact-box { padding: 28px 24px; } }

/* 404 */

.not-found { text-align: center; padding: 96px 0; }
.not-found .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }

/* ---------- Pie ---------- */

.site-footer { background: var(--primary); color: var(--white); font-size: 15px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-main {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding-top: 56px; padding-bottom: 56px;
}
.footer-brand img { width: 170px; }
.footer-contact { text-align: center; font-weight: 500; }
.footer-contact p { margin: 0; line-height: 1.9; }
.sep { display: inline-block; width: 1px; height: 16px; background: rgba(255, 255, 255, .7); margin: 0 12px; vertical-align: -2px; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .2); }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.footer-bottom p { margin: 0; font-size: 14px; }
.credit a { opacity: .8; }

@media (max-width: 767px) {
  .footer-main { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 44px; padding-bottom: 40px; }
  .footer-bottom-inner { flex-direction: column; align-items: center; text-align: center; }
}
