/* =========================================================
   PRIETO PEREZ PRIETO, S.L.P  —  Hoja de estilos
   Tipografías: Montserrat / Times New Roman
   Colores: negro · #8B0000 · rgba(222,177,0,1) (#DEB100)
   ========================================================= */

:root {
  --negro: #111111;
  --rojo: #8B0000;
  --oro: rgba(222, 177, 0, 1);
  --gris-fondo: #f5f5f5;
  --gris-borde: #e2e2e2;
  --texto: #2a2a2a;
  --serif: "Times New Roman", Times, Georgia, serif;
  --sans: "Montserrat", "Segoe UI", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--texto);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================ NAV ============================ */
.topbar {
  background: var(--negro);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 60px;
}

.nav a {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 20px 22px;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--oro);
}

.nav a.active {
  color: var(--oro);
}

/* botón hamburguesa (solo móvil) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  position: absolute;
  right: 16px;
  top: 12px;
}

/* ============================ CABECERA / LOGO ============================ */
.brand {
  text-align: center;
  padding: 34px 20px 18px;
}

.brand img {
  margin: 0 auto;
  width: 300px;
  max-width: 90%;
}

.tagline {
  text-align: center;
  font-size: clamp(1.3rem, 3.2vw, 2.1rem);
  font-weight: 700;
  color: var(--negro);
  padding: 6px 20px 26px;
}

.tagline .confianza {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--rojo);
  font-size: 1.35em;
}

.divider {
  border: none;
  border-top: 1px solid var(--gris-borde);
  max-width: 1180px;
  margin: 0 auto;
}

/* ============================ SECCIONES GENERALES ============================ */
main {
  padding: 0 0 40px;
}

.section-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--negro);
  margin-bottom: 10px;
}

.section-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  background: var(--oro);
  margin-top: 8px;
}

.serif-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: #3a3a3a;
  line-height: 1.7;
}

.leer-mas {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #555;
  text-transform: uppercase;
  display: inline-block;
  margin-top: 18px;
  transition: color 0.2s;
}

.leer-mas:hover {
  color: var(--rojo);
}

/* ============================ INICIO ============================ */
.banner {
  position: relative;
  max-width: 960px;
  margin: 22px auto 32px;
}

.banner img {
  width: 100%;
  border-radius: 2px;
}

.badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--rojo);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15;
  padding: 8px 12px;
  border-radius: 3px;
  text-align: left;
}

.home-heading {
  text-align: center;
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  color: var(--negro);
  margin: 10px auto 36px;
  max-width: 900px;
}

.optimiza {
  text-align: center;
  margin: 30px auto;
  max-width: 900px;
}

.optimiza h3 {
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--negro);
  margin-bottom: 14px;
}

.optimiza p {
  font-size: clamp(1.1rem, 2.6vw, 1.55rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--negro);
}

.optimiza .rojo {
  color: var(--rojo);
}

.optimiza .sep {
  color: #999;
  font-weight: 400;
  margin: 0 6px;
}

.cta-box {
  border: 2px solid var(--negro);
  max-width: 560px;
  margin: 40px auto 16px;
  padding: 22px 18px;
  text-align: center;
}

.cta-box span {
  font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: 0.18em;
  color: var(--negro);
}

.cta-mail {
  text-align: center;
  font-weight: 700;
  color: var(--rojo);
  margin: 0 0 50px;
  font-size: 0.95rem;
}

.cta-mail a:hover {
  text-decoration: underline;
}

/* tres columnas */
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
}

.cols-3 .col {
  padding: 34px 28px;
  border-right: 1px solid var(--gris-borde);
}

.cols-3 .col:last-child {
  border-right: none;
}

.col-list {
  list-style: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  margin-top: 14px;
}

.col-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  color: #3a3a3a;
}

.col-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--rojo);
}

/* ============================ NOSOTROS / SERVICIOS ============================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 1000px;
  margin: 26px auto 36px;
}

.gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 2px;
}

.panel {
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
  padding: 36px 40px;
  margin-bottom: 0;
}

.panel + .panel {
  border-top: none;
}

.panel p {
  margin-top: 16px;
}

.serv-group {
  font-family: var(--serif);
  font-style: italic;
  margin-top: 18px;
}

.serv-group > strong,
.serv-group > .serv-cat {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--negro);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.serv-group ul {
  list-style: none;
  padding-left: 6px;
}

.serv-group ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  color: #3a3a3a;
  font-size: 0.98rem;
}

.serv-group ul li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--rojo);
}

/* ============================ CLIENTES ============================ */
.clientes-list {
  list-style: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: #3a3a3a;
  columns: 2;
  column-gap: 50px;
  margin-top: 22px;
}

.clientes-list li {
  margin-bottom: 9px;
  break-inside: avoid;
}

.clientes-cierre {
  font-family: var(--serif);
  font-style: italic;
  margin-top: 26px;
  color: #555;
}

/* ============================ CONTACTO ============================ */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 26px;
  align-items: stretch;
}

.contacto-data {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #3a3a3a;
  margin-bottom: 26px;
}

.form-box {
  background: var(--gris-fondo);
  padding: 30px;
}

.form-box input,
.form-box textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: #555;
}

.form-box textarea {
  min-height: 130px;
  resize: vertical;
}

.form-box input:focus,
.form-box textarea:focus {
  outline: none;
  border-color: var(--oro);
}

.btn-enviar {
  display: block;
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--oro);
  color: var(--oro);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  padding: 10px 34px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-enviar:hover {
  background: var(--oro);
  color: #fff;
}

.map-box {
  min-height: 360px;
}

.map-box iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

/* ============================ FOOTER ============================ */
.footer {
  background: var(--negro);
  color: #cfcfcf;
  padding: 26px 0 30px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-copy {
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.footer-nav a {
  color: #cfcfcf;
  text-transform: uppercase;
}

.footer-nav a:first-child {
  color: var(--oro);
}

.footer-nav a:hover {
  color: var(--oro);
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #2b2b2b;
  color: #fff;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.footer-social a:hover {
  background: var(--rojo);
}

/* ============================ RESPONSIVE ============================ */

/* Tablet */
@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery img {
    height: 220px;
  }

  .cols-3 {
    grid-template-columns: 1fr;
  }

  .cols-3 .col {
    border-right: none;
    border-bottom: 1px solid var(--gris-borde);
  }

  .cols-3 .col:last-child {
    border-bottom: none;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
  }

  .clientes-list {
    columns: 1;
  }
}

/* Móvil */
@media (max-width: 600px) {
  .topbar {
    position: relative;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 14px 20px;
    text-align: center;
    border-top: 1px solid #2a2a2a;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery img {
    height: 240px;
  }

  .panel {
    padding: 26px 22px;
  }

  .cols-3 .col {
    padding: 28px 22px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }

  .contacto-data {
    font-size: 1.05rem;
  }
}
