/* ===== VARIABLES Y RESET ===== */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --brand-dark: #0a0f1f;
  --brand-500: #1abc9c;
}

@media (max-width: 768px) {
  :root {
    --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  }
}

* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  color: #0a0f1f;
  background: #f5f7fb;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 { 
  font-family: var(--font-sans); 
  margin: 0; 
}

h1 { 
  font-weight: 700; 
  letter-spacing: -0.02em; 
}

h2 { 
  font-weight: 600; 
}

p, li, a, label { 
  font-weight: 400; 
}

strong { 
  font-weight: 600; 
}

/* ===== ANIMACIONES ===== */
@keyframes slideDownFade {
  0% { transform: translateY(-30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== COMPONENTES REUTILIZABLES ===== */
.cta-button {
  background: linear-gradient(135deg, #1abc9c, #16a085);
  color: #fff;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: linear-gradient(135deg, #17a589, #138d75);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(26, 188, 156, 0.4);
}

/* ===== HEADER Y NAVEGACIÓN ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  background: rgba(10, 15, 31, 0.95);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .logo img {
  height: 80px;
  width: auto;
  display: block;
  animation: slideDownFade 1s ease forwards;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -3px;
  left: 0;
  background-color: #1abc9c;
  transition: width 0.3s ease;
}

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

.nav-links li a:hover {
  color: #1abc9c;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(180deg, #0a0f1f 0%, #1d4e44 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 140px 20px;
  position: relative;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin-bottom: 30px;
}

.hero .cta-button {
  font-size: 1.1rem;
  padding: 14px 35px;
}

/* ===== QUIÉNES SOMOS SECTION ===== */
.who {
  background: linear-gradient(180deg, #1d4e44 0%, #f5f7fb 100%);
  padding: 80px 20px;
  position: relative;
}

.who-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.who-header {
  text-align: center;
  margin-bottom: 40px;
}

.who-header h2 {
  font-size: 2.6rem;
  color: var(--brand-dark);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.who-header h2::after {
  content: "";
  position: absolute;
  width: 60%;
  height: 4px;
  bottom: -6px;
  left: 20%;
  background: var(--brand-500);
  border-radius: 2px;
}

.who-sub {
  color: #000000;
  max-width: 760px;
  margin: 16px auto 0 auto;
  font-size: 1.15rem;
  line-height: 1.7;
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.who-card {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15,20,25,0.06);
  text-align: left;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.who-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(15,20,25,0.09);
}

.who-icon {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--brand-500);
}

.who-card h3 {
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-size: 1.1rem;
}

.who-card p {
  color: #4a5863;
  line-height: 1.6;
  margin: 0;
}

.services {
  background: #1d4e44;
  color: #fff;
  padding: 100px 20px;
  text-align: center;
}

.services h2 {
  font-size: 2.5rem;
  margin-bottom: 80px;
  color: #ffffff;
}

/* Contenedor para que los servicios se alineen en fila */
.services-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Centra los elementos */
  gap: 30px; /* Espacio entre servicios */
}

.service-single {
  background: #2c443b;
  color: #fff;
  padding: 50px 40px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
  text-align: left;
  border-left: 6px solid #1abc9c;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  flex: 1 1 300px; /* Crece, se encoge, mínimo 300px */
  max-width: 400px; /* Para no crecer demasiado */
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards;
  animation-delay: 0.2s;
}

.service-single:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.service-single h3 {
  color: #1abc9c;
  font-size: 2rem;
  margin-bottom: 20px;
}

.service-details ul {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.service-details ul li {
  margin-bottom: 16px;
  padding-left: 35px;
  font-size: 1rem;
  position: relative;
}

.service-details ul li::before {
  content: "🔹";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.2rem;
  color: #1abc9c;
}

.service-cta-row {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.service-cta-row .link-secondary {
  color: #0a0f1f;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .services-container {
    flex-direction: column;
    align-items: center;
  }

  .service-single {
    max-width: 90%;
  }
}

/* ===== ABOUT SECTION ===== */
.about-modern {
  background: #1d4e44;
  color: #fff;
  padding: 100px 20px;
  text-align: center;
}

.about-modern h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.about-modern .about-intro {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 60px auto;
  line-height: 1.7;
  opacity: 0.9;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 30px 25px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.about-card .icon {
  font-size: 2.2rem;
  margin-bottom: 15px;
  display: block;
}

.about-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #1abc9c;
}

.about-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: #eee;
}

/* ===== CONTACTO SECTION ===== */
.contact {
  background: linear-gradient(to bottom, #1d4e44, #0a0f1f);
  color: #fff;
  padding: 100px 20px;
  text-align: center;
}

.contact h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #1abc9c;
}

.contact p {
  max-width: 600px;
  margin: 0 auto 40px auto;
  font-size: 1.2rem;
  color: #ddd;
}

.contact form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact input,
.contact textarea {
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.contact input::placeholder,
.contact textarea::placeholder {
  color: #aaa;
}

.contact button {
  background: #1abc9c;
  color: #fff;
  border: none;
  padding: 15px;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact button:hover {
  background: #16a085;
}

/* ===== MENÚ HAMBURGUESA ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .who-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .service-single {
    margin: -60px 20px 40px 20px;
  }
}

@media (max-width: 768px) {
  /* Header y navegación */
  header {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  
  .logo img {
    height: 50px;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 15px;
    position: absolute;
    top: 70px;
    right: 20px;
    background: rgba(10,15,31,0.98);
    padding: 20px;
    border-radius: 10px;
    width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .desktop-cta {
    display: none;
  }
  
  /* Hero section - CORRECCIÓN PRINCIPAL */
  .hero {
    padding: 80px 15px 40px 15px; /* Reducido padding-bottom */
    margin-bottom: 0;
  }
  
  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 15px;
  }
  
  .hero p {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .hero .cta-button {
    font-size: 1rem;
    padding: 12px 25px;
  }
  
  /* Quiénes somos section - CORRECCIÓN PRINCIPAL */
  .who {
    padding: 0px 15px 60px 15px; /* Padding-top a 0 */
    margin-top: -30px; /* Margen negativo para solapar */
    background: linear-gradient(180deg, #1d4e44 0%, #f5f7fb 10%);
  }
  
  .who-header {
    padding-top: 50px; /* Espacio interno */
  }
  
  .who-header h2 {
    font-size: 2rem;
  }
  
  .who-sub {
    font-size: 1rem;
  }
  
  .who-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .who-card {
    padding: 20px;
  }
  
  /* Services section */
  .services {
    padding: 60px 15px;
  }
  
  .services h2 {
    font-size: 2rem;
    margin-bottom: 40px;
  }
  
  .service-single {
    padding: 30px 20px;
    margin: -60px 15px 20px 15px;
    border-radius: 15px;
  }
  
  .service-single h3 {
    font-size: 1.5rem;
  }
  
  .service-details ul li {
    font-size: 0.95rem;
    padding-left: 30px;
  }
  
  .service-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  /* About section */
  .about-modern {
    padding: 60px 15px;
  }
  
  .about-modern h2 {
    font-size: 2rem;
  }
  
  .about-modern .about-intro {
    font-size: 1rem;
    margin-bottom: 40px;
  }
  
  .about-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .about-card {
    padding: 20px;
  }
  
  /* Contacto section */
  .contact {
    padding: 60px 15px;
  }
  
  .contact h2 {
    font-size: 2rem;
  }
  
  .contact p {
    font-size: 1rem;
  }
  
  .contact form {
    gap: 15px;
  }
  
  .contact input,
  .contact textarea {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 60px 15px 30px 15px; /* Aún menos padding inferior */
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 0.9rem;
  }
  
  .who {
    margin-top: -25px;
    padding: 0px 15px 50px 15px;
    background: linear-gradient(180deg, #1d4e44 0%, #f5f7fb 8%);
  }
  
  .who-header {
    padding-top: 40px;
  }
  
  .services h2,
  .about-modern h2,
  .who-header h2,
  .contact h2 {
    font-size: 1.7rem;
  }
  
  .service-single {
    margin: -30px 10px 20px 10px;
    padding: 20px 15px;
  }
  
  .nav-links {
    width: 180px;
    right: 10px;
  }
  
  header {
    padding: 12px 15px;
  }
}

/* GARANTIZAR QUE NO HAY ESPACIOS ENTRE SECCIONES */
.hero, .who, .services, .about-modern, .contact {
  margin: 0;
}

.hero + .who {
  margin-top: 0 !important;
}
