@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
  --primary: #1f8a9e;
  --primary-dark: #156a7a;
  --bg: #f7f9fb;
  --text: #1d2a32;
  --muted: #6b7a87;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

body {
  margin: 0;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 10px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  background: var(--card);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
}

.main-nav a.active,
.main-nav a:hover {
  background: rgba(31, 138, 158, 0.1);
  color: var(--primary-dark);
}

.cta-call {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(31, 138, 158, 0.35);
}

.cta-call:hover {
  background: var(--primary-dark);
}

.hero {
  padding: 70px 0 40px;
}

.hero-home {
  position: relative;
  background: linear-gradient(120deg, rgba(9, 35, 44, 0.72), rgba(23, 90, 104, 0.48)),
    url('fotos/fontaneria-2.jpg') center/cover no-repeat;
  color: #f7fbfd;
}

.hero-home .hero-text p {
  color: #e5f2f6;
}

.hero-home .btn.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #f7fbfd;
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-home .btn.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-home .hero-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(227, 235, 240, 0.7);
  color: var(--text);
}

.hero-small {
  padding: 60px 0 30px;
}

.hero-grid {
  display: grid;
  gap: 26px;
}

.hero-text h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 0 0 14px;
}

.hero-text p {
  margin: 0 0 18px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 138, 158, 0.35);
}

.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn.secondary {
  background: #e9f3f6;
  color: var(--primary-dark);
  border-color: rgba(31, 138, 158, 0.3);
}

.btn.secondary:hover {
  transform: translateY(-1px);
}

.btn.full {
  width: 100%;
}

.hero-card {
  background: var(--card);
  padding: 22px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid #e3ebf0;
}

.hero-card h3 {
  margin-top: 0;
}

.hero-card ul {
  padding-left: 18px;
  margin: 10px 0;
  color: var(--muted);
}

.small-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: 56px 0;
}

.section.alt {
  background: #eef5f7;
}

.section-zone {
  background: linear-gradient(120deg, rgba(14, 30, 38, 0.75), rgba(26, 74, 88, 0.6)),
    url('fotos/fontanero1.jpg') center/cover no-repeat;
  color: #f3f8fb;
}

.section-zone .lead {
  color: #e5f1f6;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
}

h3 {
  margin: 10px 0;
  font-size: 1.1rem;
}

