/* Base styles */
:root {
  --primary: #eab308;
  --primary-hover: #facc15;
  --text: #111827;
  --text-light: #4b5563;
  --bg-light: #f9fafb;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary);
  color: black;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 8rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-image {
  height: 120px; /* Logo más grande */
  width: auto;
  margin-top: -45px;  /* Mueve el logo hacia arriba para que sobresalga */
  margin-bottom: -45px; /* Ajusta si es necesario para equilibrar el espacio debajo */
  transition: all 0.3s ease;
}

.logo-image:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  font-size: 1.5rem; /* Ajusta este valor según lo necesites */
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
}

/* Hero Section */
.hero {
  min-height: 90vh;
  background-image: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?auto=format&fit=crop&q=80');
  background-size: cover;
  background-position: center;
  position: relative;
  padding-top: 4rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  color: var(--white);
  padding: 4rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(90vh - 4rem);
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  max-width: 36rem;
  margin-bottom: 2rem;
}

/* Features Section */
.features {
  padding: 5rem 0;
  background: var(--bg-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 1.5rem;
}

.feature-card i {
  color: var(--primary);
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

/* Services Section */
.services {
  padding: 5rem 0;
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 36rem;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
}

.service-card i {
  color: var(--primary);
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
}

/* Projects Section */
.projects {
  padding: 9rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem; /* Ajusté el margen inferior */
}

.section-header h1 {
  font-size: 2.5rem; /* Ajusté el tamaño de fuente */
  color: #333;
  font-weight: bold;
}

.section-header p {
  font-size: 1.2rem;
  color: #666;
}

/* Animación para fade-in */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
  to {
      opacity: 1;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--white);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
  display: none; /* Se oculta inicialmente */
}

.project-card.visible {
  display: block; /* Cuando se añade la clase .visible, se muestra */
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
}

.project-image {
  position: relative;
  height: 16rem;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary);
  color: black;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.project-content {
  padding: 1.5rem;
}

/* Estilos para la barra de búsqueda */
.filter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 20px;
  width: 100%;
}

.search-container {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 600px; /* Ancho máximo para la barra */
}

.search-container input {
  width: 100%;
  padding: 10px 20px;
  padding-left: 40px; /* Espacio para el ícono de la lupa */
  border: 2px solid #ddd;
  border-radius: 50px;
  font-size: 16px;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: border-color 0.3s ease;
  outline: none;
}

.search-container input:focus {
  border-color: #007BFF; /* Cambia el color del borde al enfocarse */
}

.search-container .search-icon {
  position: absolute;
  left: 10px;
  color: #bbb;
  font-size: 20px;
}

/* Estilo del select (opciones de categorías) */
#filter-options {
  display: none; /* Ocultamos el select por defecto */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 50px;
  background-color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  z-index: 10;
  cursor: pointer;
  transition: all 0.3s ease;
}


/* Estilo de las opciones en el select */
#filter-options option {
  padding: 10px;
  background-color: #fff;
  color: #333;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

#filter-options option:hover {
  background-color: #007BFF;
  color: #fff;
}

/* Mostrar el select cuando el input está enfocado */
.search-container input:focus + #filter-options {
  display: block; /* Muestra el select cuando el input está enfocado */
}

/* Transición suave para mostrar el select */
.search-container input:focus + #filter-options {
  display: block;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease-in-out;
}

/* Diseño del select cuando está visible */
#filter-options {
  display: block;
  opacity: 0;
  transform: translateY(-10px);
}

/* Agregar un hover más suave a las opciones */
#filter-options option:hover {
  background-color: #007BFF;
  color: #fff;
  padding-left: 20px;
}

/* Estilo del ícono de la lupa */
.search-container .search-icon {
  font-size: 20px;
  cursor: pointer;
}

/* Estilos cuando el campo de búsqueda está activo */
.search-container input:focus {
  border-color: #007BFF;
}

/* Mantener tus estilos existentes y agregar optimizaciones para iOS */
.project-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: transform, opacity;
}

/* Optimizaciones para iOS */
#filter-options {
  -webkit-appearance: none;
  appearance: none;
  font-size: 16px; /* Prevenir zoom en iOS */
  padding: 12px; /* Área de toque más grande */
  min-height: 44px; /* Altura mínima para iOS */
}

.search-container input {
  -webkit-tap-highlight-color: transparent;
  font-size: 16px;
  min-height: 44px;
  user-select: none;
  -webkit-user-select: none;
}

/* Mejorar el scroll en iOS */
#filter-options {
  -webkit-overflow-scrolling: touch;
  max-height: 300px;
  overflow-y: auto;
}

/* Prevenir problemas de eventos táctiles */
.search-container {
  touch-action: manipulation;
}

/* Footer */
.footer {
  background: var(--text);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.footer-info p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--white);
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--primary);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.contact-item i {
  color: var(--primary);
}

.footer-hours p {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  display: block;
  padding: 0.5rem 0;
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer-bottom-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-bottom-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.footer-bottom-links a:hover {
  color: var(--primary);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s, transform 0.8s;
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
      font-size: 2.5rem;
  }

  .mobile-menu-btn {
      display: block;
      background: none;
      border: none;
      cursor: pointer;
      padding: 0.5rem;
  }

  .nav-menu {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: var(--white);
      padding: 1rem;
      box-shadow: var(--shadow);
      flex-direction: column;
      gap: 1rem;
  }

  .nav-menu.active {
      display: flex;
  }

  .contact-grid {
      grid-template-columns: 1fr;
  }

  .footer-grid {
      grid-template-columns: 1fr;
      text-align: center;
  }

  .social-links {
      justify-content: center;
  }

  .contact-item {
      justify-content: center;
  }

  .footer-bottom-links {
      flex-direction: column;
      gap: 1rem;
  }
}
