:root {
  --blue: #004aad; --blue-dark: #003080; --yellow: #fdca39;
  --light-blue: #dae9ff; --white: #ffffff; --gray: #f5f7fc;
  --text: #1a1f2e; --text-soft: #5a6070;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito', sans-serif; color: var(--text); background: var(--white); overflow-x: hidden; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; height: 64px;
  background: var(--blue); box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.nav-logo {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 1.85rem;
  letter-spacing: .06em; color: var(--white); text-decoration: none;
}
.nav-logo span { color: var(--yellow); }
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,.85); text-decoration: none; font-size: .8rem;
  font-weight: 700; letter-spacing: .07em; text-transform: uppercase; transition: color .2s;
}
.nav-links a:hover { color: var(--yellow); }
.nav-cta { background: var(--yellow); color: var(--blue-dark) !important; padding: .4rem 1rem; border-radius: 6px; }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: .3s; }
.mobile-menu {
  display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
  background: var(--blue-dark); flex-direction: column; padding: 1.5rem 5%; gap: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: rgba(255,255,255,.9); text-decoration: none; font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .4rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }

/* ── HERO ── */
.hero {
  min-height: 100vh; padding: 110px 5% 70px;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 55%, #1a6fff 100%);
  display: flex; align-items: center; position: relative; overflow: hidden;
}
.hero-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); pointer-events: none; }
.hero-ring:nth-child(1) { width: 500px; height: 500px; top: -130px; right: -130px; }
.hero-ring:nth-child(2) { width: 800px; height: 800px; top: -280px; right: -280px; }
.hero-ring:nth-child(3) { width: 1100px; height: 1100px; top: -430px; right: -430px; }
.hero-glow {
  position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(253,202,57,.1) 0%, transparent 70%);
  bottom: -100px; left: -100px; pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(253,202,57,.15); border: 1px solid rgba(253,202,57,.3);
  color: var(--yellow); font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: .32rem .9rem; border-radius: 50px; margin-bottom: 1rem;
  animation: fadeUp .5s ease both;
}
.hero h1 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 900;
  font-size: clamp(2.6rem, 5.5vw, 4.5rem); line-height: .98; color: var(--white);
  text-transform: uppercase; letter-spacing: .02em; margin-bottom: 1rem;
  animation: fadeUp .5s .1s ease both;
}
.hero h1 em { color: var(--yellow); font-style: normal; }
.hero p {
  font-size: 1rem; color: rgba(255,255,255,.78); max-width: 500px;
  line-height: 1.7; margin-bottom: 2rem; animation: fadeUp .5s .2s ease both;
}
.hero-btns { display: flex; flex-wrap: wrap; gap: .9rem; animation: fadeUp .5s .3s ease both; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: 8px; font-family: 'Nunito', sans-serif;
  font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer;
  border: none; transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-yellow { background: var(--yellow); color: var(--blue-dark); box-shadow: 0 6px 20px rgba(253,202,57,.3); }
.btn-yellow:hover { box-shadow: 0 8px 28px rgba(253,202,57,.5); }
.btn-ghost { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.4); }
.btn-ghost:hover { border-color: var(--white); }
.hero-graphic { animation: fadeUp .5s .4s ease both; }
.hero-svg { width: 260px; opacity: .95; display: block; }

/* ── STRIP ── */
.strip { background: var(--yellow); padding: .85rem 0; overflow: hidden; }
.strip-track { display: flex; gap: 0; animation: ticker 22s linear infinite; white-space: nowrap; }
.strip-item {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1rem;
  letter-spacing: .09em; text-transform: uppercase; color: var(--blue-dark);
  padding: 0 2.5rem; display: flex; align-items: center; gap: .7rem; flex-shrink: 0;
}
.strip-dot { width: 6px; height: 6px; background: var(--blue); border-radius: 50%; flex-shrink: 0; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── SECTIONS ── */
section { padding: 80px 5%; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: .75rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--blue); margin-bottom: .4rem;
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 900;
  font-size: clamp(2rem, 4vw, 2.8rem); text-transform: uppercase; line-height: 1.0;
  color: var(--text); margin-bottom: .8rem;
}
.section-title em { color: var(--blue); font-style: normal; }
.section-desc { color: var(--text-soft); max-width: 520px; line-height: 1.7; margin-bottom: 2.8rem; font-size: .95rem; }

