/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #f9fafb;
}

html {
  scroll-behavior: smooth;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header */
.header {
  background: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid #e5e7eb;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}

.nav {
  display: none;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav-link {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #2563eb;
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: #1f2937;
  margin: 3px 0;
  transition: 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 999;
  padding: 1rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 0;
  text-decoration: none;
  color: #4b5563;
  font-weight: 500;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

/* Hero Section */
.hero {
    /* ELIMINA ESTAS LÍNEAS: */
    /* background-image: url('images/background-web.png'); */
    /* background-size: cover; */
    /* background-position: center; */
    /* background-repeat: no-repeat; */
    /* background-attachment: fixed; */
    
    background-color: #000; /* FALLBACK: Color negro si el video falla */
    position: relative; 
    color: white; 
    padding: 5rem 0; 
    margin-top: 70px; 
    min-height: 600px;
    
    /* El contenedor (.hero) debe ser el que tenga position: relative; */
    /* para que el video se posicione correctamente. */
    /* El resto de tu CSS es bueno para centrar el contenido. */
    display: flex; 
    align-items: center; 
    justify-content: center; /* Añade esto para centrar el contenedor horizontalmente también */
    overflow: hidden; /* Oculta cualquier parte del video que se salga de los límites */
}

/* Add overlay for better text readability */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero .container {
  position: relative;
  /* z-index: 2; */
  z-index: 10;
  /* --- ADD THIS LINE --- */
  width: 100%; /* Forces the content container to take up the full width */
  /* --------------------- */
}

.hero-content {
    /* Agrega esta línea para centrar el texto (títulos y párrafos) */
    text-align: center; 
    /* El resto de las propiedades no necesitan ser cambiadas */
}

.hero-video {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: 1; 
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.75rem;
  }
}

.hero-subtitle {
  display: block;
  color: #60a5fa;
}

.hero-description {
  font-size: 1.25rem;
  color: #d1d5db;
  margin-bottom: 2rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.5rem;
  }
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-secondary {
  border: 1px solid white;
  color: white;
  background: transparent;
}

.btn-secondary:hover {
  background: white;
  color: #1f2937;
}

.btn-dark {
  background: #1f2937;
  color: white;
}

.btn-dark:hover {
  background: #374151;
}

.btn-form {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 0.75rem;
}

.btn-icon {
  transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
  transform: translateX(2px);
}

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

.section-description {
  font-size: 1.25rem;
  color: #6b7280;
  max-width: 32rem;
  margin: 0 auto;
}

/* Services Section */
.services {
  padding: 5rem 0;
  background: white;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 0;/* <--- Change this from 4rem to 0 */
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  text-align: center;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: box-shadow 0.3s ease;
}

.service-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.service-icon {
  color: #2563eb;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.service-description {
  color: #6b7280;
}

.outsourced-services {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 2rem;
}

.outsourced-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  text-align: center;
}

.outsourced-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .outsourced-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.outsourced-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.outsourced-service-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.outsourced-service-description {
  color: #6b7280;
}

.outsourced-note {
  text-align: center;
  color: #6b7280;
  font-style: italic;
}

/* Portfolio Section */
.portfolio {
  padding: 5rem 0;
  background: #f9fafb;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portfolio-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.portfolio-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.portfolio-image {
  width: 100%;
  height: 12rem;
  object-fit: cover;
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.portfolio-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

/* Contact Section */
.contact {
  padding: 5rem 0;
  background: white;
}

.contact-content {
  max-width: 1000px;
  margin: 0 auto;
}

/* Contact Methods */
.contact-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .contact-methods {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-method {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #f8fafc;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.contact-method:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-method-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  margin: 0 auto 1rem;
}

.whatsapp-icon {
  background: #25d366;
}

.rocket-icon {
  background: #f59e0b;
}

.contact-method-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.contact-method-description {
  color: #6b7280;
  margin-bottom: 1rem;
}

.contact-method-btn {
  display: inline-block;
  background: #25d366;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-method-btn:hover {
  background: #22c55e;
  transform: translateY(-1px);
}

/* Form Container */
.form-container {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 1.5rem;
  padding: 3rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
  .form-container {
    padding: 2rem 1.5rem;
  }
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.form-subtitle {
  color: #6b7280;
  font-size: 1.1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.form-note {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
  margin-top: 1rem;
}

/* Footer */
.footer {
  background: #1f2937;
  color: white;
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-description {
  color: #9ca3af;
}

.footer-subtitle {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-list {
  list-style: none;
  color: #9ca3af;
}

.footer-list li {
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  color: #9ca3af;
}

/* WhatsApp Button */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.whatsapp-button a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
}

.whatsapp-button a:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Mobile menu animations */
.mobile-menu.active {
  display: block;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Optimizations */
@media (max-width: 480px) {
  .contact-methods {
    gap: 1.5rem;
  }

  .contact-method {
    padding: 1.5rem 1rem;
  }

  .form-container {
    margin: 0 -0.5rem;
    border-radius: 1rem;
  }

  .form-title {
    font-size: 1.5rem;
  }

  .form-subtitle {
    font-size: 1rem;
  }
}

/* About Section */
.about {
  padding: 5rem 0;
  background: #f9fafb;
}

.about-content {
  max-width: 1000px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about-text {
  padding: 1rem 0;
}

.about-subtitle {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.about-description {
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.about-location {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.location-icon {
  color: #2563eb;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.location-text {
  color: #374151;
  line-height: 1.6;
}

.about-map {
  position: relative;
}

.map-container {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  background: white;
  padding: 0.5rem;
}

.map-container iframe {
  border-radius: 0.5rem;
  width: 100%;
  height: 300px;
}

@media (max-width: 768px) {
  .about-grid {
    gap: 2rem;
  }

  .about-location {
    padding: 1rem;
  }

  .map-container iframe {
    height: 250px;
  }
}
