/* ============================================
   CORPORATIVO CONSTRUTTRICE - Soft UI Design
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #1a2a4a;
  --primary-light: #2c3e6b;
  --primary-dark: #0f1a30;
  --accent: #c5a55a;
  --accent-light: #d4bc7a;
  --accent-dark: #a88a3a;
  --white: #ffffff;
  --light: #f5f6fa;
  --light-2: #e8eaf0;
  --gray: #8b8fa3;
  --gray-dark: #5a5e72;
  --dark: #2d3142;
  --success: #27ae60;
  --shadow-soft: 8px 8px 16px rgba(26, 42, 74, 0.08), -8px -8px 16px rgba(255, 255, 255, 0.9);
  --shadow-soft-hover: 12px 12px 24px rgba(26, 42, 74, 0.12), -12px -12px 24px rgba(255, 255, 255, 0.95);
  --shadow-card: 0 4px 20px rgba(26, 42, 74, 0.06), 0 1px 3px rgba(26, 42, 74, 0.04);
  --shadow-card-hover: 0 8px 40px rgba(26, 42, 74, 0.1), 0 2px 6px rgba(26, 42, 74, 0.06);
  --shadow-nav: 0 2px 20px rgba(26, 42, 74, 0.08);
  --shadow-glow: 0 0 30px rgba(197, 165, 90, 0.15);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-xl: 40px;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: all 0.25s ease;
}

/* ---------- Reset & Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  background-color: var(--light);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
}

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

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

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

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  width: 120px;
  animation: pulse-loader 1.5s ease-in-out infinite;
}

@keyframes pulse-loader {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* ---------- Navbar ---------- */
.navbar {
  padding: 15px 0;
  transition: var(--transition);
  background: transparent;
  z-index: 1000;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-nav);
  padding: 10px 0;
}

.navbar-brand img {
  height: 50px;
  transition: var(--transition-fast);
}

.navbar.scrolled .navbar-brand img {
  height: 42px;
}

.navbar .nav-link {
  color: var(--white) !important;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  letter-spacing: 0.3px;
  position: relative;
}

.navbar.scrolled .nav-link {
  color: var(--dark) !important;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent) !important;
  background: rgba(197, 165, 90, 0.08);
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 60%;
}

.navbar-toggler {
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.navbar-toggler:focus {
  box-shadow: var(--shadow-glow);
}

/* ---------- Hero Section ---------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--primary-dark);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  transition: opacity 1.5s ease;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 26, 48, 0.85) 0%, rgba(26, 42, 74, 0.7) 50%, rgba(15, 26, 48, 0.85) 100%);
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle 8s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; top: 60%; animation-delay: 1s; }
.particle:nth-child(3) { left: 40%; top: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 60%; top: 70%; animation-delay: 3s; }
.particle:nth-child(5) { left: 80%; top: 40%; animation-delay: 4s; }
.particle:nth-child(6) { left: 90%; top: 80%; animation-delay: 5s; }
.particle:nth-child(7) { left: 30%; top: 90%; animation-delay: 1.5s; }
.particle:nth-child(8) { left: 70%; top: 10%; animation-delay: 3.5s; }
.particle:nth-child(9) { left: 50%; top: 50%; animation-delay: 2.5s; }
.particle:nth-child(10) { left: 15%; top: 75%; animation-delay: 4.5s; }

@keyframes float-particle {
  0% { opacity: 0; transform: translateY(0) scale(0); }
  20% { opacity: 0.6; transform: translateY(-20px) scale(1); }
  80% { opacity: 0.3; transform: translateY(-80px) scale(0.5); }
  100% { opacity: 0; transform: translateY(-120px) scale(0); }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(197, 165, 90, 0.15);
  border: 1px solid rgba(197, 165, 90, 0.3);
  color: var(--accent);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 25px;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 550px;
  margin-bottom: 35px;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn-soft-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  border: none;
  padding: 14px 35px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(197, 165, 90, 0.3);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-soft-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(197, 165, 90, 0.4);
  color: var(--white);
}

.btn-soft-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 12px 33px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(5px);
}

.btn-soft-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.btn-soft-secondary {
  background: var(--white);
  color: var(--primary);
  border: none;
  padding: 14px 35px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-soft-secondary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft-hover);
  color: var(--primary);
}

/* ---------- Hero Image ---------- */
.hero-image-wrapper {
  position: relative;
}

.hero-image-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-image-container img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 8s ease;
}

