/*
Theme Name: Lohua Ingeniería
Theme URI: https://example.com/
Author: Lohua
Description: Tema WordPress responsive para una empresa de ingeniería, instalaciones y mantenimiento.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: lohua-ingenieria

ÍNDICE DE ESTE ARCHIVO
1. Variables globales: paleta, anchos y radios.
2. Base: reglas generales, enlaces e imágenes.
3. Cabecera y navegación.
4. Portada principal (hero).
5. Estilos compartidos de secciones y títulos.
6. Tarjetas de servicios.
7. Sección de confianza.
8. Proyectos.
9. Franja de contacto.
10. Footer.
11. Animaciones al hacer scroll.
12. Responsive: tablet y móvil.
13. Accesibilidad y movimiento reducido.

CAMBIOS HABITUALES
- Colores: cambia las variables dentro de :root.
- Ancho máximo: modifica --max.
- Redondeo de tarjetas: modifica --radius.
- Espaciado entre secciones: busca .section.
- Tamaño del título principal: busca .hero h1.
*/

:root {
  /* 1. PALETA GLOBAL — puedes cambiar estos valores una sola vez */
  --navy: #142b3a;          /* Azul oscuro mate */
  --navy-deep: #0d202b;     /* Azul profundo del footer */
  --navy-soft: #1d4051;     /* Azul secundario */
  --green: #1370d2;         /* Azul principal */
  --green-bright: #21ace3;  /* Azul de acento para textos oscuros */
  --green-pale: #98dfeb;    /* Fondo azul muy suave */
  --ink: #24313a;           /* Texto principal */
  --muted: #697780;         /* Texto secundario */
  --paper: #ffffff;
  --soft: #f3f5f5;          /* Fondo gris claro */
  --line: #dce3e5;          /* Bordes */
  --max: 1180px;            /* Ancho máximo del contenido */
  --radius: 18px;           /* Redondeo de tarjetas */
  --shadow: 0 18px 50px rgba(20, 43, 58, .10);
  --shadow-small: 0 8px 24px rgba(20, 43, 58, .08);
}

/* 2. BASE */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body, button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
.container { width: min(var(--max), calc(100% - 44px)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -9999px; top: 10px; z-index: 1000;
  padding: 12px 16px; color: white; background: var(--navy); border-radius: 6px;
}
.skip-link:focus { left: 10px; }

/* 3. CABECERA Y NAVEGACIÓN */
.site-header {
  position: sticky; z-index: 100; top: 0;
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid rgba(220, 227, 229, .85);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 800; letter-spacing: .12em; line-height: 1.05; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: #fff; }
.brand-mark svg { width: 27px; height: 27px; }
.brand-name { font-size: 1.04rem; }
.brand-name small { display: block; margin-top: 5px; color: var(--green); font-size: .58rem; letter-spacing: .22em; font-weight: 800; }
.primary-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }
.primary-nav a { position: relative; color: #3d4a52; font-size: .88rem; font-weight: 700; transition: color .2s ease; }
.primary-nav a:not(.nav-cta)::after { position: absolute; content: ""; height: 2px; left: 0; right: 100%; bottom: -8px; background: var(--green); transition: right .25s ease; }
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--green); }
.primary-nav a:hover::after, .primary-nav a:focus-visible::after { right: 0; }
.primary-nav .nav-cta { padding: 11px 17px; color: white; background: var(--green); border-radius: 7px; }
.primary-nav .nav-cta:hover { color: white; background: #0b427e; }
.menu-toggle { display: none; border: 1px solid var(--line); background: white; color: var(--navy); border-radius: 9px; padding: 9px 11px; cursor: pointer; }

/* 4. PORTADA PRINCIPAL — cambia el fondo en .hero::before */
.hero {
  position: relative; overflow: hidden; min-height: 670px;
  display: flex; align-items: center; color: white; background: var(--navy);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 31, 43, .97) 0%, rgba(16, 40, 53, .88) 48%, rgba(16, 40, 53, .35) 100%),
    url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=2000&q=85') center/cover;
  transform: scale(1.015);
}
.hero::after {
  content: ""; position: absolute; width: 440px; height: 440px; right: -130px; bottom: -210px;
  border: 1px solid rgba(255, 255, 255, .17); border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255, 255, 255, .035), 0 0 0 110px rgba(255, 255, 255, .025);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; padding-block: 100px; max-width: 780px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; color: #21ace3; text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-weight: 800; }
