/* ============================================
   FONTANERO CEUTI - Estilos principales
   ============================================ */

/* --- Variables --- */
:root {
  --primary: #0062cc;
  --primary-dark: #004a99;
  --primary-light: #e8f0fe;
  --accent: #25d366;
  --accent-dark: #1da851;
  --urgent: #dc3545;
  --text: #1a1a2e;
  --text-light: #555;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-dark: #0f1b2d;
  --border: #dee2e6;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --header-h: 70px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul { list-style: none; }

/* --- Utilidades --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section--dark {
  background: var(--bg-dark);
  color: #fff;
}

.section__badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section__subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 700px;
  margin-bottom: 40px;
}

.section--dark .section__subtitle {
  color: #b0bec5;
}

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--whatsapp {
  background: var(--accent);
  color: #fff;
}
.btn--whatsapp:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn--urgent {
  background: var(--urgent);
  color: #fff;
  animation: pulse-urgent 2s infinite;
}
.btn--urgent:hover {
  background: #c82333;
  color: #fff;
}

@keyframes pulse-urgent {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,53,69,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(220,53,69,0); }
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: all var(--transition);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.header__logo svg {
  width: 36px;
  height: 36px;
  fill: var(--primary);
}

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

.nav__link {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav__link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.header__cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: all var(--transition);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  margin-top: var(--header-h);
  background: linear-gradient(135deg, #0a1628 0%, #0f2847 50%, #0d3b66 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(0,98,204,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,98,204,0.1) 0%, transparent 40%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 60px 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero__title span {
  color: #4da6ff;
}

.hero__text {
  font-size: 1.15rem;
  color: #b0c4de;
  margin-bottom: 32px;
  max-width: 600px;
}

.hero__buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__trust {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero__trust-item {
  color: #b0c4de;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__trust-item strong {
  color: #fff;
  font-size: 1.3rem;
}

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card__icon {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.6rem;
}

.card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card__text {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Cards en seccion oscura */
.section--dark .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
.section--dark .card:hover {
  border-color: var(--primary);
  background: rgba(255,255,255,0.08);
}
.section--dark .card__title { color: #fff; }
.section--dark .card__text { color: #b0bec5; }
.section--dark .card__icon {
  background: rgba(0,98,204,0.2);
}

/* --- Servicios (4 columnas) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.service-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card__text {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* --- Obra Nueva (2 columnas) --- */
.obra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.obra-list {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
}

.obra-list h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.obra-list li {
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
  font-size: 0.95rem;
}
.obra-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  font-weight: 700;
}

.obra-info {
  padding: 40px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
}

.obra-info h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.obra-info p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

/* --- Stats --- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.stat {
  text-align: center;
  padding: 32px 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.stat__number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat__label {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 8px;
}

.stat__desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* --- Sobre nosotros --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__text p {
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.7;
}

.about__features {
  margin-top: 32px;
}

.about__feature {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.about__feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.about__feature h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.about__feature p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

.about__image {
  background: linear-gradient(135deg, var(--primary-light) 0%, #d0e2f7 100%);
  border-radius: var(--radius-lg);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

/* --- Zona de cobertura --- */
.coverage-note {
  margin-top: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Contacto --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-method {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.contact-method:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.contact-method__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.contact-method h4 {
  font-weight: 700;
  margin-bottom: 4px;
}

.contact-method p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.contact-method a {
  font-weight: 600;
  font-size: 1.1rem;
}

/* --- Formulario --- */
.form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.form__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.form__subtitle {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.form__group {
  margin-bottom: 20px;
}

.form__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: #fff;
  color: var(--text);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,98,204,0.1);
}

.form__textarea {
  resize: vertical;
  min-height: 100px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form__submit {
  width: 100%;
  margin-top: 8px;
}

.form__privacy {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 12px;
}

.form__privacy a {
  color: var(--primary);
  text-decoration: underline;
}

.form__success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.form__success.is-visible {
  display: block;
}

.form__success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.form__success h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--accent-dark);
}

.form__error {
  color: var(--urgent);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.form__input.is-invalid,
.form__select.is-invalid,
.form__textarea.is-invalid {
  border-color: var(--urgent);
}

.form__input.is-invalid + .form__error,
.form__select.is-invalid + .form__error,
.form__textarea.is-invalid + .form__error {
  display: block;
}

/* --- CTA Final --- */
.cta-final {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, #0a1628 0%, #0f2847 100%);
  color: #fff;
}

.cta-final__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-final__text {
  font-size: 1.1rem;
  color: #b0c4de;
  max-width: 600px;
  margin: 0 auto 32px;
}

.cta-final__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-final__features {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.cta-final__feature {
  font-size: 0.95rem;
  color: #b0c4de;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Footer --- */
.footer {
  background: #060d18;
  color: #8899a6;
  padding: 40px 0 24px;
  font-size: 0.9rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__brand {
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: #8899a6;
  font-size: 0.85rem;
  transition: color var(--transition);
}
.footer__links a:hover { color: #fff; }

.footer__copy {
  width: 100%;
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8rem;
}

/* --- WhatsApp flotante --- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37,211,102,0.4);
  z-index: 999;
  transition: all var(--transition);
  animation: whatsapp-bounce 3s infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,0.5);
}
.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

@keyframes whatsapp-bounce {
  0%, 100% { transform: translateY(0); }
  15% { transform: translateY(-8px); }
  30% { transform: translateY(0); }
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  color: #ccc;
  padding: 16px 24px;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9rem;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
}

.cookie-banner.is-visible {
  display: flex;
}

.cookie-banner a {
  color: #4da6ff;
  text-decoration: underline;
}

.cookie-banner__buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* --- Scroll animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
  }
  .nav.is-open { display: flex; }

  .nav__link {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .menu-toggle { display: block; }

  .header__cta .btn { display: none; }
  .header__phone { font-size: 0.95rem; }

  .hero { min-height: auto; }
  .hero__content { padding: 40px 0; }
  .hero__trust { flex-direction: column; gap: 16px; }

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

  .obra-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

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

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section { padding: 48px 0; }

  .hero__buttons {
    flex-direction: column;
  }
  .hero__buttons .btn {
    justify-content: center;
    width: 100%;
  }

  .cta-final__buttons {
    flex-direction: column;
    align-items: center;
  }
  .cta-final__buttons .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .cta-final__features {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}