.hero-image-container:hover img {
  transform: scale(1.05);
}

.hero-float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  padding: 20px 25px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  animation: float-card 4s ease-in-out infinite;
}

.hero-float-card.card-exp {
  bottom: -20px;
  left: -30px;
}

.hero-float-card.card-rate {
  top: -20px;
  right: -20px;
}

.float-card-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.float-card-label {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 3px;
}

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

/* ---------- Section Styles ---------- */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(197, 165, 90, 0.1), rgba(197, 165, 90, 0.05));
  color: var(--accent-dark);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.8;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 4px;
  margin: 18px auto 0;
}

/* ---------- About / Nosotros ---------- */
#nosotros {
  background: var(--white);
}

.about-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  border-radius: 4px 0 0 4px;
  transition: var(--transition);
}

.about-card:hover::before {
  height: 100%;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.about-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(197, 165, 90, 0.1), rgba(197, 165, 90, 0.05));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--accent);
  box-shadow: inset 3px 3px 6px rgba(255, 255, 255, 0.8), inset -3px -3px 6px rgba(26, 42, 74, 0.05);
}

.about-card h4 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.about-card p {
  color: var(--gray-dark);
  font-size: 0.95rem;
  line-height: 1.8;
}

.about-image-section {
  position: relative;
}

.about-image-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.about-image-container img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: transform 6s ease;
}

.about-image-container:hover img {
  transform: scale(1.05);
}

.values-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.values-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--light);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
  box-shadow: inset 2px 2px 4px rgba(26, 42, 74, 0.04);
  transition: var(--transition);
}

.values-list li:hover {
  background: linear-gradient(135deg, rgba(197, 165, 90, 0.1), rgba(197, 165, 90, 0.05));
  transform: translateX(5px);
}

.values-list li i {
  color: var(--accent);
  font-size: 1.1rem;
}

/* ---------- Services ---------- */
#servicios {
  background: var(--light);
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 35px 30px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(26, 42, 74, 0.04);
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0);
  transition: var(--transition);
}

.service-card:hover::after {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

.service-icon-wrap {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(26, 42, 74, 0.2);
  transition: var(--transition);
}

.service-card:hover .service-icon-wrap {
  transform: rotateY(10deg) scale(1.05);
  box-shadow: 0 12px 30px rgba(26, 42, 74, 0.25);
}

.service-icon-wrap i {
  color: var(--accent);
  font-size: 1.6rem;
}

.service-card h4 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.service-card p {
  color: var(--gray-dark);
  font-size: 0.9rem;
  line-height: 1.7;
}

.service-card ul {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.service-card ul li {
  padding: 4px 0;
  font-size: 0.88rem;
  color: var(--gray-dark);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.service-card ul li i {
  color: var(--accent);
  margin-top: 4px;
  font-size: 0.7rem;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 15px;
  transition: var(--transition);
}

.service-link:hover {
  gap: 12px;
  color: var(--accent-dark);
}

/* ---------- Aguabajio Section ---------- */
#aguabajio {
  background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 40%, #0f2847 70%, #0a1628 100%);
  position: relative;
  overflow: hidden;
}

#aguabajio .section-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #7ec8e3;
  border: 1px solid rgba(126, 200, 227, 0.2);
}

#aguabajio .section-title {
  color: var(--white);
}

#aguabajio .section-subtitle {
  color: rgba(255, 255, 255, 0.65);
}

#aguabajio .section-divider {
  background: linear-gradient(90deg, #7ec8e3, #4da8da);
}

.agua-bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.05;
  background: #7ec8e3;
}