.eyebrow::before { content: ""; width: 30px; height: 2px; background: #21ace3; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(2.6rem, 6.5vw, 5.45rem); line-height: 1.03; letter-spacing: -.055em; font-weight: 800; }
.hero h1 span { color: var(--green-bright); }
.hero-copy { max-width: 570px; margin: 26px 0 32px; color: #d0dbe0; font-size: clamp(1rem, 1.5vw, 1.14rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 13px; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 49px;
  padding: 13px 21px; border: 1px solid transparent; border-radius: 7px;
  font-weight: 750; font-size: .9rem;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-3px); }
.button:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #84bda5; outline-offset: 3px; }
.button-primary { color: white; background: var(--green); box-shadow: 0 8px 20px rgba(13, 32, 43, .14); }
.button-primary:hover { color: white; background: #0b427e; box-shadow: 0 12px 26px rgba(13, 32, 43, .2); }
.button-outline { color: white; border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .04); }
.button-outline:hover { border-color: white; background: rgba(255, 255, 255, .09); }
.hero-note { margin-top: 52px; display: flex; gap: 18px 28px; flex-wrap: wrap; color: #d4dfe3; font-size: .84rem; }
.hero-note span { display: flex; align-items: center; gap: 9px; }
.hero-note i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #21ace3; }

/* 5. ESTILOS COMPARTIDOS DE SECCIONES Y TÍTULOS */
.section { padding: 102px 0; }
.section-soft { background: var(--soft); }
.section-heading { max-width: 710px; margin-bottom: 42px; }
.section-kicker { color: var(--green); font-size: .72rem; font-weight: 850; letter-spacing: .2em; text-transform: uppercase; }
.section-title { margin: 12px 0 14px; color: var(--navy); font-size: clamp(1.85rem, 3.6vw, 3rem); line-height: 1.12; letter-spacing: .045em; text-transform: uppercase; font-weight: 850; }
.section-description { margin: 0; max-width: 650px; color: var(--muted); font-size: 1rem; }
.section-heading.centered { margin-inline: auto; text-align: center; }
.section-heading.centered .section-description { margin-inline: auto; }

/* 6. TARJETAS DE SERVICIOS */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.service-card {
  position: relative; min-height: 245px; padding: 28px; overflow: hidden;
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card::before { content: ""; position: absolute; left: 0; top: 0; width: 0; height: 3px; background: var(--green); transition: width .3s ease; }
.service-card:hover { transform: translateY(-6px); border-color: #b6d0c5; box-shadow: var(--shadow); }
.service-card:hover::before { width: 100%; }
.service-number { position: absolute; top: 19px; right: 22px; color: #dce5e5; font-size: 1.9rem; font-weight: 850; }
.service-icon { width: 49px; height: 49px; display: grid; place-items: center; margin-bottom: 24px; color: var(--green); background: var(--green-pale); border-radius: 13px; }
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { margin: 0 0 9px; color: var(--navy); font-size: 1.1rem; line-height: 1.35; }
.service-card p { margin: 0; color: var(--muted); font-size: .91rem; }

/* 7. SOLUCIONES QUE DAN CONFIANZA */
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 65px; align-items: center; }
.trust-visual {
  min-height: 460px; position: relative; overflow: hidden; border-radius: 22px;
  background: linear-gradient(135deg, rgba(20, 43, 58, .12), rgba(20, 43, 58, .02)),
    url('https://images.unsplash.com/photo-1581092921461-eab62e97a780?auto=format&fit=crop&w=1100&q=85') center/cover;
  box-shadow: var(--shadow-small);
}
.trust-badge { position: absolute; left: 22px; bottom: 22px; max-width: 270px; padding: 21px; border-radius: 14px; color: white; background: var(--navy); box-shadow: var(--shadow); }
.trust-badge strong { display: block; font-size: 1.3rem; line-height: 1.3; }
.trust-badge span { color: #c8d4d9; font-size: .85rem; }
.trust-copy .section-heading { margin-bottom: 25px; }
.trust-points { display: grid; gap: 20px; margin-top: 28px; }
.trust-point { display: flex; gap: 15px; }
.check { flex: 0 0 29px; width: 29px; height: 29px; display: grid; place-items: center; color: var(--green); background: var(--green-pale); border-radius: 50%; font-weight: 900; }
.trust-point h3 { margin: 0 0 4px; color: var(--navy); font-size: 1rem; }
.trust-point p { margin: 0; color: var(--muted); font-size: .9rem; }

/* 8. PROYECTOS — cada tarjeta usa la variable --project-image */
.projects-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; }
.project-card { min-height: 345px; position: relative; display: flex; align-items: end; overflow: hidden; border-radius: var(--radius); background: var(--navy); isolation: isolate; }
.project-card::before { content: ""; position: absolute; z-index: -2; inset: 0; background: var(--project-image) center/cover; transition: transform .6s ease; }
.project-card::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, rgba(12, 29, 39, .94), rgba(12, 29, 39, .02) 78%); }
.project-card:hover::before { transform: scale(1.06); }
.project-info { padding: 25px; color: white; }
.project-tag { display: inline-block; margin-bottom: 9px; color: #21ace3; font-size: .7rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.project-info h3 { margin: 0 0 5px; font-size: 1.25rem; line-height: 1.3; }
.project-info p { margin: 0; color: #d1dce0; font-size: .87rem; }

/* 9. FRANJA DE CONTACTO */
.cta-band { position: relative; overflow: hidden; padding: 68px 0; color: white; background: var(--navy); }
.cta-band::after { content: ""; position: absolute; width: 300px; height: 300px; right: -110px; top: -180px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.03), 0 0 0 90px rgba(255,255,255,.025); }
.cta-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.cta-inner h2 { max-width: 700px; margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.5rem); line-height: 1.2; letter-spacing: -.025em; }
.cta-inner p { margin: 10px 0 0; color: #cbd8dd; }

/* 10. FOOTER */
.site-footer { padding: 56px 0 22px; color: #c6d2d7; background: var(--navy-deep); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 45px; padding-bottom: 40px; }
.footer-brand { color: white; }
.footer-about { max-width: 360px; color: #aabac1; font-size: .9rem; }
.footer-heading { margin: 0 0 16px; color: white; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-links { display: grid; gap: 9px; color: #b8c6cc; font-size: .9rem; }
.footer-links a { width: fit-content; transition: color .2s ease; }
.footer-links a:hover { color: var(--green-bright); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.13); color: #8ea2ab; font-size: .8rem; }

/* 11. ANIMACIONES AL DESPLAZARSE — controladas por assets/js/main.js */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* 12. TABLET */
@media (max-width: 900px) {
  .header-inner { min-height: 74px; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .primary-nav {
    display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    padding: 18px 22px 24px; flex-direction: column; align-items: stretch; gap: 0;
    background: white; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(20, 43, 58, .08);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 13px 0; }
  .primary-nav a:not(.nav-cta)::after { display: none; }
  .primary-nav .nav-cta { text-align: center; margin-top: 8px; }
  .hero { min-height: 610px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid { gap: 35px; }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card:first-child { grid-column: span 2; min-height: 360px; }
  .footer-grid { gap: 28px; }
}

/* 13. MÓVIL */
@media (max-width: 620px) {
  .container { width: min(var(--max), calc(100% - 34px)); }
  .hero { min-height: 620px; }
  .hero::before {
    background: linear-gradient(90deg, rgba(12, 31, 43, .96), rgba(16, 40, 53, .78)),
      url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1000&q=80') center/cover;
  }
  .hero-content { padding-block: 78px; }
  .hero h1 { font-size: clamp(2.55rem, 12vw, 4rem); }
  .hero-note { margin-top: 38px; gap: 12px 20px; }
  .section { padding: 74px 0; }
  .section-heading { margin-bottom: 30px; }
  .services-grid, .projects-grid, .trust-grid, .footer-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 210px; padding: 24px; }
  .trust-grid { gap: 30px; }
  .trust-visual { min-height: 340px; order: 2; }
  .projects-grid { gap: 15px; }
  .project-card, .project-card:first-child { grid-column: auto; min-height: 300px; }
  .project-info { padding: 23px; }
  .cta-inner { align-items: flex-start; flex-direction: column; }
  .cta-band { padding: 50px 0; }
  .footer-grid { gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .brand-mark { width: 40px; height: 40px; }
}

/* Evita animaciones molestas para personas que han solicitado movimiento reducido. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


/* Imagen horizontal de las tarjetas de servicios */
.service-image {
    width: 100%;
    aspect-ratio: 2.5 / 1;
    margin: 12px 0 22px;
    overflow: hidden;
    border-radius: 8px;
}

/* Imagen dentro de la tarjeta */
.service-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Efecto al pasar el cursor por la tarjeta */
.service-card:hover .service-image img {
    transform: scale(1.08);
}

/* Permite navegar sin animación a quienes la tienen desactivada */
@media (prefers-reduced-motion: reduce) {
    .service-image img {
        transition: none;
    }
}

.footer-logo {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.footer-brand {
    display: inline-block;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
