/* =========================================================
   0. RESET Y UTILIDADES GENERALES
   ========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

section {
  padding: 5rem 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1f2937;
}

.section-gray {
  background: #f0f0f0;
}

.hidden {
  display: none;
}

/* -------- Animaciones generales -------- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pillarScaleFade {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoChainIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tickerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.animate-on-scroll {
  opacity: 0;
}

.animate-on-scroll.animate {
  animation: fadeInUp 0.9s ease forwards;
}

.animate-left {
  opacity: 0;
}

.animate-left.animate {
  animation: fadeInLeft 0.5s ease forwards;
}

/* Animaciones específicas */
.pillar-card.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px) scale(0.96);
}

.pillar-card.animate-on-scroll.animate {
  animation: pillarScaleFade 0.6s ease-out forwards;
}

.company-logo.animate-on-scroll {
  opacity: 0;
  transform: translateY(10px);
}

.company-logo.animate-on-scroll.animate {
  animation: logoChainIn 0.9s ease-out forwards;
}

/* Cadena de logos colaboradores (delays) */
.companies-grid .company-logo:nth-child(1).animate { animation-delay: 0s; }
.companies-grid .company-logo:nth-child(2).animate { animation-delay: 0.08s; }
.companies-grid .company-logo:nth-child(3).animate { animation-delay: 0.12s; }
.companies-grid .company-logo:nth-child(4).animate { animation-delay: 0.16s; }
.companies-grid .company-logo:nth-child(5).animate { animation-delay: 0.2s; }
.companies-grid .company-logo:nth-child(6).animate { animation-delay: 0.24s; }
.companies-grid .company-logo:nth-child(7).animate { animation-delay: 0.28s; }
.companies-grid .company-logo:nth-child(8).animate { animation-delay: 0.32s; }
.companies-grid .company-logo:nth-child(9).animate { animation-delay: 0.36s; }
.companies-grid .company-logo:nth-child(10).animate { animation-delay: 0.4s; }
.companies-grid .company-logo:nth-child(11).animate { animation-delay: 0.44s; }
.companies-grid .company-logo:nth-child(12).animate { animation-delay: 0.48s; }
.companies-grid .company-logo:nth-child(13).animate { animation-delay: 0.52s; }
.companies-grid .company-logo:nth-child(14).animate { animation-delay: 0.56s; }

/* Botones genéricos */

.btn-primary {
  background: white;
  color: #3fae29;
  padding: 1rem 2rem;
  border: 2px solid transparent;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
  animation: fadeInUp 1.4s ease;
}

.btn-primary:hover {
  background: #b9d92b;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.btn-toggle-about {
  margin-top: 1rem;
  background: none;
  border: none;
  color: #3fae29;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  display: none; /* solo se muestra en móvil */
}


/* Triángulo por defecto (Leer más = hacia abajo) */
.btn-toggle-about::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #3fae29; /* triángulo hacia abajo */
  transition: transform 0.2s ease;
}

/* Cuando está expandido: triángulo hacia arriba */
.btn-toggle-about.expanded::after {
  transform: translateY(-50%) rotate(180deg);
}
/* =========================================================
   1. ESTILOS GENERALES
   1.1 SECCIONES
   ========================================================= */

/* ---------------------------------------------------------
   1.1.1 BANNER SUPERIOR (OFICINAS)
   --------------------------------------------------------- */

.top-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #e5e7eb;
  border-bottom: 1px solid #d1d5db;
  font-size: 0.7rem;
  color: #111827;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticker {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0.35rem 0;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: tickerScroll linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ticker-phone-block {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.ticker-icon {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  filter: grayscale(1) brightness(0.5);
}

.ticker-dash {
  opacity: 0.7;
  margin-right: 0.2rem;
  margin-left: 0.2rem;
}

.ticker-separator {
  opacity: 0.4;
  margin: 0 1.5rem;
}

/* ---------------------------------------------------------
   1.1.2 HEADER
   --------------------------------------------------------- */

header {
  background: white;
  box-shadow: none;
  border-bottom: none;
  position: sticky;
  top: 30px;
  z-index: 40;
}

header.header-border {
  border-bottom: 3px solid #3fae29;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 35px;
}

.btn-access {
  background: #3fae29;
  color: white;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Hover común de botones principales */
.btn-access:hover,
.btn-submit:hover {
  background: #b9d92b;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.15);
  color: #000;
}

/* ---------------------------------------------------------
   1.1.3 HERO
   --------------------------------------------------------- */

.hero {
  position: relative;
  height: 800px;
  display: flex;
  align-items: center;
  color: white;
  z-index: 1;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(63, 174, 41, 0.8)),
    url("images/portada/hero-banner.jpg") center/cover;
  filter: blur(3px);
  z-index: 0;
  overflow: hidden;
}

