/* =========================
   Variables y Reset
   ========================= */
:root {
  /* Palette - Premium Blue & Cyan */
  --color-primary: #0077b6;
  --color-secondary: #00b4d8;
  --color-accent: #90e0ef;
  --color-dark: #023e8a;
  --color-text: #333333;
  --color-bg: #f8f9fa;
  --color-white: #ffffff;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  --gradient-hover: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));

  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(0, 180, 216, 0.3);

  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

/* =========================
   Animations (Scroll Reveal)
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

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

/* =========================
   Wave Dividers
   ========================= */
.wave-divider-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

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

.wave-divider-top .shape-fill {
  fill: #f0f4f8;
  /* Match previous section bg */
}

/* =========================
   Navigation
   ========================= */
.container-barra-navegacion {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  display: flex;
  width: 100%;
  height: 60px;
  position: fixed;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 2rem;
}

.nav-logo-link {
  display: none;
  /* Hidden by default on desktop */
  height: 100%;
}

.nav-logo {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  height: 100%;
  align-items: center;
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: black;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.opcion-container {
  color: var(--color-white);
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.opcion-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.opcion-container:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.opcion-container:hover {
  color: var(--color-accent);
  background: rgba(255, 255, 255, 0.05);
}

/* =========================
   Header & Hero
   ========================= */
.main-header {
  padding-top: 60px;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 10;
}

.container-header-flex {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  gap: 20px;
}

.logo {
  height: 70px;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

.main-header h1 {
  font-size: 1.8rem;
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../images/fondo1.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--color-white);
  text-align: center;
  overflow: hidden;
  padding: 0;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 119, 182, 0.7));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
  animation: fadeUp 1s ease-out;
}

.hero h2 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
  font-weight: 300;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Button Styles */
.btn-solicitar {
  display: inline-block;
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--gradient-primary);
  border-radius: 50px;
  box-shadow: 0 0 20px rgba(0, 180, 216, 0.5);
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.btn-solicitar:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 180, 216, 0.7);
  background: var(--gradient-hover);
  color: var(--color-white);
}

/* =========================
   Services Section
   ========================= */
.servicios-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2rem;
  background: var(--color-white);
  text-align: center;
}

.servicios-container h2 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.servicios-container h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-secondary);
  margin: 10px auto 0;
  border-radius: 2px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.s-container {
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.s-container:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.s-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  z-index: 1;
  transition: opacity var(--transition-fast);
}

.s-container:hover::before {
  background: linear-gradient(to top, rgba(0, 119, 182, 0.9), rgba(0, 0, 0, 0.2));
}

.servicios-destacados {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  color: var(--color-white);
  z-index: 2;
  text-align: left;
  transform: translateY(20px);
  transition: transform var(--transition-fast);
}

.s-container:hover .servicios-destacados {
  transform: translateY(0);
}

.servicios-destacados strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}

.p-serviciosd {
  font-size: 1rem;
  opacity: 0.9;
}

/* Individual Backgrounds */
#construccion {
  background-image: url('../images/construccion.jpg');
  background-size: cover;
  background-position: center;
}

#mantenimiento {
  background-image: url('../images/mantenimiento.jpg');
  background-size: cover;
  background-position: center;
}

#quimicos {
  background-image: url('../images/químicos.jpeg');
  background-size: cover;
  background-position: center;
}

/* =========================
   Products Section
   ========================= */
#productos {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2rem;
  background-color: #f0f4f8;
  text-align: center;
}

#productos h2 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
}

#productos p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

.productos-grid {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.producto-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  width: 250px;
  transition: transform var(--transition-fast);
}

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

.producto-card h3 {
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

/* =========================
   About Section
   ========================= */
.about-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  background: white;
}

.about-container h2 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.8;
}

.about-content p {
  margin-bottom: 1.5rem;
}

/* =========================
   Partners Section
   ========================= */
.panteners-container {
  min-height: 25vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 2rem;
  background: #f0f4f8;
  text-align: center;
}

.panteners-container h2 {
  font-size: 2rem;
  color: var(--color-dark);
  margin-bottom: 3rem;
}

.panteners-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.panteners-logos img {
  height: 60px;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all var(--transition-fast);
}

.panteners-logos img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* =========================
   Contact Section (Business Card)
   ========================= */
