/* =========================================
   El Rey de las Piscinas — style.css
   Diseño: Navy profundo + Dorado
   ========================================= */

/* --- VARIABLES --- */
:root {
  --navy:       #0a1628;
  --navy-mid:   #112240;
  --navy-light: #1e3a5f;
  --gold:       #c9a84c;
  --gold-light: #e8c97a;
  --white:      #f5f5f0;
  --grey:       #8a9bb5;
  --text:       #ccd6f6;
  --radius:     12px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --shadow:     0 8px 32px rgba(0,0,0,0.35);
  --font-head:  'Cormorant Garamond', Georgia, serif;
  --font-body:  'DM Sans', system-ui, sans-serif;
  --max-w:      1200px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

ul { list-style: none; }

address { font-style: normal; }

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--white);
}
h1 { font-size: clamp(3rem, 7vw, 6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 500; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

/* --- LAYOUT --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.section {
  padding: 6rem 0;
}

.section__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section__sub {
  color: var(--grey);
  max-width: 560px;
  margin: 1rem auto 0;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn--gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn--gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.35);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn--outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.btn--full { width: 100%; justify-content: center; }

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 2rem;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(12px);
  padding: 0.75rem 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.navbar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.navbar__links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  transition: color var(--transition);
}
.navbar__links a:hover { color: var(--gold); }

.navbar__cta {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--gold) !important;
  border-radius: 4px;
  color: var(--gold) !important;
}
.navbar__cta:hover {
  background: var(--gold);
  color: var(--navy) !important;
}

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.navbar__burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--white);
  transition: all var(--transition);
}
.navbar__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.open span:nth-child(2) { opacity: 0; }
.navbar__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__slides { position: absolute; inset: 0; }

.hero__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
  transform: scale(1.05);
  animation: zoomSlide 8s ease-in-out infinite alternate;
}
.hero__slide.active { opacity: 1; }

@keyframes zoomSlide {
  from { transform: scale(1.05); }
  to   { transform: scale(1); }
}

.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,22,40,0.55) 0%,
    rgba(10,22,40,0.3) 40%,
    rgba(10,22,40,0.7) 100%
  );
}

.hero__content {
  position: relative;
  text-align: center;
  padding: 0 1.5rem;
  animation: fadeUp 1s ease 0.3s both;
}

.hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero__title {
  color: var(--white);
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.hero__sub {
  font-size: 1.1rem;
  color: rgba(245,245,240,0.85);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}
.hero__dots .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all var(--transition);
}
.hero__dots .dot.active {
  background: var(--gold);
  width: 24px;
  border-radius: 4px;
}

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

/* =========================================
   NOSOTROS
   ========================================= */
.nosotros { background: var(--navy-mid); }

.nosotros__text h2 { margin-bottom: 1.25rem; }
.nosotros__text p { color: var(--grey); margin-bottom: 1rem; }
.nosotros__text strong { color: var(--gold); font-weight: 500; }

.nosotros__stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.stat__num {
  display: block;
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat__label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--grey);
  margin-top: 0.25rem;
}

.nosotros__values { display: flex; flex-direction: column; gap: 1.25rem; }

.value-card {
  background: var(--navy-light);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}
.value-card:hover {
  border-color: var(--gold);
  transform: translateX(6px);
}
.value-card__icon { font-size: 1.25rem; color: var(--gold); display: block; margin-bottom: 0.5rem; }
.value-card h3 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--white); }
.value-card p { font-size: 0.88rem; color: var(--grey); }

/* =========================================
   SERVICIOS
   ========================================= */
.servicios { background: var(--navy); }

.servicios__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.servicio-card {
  background: var(--navy-mid);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.servicio-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201,168,76,0.3);
  box-shadow: var(--shadow);
}

.servicio-card__img {
  overflow: hidden;
  height: 180px;
  margin: 0;
}
.servicio-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.servicio-card:hover .servicio-card__img img { transform: scale(1.08); }

.servicio-card__body { padding: 1.25rem; }
.servicio-card__body h3 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--gold-light); }
.servicio-card__body p { font-size: 0.82rem; color: var(--grey); line-height: 1.6; }

