/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

html { scroll-padding-top: 160px; }

h1, h2, h3 {
    margin: 0 0 1rem;
    font-weight: bold;
}

section { padding: 60px 20px; text-align: center; }

/* Cabecera Fija */
.header {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000; background-color: #fff;
    padding: 20px 30px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: nowrap; box-sizing: border-box;
}

.logo img { height: 120px; flex-shrink: 0; }

.nav-menu { display: flex; list-style: none; flex-wrap: wrap; flex-shrink: 1; min-width: 0; }

.nav-menu a { text-decoration: none; color: #333; margin: 0 15px; font-weight: bold; }

.contact-number {
    text-decoration: none; color: #000; font-size: 1.1rem; font-weight: bold;
    margin-left: 20px; white-space: nowrap; flex-shrink: 0; min-width: fit-content;
    padding: 8px 12px; background-color: #f8f9fa; border: 2px solid #007bff; border-radius: 5px;
    transition: all 0.3s ease;
}
.contact-number:hover { background-color: #007bff; color: #fff; }

.hamburger-menu { display: none; font-size: 2rem; cursor: pointer; background: none; border: none; }

/* Hero / Video */
.hero-section {
    position: relative; height: 100vh; display: flex; justify-content: center; align-items: center;
    color: #fff; text-align: center; overflow: hidden; margin-top: 160px; background-color: #333;
    background-image: url('recursos/img/portafolio/Bandas-Transportadoras-BTYS-9.webp');
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.background-video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; overflow: hidden; /* antes -1 (ocultaba) */
}
.background-video video {
    width: 100%; height: 100%; object-fit: cover;
    background-image: url('recursos/img/portafolio/Bandas-Transportadoras-BTYS-9.webp');
    background-size: cover; background-position: center;
}
.video-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.3); z-index: 1;
}
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { font-size: 3.5rem; font-weight: bold; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero-content p  { font-size: 1.5rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }

/* Soluciones */
.solution-section { background-color: #f4f4f4; }
.solution-grid {
    display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 40px;
}
.solution-block {
    flex-basis: 300px; padding: 20px; background: #fff; border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); text-align: left;
}
.solution-block img { max-width: 100%; height: auto; margin-top: 15px; border-radius: 5px; }

/* Parallax */
.parallax-section {
    background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover;
    height: 400px; display: flex; justify-content: center; align-items: center; text-align: center; color: #fff;
    position: relative; padding: 20px;
}
.content-overlay { background: rgba(0,0,0,0.4); padding: 20px; }

.cta-button {
    display: inline-block; padding: 10px 20px; background-color: #007bff; color: #fff;
    text-decoration: none; border-radius: 5px; margin-top: 20px; font-weight: bold;
}

/* Industrias */
.industries-section { background-color: #fff; }
.industry-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; margin-top: 40px;
}
.industry-card {
    background: #f9f9f9; padding: 20px; border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); text-align: left;
}
.industry-card img { max-width: 100%; height: auto; border-radius: 5px; }

/* Clientes */
.client-section { background-color: #f4f4f4; padding: 60px 20px; }
.client-logos-slider {
    display: flex; gap: 40px; align-items: center; overflow: hidden; padding: 20px 0;
    white-space: nowrap; position: relative;
}
.client-logos-slider img {
    height: 80px; filter: grayscale(100%); transition: filter 0.3s ease;
    animation: slide 15s linear infinite; flex-shrink: 0;
}
.client-logos-slider:hover img { filter: grayscale(0%); animation-play-state: paused; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* Impacto */
.impact-section { background-color: #333; padding: 80px 20px; color: #fff; }
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px; margin-top: 40px;
}
.stat-item { text-align: center; }
.stat-number { font-size: 3rem; font-weight: bold; color: #007bff; display: block; }

/* Info */
.info-section {
    background-color: #f4f4f4; display: flex; justify-content: center; gap: 30px;
    flex-wrap: wrap; text-align: left;
}
.info-block { flex-basis: 45%; max-width: 500px; }

/* Contacto */
.contact-section { background-color: #fff; }
.contact-details { margin-bottom: 20px; }
.contact-form {
    display: flex; flex-direction: column; max-width: 500px; margin: 20px auto; gap: 15px;
}
.contact-form input, .contact-form textarea {
    padding: 12px; border: 1px solid #ccc; border-radius: 5px;
}
.contact-form button {
    padding: 12px; background-color: #007bff; color: #fff; border: none;
    border-radius: 5px; cursor: pointer; font-weight: bold;
}

/* WhatsApp flotante */
.whatsapp-button {
    position: fixed; bottom: 20px; left: 20px; z-index: 1000;
    animation-duration: 0.5s; animation-timing-function: ease-in-out; animation-iteration-count: infinite;
}
.whatsapp-button img {
    width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    25% { transform: translate(-1px, -2px) rotate(-1deg); }
    50% { transform: translate(-3px, 0) rotate(1deg); }
    75% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -1px) rotate(-1deg); }
}

/* Footer */
.site-footer { background-color: #333; color: #fff; padding: 20px 0; text-align: center; }
.footer-contact { margin-top: 10px; }

/* --- Media Queries --- */
@media (max-width: 768px) {
    .header { padding: 10px 15px; min-height: auto; height: auto; flex-wrap: wrap; }
    .logo { order: 1; flex: 0 0 auto; }
    .logo img { height: 60px; }
    .contact-number {
        order: 2; font-size: 0.9rem; margin-left: 10px; margin-bottom: 0; flex: 0 0 auto;
        white-space: nowrap; min-width: fit-content; max-width: none; padding: 6px 10px;
    }
    .hamburger-menu { order: 3; display: block; margin-left: 10px; }
    .nav-menu {
        order: 4; display: none; flex-direction: column; width: 100%; background-color: #fff;
        padding-top: 10px; position: absolute; top: 100%; left: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .nav-menu.active { display: flex; }
    .nav-menu a { padding: 10px 0; text-align: center; }

    .hero-section { margin-top: 80px; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p  { font-size: 1rem; }

    .solution-grid, .industry-grid, .info-section, .stats-grid { flex-direction: column; gap: 30px; }
    .solution-block, .info-block { flex-basis: 100%; max-width: 100%; }

    .parallax-section { background-attachment: scroll; }
}

@media (max-width: 480px) {
    .contact-number { font-size: 0.9rem; padding: 5px; }
    .header { padding: 10px; }
    .logo img { height: 70px; }

    /* Impacto m贸vil centrado */
    .stats-grid {
        display: flex; flex-direction: column; align-items: center; gap: 16px;
        padding: 0 16px; box-sizing: border-box;
    }
    .stat-item {
        width: 100%; max-width: 320px; margin: 0 auto; text-align: center;
    }
}


/* ---- FIX solo móvil para #impacto (sección Impacto y Presencia Nacional) ---- */
@media (max-width: 768px) {
  /* que la sección crezca según el contenido y no se recorte */
  #impacto.parallax-section {
    height: auto;           /* en escritorio está en 400px; aquí lo quitamos */
    min-height: 560px;      /* altura mínima cómoda; puedes bajar a 520 si quieres */
    padding-top: 72px;      /* aire arriba */
    padding-bottom: 72px;   /* aire abajo */
    background-attachment: scroll; /* en móvil evita glitches y saltos */
    box-sizing: border-box;
  }

  /* que el overlay no “aplasté” el contenido y respete márgenes internos */
  #impacto .content-overlay {
    padding: 24px 16px;
    max-width: 1200px;
    margin: 0 auto;
  }

  /* grilla y tarjetas centradas y sin desbordes laterales */
  #impacto .stats-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    box-sizing: border-box;
  }

  #impacto .stat-item {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
  }
}

/* reforzamos en pantallas muy pequeñas */
@media (max-width: 480px) {
  #impacto.parallax-section {
    min-height: unset;      /* deja que fluya con su contenido */
    padding-top: 64px;
    padding-bottom: 64px;
  }
}
