/* ============================================
   CODORCOL - Estilos Globales
   Distribución B2B de Codorniz
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-width: 360px;
  overflow-x: hidden;
  background-color: #f5eee5;
  color: #2c3e35;
}

/* --- Hero Background --- */
.hero-bg {
  background-image:
    linear-gradient(135deg, rgba(6, 77, 67, 0.92), rgba(6, 77, 67, 0.78)),
    url('../assets/images/huevos-bonitos-vertical.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .hero-bg {
    background-attachment: scroll;
  }
}

/* --- Títulos con subrayado de marca --- */
.title-underline {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.title-underline::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: #c49c6d;
  border-radius: 2px;
}

.title-underline-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* --- Bordes suaves B2B (forma huevo/óvalo del branding) --- */
.rounded-b2b {
  border-radius: 16px;
}

/* --- Animaciones de entrada (Intersection Observer) --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* --- Counter animado --- */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* --- Testimonial Carousel --- */
.testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(196, 156, 109, 0.3);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  padding: 0;
}

.testimonial-dot.active {
  background-color: #c49c6d;
  transform: scale(1.3);
}

/* --- Timeline de Proceso B2B --- */
.process-line {
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  height: 2px;
  background: linear-gradient(90deg, #c49c6d, #064d43, #c49c6d);
  z-index: 0;
}

@media (max-width: 768px) {
  .process-line {
    display: none;
  }
}

/* --- FAQ Accordion --- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.3s ease;
}

.faq-answer.open {
  max-height: 500px;
}

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-chevron.rotated {
  transform: rotate(180deg);
}

/* --- Formulario de contacto --- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e5dcd0;
  border-radius: 8px;
  background-color: #fff;
  color: #2c3e35;
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #064d43;
  box-shadow: 0 0 0 3px rgba(6, 77, 67, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3e35' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* --- WhatsApp Floating Button --- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
}

.whatsapp-float .ping-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #25D366;
  opacity: 0.75;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: -1;
}

@keyframes ping {
  75%, 100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* --- Mapa de Cobertura (sección logística) --- */
.coverage-badge {
  position: relative;
  padding-left: 1.5rem;
}

.coverage-badge::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #c49c6d;
}

/* --- Smooth scroll for all browsers --- */
html {
  scroll-behavior: smooth;
}

/* --- Mejora de accesibilidad --- */
:focus-visible {
  outline: 2px solid #c49c6d;
  outline-offset: 2px;
}

/* --- Skip to content link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: #064d43;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 0 0 8px 8px;
  z-index: 100;
  font-weight: bold;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* --- Print Styles --- */
@media print {
  nav, .whatsapp-float, .fa-brands {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}
