@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;700;800&family=Inter:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --primary-blue: #0069ad;
  --secondary-blue: #a3c1d7;
  --primary-red: #e11f23;
  --base-white: #ffffff;
  --text-dark: #2c3e50;
  --bg-light: #f4f7f6;
  
  --font-title: 'Outfit', sans-serif;
  --font-text: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-text);
  color: var(--text-dark);
  background-color: var(--base-white);
  line-height: 1.6;
  /* Cursor de Patito de Goma Pequeño */
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScyNCcgaGVpZ2h0PScyNCcgdmlld0JveD0nMCAwIDI0IDI0Jz48cGF0aCBmaWxsPScjRkZENzAwJyBkPSdNMjEgMTQuNWMwLTEuOS0xLjUtMy41LTMuNS0zLjVoLTFjLS41IDAtMS0uNS0xLTF2LTFjMC0yLjItMS44LTQtNC00UzcuNSA2LjggNy41IDl2MWMwIC41LS41IDEtMSAxaC0xQzMuNSAxMSAyIDEyLjYgMiAxNC41UzMuNSAxOCA1LjUgMThoMTNjMiAwIDMuNS0xLjYgMy41LTMuNXonLz48Y2lyY2xlIGN4PSc5JyBjeT0nOScgcj0nMScgZmlsbD0nIzAwMCcvPjxwYXRoIGZpbGw9JyNGRjhDMDAnIGQ9J000LjUgOS41YzAtLjguNy0xLjUgMS41LTEuNWgxdjNINmMtLjggMC0xLjUtLjctMS41LTEuNXonLz48L3N2Zz4=") 12 12, auto;
}

/* Enlaces y Botones también usan el cursor */
a, button, .btn-primary, .btn-secondary, .whatsapp-float {
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScyNCcgaGVpZ2h0PScyNCcgdmlld0JveD0nMCAwIDI0IDI0Jz48cGF0aCBmaWxsPScjRkZENzAwJyBkPSdNMjEgMTQuNWMwLTEuOS0xLjUtMy41LTMuNS0zLjVoLTFjLS41IDAtMS0uNS0xLTF2LTFjMC0yLjItMS44LTQtNC00UzcuNSA2LjggNy41IDl2MWMwIC41LS41IDEtMSAxaC0xQzMuNSAxMSAyIDEyLjYgMiAxNC41UzMuNSAxOCA1LjUgMThoMTNjMiAwIDMuNS0xLjYgMy41LTMuNXonLz48Y2lyY2xlIGN4PSc5JyBjeT0nOScgcj0nMScgZmlsbD0nIzAwMCcvPjxwYXRoIGZpbGw9JyNGRjhDMDAnIGQ9J000LjUgOS41YzAtLjguNy0xLjUgMS41LTEuNWgxdjNINmMtLjggMC0xLjUtLjctMS41LTEuNXonLz48L3N2Zz4=") 12 12, pointer;
}

/* Fondo dinámico para el Home */
body.home-body {
  background-color: #f0f9ff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation Glassmorphism */
header {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.3s ease;
}

header .container {
  max-width: 1600px; /* Pegar el logo más a la izquierda ensanchando el menú */
  padding: 0 50px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: var(--primary-blue);
  border-radius: 3px;
  transition: all 0.3s;
}

.logo img {
  height: 50px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.logo img:hover {
  transform: scale(1.08) translateY(-3px);
}

.nav-links {
  display: flex;
  gap: 25px;
  list-style: none;
}

.nav-links a {
  font-weight: 600;
  color: var(--primary-blue);
  position: relative;
  transition: color 0.3s;
  padding-bottom: 5px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-red);
  transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary-red);
}

/* Botones Premium con Efecto Agua */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-red), #b3161a);
  color: var(--base-white);
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(225, 31, 35, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: inline-block;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(225, 31, 35, 0.4);
  color: white;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--primary-blue), #004d80);
  color: var(--base-white);
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 105, 173, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: inline-block;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 105, 173, 0.4);
  color: white;
}

/* Hero Section */
.hero {
  position: relative;
  height: 85vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--base-white);
  background: var(--primary-blue); /* fallback */
  overflow: hidden;
}

/* Video background recortado */
.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-video-container video {
  min-width: 100%;
  /* Recortamos la parte de abajo haciendo que sea un 15% más alto y que quede oculto por el overflow:hidden */
  min-height: 115%; 
  width: auto;
  height: auto;
  position: absolute;
  top: 0; /* Lo anclamos arriba, lo que sobra queda escondido abajo */
  left: 50%;
  transform: translateX(-50%);
  object-fit: cover;
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 105, 173, 0.6), rgba(0, 105, 173, 0.4));
  z-index: 1;
}

.hero-content {
  z-index: 2;
  max-width: 900px;
  padding: 20px;
}

.hero h1 {
  color: var(--base-white);
  font-size: 4.5rem;
  margin-bottom: 20px;
  text-shadow: 0 4px 15px rgba(0,0,0,0.3);
  line-height: 1.1;
}