.agua-bg-shape.shape-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
}

.agua-bg-shape.shape-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  left: -80px;
}

.agua-bg-shape.shape-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.agua-logo-container {
  text-align: center;
  margin-bottom: 40px;
}

.agua-logo-container img {
  max-height: 100px;
  filter: brightness(1.1);
  transition: var(--transition);
}

.agua-logo-container:hover img {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.agua-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(126, 200, 227, 0.12);
  border-radius: var(--radius-lg);
  padding: 35px 30px;
  transition: var(--transition);
  height: 100%;
}

.agua-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(126, 200, 227, 0.25);
  transform: translateY(-5px);
}

.agua-card-icon {
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, rgba(126, 200, 227, 0.2), rgba(77, 168, 218, 0.1));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.agua-card-icon i {
  color: #7ec8e3;
  font-size: 1.4rem;
}

.agua-card h5 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.agua-card p,
.agua-card li {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.7;
}

.agua-card ul {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}

.agua-card ul li {
  padding: 3px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.agua-card ul li i {
  color: #7ec8e3;
  margin-top: 5px;
  font-size: 0.65rem;
}

.agua-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 50px;
}

.agua-stat-card {
  text-align: center;
  padding: 25px 15px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid rgba(126, 200, 227, 0.08);
  transition: var(--transition);
}

.agua-stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
}

.agua-stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: #7ec8e3;
  line-height: 1;
}

.agua-stat-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 5px;
  font-weight: 500;
}

.agua-cta {
  text-align: center;
  margin-top: 50px;
}

/* ---------- Contact Section ---------- */
#contacto {
  background: var(--white);
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 35px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  height: 100%;
  text-align: center;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.contact-icon {
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, rgba(197, 165, 90, 0.12), rgba(197, 165, 90, 0.05));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: inset 3px 3px 6px rgba(255, 255, 255, 0.8), inset -3px -3px 6px rgba(26, 42, 74, 0.05);
}

.contact-icon i {
  font-size: 1.5rem;
  color: var(--accent);
}

.contact-card h5 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.contact-card p {
  color: var(--gray-dark);
  font-size: 0.92rem;
  margin: 0;
}

.contact-form {
  background: var(--light);
  border-radius: var(--radius-lg);
  padding: 45px;
  box-shadow: var(--shadow-soft);
}

.contact-form .form-control,
.contact-form .form-select {
  border: 2px solid transparent;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 0.92rem;
  box-shadow: inset 2px 2px 4px rgba(26, 42, 74, 0.04);
  transition: var(--transition);
  color: var(--dark);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(197, 165, 90, 0.1), inset 2px 2px 4px rgba(26, 42, 74, 0.04);
}

.contact-form .form-control::placeholder {
  color: var(--gray);
}

.contact-form label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
  margin-bottom: 8px;
}

/* ---------- Footer ---------- */
footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.65);
  padding: 60px 0 0;
}

footer h5 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

footer p {
  font-size: 0.9rem;
  line-height: 1.8;
}

footer ul {
  list-style: none;
  padding: 0;
}

footer ul li {
  margin-bottom: 10px;
}

footer ul li a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

footer ul li a:hover {
  color: var(--accent);
  padding-left: 5px;
}

footer ul li a i {
  font-size: 0.7rem;
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  margin-top: 50px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.65);
  margin-right: 10px;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-3px);
}

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

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }
.delay-6 { transition-delay: 0.6s !important; }

/* ---------- Back to Top ---------- */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(197, 165, 90, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(197, 165, 90, 0.4);
}

/* ---------- Counter Animation ---------- */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ---------- Tooltip Custom ---------- */
.tooltip-inner {
  background: var(--primary);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  section {
    padding: 70px 0;
  }

  .hero-image-wrapper {
    margin-top: 40px;
  }

  .hero-float-card {
    display: none;
  }

  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 15px;
    box-shadow: var(--shadow-card);
  }

  .navbar .nav-link {
    color: var(--dark) !important;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 1.9rem;
  }

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

  .hero-btns .btn {
    justify-content: center;
  }

  .values-list {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 30px 20px;
  }

  .about-card {
    padding: 30px 25px;
  }

  .agua-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 1.8rem;
  }

  section {
    padding: 50px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }
}