.lead {
  color: var(--muted);
  margin-bottom: 16px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.icon-grid article {
  background: var(--card);
  padding: 18px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid #e3ebf0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.services-grid article {
  background: var(--card);
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #dce8ed;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.services-grid article:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.service-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #0f2a33;
  animation: pulse 2.4s ease-in-out infinite;
}

.badge.hot { background: #ffe0b3; color: #a85a00; }
.badge.new { background: #d8f1ff; color: #0c5d83; }
.badge.eco { background: #e2f6ea; color: #1d7a41; }
.badge.quick { background: #fde3ef; color: #a71f6c; }
.badge.pro { background: #e6e9ff; color: #2e3b8f; }
.badge.care { background: #fff3d4; color: #9a6b00; }

.service-thumb {
  width: 100%;
  height: 170px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #e8f1f4;
}

.service-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.services-grid article:hover .service-thumb img {
  transform: scale(1.05);
}

.reviews {
  background: var(--card);
  padding: 22px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid #c9e3ef;
}

.reviews-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(120deg, rgba(31, 138, 158, 0.08), rgba(31, 138, 158, 0.18));
  border-radius: 12px;
  margin-bottom: 14px;
}

.reviews-head img {
  width: 130px;
  max-width: 40vw;
  height: auto;
  display: block;
}

.reviews-label {
  margin: 0;
  font-weight: 700;
  color: var(--primary-dark);
}

.reviews-stars {
  margin: 3px 0 0;
  color: #f5a524;
  font-weight: 700;
}

.reviews-track {
  position: relative;
  min-height: 140px;
}

.review-slide {
  display: none;
  animation: fade 0.5s ease;
}

.review-slide.active {
  display: block;
}

.review-slide p {
  margin: 0 0 8px;
  font-weight: 600;
}

.review-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.review-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.review-controls button {
  background: #e8f3f6;
  border: none;
  color: var(--primary-dark);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.review-controls .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--primary-dark);
  background: transparent;
  padding: 0;
}

.review-controls .dot.active {
  background: var(--primary);
}

.map-embed {
  margin-top: 18px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #d7e4ea;
}

.map-embed iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

.map-embed.small iframe {
  height: 240px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.gallery-card {
  background: linear-gradient(145deg, #f9fbfc, #eef4f7);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
  border: 1px solid #d6e6ed;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.08);
}

.gallery-thumb {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.gallery-thumb::after {
  content: "Ver";
  position: absolute;
  inset: 0;
  background: rgba(31, 138, 158, 0.18);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.gallery-card:hover .gallery-thumb::after {
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-thumb img {
  transform: scale(1.04);
}

.gallery-grid figcaption {
  margin: 10px 4px 2px;
  color: var(--text);
  font-weight: 700;
}

.gallery-links {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-grid {
  display: grid;
  gap: 22px;
}

.contact-form-card {
  background: var(--card);
  padding: 22px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid #e3ebf0;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d6e2e8;
  font-size: 1rem;
  font-family: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.inline-links {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer {
  background: #0f1f26;
  color: #e8f1f4;
  padding: 34px 0;
  margin-top: 30px;
}

.site-footer a {
  color: #c7e6ef;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.muted {
  color: #9bb4c0;
  margin: 6px 0 0;
}

.whatsapp-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
  z-index: 12;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
}

.wa-icon {
  font-weight: 700;
  font-size: 20px;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.lightbox.active {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 20, 26, 0.65);
  backdrop-filter: blur(2px);
}

.lightbox-content {
  position: relative;
  background: #fff;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  max-width: 90vw;
  max-height: 90vh;
  display: grid;
  gap: 8px;
  z-index: 1;
}

.lightbox-content img {
  max-width: 80vw;
  max-height: 70vh;
  object-fit: contain;
}

.lightbox-caption {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #0f1f26;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.faq-section {
  background: #f5f7f9;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.faq-item {
  background: #fff;
  border: 1px solid #dbe7ee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  background: #fff;
  border: none;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question::after {
  content: "+";
  font-weight: 900;
  color: var(--primary-dark);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question::after {
  content: "–";
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  transition: max-height 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  opacity: 1;
  padding-bottom: 14px;
}

.faq-answer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f7fbfd;
  border-top: 1px solid #d4e3ea;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  padding: 14px;
  display: none;
  z-index: 30;
}

.cookie-banner.visible {
  display: block;
}

.cookie-banner.hidden {
  display: none;
}

.cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  color: var(--text);
  font-size: 0.96rem;
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

.cookie-accept {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(31, 138, 158, 0.25);
}

.cookie-accept:hover {
  background: var(--primary-dark);
}

.cookie-link {
  color: var(--primary-dark);
  font-weight: 700;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(31, 138, 158, 0.0); }
  50% { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(31, 138, 158, 0.12); }
}

@media (min-width: 720px) {
  .hero-grid {
    grid-template-columns: 2fr 1fr;
    align-items: center;
  }

  .contact-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .header-content {
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    align-items: center;
    flex-wrap: wrap;
  }

  .logo {
    order: 1;
  }

  .cta-call {
    order: 2;
    padding: 8px 12px;
    margin-left: auto;
  }

  .main-nav {
    order: 3;
    display: flex;
    width: 100%;
    gap: 10px;
    padding: 6px 10px;
    background: #eef5f7;
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav a {
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
  }

  .site-header {
    position: sticky;
  }

  .hero {
    padding: 60px 0 34px;
  }

  .hero-home {
    background-position: center;
  }

  .section {
    padding: 46px 0;
  }

  .hero-card {
    padding: 18px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .reviews {
    padding: 18px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .gallery-thumb img {
    height: 160px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 11px;
  }

  .map-embed iframe {
    height: 260px;
  }

  .whatsapp-float {
    right: 12px;
    bottom: 12px;
    padding: 11px 13px;
    font-size: 14px;
    gap: 8px;
  }

  .wa-icon {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.98rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .btn {
    padding: 11px 14px;
    border-radius: 10px;
  }

  .icon-grid article,
  .services-grid article,
  .contact-form-card {
    padding: 16px;
  }

  .whatsapp-float {
    right: 10px;
    bottom: 10px;
    padding: 10px 12px;
    font-size: 13px;
    gap: 6px;
  }
}
