/* ===== Dillenza — Estilos ===== */

:root {
  --blue-900: #0b3a52;
  --blue-700: #106a95;
  --blue-600: #1487bd;
  --blue-500: #2ea7dc;
  --blue-400: #5cc0e8;
  --blue-50: #eef8fc;
  --green-600: #7ea92e;
  --green-500: #9bc53d;
  --green-100: #eef6dd;
  --ink: #16303f;
  --ink-soft: #4a6273;
  --white: #ffffff;
  --bg-alt: #f5fafc;
  --border: #e1edf2;

  --font-head: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(11, 58, 82, 0.25);
  --shadow-sm: 0 4px 14px -6px rgba(11, 58, 82, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--blue-900);
  line-height: 1.2;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { color: var(--ink-soft); }

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

.eyebrow {
  display: inline-block;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--green-600);
  background: var(--green-100);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.text-grad {
  background: linear-gradient(90deg, var(--blue-600), var(--green-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { box-shadow: 0 14px 26px -10px rgba(20,135,189,.5); }

.btn--ghost {
  background: transparent;
  color: var(--blue-700);
  border: 2px solid var(--blue-500);
}
.btn--ghost:hover { background: var(--blue-50); }

.btn--whatsapp {
  background: #25D366;
  color: #fff;
}
.btn--whatsapp:hover { box-shadow: 0 14px 26px -10px rgba(37,211,102,.5); }
.btn--whatsapp .icon { width: 20px; height: 20px; fill: currentColor; stroke: none; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.header.is-scrolled {
  box-shadow: 0 6px 20px -12px rgba(11,58,82,.25);
  border-color: var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 24px;
}

.header__logo img { height: 52px; width: auto; }

.nav__list {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav__tel-item { display: none; }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--blue-500);
  transition: width .25s ease;
}
.nav__link:hover::after { width: 100%; }
.nav__link.is-active { color: var(--blue-700); }
.nav__link.is-active::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header__cta { flex-shrink: 0; }
.header__tel { padding: 12px 18px; font-size: .88rem; }
.header__tel .icon { width: 17px; height: 17px; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-900);
  transition: transform .3s ease, opacity .3s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 90px 0 110px;
  background:
    linear-gradient(90deg, var(--blue-50) 0%, var(--blue-50) 40%, rgba(238,248,252,.55) 68%, rgba(238,248,252,.28) 100%),
    url('../assets/img/photos/dillenza2.jpg') center 62% / cover no-repeat;
  overflow: hidden;
}

.hero__decor { position: absolute; inset: 0; pointer-events: none; }
.sparkle { position: absolute; fill: var(--green-500); opacity: .55; }
.sparkle--1 { width: 34px; top: 14%; right: 12%; animation: float 5s ease-in-out infinite; }
.sparkle--2 { width: 20px; top: 60%; right: 22%; animation: float 6s ease-in-out infinite 1s; }
.sparkle--3 { width: 26px; top: 30%; right: 4%; fill: var(--blue-400); animation: float 4.5s ease-in-out infinite .5s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 50px;
}

.hero__lead {
  margin: 22px 0 30px;
  font-size: 1.08rem;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.hero__badges li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: .92rem;
  color: var(--blue-700);
}
.hero__badges .icon { color: var(--green-600); width: 18px; height: 18px; }

.hero__visual { display: flex; justify-content: center; }
.hero__logo-card {
  background: var(--white);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
  max-width: 340px;
}

/* ===== Banner de página interna (con foto de fondo) ===== */
.page-banner {
  position: relative;
  min-height: 460px;
  padding: 150px 0 60px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.page-banner .container { width: 100%; }
.page-banner__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

/* Carrusel de fotos de fondo (rotación automática, sin JS) */
.page-banner__carousel {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.page-banner__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: bannerCarousel 20s infinite;
}
.page-banner__slide:nth-child(1) { animation-delay: 0s; }
.page-banner__slide:nth-child(2) { animation-delay: -5s; }
.page-banner__slide:nth-child(3) { animation-delay: -10s; }
.page-banner__slide:nth-child(4) { animation-delay: -15s; }

@keyframes bannerCarousel {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  22%  { opacity: 1; }
  27%  { opacity: 0; }
  100% { opacity: 0; }
}
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11,58,82,.92), rgba(20,135,189,.8));
  z-index: -1;
}
.page-banner .section-head { margin-bottom: 0; }
.page-banner .eyebrow { background: rgba(255,255,255,.16); color: #fff; }
.page-banner h2 { color: #fff; }
.page-banner .section-head p { color: rgba(255,255,255,.88); }

/* ===== Carrusel de fotos "solo imagen" (sin texto encima) ===== */
.photo-carousel {
  position: relative;
  height: 62vh;
  min-height: 420px;
  max-height: 620px;
  overflow: hidden;
}

/* ===== Galería de trabajos ===== */
.gallery { padding: 100px 0; background: var(--bg-alt); }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3 / 4;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery__item:hover img { transform: scale(1.07); }
.gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 14px 12px;
  background: linear-gradient(0deg, rgba(11,58,82,.88), transparent);
  color: #fff;
  font-weight: 600;
  font-size: .85rem;
}

/* ===== Section head ===== */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}
.section-head p { margin-top: 12px; }

/* ===== Services ===== */
.services { padding: 100px 0; }

/* ===== Servicios: pestañas + fotos en capas ===== */
.services-tabs__radio { position: absolute; opacity: 0; pointer-events: none; }

.services-tabs__grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 40px;
  align-items: start;
}