.hero > * {
  z-index: 2;
}

.hero::after {
  content: none !important;
  background: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
}

.hero h1 {
  font-size: 4.5rem;
  line-height: 1.2;
  animation: fadeInUp 1s ease;
  text-shadow: 2px 2px 5px #5b5b5b;
}

.hero-subtitle {
  text-shadow: 1px 1px 5px #5b5b5b;
}

.hero p {
  font-size: 1.7rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1.2s ease;
}

/* ---------------------------------------------------------
   1.1.4 QUIÉNES SOMOS
   --------------------------------------------------------- */

.about-text {
  max-width: 1200px;
  margin: 0 auto;
  color: #4b5563;
  column-count: 2;
  column-gap: 4rem;
}

.about-text p {
  margin-bottom: 1rem;
}

/* ---------------------------------------------------------
   1.1.5 SERVICIOS
   --------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.service-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  display: flex;
}

.service-inner {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-image {
  width: 100%;
  height: 150px;
  background-size: cover;
  background-position: center;
}

.service-content {
  padding: 1.5rem;
  flex: 1;
}

.service-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.service-content p {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   1.1.6 CÓMO TRABAJAMOS
   --------------------------------------------------------- */

.work-process {
  max-width: 800px;
}

.process-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.check-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Fondo con imagen + gradiente */
.section-work {
  position: relative;
  color: #ffffff;
  overflow: hidden;
}

.section-work::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/comoTrabajamos1.png") center/cover no-repeat;
  opacity: 0.8;
  filter: blur(2px);
  z-index: 0;
}

.section-work::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(12, 12, 12, 0.7) -10%,
    rgba(240, 240, 240, 0.9) 25%,
    rgba(240, 240, 240, 0) 100%
  );
  z-index: 1;
}

.section-work .container {
  position: relative;
  z-index: 2;
}

.section-work .process-item p {
  color: #000;
}

/* ---------------------------------------------------------
   1.1.7 NUESTROS PILARES
   --------------------------------------------------------- */

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pillar-card {
  background: rgba(63, 174, 41, 0.1);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  text-justify: inter-word;
}

.pillar-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
}

.pillar-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

.pillar-card p {
  color: #4b5563;
  font-size: 0.95rem;
}

/* ---------------------------------------------------------
   1.1.8 DATOS (ESTADÍSTICAS)
   --------------------------------------------------------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  text-align: center;
  text-justify: inter-word;
}

.stat-item {
  padding: 1.5rem 0.75rem;
}

.stat-item.counted {
  pointer-events: none;
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #6b7280;
  font-size: 0.95rem;
}

/* ---------------------------------------------------------
   1.1.9 EMPRESAS COLABORADORAS
   --------------------------------------------------------- */

.companies-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  align-items: center;
}

.company-logo {
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.company-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.4;
}

/* ---------------------------------------------------------
   1.1.10 CONTACTO
   --------------------------------------------------------- */

/* Fondo y capas */
#contacto {
  position: relative;
  overflow: hidden;
  color: white;
  height: 850px;
}

#contacto::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/portada/2c.png") center/cover no-repeat;
  z-index: 0;
}

#contacto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(63, 174, 41, 0.8));
  z-index: 1;
}

#contacto .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

#contacto h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Wrapper formulario contacto (base centrado; desplazamiento en responsive desktop) */
#contacto .form-wrapper {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

/* Formulario: tabs superiores */
.contact-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
  gap: 0;
}

.tab-button {
  flex: 1;
  max-width: 450px;
  padding: 1.25rem 3rem;
  border: none;
  background: #e5e7eb;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: relative;
  top: 2px;
  border-bottom: 3px solid #d1d5db;
  border: 2px solid #d1d5db;
}

.tab-button:first-child {
  border-right: 1px solid #d1d5db;
  border-top-left-radius: 8px;
}

.tab-button:last-child {
  border-top-right-radius: 8px;
}

.tab-button.active {
  background: white;
  color: #1f2937;
  z-index: 1;
  border-bottom: 3px solid #3fae29;
}

/* Contenedor general de formulario */
.form-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.form-container {
  background: white;
  padding: 3rem;
  border-radius: 8px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border: 2px solid #d1d5db;
}

/* Sub-tabs: proveedor / trabajador */
.sub-tabs {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}

.sub-tabs-question {
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
}

.sub-tabs-buttons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  white-space: nowrap;
}

/* Radio buttons personalizados */
.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  color: #1f2937;
}