.hero p {
  font-size: 1.6rem;
  margin-bottom: 40px;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* CSS Waves Animation for Hero */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: -5px; /* Para ocultar huecos */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.wave-bg {
    animation: waveAnim 15s linear infinite;
    transform-origin: center bottom;
}
.wave-front {
    animation: waveAnim 10s linear infinite reverse;
    transform-origin: center bottom;
}

@keyframes waveAnim {
    0% { transform: translateX(0) translateZ(0) scaleY(1) }
    50% { transform: translateX(-25%) translateZ(0) scaleY(0.8) }
    100% { transform: translateX(-50%) translateZ(0) scaleY(1) }
}

/* Cintillo de Confianza */
.trust-badges {
  background-color: var(--base-white);
  padding: 60px 0;
  position: relative;
  z-index: 10;
}

.trust-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
  text-align: center;
}

.trust-item {
  flex: 1;
  min-width: 250px;
  padding: 30px;
  background: var(--bg-light);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  transition: transform 0.3s;
}

.trust-item:hover {
  transform: translateY(-10px);
}

.trust-item h3 {
  color: var(--primary-blue);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

/* General Sections */
.section-padding {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), transparent);
  margin: 20px auto 0;
  border-radius: 2px;
}

/* Grid layout for pools */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

/* Card Styles Premium */
.card {
  background: var(--base-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 105, 173, 0.05);
}

.card:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 45px rgba(0, 105, 173, 0.15);
}

.card-img {
  height: 280px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover .card-img {
  transform: scale(1.08);
}

.card-content {
  padding: 30px;
  text-align: center;
  position: relative;
  z-index: 2;
  background: white;
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  color: white;
  border-radius: 50px;
  padding: 12px 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  animation: floatAnim 3s ease-in-out infinite;
}

@keyframes floatAnim {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.whatsapp-float:hover {
  background-color: #128C7E;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  transform: scale(1.05);
  animation: none; /* Pausar flotación al pasar ratón */
}

/* Footer */
footer {
  background: linear-gradient(to right, #004d80, var(--primary-blue));
  color: var(--base-white);
  text-align: center;
  padding: 70px 20px;
  position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--secondary-blue), var(--primary-red), var(--secondary-blue));
}

footer h2 {
  color: var(--base-white);
  font-size: 2.5rem;
  text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

footer p {
  font-style: italic;
  font-size: 1.2rem;
  margin-top: 10px;
  color: var(--secondary-blue);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,30,50,0.8);
  backdrop-filter: blur(5px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
  background: var(--base-white);
  padding: 50px;
  border-radius: 20px;
  text-align: center;
  max-width: 450px;
  position: relative;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
  transform: scale(0.9);
  animation: scaleUp 0.3s forwards;
}

@keyframes scaleUp {
    to { transform: scale(1); }
}

.close-btn {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
}

.close-btn:hover {
    color: var(--primary-red);
}

/* Show Pool Video Background */
.video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  background-color: var(--text-dark); /* fallback */
}

.video-container video {
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.75); /* 75% opacity white */
  z-index: -1;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* Responsive */
@media (max-width: 768px) {
  /* General */
  .section-padding { padding: 50px 20px; }
  .container { padding: 0 25px; }

  /* Navbar & Menú */
  .navbar { position: relative; }
  .menu-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    background: var(--base-white);
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    border-radius: 0 0 15px 15px;
    z-index: 1000;
  }
  .nav-links.active { display: flex; }
  .navbar .btn-primary { display: none; }

  /* Hero */
  .hero h1 { font-size: 2.8rem; }
  .hero p { font-size: 1.2rem; }
  
  /* Botón Flotante Whatsapp */
  .whatsapp-float span { display: none; }
  .whatsapp-float { padding: 15px; border-radius: 50%; }

  /* Trust Badges (Cajas horizontales) */
  .trust-grid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding-bottom: 20px;
  }
  .trust-item {
    min-width: 0;
    padding: 10px;
    flex: 1;
    text-align: center;
  }
  .trust-item h3 { font-size: 0.9rem; margin-bottom: 5px; line-height: 1.2; }
  .trust-item p { font-size: 0.75rem; line-height: 1.2; }

  /* Reseñas (Más pequeñas) */
  .reviews-grid { gap: 15px; }
  .review-card { padding: 20px 15px; }
  .reviewer-avatar { width: 40px; height: 40px; font-size: 1rem; }
  .reviewer-name { font-size: 0.95rem; }
  .review-text { font-size: 0.9rem; line-height: 1.4; }

  /* Catálogo & Nuestro Equipo */
  .card-content { padding: 20px 15px; }
  .team-section { flex-direction: column !important; text-align: center; margin: 0 auto; gap: 20px; }
  .team-content { padding: 0 10px; }
}

/* Reseñas / Google Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.review-card {
    background-color: var(--base-white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-top: 4px solid var(--primary-blue);
    transition: transform 0.3s;
}
.review-card:hover {
    transform: translateY(-5px);
}
.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 1.2rem;
}
.reviewer-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}
.stars {
    color: #FFD700;
    font-size: 1.1rem;
}
.google-icon {
    width: 20px;
    height: 20px;
    margin-left: auto;
}
.review-text {
    font-style: italic;
    color: #555;
    line-height: 1.6;
}
.review-text strong {
    color: var(--primary-red);
}