.services-tabs__sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s ease;
}
.tab-item:hover { background: var(--bg-alt); }
.tab-item svg { width: 32px; height: 32px; stroke: var(--green-600); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab-item span { font-weight: 600; font-size: .95rem; color: var(--ink); }

.tab-panel { display: none; }
.tab-panel__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: center;
}
.tab-panel p { margin-bottom: 16px; }
.tab-panel .btn { margin-top: 8px; }

.photo-stack {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.photo-stack img {
  position: absolute;
  border-radius: 20px;
  box-shadow: var(--shadow);
  object-fit: cover;
  border: 5px solid var(--white);
}
.photo-stack__back {
  top: 0; right: 0;
  width: 68%;
  height: 60%;
  z-index: 1;
}
.photo-stack__front {
  left: 0; bottom: 0;
  width: 58%;
  height: 66%;
  z-index: 2;
}

/* Selección de pestaña activa (sin JS) */
#tab-tapizados:checked ~ .services-tabs__grid .tab-item[for="tab-tapizados"],
#tab-corporativa:checked ~ .services-tabs__grid .tab-item[for="tab-corporativa"],
#tab-obra:checked ~ .services-tabs__grid .tab-item[for="tab-obra"],
#tab-vidrios:checked ~ .services-tabs__grid .tab-item[for="tab-vidrios"] {
  background: var(--bg-alt);
}
#tab-tapizados:checked ~ .services-tabs__grid .tab-item[for="tab-tapizados"] svg,
#tab-corporativa:checked ~ .services-tabs__grid .tab-item[for="tab-corporativa"] svg,
#tab-obra:checked ~ .services-tabs__grid .tab-item[for="tab-obra"] svg,
#tab-vidrios:checked ~ .services-tabs__grid .tab-item[for="tab-vidrios"] svg {
  stroke: var(--blue-700);
}

#tab-tapizados:checked ~ .services-tabs__grid #panel-tapizados,
#tab-corporativa:checked ~ .services-tabs__grid #panel-corporativa,
#tab-obra:checked ~ .services-tabs__grid #panel-obra,
#tab-vidrios:checked ~ .services-tabs__grid #panel-vidrios {
  display: block;
}

