/* Reset & Variables */
:root {
  --primary-color: #0056b3;
  --secondary-color: #00a8cc;
  --dark-color: #1a1a1a;
  --light-color: #f4f4f4;
  --text-color: #333;
  --white: #ffffff;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

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

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.section-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 50px;
  font-size: 1.1rem;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

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

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

.btn-outline {
  border-color: var(--white);
  color: var(--white);
}

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

/* Navbar */
.navbar {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  height: 90px;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

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

.logo img {
  height: 70px; /* Ajustado para logo de 1600x545 */
  width: auto;
  transition: var(--transition);
  mix-blend-mode: multiply; /* Mezcla el fondo de la imagen con el del navbar */
}

.logo img:hover {
  transform: scale(1.02);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: var(--dark-color);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
}

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

/* Dropdown Menu Styles */
.nav-item-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 200px;
  box-shadow: var(--shadow);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1001;
  padding: 10px 0;
}

.nav-item-dropdown:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  position: relative;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--dark-color);
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-menu a:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

/* Nested Dropdown */
.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -10px;
}

.dropdown-submenu:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-arrow {
  margin-left: 5px;
  font-size: 0.8rem;
}

.dropdown-menu .dropdown-arrow {
  float: right;
  margin-top: 5px;
}

.btn-contact {
  background-color: var(--primary-color);
  color: var(--white) !important;
  padding: 10px 25px;
  border-radius: 25px;
}

.btn-contact:hover {
  background-color: var(--secondary-color);
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: var(--transition);
  background-color: var(--dark-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  background: radial-gradient(circle at 70% 50%, #111 0%, #000 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  margin-top: 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
  opacity: 0.4;
  z-index: 0;
}

.hero-planet {
  position: absolute;
  width: 600px;
  height: 600px;
  background: url('img/earth/earth_daymap.jpg') repeat-x;
  background-size: cover;
  border-radius: 50%;
  top: 50%;
  right: -100px;
  transform: translateY(-50%) rotate(-15deg);
  /* Sombra interna más suave para que se vean los colores, y brillo atmosférico azul */
  box-shadow: inset 10px 0 80px 10px rgba(0, 0, 0, 0.6),
    inset -5px 0 30px rgba(255, 255, 255, 0.2),
    0 0 60px rgba(0, 123, 255, 0.4);
  animation: rotate-planet 120s linear infinite;
  z-index: 0;
  opacity: 1;
}

@keyframes rotate-planet {
from { background-position: 0 0; }
to { background-position: 1200px 0; }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0) 80%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  z-index: 5;
  position: relative;
  max-width: 800px;
  text-shadow: 0 2px 15px rgba(0,0,0,1);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Services Grid */
.services {
  background-color: var(--light-color);
}

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

.service-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer; /* Indica interactividad */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.service-card p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
}

.service-card:hover .read-more {
  opacity: 1;
  transform: translateY(0);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.3);
  position: relative;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.modal.show .modal-content {
  transform: scale(1);
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 15px;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.close-modal:hover,
.close-modal:focus {
  color: var(--dark-color);
  text-decoration: none;
  cursor: pointer;
}

.modal-header {
  background: var(--light-color);
  padding: 30px 30px 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.modal-header i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.modal-header h2 {
  color: var(--dark-color);
  margin: 0;
}

.modal-body {
  padding: 30px;
  color: var(--text-color);
  line-height: 1.6;
}

.modal-details {
  margin-top: 20px;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.modal-footer {
  padding: 20px 30px;
  background: var(--light-color);
  text-align: right;
  border-top: 1px solid #eee;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

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

.icon-box {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

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

/* Gallery / Carousel Section */
.gallery {
  background-color: var(--white);
  position: relative;
}

.carousel-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  height: 500px; /* Ajusta según el aspecto de las fotos */
}

.carousel-track-container {
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: var(--shadow);
  background-color: #1a1a1a; /* Fondo oscuro para resaltar las imágenes */
}

.carousel-track {
  padding: 0;
  margin: 0;
  list-style: none;
  position: relative;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  font-size: 1.2rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.prev-btn {
  left: -60px;
}

.next-btn {
  right: -60px;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.carousel-indicator {
  border: 0;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  background: #ccc;
  margin: 0 8px;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-indicator.current-slide {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* About Section */
.about-container {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  text-align: left;
}

.features-list {
  margin-top: 20px;
}

.features-list li {
  margin-bottom: 10px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.features-list i {
  color: var(--secondary-color);
}

.about-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.tech-illustration {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1600 / 1200; /* Imagen original: 1600x1200 */
}

.tech-illustration img {
  width: 100%;
  height: auto;
  display: block;
}

/* Clients Grid */
.clients {
  background-color: var(--white);
  text-align: center;
}

.clients-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}

.client-item {
  width: 150px; /* Tamaño base para los logos */
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
  filter: grayscale(0%); /* Color original por defecto */
  opacity: 1;
}

.client-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.client-item:hover {
  transform: scale(1.1); /* Ligero zoom */
}

/* Contact Section */
.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  background: var(--white);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.contact-info {
  flex: 1;
  min-width: 250px;
}

.info-item {
  margin-bottom: 30px;
  text-align: center;
}

.info-item i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.contact-form {
  flex: 2;
  min-width: 300px;
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

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

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.footer-logo h3 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.social-links a {
  color: var(--white);
  font-size: 1.5rem;
  margin-left: 20px;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #333;
  padding-top: 20px;
  font-size: 0.9rem;
  color: #888;
}

.visit-counter {
  display: inline-block;
  margin-top: 15px;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.visit-counter:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

.visit-counter i {
  margin-right: 6px;
  color: var(--secondary-color);
}

/* WhatsApp & Facebook Float */
.float-buttons {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 10000;
}

.float-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--white);
}

.float-btn:hover {
  transform: scale(1.1);
  box-shadow: 2px 4px 12px rgba(0,0,0,0.4);
  color: var(--white);
}

.whatsapp-float {
  background-color: #25d366;
}

.whatsapp-float:hover {
  background-color: #128c7e;
}

.facebook-float {
  background-color: #1877f2;
}

.facebook-float:hover {
  background-color: #166fe5;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 90px;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 15px 0;
    width: 100%; /* Asegurar que ocupen el ancho para centrar */
  }

  /* Mobile Dropdown */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    width: 100%;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none; /* Oculto por defecto en mobile */
  }

  .nav-item-dropdown:hover > .dropdown-menu,
  .nav-item-dropdown.active > .dropdown-menu {
    display: block;
  }

  .dropdown-submenu:hover > .dropdown-menu,
  .dropdown-submenu.active > .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    padding: 10px 0;
    font-size: 0.9rem;
    color: #555;
  }

  .dropdown-submenu > .dropdown-menu {
    margin-top: 0;
    margin-left: 0;
  }

  .dropdown-menu .dropdown-arrow {
    float: none;
    display: inline-block;
    transform: rotate(90deg);
  }

  /* Indentación para jerarquía en móvil */
  .dropdown-menu li {
    padding-left: 20px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text h2 {
    text-align: center;
  }

  .features-list li {
    justify-content: center;
  }

  .contact-wrapper {
    flex-direction: column;
  }

  /* Carousel Responsive Adjustments */
  .carousel-container {
    height: 300px;
    width: 90%;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .prev-btn { left: -20px; }
  .next-btn { right: -20px; }
}

/* Map Section */
.map-container {
  margin-top: 40px;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  /* Ensure the iframe fills the container if not set inline */
}

.map-container iframe {
  width: 100%;
  display: block; /* Removes bottom space */
}