/* ── SERVICIOS ── */
#servicios { background: var(--light-blue); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 1.4rem; }
.service-card {
  background: var(--white); border-radius: 16px; padding: 2rem;
  box-shadow: 0 4px 24px rgba(0,74,173,.07); border: 1px solid rgba(0,74,173,.06);
  transition: transform .25s, box-shadow .25s; position: relative; overflow: hidden;
}
.service-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(0,74,173,.13); }
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  width: 54px; height: 54px; background: var(--light-blue); border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 1.1rem;
}
.service-card h3 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.35rem;
  text-transform: uppercase; color: var(--blue); margin-bottom: .5rem;
}
.service-card p { color: var(--text-soft); line-height: 1.65; font-size: .9rem; }
.service-card ul { color: var(--text-soft); line-height: 1.9; font-size: .88rem; padding-left: 1.2rem; margin-top: .5rem; }

/* ── GALLERY ── */
#trabajos { background: var(--white); }
.gallery-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
/* 1. Contenedor principal para evitar que la página se ensanche */
.gallery-wrapper {
    width: 100%;
    overflow: hidden;
}
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.1rem; }
.gallery-item {
  border-radius: 12px; overflow: hidden; aspect-ratio: 4/3;
  position: relative; background: var(--light-blue); cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,48,128,.72) 0%, transparent 55%);
  opacity: 0; transition: opacity .3s; display: flex; align-items: flex-end; padding: 1rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span { color: var(--white); font-weight: 700; font-size: .82rem; }
.gallery-upload-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  border: 2px dashed rgba(0,74,173,.3); border-radius: 12px; aspect-ratio: 4/3;
  cursor: pointer; transition: border-color .2s, background .2s; background: transparent;
}
.gallery-upload-btn:hover { border-color: var(--blue); background: var(--light-blue); }
.gallery-upload-btn .upload-icon { font-size: 2rem; }
.gallery-upload-btn span { font-size: .8rem; color: var(--text-soft); font-weight: 600; font-family: 'Nunito', sans-serif; }
#fileInput { display: none; }
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.9); align-items: center; justify-content: center; padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; object-fit: contain; }
.lb-close {
  position: absolute; top: 1.2rem; right: 1.5rem; color: var(--white); font-size: 2.2rem;
  cursor: pointer; background: none; border: none; line-height: 1; opacity: .8; transition: opacity .2s;
}
.lb-close:hover { opacity: 1; }

/* ── OPINIONES ── */
#opiniones { background: var(--light-blue); }
.reviews-scroll { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: .5rem; }
.reviews-scroll::-webkit-scrollbar { display: none; }
.review-card {
  background: var(--white); border-radius: 16px; padding: 1.7rem;
  min-width: 290px; max-width: 320px; scroll-snap-align: start; flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0,74,173,.07); border: 1px solid rgba(0,74,173,.05);
}
.stars { color: var(--yellow); font-size: 1.3rem; margin-bottom: .7rem; letter-spacing: .1em; }
.review-text { font-size: .9rem; color: var(--text-soft); line-height: 1.7; margin-bottom: 1.1rem; font-style: italic; }
.review-author { display: flex; align-items: center; gap: .7rem; }
.author-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--blue);
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.05rem; flex-shrink: 0;
}
.author-name { font-weight: 700; font-size: .87rem; color: var(--text); }
.author-loc { font-size: .74rem; color: var(--text-soft); }



/* Add review */
.add-review-box {
  margin-top: 2.5rem; background: var(--white); border-radius: 16px; padding: 1.8rem;
  max-width: 580px; box-shadow: 0 4px 20px rgba(0,74,173,.07);
}
.add-review-box h4 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.1rem;
  text-transform: uppercase; color: var(--blue); margin-bottom: 1rem;
}
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.form-group { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 180px; }
.form-group label { font-size: .72rem; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .07em; }
.form-group input, .form-group textarea, .form-group select {
  padding: .6rem .85rem; border: 1.5px solid rgba(0,74,173,.18); border-radius: 8px;
  font-family: 'Nunito', sans-serif; font-size: .9rem; color: var(--text);
  background: var(--white); transition: border-color .2s; outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--blue); }