.contacto {
  min-height: 100vh;
  padding: 5rem 1rem;
  background: linear-gradient(135deg, #001f3f, #0077b6);
  /* Deep Ocean Theme */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Floating Animation */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

.business-card {
  background: rgba(255, 255, 255, 0.1);
  /* More transparent */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  /* Reduced radius */
  padding: 2rem;
  /* Significantly reduced padding */
  width: 100%;
  max-width: 500px;
  /* Reduced width */
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 2;
  animation: float 6s ease-in-out infinite;
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Reduced gap */
}

.card-header {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
}

.card-logo {
  height: 50px;
  /* Smaller logo */
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.business-card h3 {
  color: var(--color-white);
  font-size: 1.3rem;
  /* Smaller title */
  margin-bottom: 0.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.card-subtitle {
  color: var(--color-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  /* Smaller subtitle */
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  /* Tighter gap */
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.8rem;
  /* Smaller padding */
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

.contact-item:hover {
  transform: translateX(10px);
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-accent);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.icon-box {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  color: var(--color-white);
  width: 40px;
  /* Smaller icon box */
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-fast);
}

.contact-item:hover .icon-box {
  transform: scale(1.1) rotate(5deg);
}

.contact-text {
  text-align: left;
}

.contact-text span {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0;
}

.contact-text a,
.contact-text p {
  font-size: 0.95rem;
  /* Smaller text */
  color: var(--color-white);
  font-weight: 500;
}

.contact-text a:hover {
  color: var(--color-accent);
}

.card-footer {
  margin-top: 1rem;
}

.btn-card {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 12px 30px;
  /* Smaller button */
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
}

.btn-card:hover {
  background: var(--color-accent);
  color: var(--color-dark);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* =========================
   Footer
   ========================= */
footer {
  background: #1a1a1a;
  color: #888;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}

footer p {
  margin: 0;
}

/* =========================
   Animations
   ========================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .container-barra-navegacion {
    height: auto;
    flex-wrap: wrap;
    padding-left: 10px;
    padding-right: 10px;
    background-color: #ffffff5e;
    justify-content: space-between;
    /* Space out logo and hamburger */
    align-items: center;
  }

  .main-header {
    display: none;
    /* Hide main header on mobile */
  }

  .nav-logo-link {
    display: flex;
    /* Show logo in nav on mobile */
    margin-left: 10px;
  }

  .opcion-container {
    padding: 10px;
    font-size: 0.9rem;
    width: 100%;
    /* Full width in mobile menu */
    justify-content: center;
    /* Center text */
  }

  .hamburger-menu {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    right: 0;
  }

  .main-header {
    padding-top: 100px;
  }

  .container-header-flex {
    flex-direction: column;
  }

  .servicios-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    width: 100%;
    height: 100%;
    box-shadow: var(--shadow-sm);
    border-radius: 10px;
    transition: transform var(--transition-fast);
  }

  /* Adjust padding for full height sections on mobile */
  .servicios-container,
  #productos,
  .about-container,
  .contacto {
    padding: 3rem 1rem;
  }

  /* Force service details to be visible on mobile */
  .servicios-destacados {
    transform: translateY(0) !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    /* Add background to text container for better readability if needed, or rely on parent */
  }

  /* Ensure the parent gradient is visible enough */
  .s-container::before {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent) !important;
  }

  .business-card {
    padding: 2rem;
  }

  .contact-item {
    flex-dirmediaection: column;
    text-align: center;
    gap: 0.5rem;
  }

  .contact-text {
    text-align: center;
  }

  .contact-item:hover {
    transform: translateY(-5px);
  }
}

/* =========================
   Splash Screen
   ========================= */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #00b4d8 0%, #0077b6 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease-out, visibility 0.8s;
}

#splash-screen.splash-hidden {
  opacity: 0;
  visibility: hidden;
}

.drop-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 2rem;
}

.drop {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50% 0 50% 50%;
  transform: translateX(-50%) rotate(-45deg);
  animation: dropFall 1.5s infinite ease-in;
}

.ripples {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleY(0.5);
  width: 100px;
  height: 100px;
}

.ripples div {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: rippleExpand 1.5s infinite linear;
}

.ripples div:nth-child(2) {
  animation-delay: 0.5s;
}

.splash-text {
  text-align: center;
  color: white;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.5s forwards;
}

.splash-logo {
  height: 60px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
  /* Make logo white */
}

.splash-text p {
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 300;
}

@keyframes dropFall {
  0% {
    top: -100px;
    opacity: 0;
    transform: translateX(-50%) rotate(-45deg) scale(0.5);
  }

  20% {
    opacity: 1;
  }

  40% {
    top: 50%;
    transform: translateX(-50%) rotate(-45deg) scale(1);
    opacity: 1;
  }

  45% {
    top: 50%;
    transform: translateX(-50%) rotate(-45deg) scale(0.1);
    opacity: 0;
  }

  100% {
    top: 50%;
    opacity: 0;
  }
}

@keyframes rippleExpand {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
    border-width: 4px;
  }

  40% {
    opacity: 1;
  }

  100% {
    width: 100px;
    height: 100px;
    opacity: 0;
    border-width: 0;
  }
}

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