/* ===== Features strip ===== */
.features {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  padding: 60px 0;
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  color: #fff;
}
.feature { text-align: center; }
.feature .icon {
  width: 34px; height: 34px;
  stroke: #fff;
  margin-bottom: 14px;
}
.feature h4 { color: #fff; font-family: var(--font-body); font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: rgba(255,255,255,.85); font-size: .88rem; }

/* ===== About ===== */
.about { padding: 100px 0; background: var(--bg-alt); }

.about__inner {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.about__logo-card {
  background: var(--white);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.about__text p { margin-bottom: 16px; }

.about__list { margin: 22px 0 30px; }
.about__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 500;
  color: var(--blue-900);
}
.about__list .icon { color: var(--green-600); flex-shrink: 0; }

.about__tagline {
  font-weight: 600;
  font-style: italic;
  color: var(--blue-900);
  border-left: 3px solid var(--green-500);
  padding-left: 16px;
  margin: 4px 0 26px;
}

/* ===== Contact ===== */
.contact { padding: 100px 0; }

.contact__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
}

.contact__form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.form__row { margin-bottom: 20px; }
.form__row label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  color: var(--blue-900);
  margin-bottom: 8px;
}
.form__row input,
.form__row select,
.form__row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  background: var(--bg-alt);
  transition: border-color .2s ease;
}
.form__row input:focus,
.form__row select:focus,
.form__row textarea:focus {
  outline: none;
  border-color: var(--blue-500);
}
.form__submit { width: 100%; justify-content: center; margin-top: 6px; }

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.info-card .icon { color: var(--blue-600); flex-shrink: 0; margin-top: 2px; }
.info-card .icon[fill] { fill: var(--blue-600); }
.info-card h4 { font-family: var(--font-body); font-size: .95rem; color: var(--blue-900); margin-bottom: 2px; }
.info-card p { font-size: .9rem; }
.info-card a:hover { color: var(--blue-600); }

.onsite-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--blue-50), var(--green-100));
  border-radius: 14px;
  padding: 20px;
}
.onsite-card .icon { color: var(--blue-700); flex-shrink: 0; margin-top: 2px; }
.onsite-card h4 { font-family: var(--font-body); font-size: .95rem; color: var(--blue-900); margin-bottom: 4px; }
.onsite-card p { font-size: .88rem; }

/* ===== Footer ===== */
.footer { background: var(--blue-900); color: #cfe4ee; padding: 60px 0 0; }

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer__brand img { height: 46px; margin-bottom: 14px; border-radius: 8px; }
.footer__brand p { color: #a9c3d1; font-size: .9rem; max-width: 260px; }

.footer__links h5 { color: #fff; font-family: var(--font-body); font-size: .95rem; margin-bottom: 16px; }
.footer__links a { display: block; color: #a9c3d1; font-size: .9rem; margin-bottom: 10px; }
.footer__links a:hover { color: var(--green-500); }

.footer__bottom {
  text-align: center;
  padding: 22px 0;
  font-size: .82rem;
  color: #7fa0b3;
}
.footer__credit {
  margin-top: 6px;
  font-size: .8rem;
}
.footer__credit a {
  color: #a9c3d1;
  font-weight: 600;
  transition: color .2s ease;
}
.footer__credit a:hover { color: var(--green-500); }

/* ===== WhatsApp float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -6px rgba(37,211,102,.6);
  z-index: 200;
  animation: pulse 2.4s infinite;
}
.whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero {
    background:
      linear-gradient(180deg, var(--blue-50) 0%, rgba(238,248,252,.85) 100%),
      url('../assets/img/photos/dillenza2.jpg') center 55% / cover no-repeat;
  }
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__actions, .hero__badges { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__logo-card { max-width: 240px; }

  .features__grid { grid-template-columns: repeat(2, 1fr); gap: 34px; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .page-banner { padding: 130px 0 50px; min-height: 380px; }
  .photo-carousel { height: 48vh; min-height: 320px; }

  .services-tabs__grid { grid-template-columns: 1fr; }
  .services-tabs__sidebar { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .tab-item { flex: 1 1 130px; padding: 16px 10px; }
  .tab-panel__grid { grid-template-columns: 1fr; }
  .tab-panel__grid .photo-stack { order: -1; margin-bottom: 10px; }

  .about__inner { grid-template-columns: 1fr; }
  .about__visual { display: flex; justify-content: center; }
  .about__logo-card { max-width: 220px; }

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

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav { position: fixed; top: 74px; left: 0; right: 0; background: #fff; box-shadow: 0 12px 20px -10px rgba(11,58,82,.2); transform: translateY(-130%); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
  .nav.is-open { transform: translateY(0); opacity: 1; }
  .nav__list { flex-direction: column; padding: 24px; gap: 18px; }
  .nav__tel-item { display: block; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
  .nav__tel { color: var(--blue-700); font-weight: 600; }
  .header__actions { display: none; }
  .hamburger { display: flex; }

  .features__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .photo-stack { max-width: 300px; }
}
