:root {
  --naranja: #f57c00;
  --verde: #25D366;
  --negro: #111;
  --blanco: #fff;
  --gris-borde: #ddd;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--negro);
  background: #f9f9f9;
}

#top-header {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  height: 32px;
  width: 100%;
  z-index: 1000;
  background-color: #222; /* Contraste con fondo claro */
  color: #fff;
  font-size: 0.9rem;
  padding: 6px 20px;
  display: flex;
  justify-content: center;
  gap: 60px;
  align-items: center;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon {
  height: 16px;
  width: auto;
}

body {
  padding-top: 40px; /* Compensa altura del top-header */
}
/* Header */
#main-header {
  box-sizing: border-box;
  position: fixed;
  top: 32px;
  width: 100%;
  padding: .5rem 2rem;
  background: transparent;
  color: var(--blanco);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  z-index: 1000;
}

#main-header.scrolled {
  background: var(--blanco);
  color: var(--negro);
  border-bottom: 2px solid var(--gris-borde);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo img {
  height: 85px;
  transition: all 0.3s ease;
}

.logo span {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Menú hamburguesa */
#menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: inherit;
  cursor: pointer;
  margin-left: auto;
  margin-right: 2rem;
}

/* Navegación */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
}

nav a {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Hero */
#hero {
  height: 100vh;
  margin-top: -25px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--blanco);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('assets/hero-fumigacion-exterior.jpg') center center / cover no-repeat;
  background-blend-mode: darken;
  z-index: -1;
}

.hero-content {
  z-index: 1;
}

#hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

#hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

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

.hero-buttons a {
  background: var(--naranja);
  color: var(--blanco);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
}

/* Secciones */
section {
  min-height: auto;
  padding: 2rem 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

section h2 {
  font-size: 3rem;
  margin-bottom: 2rem;
}

#nosotros,
#servicios,
#contacto {
  scroll-margin-top: 100px;
}

/* Nosotros */
.contenido-nosotros {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
}

.contenido-nosotros > div {
  flex: 1 1 45%;
  min-width: 280px;
}

.contenido-nosotros img {
  max-width: 85%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.contenido-nosotros p {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 800px;
}

/* Servicios */
#servicios {
  background: #f0f0f0;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
  max-width: 1000px;
  width: 100%;
}

.servicios-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #ccc;
}

/* Testimonios */
#testimonios {
  max-width: 800px;
  margin: 4rem auto;
  padding: 2rem;
  text-align: center;
}

#testimonios h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.testimonial {
  margin-bottom: 2rem;
  font-style: italic;
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.testimonial span {
  display: block;
  margin-top: 0.5rem;
  font-weight: bold;
  color: var(--naranja);
}

/* Contacto */
#contacto {
  background: #fff;
}

.contacto-contenido {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
  max-width: 1000px;
  width: 100%;
  flex-wrap: wrap;
}

.contacto-contenido img {
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
}

input, textarea, button {
  padding: 0.75rem;
  font-size: 1rem;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

button {
  background: var(--naranja);
  color: var(--blanco);
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
}

#faq {
  max-width: 800px;       /* ancho máximo uniforme */
  margin: 4rem auto;
  padding: 2rem;
}

#faq h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.faq-item {
  margin-bottom: 1.5rem;
  width: 100%;
}

.faq-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--naranja);
}


/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: #eee;
}

/* WhatsApp flotante */
.whatsapp {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 30px;
  background: var(--verde);
  color: var(--blanco);
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1001;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 6rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1000;
}

/* Responsive + menú hamburguesa */
@media screen and (max-width: 768px) {
  .logo img {
    display: none;
  }

  .logo span {
    margin-left: 2rem;
  }
  
  #top-header {
    display: inline-block;
    height: 75px;
    padding: 3px 10px;
    text-decoration: none;
  }
  
  .top-item {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    width: 100%;
  }
  
  #main-header {
    padding: 0;  
    top: 75px;
  }

  #menu-toggle {
    display: block;
  }

  #main-nav {
    display: block;
    position: absolute;
    top: 80px;
    right: 0;
    width: 200px;
    background: var(--blanco);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    padding: 1rem;
    z-index: 999;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }

  #main-nav.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  #main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  #main-nav a {
    color: var(--negro) !important;
  }
  
  .hero-buttons {
    font-size: 0.8em;
  }
  
  section {
      padding: 2rem 1.5rem;
  }
  
  #testimonios, #faq {
      margin: 0 auto;
  }

  .contenido-nosotros {
    flex-direction: column;
    text-align: center;
  }

  .contenido-nosotros > div {
    flex: 1 1 100%;
  }

  .servicios-grid {
    grid-template-columns: 1fr;
  }

  .contacto-contenido {
    flex-direction: column;
    align-items: center;
  }

  .contacto-contenido img {
    max-width: 100%;
  }

  .back-to-top {
    display: none;
  }
}