:root {
  --primary: #071a2c;
  --secondary: #00a8e8;
  --background: #f4f7fb;
  --text: #1e1e1e;
  --card: #ffffff;
  --overlay: rgba(0, 0, 0, 0.45);
  --header: rgba(7, 26, 44, 0.65);
}

.dark-mode {
  --primary: #02070d;
  --secondary: #4cc9f0;
  --background: #0b1118;
  --text: #f5f5f5;
  --card: #101820;
  --overlay: rgba(0, 0, 0, 0.60);
  --header: rgba(0, 0, 0, 0.75);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: var(--background);
  color: var(--text);
  transition: background-color 0.3s, color 0.3s;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Evita que el header tape el contenido al hacer clic en los enlaces */
}

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  background: url("image1.png") center/cover no-repeat;
}

.overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  transition: 0.3s;
}

/* HEADER & LOGO */
.main-header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: var(--header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.logo-img {
  width: 55px;
}

.logo-text {
  color: white;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-text span {
  color: var(--secondary);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: 0.3s;
}

nav a:hover {
  color: var(--secondary);
}

/* MODERN SELECTOR & TOOLS */
.header-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}

.modern-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 8px 30px 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px top 50%;
  background-size: 10px auto;
  transition: 0.3s;
}

.modern-select:hover, .modern-select:focus {
  border-color: var(--secondary);
  background-color: rgba(255, 255, 255, 0.15);
}

.modern-select option {
  background: var(--primary);
  color: white;
}

#themeToggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  color: white;
  font-size: 16px;
  transition: 0.3s;
}

#themeToggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* HERO CONTENT */
.hero-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 20px;
}

.hero-logo {
  width: 350px;
  margin-bottom: 20px;
  animation: fadeUp 1s ease forwards;
}

.hero-content h1 {
  font-size: 55px;
  font-weight: 700;
  max-width: 900px;
  line-height: 1.2;
  margin-bottom: 20px;
  animation: fadeUp 1.3s ease forwards;
}

.hero-content p {
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 40px;
  opacity: 0.9;
  animation: fadeUp 1.6s ease forwards;
}

.btn {
  background: var(--secondary);
  color: white;
  text-decoration: none;
  padding: 16px 36px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 168, 232, 0.5);
}

/* NEW SERVICES LAYOUT */
.services {
  padding: 100px 5%;
  max-width: 1300px;
  margin: auto;
}

.section-title {
  text-align: center;
  margin-bottom: 70px;
  font-size: 42px;
  font-weight: 700;
  color: var(--text);
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.service-row {
  display: flex;
  align-items: center;
  gap: 50px;
  background: var(--card);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

/* Image on the left with black gradient */
.service-img-wrapper {
  position: relative;
  width: 45%;
  aspect-ratio: 1 / 1; /* Cuadrada */
  border-radius: 15px;
  overflow: hidden;
  flex-shrink: 0;
}

.service-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-img-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
  pointer-events: none;
}

/* Text on the right */
.service-text {
  width: 55%;
}

.service-text h3 {
  font-size: 32px;
  color: var(--secondary);
  margin-bottom: 20px;
  font-weight: 600;
}

.service-text p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 15px;
  color: var(--text);
}

.important {
  color: #ff5d73 !important;
  font-weight: 600;
}

/* ABOUT */
.about {
  background: var(--primary);
  color: white;
  padding: 100px 20px;
  text-align: center;
}

.about h2 {
  margin-bottom: 25px;
  font-size: 42px;
}

.about p {
  max-width: 800px;
  margin: auto;
  font-size: 20px;
  line-height: 1.8;
  font-weight: 300;
}

/* CONTACT */
.contact {
  padding: 100px 20px;
  max-width: 800px;
  margin: auto;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

input, textarea {
  padding: 18px 20px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.dark-mode input, .dark-mode textarea {
  border-color: rgba(255,255,255,0.1);
}

input:focus, textarea:focus {
  border-color: var(--secondary);
}

textarea {
  min-height: 200px;
  resize: vertical;
}

/* FOOTER */
footer {
  background: #04101c; /* Ligeramente más oscuro que primary */
  color: rgba(255, 255, 255, 0.8);
  padding: 70px 5% 30px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 50px;
}

.footer-brand {
  max-width: 350px;
}

.footer-brand .logo-text {
  font-size: 28px;
  margin-bottom: 15px;
}

.footer-brand p {
  font-size: 15px;
  line-height: 1.6;
}

.footer-contact h3,
.footer-langs h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contact a:hover {
  color: var(--secondary);
}

/* Horizontal Languages */
.horizontal-langs {
  display: flex;
  gap: 10px;
}

.footer-lang-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

.footer-lang-btn:hover, .footer-lang-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  font-size: 14px;
}

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

/* RESPONSIVE */
@media (max-width: 992px) {
  .service-row {
    flex-direction: column;
    padding: 40px 20px;
  }
  .service-img-wrapper, .service-text {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .main-header {
    position: absolute;
    flex-wrap: wrap;
    padding: 15px 20px;
    background: transparent;
    border: none;
  }
  
  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    width: 100%;
    order: 3;
    background: rgba(7, 26, 44, 0.95);
    margin-top: 15px;
    border-radius: 12px;
    padding: 20px 0;
  }

  nav.nav-active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .hero-content h1 {
    font-size: 38px;
  }
  
  .hero-content p {
    font-size: 18px;
  }
  
  .footer-content {
    flex-direction: column;
  }
}