/* Fontanería y Multigremios Josu · hoja única para todas las páginas.
   Colores sacados del logo; una sola fuente alojada en la propia web. */
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

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

:root {
  --tinta: #13203a;          /* azul marino del logo */
  --tinta-2: #475569;
  --tinta-3: #64748b;
  --azul: #1f5fa8;           /* «JOSU» del logo */
  --azul-oscuro: #184c88;
  --verde: #4f8a2b;          /* verde del icono */
  --papel: #ffffff;
  --suave: #f5f7fa;
  --linea: #e3e8ef;
  --pie: #0d1628;
  --whatsapp: #128c4a;
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Nombres antiguos que aún usan algunos estilos en línea de las páginas */
  --navy: var(--tinta);
  --navy-light: #1c2b48;
  --orange: var(--azul);
  --orange-dark: var(--azul-oscuro);
  --accent: var(--azul);
  --white: #ffffff;
  --gray-50: var(--suave);
  --gray-100: #eef2f6;
  --gray-200: var(--linea);
  --gray-300: #cbd5e1;
  --gray-500: var(--tinta-3);
  --gray-600: var(--tinta-2);
  --gray-700: #334155;
  --gray-800: #1e293b;
}

html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--tinta-2); background: var(--papel); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font); color: var(--tinta); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 750; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin-bottom: 1rem; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--tinta); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 200; }
.saltar:focus { left: 8px; }

/* ===== CABECERA ===== */
#site-header { position: sticky; top: 0; z-index: 100; background: rgb(255 255 255 / .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
#site-header.con-borde { border-bottom-color: var(--linea); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 72px; }
.header-logo { height: 44px; width: auto; }
#menu-toggle { display: none; background: none; border: 0; color: var(--tinta); cursor: pointer; padding: .5rem; border-radius: 8px; }
#menu-toggle svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2; fill: none; }
#main-nav ul { display: flex; align-items: center; gap: 1.75rem; }
#main-nav a { color: var(--tinta-2); font-size: .95rem; font-weight: 500; }
#main-nav a:hover, #main-nav a.active { color: var(--tinta); }
#main-nav a.active:not(.btn-nav-cta) { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--azul); }
.btn-nav-cta { display: inline-flex; align-items: center; height: 42px; padding: 0 1.15rem; border-radius: 999px; background: var(--azul); color: #fff !important; font-weight: 600 !important; }
.btn-nav-cta:hover { background: var(--azul-oscuro); }

@media (max-width: 860px) {
  #menu-toggle { display: block; }
  #main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--linea); padding: .5rem 1.25rem 1.25rem; }
  #main-nav.open { display: block; }
  #main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  #main-nav li a { display: block; padding: .85rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--linea); }
  #main-nav li:last-child a { border: 0; }
  .btn-nav-cta { justify-content: center; height: 48px; margin-top: 1rem; }
}

/* ===== BOTONES ===== */
.btn-primary, .btn-secondary, .btn-wa-claro {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: 0 1.6rem; border-radius: 999px; font-family: var(--font); font-size: 1.02rem; font-weight: 650;
  border: 1px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; text-align: center;
}
.btn-primary { background: var(--azul); color: #fff; }
.btn-primary:hover { background: var(--azul-oscuro); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--tinta); border-color: var(--linea); }
.btn-secondary:hover { border-color: var(--tinta-3); }
.btn-wa-claro { background: var(--whatsapp); color: #fff; }
.btn-wa-claro:hover { background: #0e7a40; }
.btn-primary svg, .btn-secondary svg, .btn-wa-claro svg { width: 20px; height: 20px; fill: currentColor; }

/* ===== PORTADA ===== */
.hero-split-section { background: var(--suave); border-bottom: 1px solid var(--linea); }
.hero-split-container { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3.5rem; align-items: center; padding-top: 4.5rem; padding-bottom: 4.5rem; }
.hero-tag { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--verde); margin-bottom: 1.25rem; }
.hero-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgb(79 138 43 / .15); }
.hero-text-col h1 { margin-bottom: 1.25rem; }
.hero-text-col h1 span { display: block; color: var(--azul); }
.hero-text-col > p { font-size: 1.15rem; color: var(--tinta-2); max-width: 34em; margin-bottom: 2rem; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-datos { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); font-size: .95rem; }
.hero-datos li, .hero-datos a { display: flex; flex-direction: column; }
.hero-datos strong { color: var(--tinta); font-size: 1.15rem; font-weight: 700; }
.hero-datos a:hover strong { text-decoration: underline; }
.hero-image-col { position: relative; }
.hero-split-img { width: 100%; aspect-ratio: 4 / 5; max-height: 560px; object-fit: cover; object-position: center center; border-radius: 20px; box-shadow: 0 12px 32px -8px rgba(18, 28, 45, 0.12); }
@media (max-width: 860px) {
  .hero-split-container { grid-template-columns: 1fr; gap: 2.25rem; padding-top: 2.5rem; padding-bottom: 3rem; }
  .hero-split-img { aspect-ratio: 4 / 3; max-height: 380px; }
  .hero-buttons a { flex: 1 1 100%; }
}

/* ===== SECCIONES ===== */
.section-padding { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.bg-light { background: var(--suave); }
.section-header { max-width: 720px; margin-bottom: 2.75rem; }
.section-header.text-center, .text-center .section-header { margin-left: auto; margin-right: auto; }
.section-header h2 { margin-bottom: .75rem; }
.section-header p { color: var(--tinta-3); font-size: 1.08rem; margin: 0; }
.antetitulo { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--azul); margin-bottom: .6rem; }

/* Servicios */
.services-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--linea); }
.service-card { padding: 2rem 1.75rem 1rem 0; }
.service-card + .service-card { padding-left: 1.75rem; border-left: 1px solid var(--linea); }
.service-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #e8f0fa; color: var(--azul); margin-bottom: 1.1rem; }
.service-icon svg { width: 22px; height: 22px; stroke: currentColor; }
.service-card h3 { margin-bottom: .5rem; }
.service-card p { font-size: .97rem; margin: 0; }
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card:nth-child(3) { padding-left: 0; border-left: 0; }
  .service-card:nth-child(n+3) { border-top: 1px solid var(--linea); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card, .service-card + .service-card { padding: 1.5rem 0; border-left: 0; }
  .service-card + .service-card { border-top: 1px solid var(--linea); }
}