/* ---------- Utilities ---------- */
.bg-light-custom {
  background-color: var(--light);
}

.text-accent {
  color: var(--accent) !important;
}

.text-primary-custom {
  color: var(--primary) !important;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Smooth link underline */
.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Typing cursor animation */
.typing-cursor::after {
  content: '|';
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Wave separator */
.wave-separator {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-separator svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

/* Image reveal */
.img-reveal {
  position: relative;
  overflow: hidden;
}

.img-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  z-index: 2;
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.img-reveal.active::before {
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- Language Toggle Button (Flags) ---------- */
.btn-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(197, 165, 90, 0.12);
  border: 1.5px solid rgba(197, 165, 90, 0.3);
  padding: 6px 12px;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: 'Inter', sans-serif;
  line-height: 1;
  min-width: 72px;
  min-height: 36px;
}

/* Override Bootstrap img reset for flags */
.btn-lang img.lang-flag,
img.lang-flag {
  width: 28px !important;
  height: 20px !important;
  max-width: 28px !important;
  border-radius: 4px;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease;
  will-change: opacity, transform, filter;
  opacity: 0.35;
  transform: scale(0.85);
  filter: grayscale(70%) brightness(0.8);
  box-shadow: none;
  -webkit-filter: grayscale(70%) brightness(0.8);
}

img.lang-flag.lang-flag-active {
  opacity: 1;
  transform: scale(1.08);
  filter: grayscale(0%) brightness(1) drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  -webkit-filter: grayscale(0%) brightness(1) drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Switch animation - flag that becomes active flips in */
img.lang-flag.flag-anim-in {
  animation: flagFlipIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

img.lang-flag.flag-anim-out {
  animation: flagFlipOut 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes flagFlipIn {
  0% {
    opacity: 0.2;
    transform: scale(0.7) rotateY(90deg);
    filter: grayscale(100%) brightness(0.5);
  }
  60% {
    transform: scale(1.12) rotateY(-5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1.08) rotateY(0deg);
    filter: grayscale(0%) brightness(1) drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  }
}

@keyframes flagFlipOut {
  0% {
    opacity: 1;
    transform: scale(1.08) rotateY(0deg);
    filter: grayscale(0%) brightness(1);
  }
  100% {
    opacity: 0.35;
    transform: scale(0.85) rotateY(-90deg);
    filter: grayscale(70%) brightness(0.8);
  }
}

.btn-lang:hover {
  background: rgba(197, 165, 90, 0.25);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-lang:hover img.lang-flag:not(.lang-flag-active) {
  opacity: 0.55;
  transform: scale(0.92);
  filter: grayscale(40%) brightness(0.9);
  -webkit-filter: grayscale(40%) brightness(0.9);
}

.btn-lang:hover img.lang-flag.lang-flag-active {
  transform: scale(1.12);
}

.btn-lang:active {
  transform: scale(0.95);
}

/* Lang button in scrolled navbar (light bg) */
.navbar.scrolled .btn-lang {
  background: var(--light);
  border-color: rgba(197, 165, 90, 0.3);
}

.navbar.scrolled .btn-lang:hover {
  background: rgba(197, 165, 90, 0.12);
  border-color: var(--accent);
}

/* Lang button inside mobile dropdown */
.navbar-collapse .btn-lang {
  background: rgba(197, 165, 90, 0.1);
  border-color: rgba(197, 165, 90, 0.2);
}

.navbar-collapse .btn-lang:hover {
  background: rgba(197, 165, 90, 0.2);
}

/* Language switch animation for text */
body.lang-switching [data-i18n] {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.lang-switching [data-i18n] {
  opacity: 0;
  transform: translateY(4px);
}

body.lang-ready [data-i18n] {
  opacity: 1;
  transform: translateY(0);
}