.radio-option input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-option span {
  transition: all 0.25s;
}

.radio-option.selected span {
  font-weight: 600;
}

/* Grid campos formulario */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Labels flotantes */
.form-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.3s;
  background: white;
  padding: 0 4px;
}

.form-group.has-file label,
.form-group.has-textarea label {
  top: 20px;
  transform: none;
}

.form-group.focused label,
.form-group.filled label {
  top: -8px;
  font-size: 0.85rem;
  color: #3fae29;
}

/* Estado archivo (CV) siempre activo visualmente */
.form-group.file-ready label,
.form-group.file-static label {
  top: -8px;
  font-size: 0.85rem;
  color: #9ca3af;
}

.form-group.file-static input {
  background: white;
}

/* Estados de error */
.form-group.error label {
  color: #ef4444;
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s;
  background: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  opacity: 0;
  transition: opacity 0.3s;
}

.form-group.focused input::placeholder,
.form-group.focused textarea::placeholder {
  opacity: 1;
  color: #9ca3af;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3fae29;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #ef4444;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.error-message {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.error .error-message {
  display: block;
}

.form-full {
  grid-column: 1 / -1;
}

/* Caso específico: "Trabajador" -> CV ancho completo */
#form-trabajador .form-group {
  width: 100%;
}

#form-trabajador input[type="file"] {
  width: 100%;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  padding: 0.85rem;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Botón envío formulario */
.btn-submit {
  width: 100%;
  background: #3fae29;
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

/* Mensaje de éxito */
.success-message {
  display: none;
  text-align: center;
  padding: 5rem 3rem;
  background: #fff;
  border-radius: 8px;
  margin-top: 1rem;
  border: 2px solid #d1d5db;
}

.success-message img {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
}

.success-message h3 {
  color: #3fae29;
  font-size: 1.5rem;
}

.success-sub {
  margin-top: 1rem;
  font-size: 1rem;
  color: #333;
}

/* Modo éxito a pantalla completa (oculta tabs y formularios) */
.form-wrapper.success-mode {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.form-wrapper.success-mode .contact-tabs {
  display: none !important;
}

.form-wrapper.success-mode .form-container {
  display: none !important;
}

/* ---------------------------------------------------------
   1.1.11 MAPA
   --------------------------------------------------------- */

.map-section {
  padding: 0;
  margin: 0;
}

#map {
  width: 100%;
  height: 500px;
}

/* Reseteo estilos Leaflet popup */
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  max-width: none !important;
}

.leaflet-popup-tip {
  display: none;
}

.leaflet-popup-content {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
}

/* Tarjeta popup */
.map-popup {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 20px;
  min-width: 430px;
  max-width: none;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.map-popup-container {
  position: relative;
  display: inline-block;
}

/* Pico del popup */
.map-popup-container::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 10px solid #ffffff;
  filter: none !important;
  box-shadow: none !important;
}

.map-popup-text {
  display: flex;
  flex-direction: column;
}

.map-popup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.map-popup-logo {
  width: 20px;
  height: 20px;
  margin-bottom: 10px;
}

.map-popup-brand {
  font-size: 0.9rem;
  font-weight: 600;
  color: #3fae29;
  margin-bottom: 10px;
}

.map-popup-brand span {
  color: #111827;
}

.map-popup-title {
  white-space: nowrap;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.map-popup-address {
  display: flex;
  align-items: center;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.2;
}

/* Acciones popup (botones cómo llegar / llamar) */
.map-popup-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 25px 0 0 0;
}

.map-popup-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #3fae29;
  font-size: 0.78rem;
  transition: 0.25s ease;
  white-space: nowrap;
}

.map-popup-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3fae29;
  transition: 0.25s;
}

.map-popup-icon img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.map-popup-action:hover .map-popup-icon {
  background: #a2a2a2;
}

.map-popup-action:hover {
  color: #000;
}

/* Botón cerrar popup Leaflet */
.leaflet-container a.leaflet-popup-close-button {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 3;
  color: #9ca3af;
  font-size: 18px;
  padding: 10;
  width: 34px;
  height: 34px;
  line-height: 24px;
  text-align: center;
}

/* ---------------------------------------------------------
   1.1.12 FOOTER
   --------------------------------------------------------- */

footer {
  background: #1f2937;
  color: white;
  padding: 3rem 4rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.footer-block {
  width: max-content;
  margin: 0 auto;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: flex-start;
  justify-content: center;
}

.footer-office {
  flex: 0 0 auto;
}

.footer-office h3 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  white-space: nowrap;
}

