/*
Theme Name: Grúas López Hernández
Description: Tema propio de gruaslopezhernandez.com. Mismo diseño que la web anterior; los textos y fotos se editan desde el editor de bloques.
Author: Grupomaspc.com
Version: 1.0.0
Requires at least: 7.0
Requires PHP: 7.4
Text Domain: gruas-lh
*/
@import url('assets/fonts/fuentes.css');

:root {
  --rojo: #ff0000;
  --rojo-enlace: #dd3333;
  --tinta: #0c1325;
  --tinta-2: #250c0c;
  --gris: #4c4f57;
  --gris-claro: #7f7d8e;
  --morado: #34314b;
  --borde: #e6e6e6;
  --ancho: 1170px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rojo-enlace); text-decoration: none; }
a:hover { text-decoration: underline; }
.rojo { color: var(--rojo); }
mark.has-inline-color { background: transparent; }
.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }
.saltar { position: absolute; left: -9999px; }
.saltar:focus { left: 10px; top: 10px; background: #fff; padding: 8px; z-index: 100; }
.solo-lectores { position: absolute; left: -9999px; }

/* Bloques del editor: sin márgenes propios, el diseño los pone */
:where(.entrada, .editor-styles-wrapper) :where(figure, .wp-block-buttons) { margin: 0; }
:where(.entrada, .editor-styles-wrapper) :where(.wp-block-group) { margin-block: 0; }
.wp-block-group > .wp-block-group__inner-container { display: contents; }
/* Páginas nuevas creadas en el editor (aviso legal, etc.): texto centrado con el ancho de la web */
.entrada > p, .entrada > h1, .entrada > h2, .entrada > h3, .entrada > h4, .entrada > ul, .entrada > ol,
.entrada > figure, .entrada > .wp-block-buttons, .entrada > .wp-block-table, .entrada > .wp-block-columns {
  max-width: var(--ancho); margin-inline: auto; padding-inline: 20px;
}
.entrada > p, .entrada > ul, .entrada > ol { font-size: 16px; line-height: 1.6; }
.entrada > :last-child:not(.wp-block-group) { margin-bottom: 60px; }
.titulo-pagina { padding-block: 40px 10px; }

/* Cabecera */
.cabecera { background: #fff; position: relative; z-index: 20; }
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; min-height: 130px; }
.cabecera .logo img { width: 100px; height: 100px; }
.menu { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.menu a { font-size: 16px; color: var(--rojo-enlace); }
.menu a[aria-current="page"], .menu a:hover { color: var(--rojo); text-decoration: none; }
.boton-menu { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.boton-menu span { display: block; width: 26px; height: 3px; background: var(--rojo-enlace); margin: 5px 0; border-radius: 2px; }

/* Cabeceras con foto de las páginas interiores (la foto es la «imagen destacada» de la página) */
.banda-pagina { height: 200px; background-size: cover; background-position: center; }
.banda-pagina h1 { position: absolute; left: -9999px; }
.pagina-empresa .banda-pagina { background-position: center 78%; }

/* Carrusel de la portada */
.carrusel { position: relative; height: 650px; overflow: hidden; background: #2b3a4a; }
.carrusel .diapo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.carrusel .diapo.activa { opacity: 1; }
.carrusel .diapo::after { content: ''; position: absolute; inset: 0; background: rgba(20, 30, 45, 0.25); }
.carrusel .titulo {
  position: absolute; z-index: 2; top: 50%; right: 13%; transform: translateY(-50%);
  margin: 0; font-family: 'Open Sans', sans-serif; font-weight: 300; font-size: 76px; line-height: 1.1;
  color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.carrusel .flecha {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 18px; line-height: 40px;
}
.carrusel .flecha:hover { background: rgba(0, 0, 0, 0.75); }
.carrusel .anterior { left: 20px; }
.carrusel .siguiente { right: 20px; }
.carrusel .puntos { position: absolute; z-index: 3; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.carrusel .puntos button { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.carrusel .puntos button[aria-current="true"] { background: #fff; }

/* Rótulo «GRUAS LOPEZ HERNANDEZ» */
.rotulo { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 50px 20px 20px; }
.rotulo img { margin: 0 auto; max-width: 1040px; width: 100%; }

/* Títulos estilo Poppins */
.titulo-poppins { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 38px; line-height: 1.3; margin: 0 0 20px; color: var(--tinta); }

/* Portada: misión + tarjetas */
.mision { padding: 40px 0 90px; }
.mision .contenedor { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; align-items: start; }
.mision .texto { padding-top: 40px; }
.mision p { font-family: 'Poppins', sans-serif; font-weight: 300; font-size: 14px; line-height: 1.65; color: var(--gris); margin: 0 0 30px; }
.mision p strong { font-weight: 700; color: var(--rojo); }
.boton-rojo .wp-block-button__link {
  display: inline-block; background: var(--rojo); color: #fff; font-family: 'Poppins', sans-serif; font-weight: 500;
  font-size: 13px; line-height: normal; text-transform: uppercase; padding: 12px 20px; border-radius: 3px;
}
.boton-rojo .wp-block-button__link:hover { background: #d10000; color: #fff; text-decoration: none; }
.tarjetas-iso { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tarjetas-iso::before {
  content: ''; position: absolute; inset: -40px 0 auto 22%; height: 400px; z-index: 0;
  background: url('assets/img/sello-iso.webp') center / contain no-repeat; opacity: 0.32;
}
.tarjeta-iso {
  position: relative; z-index: 1; border: 1px solid var(--borde); border-radius: 4px; padding: 30px 30px 50px;
  background: rgba(255, 255, 255, 0.55); min-height: 250px;
}
.tarjeta-iso h3 { font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 16px; color: var(--tinta); margin: 0 0 22px; }
.tarjeta-iso p { font-family: 'Poppins', sans-serif; font-weight: 300; font-size: 14px; line-height: 1.65; color: var(--gris); margin: 0; }
.tarjeta-iso::after { content: ''; position: absolute; right: 18px; bottom: 14px; width: 48px; height: 56px; background: var(--icono) center / contain no-repeat; opacity: 0.12; }
.tarjeta-iso.icono-1 { --icono: url('assets/img/icono-1.webp'); }
.tarjeta-iso.icono-2 { --icono: url('assets/img/icono-2.webp'); }
.tarjeta-iso.icono-3 { --icono: url('assets/img/icono-3.webp'); }

/* Servicios (portada y página de servicios) */
.servicios { padding: 40px 0 70px; }
.servicios .titulo-poppins { color: var(--tinta-2); max-width: 380px; }
.servicios .titulo-poppins mark { color: #ff0303 !important; }
.rejilla-servicios { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.servicio {
  position: relative; overflow: hidden; border: 1px solid var(--borde); border-radius: 4px; min-height: 180px;
  padding: 40px 35px; display: flex; flex-direction: column; justify-content: flex-start;
  background: var(--foto) center / cover no-repeat;
}
.servicio::before { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.72); }
.servicio > * { position: relative; }
.servicio.ancho { grid-column: 1 / -1; }
.servicio.foto-moviles { --foto: url('assets/img/gruas-moviles.webp'); }
.servicio.foto-camion { --foto: url('assets/img/camion-grua.webp'); }
.servicio.foto-transportes { --foto: url('assets/img/transportes.webp'); }
.servicio h3 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 30px; line-height: 1.2; color: #000; margin: 0 0 18px; }
.servicio p { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 9.5px; line-height: 2.4; color: #000; margin: 0; }

/* Banda con foto fija */
.banda-foto {
  min-height: 300px; display: flex; align-items: center; justify-content: center; text-align: center;
  background: url('assets/img/banda-gruas.webp') center / cover no-repeat fixed;
}
.banda-foto h2 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 38px; line-height: 1.3; color: #fff; margin: 0; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }

.contacta { padding: 90px 0 110px; }
.contacta .titulo-poppins { max-width: 560px; margin: 0; }
.contacta a { color: inherit; }
.contacta a:hover { text-decoration: none; }
.contacta p { font-family: 'Poppins', sans-serif; font-weight: 300; color: var(--gris); }

/* Página Empresa */
.empresa-intro .contenedor { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding-top: 20px; padding-bottom: 10px; }
.empresa-intro .logo-grande { padding: 30px 30px 0; }
.titulo-hind { font-family: 'Hind', sans-serif; font-weight: 600; font-size: 36px; color: var(--morado); margin: 15px 0 22px; }
.texto-open p { font-family: 'Open Sans', sans-serif; font-weight: 300; font-size: 15px; line-height: 1.6; color: var(--gris-claro); margin: 0 0 15px; }
.texto-open strong { font-weight: 700; color: var(--rojo); }
.certificados { display: grid; grid-template-columns: 1fr 1fr; text-align: center; margin: 55px 0 18px; }
.texto-open .certificados p { margin: 0; }
.certificados a { font-family: Arial, Helvetica, sans-serif; font-weight: 700; color: #000; font-size: 16px; }
.empresa-intro .sello-bv { padding: 0 10px 25px; }
.gestion { border-top: 1px solid var(--borde); }
.gestion .contenedor { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding-top: 30px; padding-bottom: 60px; }
.gestion .puntos-gestion p { font-family: 'Open Sans', sans-serif; font-weight: 700; font-size: 15px; line-height: 1.6; color: #000; margin: 0 0 40px; }
.gestion .cable { display: flex; justify-content: center; }
.gestion .cable img { max-height: 820px; width: auto; }
.wp-block-buttons:has(> .boton-politica) { display: block; }
.wp-block-buttons > .boton-politica { display: block; width: fit-content; margin: 60px auto 0; }
.boton-politica .wp-block-button__link {
  display: block; padding: 10px 24px; border: 1px solid #c5c5c5; outline: 2px solid #d9534f; outline-offset: -3px; border-radius: 0;
  background: #d9534f; color: #fff; font-family: Helvetica, Arial, sans-serif; font-weight: 600; font-size: 20px; line-height: 1.4;
}
.boton-politica .wp-block-button__link:hover { background: #c9302c; color: #fff; text-decoration: none; }

/* Página Servicios */
.servicios-pagina { padding: 85px 0 60px; }
.servicios-pagina .contenedor { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }
.servicios-pagina .titulo-poppins { padding-top: 10px; }
.tres-servicios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.tres-servicios .servicio { min-height: 375px; padding: 55px 45px; }
.tres-servicios .servicio h3 { font-weight: 500; font-size: 20px; }
.detalle-servicios { padding: 60px 0 90px; }
.detalle-servicios .rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; max-width: 1366px; margin: 0 auto; padding: 0 20px; }
.detalle-servicios .rotulo-pequeno { max-width: 610px; margin: 25px 0 45px 25px; }
.detalle-servicios h2 { font-size: 16px; font-weight: 700; margin: 0 0 18px; }
.detalle-servicios p { font-size: 16px; line-height: 1.15; margin: 0 0 22px; }
.galeria { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #e9edf2; }
.galeria img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.galeria img.activa { opacity: 1; }
/* En el editor se ven todas las fotos de la galería, una debajo de otra */
.editor-styles-wrapper .galeria { aspect-ratio: auto; overflow: visible; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.editor-styles-wrapper .galeria img { position: static; height: auto; opacity: 1; }

/* Página Contacto */
.contacto-pagina { padding: 100px 0 70px; }
.contacto-pagina .contenedor { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contacto-pagina .logo-grande { padding: 10px 40px; }
.datos { list-style: none; padding: 0; margin: 30px 0 10px; }
.datos li { position: relative; padding-left: 46px; min-height: 28px; padding-block: 4px; margin-bottom: 22px; font-size: 17px; font-weight: 500; line-height: 1.2; }
.datos li::before { content: ''; position: absolute; left: 0; top: 50%; width: 28px; height: 28px; transform: translateY(-50%); background: center / contain no-repeat; }
.datos li:nth-child(1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.7 11.3l-9-9a1 1 0 0 0-1.4 0l-9 9a1 1 0 0 0 0 1.4l9 9a1 1 0 0 0 1.4 0l9-9a1 1 0 0 0 0-1.4zM14 14.5V12h-4v3H8v-4a1 1 0 0 1 1-1h5V7.5l3.5 3.5-3.5 3.5z'/%3E%3C/svg%3E"); }
.datos li:nth-child(2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4.2l-8 5-8-5V6l8 5 8-5v2.2z'/%3E%3C/svg%3E"); }
.datos li:nth-child(3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1L6.6 10.8z'/%3E%3C/svg%3E"); }
.mapa iframe { display: block; width: 100%; height: 300px; border: 0; margin-left: 10px; }

/* Pie */
.pie { padding: 40px 0 30px; font-size: 11px; }
.pie a { color: var(--rojo-enlace); }

/* Móvil y tableta */
@media (max-width: 1024px) {
  .carrusel { height: 480px; }
  .carrusel .titulo { font-size: 56px; right: 8%; }
  .mision .contenedor, .servicios-pagina .contenedor { grid-template-columns: 1fr; }
  .tres-servicios { grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
  .banda-foto { background-attachment: scroll; }
}
@media (max-width: 767px) {
  .cabecera .contenedor { min-height: 90px; }
  .cabecera .logo img { width: 70px; height: 70px; }
  .boton-menu { display: block; }
  .menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  }
  .menu.abierto { display: flex; }
  .menu a { display: block; padding: 14px 20px; border-top: 1px solid #f0f0f0; }
  .carrusel { height: 340px; }
  .carrusel .titulo { font-size: 38px; right: 6%; left: 6%; text-align: right; }
  .carrusel .flecha { display: none; }
  .titulo-poppins, .banda-foto h2 { font-size: 28px; }
  .tarjetas-iso, .rejilla-servicios, .tres-servicios,
  .empresa-intro .contenedor, .gestion .contenedor, .detalle-servicios .rejilla, .contacto-pagina .contenedor { grid-template-columns: 1fr; }
  .tres-servicios .servicio { min-height: 240px; }
  .servicio h3 { font-size: 24px; }
  .servicio p { font-size: 11px; line-height: 2; }
  .banda-pagina { height: 140px; }
  .gestion .cable img { max-height: 420px; }
  .contacto-pagina { padding-top: 40px; }
  .mapa iframe { margin-left: 0; }
  .detalle-servicios .rotulo-pequeno { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .carrusel .diapo, .galeria img { transition: none; }
}
