/* Reset básico y variables CSS */
:root {
  --primary: #0A6B6D;
  --primary-light: #73c7ca;
  --secondary: #054546;
  --accent: #ff6b6b;
  --light: #ffffff;
  --dark: #333333;
  --gray: #f8f9fa;
  --transition: all 0.4s ease;
  --shadow: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-hover: 0 15px 40px rgba(0,0,0,0.2);
  --border-radius: 15px;
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Montserrat', sans-serif;
}

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

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

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--dark);
  overflow-x: hidden;
  background: var(--light);
}

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

/* Loader de inicio */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-content {
  text-align: center;
  color: white;
}

.logo-loader {
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-light);
  animation: pulse 1.5s infinite;
  display: inline-block;
}

.loading-text {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.progress-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.progress {
  width: 0%;
  height: 100%;
  background: var(--primary-light);
  border-radius: 2px;
  animation: loading 2s infinite;
}

@keyframes loading {
  0% { width: 0%; }
  50% { width: 100%; }
  100% { width: 100%; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

header.scrolled {
  padding: 10px 0;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 70px;
  width: auto;
  max-width: 400px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 30px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-menu a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--primary);
  margin: 3px 0;
  transition: var(--transition);
}

/* Sección Hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: white;
}

.three-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 20px;
  width: 100%;
}

.hero-content .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70vh;
}

.hero-text {
  flex: 1;
  max-width: 600px;
  animation: fadeInUp 1s ease;
}

.hero-text h1 {
  font-family: var(--font-secondary);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(45deg, var(--secondary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight {
  position: relative;
  z-index: 1;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  z-index: -1;
  opacity: 0.2;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: var(--dark);
  max-width: 500px;
}

.cta-buttons {
  display: flex;
  gap: 20px;
}

.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

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

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 500px;
}

.floating-elements {
  position: relative;
  width: 300px;
  height: 300px;
}

.floating-element {
  position: absolute;
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  box-shadow: var(--shadow);
  animation: float 6s infinite ease-in-out;
}

.element-1 {
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.element-2 {
  top: 50%;
  right: 0;
  animation-delay: 2s;
}

.element-3 {
  bottom: 0;
  left: 50%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-20px) translateX(20px); }
  50% { transform: translateY(0) translateX(-20px); }
  75% { transform: translateY(20px) translateX(0); }
}

/* Secciones comunes */
section {
  padding: 100px 0;
}

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

.section-header h2 {
  font-family: var(--font-secondary);
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--secondary);
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--primary);
  max-width: 600px;
  margin: 0 auto;
}

/* Sección Servicios */
.services {
  background: var(--gray);
  position: relative;
  overflow: hidden;
}

.services::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(115,199,202,0.1) 0%, rgba(255,255,255,0) 70%);
  z-index: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  position: relative;
  z-index: 1;
}

.service-card {
  background: white;
  padding: 40px 30px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
  z-index: -1;
}

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

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

.service-icon {
  width: 80px;
  height: 80px;
  background: rgba(115, 199, 202, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--primary);
  font-size: 2rem;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--secondary);
}

.service-card p {
  margin-bottom: 20px;
  color: var(--dark);
}

.service-card .btn {
  margin-top: 15px;
}

/* Sección Sobre Nosotros */
.about {
  background: white;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text h2 {
  font-family: var(--font-secondary);
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--secondary);
}

.about-text p {
  margin-bottom: 20px;
  color: var(--dark);
  line-height: 1.8;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat {
  text-align: center;
  padding: 30px 20px;
  background: var(--gray);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.stat:hover {
  transform: translateY(-5px);
  background: var(--primary-light);
  color: white;
}

.stat:hover .stat-number {
  color: white;
}

.stat-number {
  font-family: var(--font-secondary);
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
  color: var(--primary);
}

.stat-label {
  font-size: 0.9rem;
}

/* Sección Testimonios */
.testimonials {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  position: relative;
  overflow: hidden;
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.1;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 30px;
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.testimonial-content p {
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
  padding-left: 25px;
}

.testimonial-content p::before {
  content: '"';
  position: absolute;
  left: -10px;
  top: -15px;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.2);
  font-family: serif;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.author-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--light);
  margin-right: 15px;
  flex-shrink: 0;
}

.author-info h4 {
  font-weight: 600;
  margin-bottom: 5px;
}

.author-info p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Sección Contacto */
.contact {
  background: var(--gray); /* white; */
  position: relative;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-item {
  display: flex;
  gap: 15px;
}

.contact-item i {
  width: 50px;
  height: 50px;
  background: var(--primary-light);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: var(--secondary);
}

.contact-item p {
  color: var(--dark);
}

.contact-form {
  background: var(--gray);
  padding: 40px;
  border-radius: var(--border-radius);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(115, 199, 202, 0.2);
}

/* Footer */
footer {
  background: var(--secondary);
  color: white;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 20px;
  color: var(--primary-light);
}

.footer-section p {
  margin-bottom: 15px;
  opacity: 0.8;
}

.footer-section ul {
  list-style: none;
}

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

.footer-section ul li a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  opacity: 1;
  color: var(--primary-light);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.social-icons a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  opacity: 0.7;
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content .container {
    flex-direction: column;
    text-align: center;
    gap: 50px;
  }
  
  .hero-text {
    max-width: 100%;
  }
  
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .about-visual {
    order: -1;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    padding: 20px 0;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li {
    margin: 15px 0;
  }
  
  .hero-text h1 {
    font-size: 2.5rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero {
    height: auto;
    padding: 150px 0 100px;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  section {
    padding: 60px 0;
  }
}