.form-group textarea { resize: vertical; min-height: 80px; }
.star-pick { display: flex; gap: .3rem; margin-bottom: .9rem; }
.star-pick span { font-size: 1.4rem; cursor: pointer; color: #ccc; transition: color .15s; }
.star-pick span.active, .star-pick span:hover { color: var(--yellow); }
.btn-submit {
  background: var(--blue); color: var(--white); padding: .65rem 1.5rem;
  border-radius: 8px; font-family: 'Nunito', sans-serif; font-size: .9rem; font-weight: 700;
  border: none; cursor: pointer; transition: background .2s, transform .15s;
}
.btn-submit:hover { background: var(--blue-dark); transform: translateY(-1px); }

/* ── CONTACT ── */
#contacto { background: var(--white); }
.contact-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Se ajusta solo */
  gap: 2rem; 
  align-items: start; 
}
.contact-info { display: flex; flex-direction: column; gap: 1.4rem; }
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--light-blue); border-radius: 14px; padding: 1.3rem 1.5rem;
  text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s;
  border: 1px solid rgba(0,74,173,.09);
}
.contact-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,74,173,.12); }
.contact-icon {
  width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.contact-icon.wa { background: #25D366; }
.contact-icon.mail { background: var(--blue); }
.contact-label { font-size: .72rem; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .1rem; }
.contact-value { font-weight: 700; font-size: 1rem; color: var(--text); }

.contact-visual {
  background: linear-gradient(135deg, var(--blue) 0%, #1a6fff 100%);
  border-radius: 20px; padding: 2.5rem; display:inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem; text-align: center; min-height: 260px;
}
.contact-visual .big-icon { font-size: 4rem; }
.contact-visual h3 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 1.8rem;
  text-transform: uppercase; color: var(--white); line-height: 1;
}
.contact-visual p { color: rgba(255,255,255,.75); font-size: .88rem; line-height: 1.6; max-width: 220px; }
.contact-visual .btn-yellow { margin-top: .5rem; }

/* ── FOOTER ── */
footer {
  background: var(--blue-dark); color: rgba(255,255,255,.6);
  padding: 2rem 5%; text-align: center; font-size: .82rem;
}
footer strong { color: var(--yellow); font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; letter-spacing: .06em; }
footer a { color: rgba(255,255,255,.6); text-decoration: none; }
footer a:hover { color: var(--yellow); }

/* ── WHATSAPP FLOAT ── */
.wa-float {
  position: fixed; bottom: 1.8rem; right: 1.8rem; z-index: 50;
  width: 56px; height: 56px; background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.45); text-decoration: none;
  font-size: 1.7rem; transition: transform .2s, box-shadow .2s;
  animation: pulse 2.5s ease infinite;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 10px 32px rgba(37,211,102,.55); animation: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 6px 24px rgba(37,211,102,.45); } 50% { box-shadow: 0 6px 36px rgba(37,211,102,.7); } }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-graphic { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 768px) {
    /* 2. Transformamos el Grid en una fila deslizable */
    .gallery-grid {
        display: flex; /* Cambiamos grid por flex en mobile */
        overflow-x: auto;
        scroll-snap-type: x mandatory; /* Efecto imán al deslizar */
        gap: 1rem;
        padding: 1rem;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch; /* Suavidad en iPhone */
    }

    /* 3. Ajustamos cada foto para que ocupe casi todo el ancho */
    .gallery-item {
        flex: 0 0 85%; /* Cada foto ocupa el 85% del ancho */
        scroll-snap-align: center; /* Se centra al soltar el dedo */
        aspect-ratio: 4/3; /* Mantiene una proporción linda */
    }

    /* Ocultamos la barra de scroll para que se vea más limpio */
    .gallery-grid::-webkit-scrollbar {
        display: none;
    }
}


@media (max-width: 600px) {
  section { padding: 60px 5%; }
  .hero { padding: 100px 5% 60px; }
  /* Ajuste de sección contacto */
  .contact-visual {
    width: 100%;
    min-height: auto;
    padding: 2rem 1.5rem;
  }
  
  .contact-card {
    padding: 1rem; /* Menos padding para que no se vea gigante */
  }

  .contact-value {
    font-size: 0.9rem; /* Achicamos un poco el texto para que no rompa línea */
  }

  /* Ajuste de Footer */
  footer {
    padding: 2rem 1rem;
  }
  
  footer p {
    font-size: 0.75rem;
    line-height: 1.5;
  }
}