.footer-office p {
  color: #d1d5db;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Separador horizontal footer */
.footer-divider {
  border: none;
  border-top: 1px solid #374151;
  margin: 1.5rem 0;
}

/* Parte inferior */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.footer-certificates {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-certificate-logo {
  height: 40px;
  object-fit: contain;
}

.footer-divider-vertical {
  width: 1px;
  height: 80px;
  background: #374151;
}

.footer-copyright {
  display: flex;
  align-items: center;
}

.footer-copyright p {
  color: #d1d5db;
  font-size: 0.9rem;
}

/* =========================================================
   2. ESTILOS RESPONSIVE
   ========================================================= */

/* ---------------------------------------------------------
   2.1.1 BANNER (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  .ticker {
    padding: 0.35rem 2rem;
  }
}

/* ---------------------------------------------------------
   2.1.2 HEADER (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  .header-container {
    padding: 1rem 2rem;
  }

  .logo img {
    height: 28px;
  }

  .btn-access {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* ---------------------------------------------------------
   2.1.3 HERO (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  .hero {
    height: 600px;
  }

  .hero-content {
    padding: 0 2rem;
  }

  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    max-width: 100%;
  }

  .hero p {
    font-size: 1.2rem;
  }
}

/* ---------------------------------------------------------
   2.1.4 QUIÉNES SOMOS (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 1024px) {
  .about-text {
    column-count: 1;
  }
}

@media (max-width: 768px) {
  .btn-toggle-about {
    display: inline-block;
  }


}

/* ---------------------------------------------------------
   2.1.5 SERVICIOS (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ---------------------------------------------------------
   2.1.6 CÓMO TRABAJAMOS (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  /* Sin imagen, solo fondo gris claro */
  .section-work::after {
    display: none;
  }

  .section-work::before {
    background: linear-gradient(
      to right,
      rgba(243, 244, 246, 1) 0%,
      rgba(243, 244, 246, 1) 100%
    );
  }

  .section-work {
    color: #1f2937;
  }
}

/* ---------------------------------------------------------
   2.1.7 NUESTROS PILARES (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ---------------------------------------------------------
   2.1.8 DATOS (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .stat-item {
    padding: 1.25rem 0.5rem;
  }
}

/* ---------------------------------------------------------
   2.1.9 EMPRESAS (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  .companies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* ---------------------------------------------------------
   2.1.10 CONTACTO (RESPONSIVE)
   --------------------------------------------------------- */

/* Desktop: desplazar formulario a la derecha */
@media (min-width: 1024px) {
  #contacto .form-wrapper {
    max-width: 820px;
    width: 100%;
    margin-left: auto;
    margin-right: 0;
    transform: translateX(80px); /* Ajustable: entre 40 y 120px */
  }
}

@media (max-width: 768px) {
  /* Ajustar altura sección */
  #contacto {
    height: auto !important;
    padding-bottom: 3rem;
  }

  /* Formulario centrado en móvil */
  #contacto .form-wrapper {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    transform: none;
    padding: 0 1rem;
  }

  /* Tabs lado a lado */
  .contact-tabs {
    display: flex;
    flex-direction: row;
    width: 100%;
  }

  .tab-button {
    flex: 1;
    width: 50%;
    padding: 1rem 1rem;
    border-radius: 8px 8px 0 0 !important;
    text-align: center;
  }

  .tab-button:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 0;
  }

  .tab-button:last-child {
    border-top-right-radius: 8px;
    border-top-left-radius: 0;
  }

  /* Sub-tabs apiladas */
  .sub-tabs {
    flex-direction: column;
    align-items: flex-start;
  }

  .sub-tabs-buttons {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* Formulario */
  .form-container {
    padding: 2rem;
    border-radius: 0 0 8px 8px;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    width: 100%;
  }

  .form-group {
    width: 100%;
  }

  .success-message {
    padding: 3rem 2rem;
    border-radius: 0 0 8px 8px;
  }
}

/* ---------------------------------------------------------
   2.1.11 MAPA (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  #map {
    height: 400px;
  }

  .map-popup {
    min-width: 290px;
    width: 330px;
    max-width: 90vw;
    padding: 16px 18px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .map-popup-text {
    margin-bottom: 4px;
  }

  .map-popup-actions {
    padding: 10px 0 0 0;
    justify-content: center;
    gap: 16px;
  }
}

/* ---------------------------------------------------------
   2.1.12 FOOTER (RESPONSIVE)
   --------------------------------------------------------- */

@media (max-width: 768px) {
  footer {
    padding: 2rem;
  }

  .footer-block {
    width: 100%;
  }

  .footer-grid {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-certificates {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .footer-divider-vertical {
    display: none;
  }

  .footer-copyright {
    text-align: center;
    justify-content: center;
  }
}