.servicio-card--mercadopago .servicio-card__img { background: #f5f5f0; }
.servicio-card--mercadopago .servicio-card__img img { object-fit: contain; padding: 1rem; }

/* =========================================
   PORTFOLIO
   ========================================= */
.portfolio { background: var(--navy-mid); }

.portfolio__grid { display: flex; flex-direction: column; gap: 4rem; margin-bottom: 4rem; }

.portfolio__item p { color: var(--grey); margin-top: 1rem; font-size: 0.88rem; text-align: center; }

.portfolio__duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.portfolio__duo figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.portfolio__duo img {
  width: 100%; height: 260px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.portfolio__duo figure:hover img { transform: scale(1.04); }

.badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge--before { background: rgba(200,50,50,0.85); color: #fff; }
.badge--after  { background: rgba(201,168,76,0.9); color: var(--navy); }

/* TESTIMONIOS */
.testimonios {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 3rem;
  text-align: center;
}
.testimonios__title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--white);
}

.testimonios__track { overflow: hidden; position: relative; }

.testimonio {
  display: none;
  padding: 0 1rem;
  animation: fadeUp 0.5s ease both;
}
.testimonio.active { display: block; }
.testimonio p {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 1rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.testimonio cite { font-size: 0.82rem; color: var(--gold); letter-spacing: 0.05em; }

.testimonios__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.testimonios__dots .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background var(--transition);
  border: none;
}
.testimonios__dots .dot.active { background: var(--gold); }

/* =========================================
   PACKS
   ========================================= */
.packs {
  background: var(--navy);
  position: relative;
}
.packs::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.packs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
}

.pack-card {
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.pack-card:hover {
  transform: translateY(-8px);
  border-color: rgba(201,168,76,0.3);
  box-shadow: var(--shadow);
}

.pack-card--featured {
  border-color: var(--gold);
  background: var(--navy-light);
  transform: scale(1.03);
}
.pack-card--featured:hover {
  transform: scale(1.03) translateY(-8px);
  border-color: var(--gold-light);
}

.pack-card__badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
}

.pack-card__tag {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
.pack-card__header h3 { font-size: 1.8rem; color: var(--white); }

.pack-card__features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.pack-card__features li {
  font-size: 0.88rem;
  color: var(--text);
  padding-left: 1.25rem;
  position: relative;
}
.pack-card__features li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.55rem;
  top: 0.35rem;
}

.packs__disclaimer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.78rem;
  color: var(--grey);
  font-style: italic;
}

/* =========================================
   CONTACTO
   ========================================= */
.contacto { background: var(--navy-mid); }

.contacto__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-list { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-list li { display: flex; align-items: flex-start; gap: 0.75rem; }
.contact-list__icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--gold); }

.contacto__social {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.social-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.08);
}

.contacto__map iframe {
  border-radius: var(--radius);
  width: 100%;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2rem 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer p { font-size: 0.82rem; color: var(--grey); }
.footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer nav a { font-size: 0.8rem; color: var(--grey); }
.footer nav a:hover { color: var(--gold); }

/* =========================================
   WHATSAPP FLOTANTE
   ========================================= */
.wa-float {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 999;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: pulse 2.5s infinite;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37,211,102,0.7);
  color: #fff;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
  50%       { box-shadow: 0 4px 30px rgba(37,211,102,0.8), 0 0 0 8px rgba(37,211,102,0.1); }
}

/* =========================================
   REVEAL ON SCROLL
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .packs__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .pack-card--featured { transform: none; }
  .pack-card--featured:hover { transform: translateY(-8px); }
  .grid-2 { grid-template-columns: 1fr; gap: 2.5rem; }
  .contacto__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .navbar__links {
    position: fixed;
    top: 0; right: 0;
    width: 100%; height: 100vh;
    background: var(--navy);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .navbar__links.open { transform: translateX(0); }
  .navbar__links a { font-size: 1.1rem; }
  .navbar__burger { display: flex; z-index: 10; }

  .section { padding: 4rem 0; }

  .portfolio__duo { grid-template-columns: 1fr; }
  .portfolio__duo img { height: 200px; }

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

  .nosotros__stats { flex-direction: column; gap: 1rem; }

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

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

@media (max-width: 480px) {
  .servicios__grid { grid-template-columns: 1fr; }
}