/* Trabajos (portada y proyectos) */
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.gallery-grid > li, .gallery-grid > .gallery-item { min-width: 0; }
.gallery-item { margin: 0; }
.gallery-img-wrap, .gallery-item > img { border-radius: 16px; overflow: hidden; background: var(--suave); aspect-ratio: 4 / 5; }
.gallery-img-wrap img, .gallery-item > img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption, .gallery-overlay { padding: .85rem .15rem 0; }
.gallery-item figcaption h3, .gallery-overlay h3, .gallery-overlay span { display: block; font-size: 1.02rem; font-weight: 650; color: var(--tinta); margin-bottom: .2rem; }
.gallery-item figcaption p, .gallery-overlay p { font-size: .92rem; color: var(--tinta-3); margin: 0; }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; } }
@media (max-width: 480px) { .gallery-grid { gap: .75rem; } .gallery-item figcaption p, .gallery-overlay p { display: none; } }
.gallery-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.5rem; }

/* Sobre Josu */
.sobre { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.sobre p strong { color: var(--tinta); }
.cita { border-left: 3px solid var(--azul); padding: .25rem 0 .25rem 1.25rem; margin-top: 1.5rem; color: var(--tinta); font-size: 1.1rem; }
.datos-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--linea); border: 1px solid var(--linea); border-radius: 16px; overflow: hidden; }
.datos-lista div { background: #fff; padding: 1.4rem; }
.datos-lista strong { display: block; color: var(--tinta); font-size: 1.6rem; font-weight: 750; line-height: 1.1; }
.datos-lista span { font-size: .92rem; color: var(--tinta-3); }
@media (max-width: 860px) { .sobre { grid-template-columns: 1fr; gap: 2rem; } }

/* Opiniones reales en Google */
.google-nota { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; border: 1px solid var(--linea); border-radius: 20px; padding: 2rem; background: #fff; }
.google-nota .nota { display: flex; align-items: baseline; gap: .75rem; }
.google-nota .nota strong { font-size: 3rem; font-weight: 750; color: var(--tinta); line-height: 1; }
.google-nota .estrellas { color: #e8a317; font-size: 1.3rem; letter-spacing: 2px; }
.google-nota p { margin: .35rem 0 0; color: var(--tinta-3); }

/* Zonas */
.zonas { display: flex; flex-wrap: wrap; gap: .5rem; }
.zonas li { padding: .45rem 1rem; border: 1px solid var(--linea); border-radius: 999px; background: #fff; font-size: .95rem; color: var(--tinta); }

/* Preguntas frecuentes */
.faq { max-width: 820px; border-top: 1px solid var(--linea); }
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary { list-style: none; cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0; position: relative; font-weight: 650; font-size: 1.07rem; color: var(--tinta); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: .4rem; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--tinta-3); border-bottom: 2px solid var(--tinta-3); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 2.5rem 1.25rem 0; margin: 0; }

/* Contacto */
.contacto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.contacto-lista { border-top: 1px solid var(--linea); }
.contacto-lista li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--linea); }
.contacto-lista .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #e8f0fa; color: var(--azul); }
.contacto-lista .ico svg { width: 20px; height: 20px; }
.contacto-lista small { display: block; font-size: .85rem; color: var(--tinta-3); }
.contacto-lista a, .contacto-lista address { color: var(--tinta); font-weight: 600; font-style: normal; overflow-wrap: anywhere; }
.contacto-lista a:hover { color: var(--azul); }
.contacto-cta { background: var(--tinta); color: #cbd5e1; border-radius: 20px; padding: 2rem; }
.contacto-cta h3 { color: #fff; font-size: 1.5rem; margin-bottom: .5rem; }
.contacto-cta p { margin-bottom: 1.5rem; }
.contacto-cta .hero-buttons a { flex: 1 1 200px; }
.contacto-cta .btn-secondary { color: #fff; border-color: rgb(255 255 255 / .25); }
.contacto-cta .btn-secondary:hover { border-color: #fff; }
@media (max-width: 860px) { .contacto { grid-template-columns: 1fr; } }

/* ===== CABECERA DE PÁGINAS INTERIORES ===== */
.promo-banner { background: var(--suave); border: 1px solid var(--linea); border-radius: 20px; padding: clamp(2rem, 5vw, 3.25rem) 1.5rem; margin: 2rem auto; text-align: center; }
.promo-banner h3, .promo-banner .promo-titulo { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 750; color: var(--tinta); margin-bottom: .75rem; }
.promo-banner p { color: var(--tinta-3); font-size: 1.08rem; max-width: 40em; margin: 0 auto; }

/* ===== FILTROS (PROYECTOS) ===== */
.filter-btn { padding: .6rem 1.25rem; background: #fff; border: 1px solid var(--linea); border-radius: 999px; font-family: var(--font); font-weight: 600; font-size: .95rem; color: var(--tinta-2); cursor: pointer; }
.filter-btn:hover { border-color: var(--tinta-3); }
.filter-btn.active { background: var(--tinta); border-color: var(--tinta); color: #fff; }

/* ===== BLOG ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.5rem; }
.blog-card { background: #fff; border: 1px solid var(--linea); border-radius: 16px; overflow: hidden; }
.blog-img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; }
.blog-content { padding: 1.4rem; }
.blog-date { display: block; font-size: .85rem; color: var(--tinta-3); margin-bottom: .4rem; }
.blog-content h4 { font-size: 1.15rem; margin-bottom: .6rem; }
.blog-content p { font-size: .95rem; }
.blog-content a { color: var(--azul); font-weight: 600; }

/* ===== PRESUPUESTO ===== */
.form-container { max-width: 700px; margin: 0 auto; background: #fff; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: 20px; border: 1px solid var(--linea); }
.options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.option-card { background: #fff; border: 1px solid var(--gray-300); padding: 1.2rem; border-radius: 12px; font-family: var(--font); font-weight: 600; font-size: 1.02rem; color: var(--tinta); cursor: pointer; text-align: left; }
.option-card:hover { border-color: var(--azul); background: var(--suave); }
.option-card.selected { border-color: var(--azul); background: #eef5fc; box-shadow: 0 0 0 2px var(--azul); color: var(--azul); }
@media (max-width: 600px) { .options-grid { grid-template-columns: 1fr; } }
.form-container input, .form-container textarea, .form-container select { font: inherit; }

/* ===== PIE ===== */
#site-footer { background: var(--pie); color: #a7b2c4; padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-logo { height: 46px; width: auto; margin-bottom: 1.1rem; }
.footer-col p { max-width: 26em; }
.footer-col h4 { color: #fff; font-size: .95rem; font-weight: 650; letter-spacing: .02em; margin-bottom: 1rem; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .1); padding-top: 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font-size: .85rem; color: #7d8aa0; }
.footer-bottom p { margin: 0; }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Crédito discreto del estudio que hizo la web */
.pe-credit a { color: #7d8aa0; text-decoration: underline; text-decoration-color: rgb(255 255 255 / .2); text-underline-offset: 3px; }
.pe-credit a:hover { color: #fff; text-decoration-color: currentColor; }

/* ===== BOTONES FLOTANTES ===== */
.floating-contact { position: fixed; right: 1.25rem; bottom: 1.25rem; display: flex; flex-direction: column; gap: .75rem; z-index: 99; }
.float-btn { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 24px rgb(13 22 40 / .22); transition: transform .15s; }
.float-btn:hover { transform: translateY(-2px); color: #fff; }
.float-wa, .float-whatsapp { background: var(--whatsapp); }
.float-phone { background: var(--azul); }
.float-btn svg { width: 26px; height: 26px; fill: currentColor; }
@media (max-width: 768px) { #site-footer { padding-bottom: 6.5rem; } }

/* Las dimensiones del HTML solo reservan el hueco (evita saltos al cargar) */
:where(img[width][height]) { height: auto; max-width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
