/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  color: #666;
  background-color: #fff;
  line-height: 1.7em;
  font-weight: 500;
}

.container {
  width: 85%;
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  color: #333;
  font-weight: 600;
}

a {
  text-decoration: none;
  transition: color 0.3s ease;
}

/* ========== HEADER ========== */
.topbar {
  background-color: #1e3a6e;
  color: #fff;
  padding: 10px 0;
  font-size: 14px;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar a {
  color: #fff;
}

.topbar .icon {
  margin-right: 8px;
}

.main-header {
  background-color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
  padding: 15px 0;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo img {
  max-height: 70px;
  width: auto;
}

/* ========== MENÚ SUPERIOR ========== */
.main-nav ul {
  display: flex;
  align-items: center;      /* centra verticalmente ítems de 1 y 2 líneas */
  justify-content: flex-end;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  display: flex;
  align-items: center;      /* centra el <a> dentro del <li> */
  height: 100%;
}

.main-nav a {
  display: block;
  max-width: 130px;         /* fuerza el salto de línea en textos largos */
  text-align: center;
  line-height: 1.2;
  color: #1e3a6e;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-nav a.active,
.main-nav a:hover,
.main-nav a:focus,
.main-nav a:active {
  color: #f49f20;
  text-decoration: none;
}




/* ========== DESCRIPCIÓN ========== */
.description-section {
  padding: 50px 0;
  background: #f9f9f9;
}

.description-box {
  background-color: #1e3a6e;
  color: #fff;
  padding: 40px;
  border-radius: 8px;
  text-align: justify;
  font-size: 16px;
  line-height: 1.8;
}

/* ========== PRODUCTOS (HOME) ========== */
.products-section {
  padding: 60px 0;
  background: #f9f9f9;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  transition: opacity 0.15s ease;
}

.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.product-image {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: pointer;
}

.product-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-image .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 58, 110, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.product-image .overlay h2 {
  color: #fff;
  font-size: 28px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  text-align: center;
  padding: 20px;
  margin: 0;
}

/* ========== BOTONES ========== */
.btn {
  display: inline-block;
  background-color: #1e3a6e;
  color: #fff;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  margin: 20px 0 25px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  align-self: center;
}

.btn:hover {
  background-color: #f49f20;
  color: #1e3a6e;
  transform: translateY(-3px);
}

.btn-large {
  padding: 15px 40px;
  font-size: 18px;
}

/* ========== CTA ========== */
.cta-section {
  background: linear-gradient(135deg, #1e3a6e 0%, #0f2a4f 100%);
  padding: 70px 0;
  text-align: center;
}

.cta-section h2 {
  color: #fff;
  font-size: 32px;
  margin-bottom: 30px;
}

/* ========== FOOTER ========== */
footer {
  background-color: #0a1a30;
  color: #fff;
  padding: 50px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.footer-menu h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 20px;
  border-left: 4px solid #f49f20;
  padding-left: 15px;
}

.footer-menu ul {
  list-style: none;
}

.footer-menu li {
  margin-bottom: 12px;
}

.footer-menu a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-menu a:hover,
.footer-menu a:focus,
.footer-menu a:active {
  color: #f49f20;
  padding-left: 5px;
  text-decoration: none;
}

.footer-logo {
  text-align: center;
}

.footer-logo img {
  max-width: 200px;
  margin-bottom: 20px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.social-icons a {
  background: #f49f20;
  color: #1e3a6e;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: 0.3s;
}

.social-icons a:hover {
  background: #fff;
  transform: translateY(-5px);
}

/* ========== PÁGINA NOSOTROS ========== */
.about-section {
  padding: 60px 0;
  background: #fff;
}

.about-description {
  max-width: 900px;
  margin: 0 auto 40px auto;
  text-align: center;
}

.about-description p {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  text-align: justify;
}

.about-video-container {
  max-width: 800px;
  margin: 0 auto;
}

.about-video {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-video video {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.mission-vision-section {
  padding: 60px 0;
  background: #f9f9f9;
}

.mission-vision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.mv-card {
  background: #fff;
  padding: 35px 30px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s;
  border-bottom: 4px solid #f49f20;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.mv-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.mv-card h3 {
  font-size: 28px;
  color: #1e3a6e;
  margin-bottom: 20px;
  font-weight: 700;
}

.mv-card p {
  color: #555;
  line-height: 1.7;
  font-size: 15px;
}

.values-section {
  padding: 60px 0;
  background: #fff;
}

.section-title {
  text-align: center;
  font-size: 36px;
  color: #1e3a6e;
  margin-bottom: 50px;
  position: relative;
  font-weight: 700;
}

.section-title:after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: #f49f20;
  margin: 15px auto 0;
  border-radius: 2px;
}

.values-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.value-card {
  background: #f9f9f9;
  padding: 30px 25px;
  border-radius: 16px;
  text-align: center;
  width: 200px;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.value-icon {
  width: 70px;
  height: 70px;
  background: #1e3a6e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.value-icon i {
  font-size: 32px;
  color: #f49f20;
}

.value-card h4 {
  font-size: 18px;
  color: #1e3a6e;
  font-weight: 700;
  margin-bottom: 12px;
}

.value-card p {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* ========== PÁGINA MATERIAS PRIMAS ========== */
.video-banner-section {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.video-banner {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-banner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.video-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 80%;
  z-index: 2;
}

.video-content h1 {
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 20px;
}

.products-grid-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  transition: opacity 0.15s ease;
}

/* ========== PÁGINA DISTRIBUIDORA VETERINARIA ========== */
.veterinary-banner {
  position: relative;
  width: 100%;
  height: 400px;
  background-image: url('../img/distribuidora-veterinaria-min.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  z-index: 2;
}

.banner-content h1 {
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.veterinary-description {
  padding: 60px 0;
  background: #f9f9f9;
}

.desc-video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.desc-text p {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  text-align: justify;
}

.desc-video video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.veterinary-products {
  padding: 60px 0;
  background: #fff;
}

/* ========== MODAL ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 5% auto;
  width: 80%;
  max-width: 1000px;
  border-radius: 16px;
  overflow: hidden;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.modal-close:hover {
  background: #f49f20;
  color: #1e3a6e;
}

.modal-body {
  display: flex;
  flex-wrap: wrap;
}

.modal-image {
  flex: 1;
  min-width: 250px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.modal-image img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

.modal-text {
  flex: 1;
  padding: 40px;
  background: #fff;
}

.modal-text h2 {
  color: #1e3a6e;
  font-size: 32px;
  margin-bottom: 20px;
  font-weight: 700;
  border-left: 5px solid #f49f20;
  padding-left: 20px;
}

.modal-text p {
  color: #444;
  line-height: 1.8;
  font-size: 16px;
  text-align: justify;
}

/* ========== PAGINACIÓN ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.pagination a,
.pagination .current {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: 0.3s;
  text-decoration: none;
  cursor: pointer;
}

.pagination .current {
  background: #1e3a6e;
  color: #fff;
}

.pagination a {
  background: #f0f0f0;
  color: #1e3a6e;
}

.pagination a:hover {
  background: #f49f20;
  color: #1e3a6e;
}

.pagination .page-dots {
  display: inline-block;
  padding: 8px 4px;
  color: #666;
}

/* ========== CONTACTO ========== */
.hero-contact {
  background-image: url('../img/contactanos.png');
  background-size: cover;
  background-position: center;
  padding: 20.5% 0 5%;
  text-align: center;
}

.contact-section {
  background-color: rgba(30,58,110,0.24);
  padding: 40px 0 19px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  padding: 20px;
}

.contact-form {
  flex: 1;
  min-width: 280px;
}

.contact-info {
  flex: 1;
  min-width: 280px;
}

.et_pb_contact_form input,
.et_pb_contact_form textarea {
  background: #eee;
  width: 100%;
  border: none;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 20px;
  font-family: inherit;
}

.et_pb_contact_form .half {
  display: flex;
  gap: 20px;
}

.et_pb_contact_form .half > div {
  flex: 1;
}

.captcha-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.et_pb_contact_right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.et_pb_contact_right input {
  width: 80px;
  text-align: center;
  margin: 0;
}

.et_pb_contact_submit {
  background: #F49F20;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 30px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.et_pb_contact_submit:hover {
  background: #1E3A6E;
}

.blurb {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.blurb img {
  width: 64px;
}

.blurb h3 {
  color: #1E3A6E;
  font-size: 18px;
}

.map-section {
  text-align: center;
  padding: 40px 0;
}

.map-section h2 {
  margin-bottom: 20px;
}

/* ========== EXTRAS ========== */
html {
  scroll-behavior: smooth;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .products-grid-masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container { width: 90%; }

  .main-header .container {
    flex-direction: column;
    gap: 15px;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .main-nav a {
    max-width: none;      /* en móvil no forzamos ancho, se ajusta natural */
  }

  .products-grid {
    gap: 30px;
  }

  .product-card {
    max-width: 100%;
  }

  .product-image .overlay h2 {
    font-size: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-menu h3 {
    border-left: none;
    text-align: center;
  }


  /* Nosotros */
  .mission-vision-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    gap: 20px;
  }

  .value-card {
    width: calc(50% - 20px);
    min-width: 160px;
  }

  .section-title {
    font-size: 28px;
  }

  .mv-card h3 {
    font-size: 24px;
  }

  /* Materias Primas */
  .video-banner-section {
    height: 350px;
  }

  .video-content h1 {
    font-size: 28px;
  }

  .products-grid-masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Distribuidora Veterinaria */
  .veterinary-banner {
    height: 250px;
    background-attachment: scroll;
  }

  .banner-content h1 {
    font-size: 32px;
  }

  .desc-video-grid {
    grid-template-columns: 1fr;
  }

  /* Modal */
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .modal-body {
    flex-direction: column;
  }

  .modal-text {
    padding: 25px;
  }

  .modal-text h2 {
    font-size: 24px;
  }

  .modal-image {
    padding: 20px;
  }

  .modal-image img {
    max-width: 200px;
  }

  /* Contacto */
  .contact-row {
    flex-direction: column;
  }

  .et_pb_contact_form .half {
    flex-direction: column;
    gap: 0;
  }

  .captcha-row {
    flex-direction: column;
    align-items: stretch;
  }

  .et_pb_contact_submit {
    width: 100%;
  }

  .hero-contact {
    padding: 40% 0 10%;
  }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .products-section {
    padding: 40px 0;
  }

  .product-image .overlay h2 {
    font-size: 20px;
  }

  .value-card {
    width: 100%;
  }

  .products-grid-masonry {
    grid-template-columns: 1fr;
  }

  .video-content h1 {
    font-size: 22px;
  }

  .modal-text p {
    font-size: 14px;
  }

}


/* ========== SLIDER ========== */
    /* Contenedor principal del slider */
    .slider-container {
      position: relative;
      max-width: 1921px;
      width: 100%;
      margin: 0 auto;
      overflow: hidden;
      border-radius: 8px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
      background: #000;
    }

    /* Contenedor de las imágenes alineadas */
    .slider-track {
      display: flex;
      transition: transform 0.5s ease-in-out;
      width: 300%; /* 100% por cada una de las 3 imágenes */
      will-change: transform;
    }

    /* Estilo para cada imagen */
    .slider-track img {
      width: 33.3333%; /* 1/3 del track = 100% del contenedor visible */
      height: auto;
      display: block;
      flex-shrink: 0;
      user-select: none;
      -webkit-user-drag: none;
    }

    /* Botones de navegación (Flechas) */
    .btn-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background-color: rgba(0, 0, 0, 0.5);
      color: white;
      border: none;
      padding: 12px 16px;
      cursor: pointer;
      font-size: 18px;
      border-radius: 50%;
      transition: background 0.3s;
      z-index: 10;
      line-height: 1;
    }

    .btn-nav:hover {
      background-color: rgba(0, 0, 0, 0.8);
    }

    .btn-prev {
      left: 10px;
    }

    .btn-next {
      right: 10px;
    }

    /* Indicadores de posición (Puntos) */
    .dots-container {
      text-align: center;
      padding: 15px 0;
    }

    .dot {
      display: inline-block;
      width: 12px;
      height: 12px;
      margin: 0 5px;
      background-color: #bbb;
      border-radius: 50%;
      cursor: pointer;
      transition: background 0.3s, transform 0.3s;
    }

    .dot:hover {
      transform: scale(1.2);
    }

    .dot.active {
      background-color: #333;
    }

    /* Responsive: en pantallas pequeñas las flechas se hacen más chicas */
    @media (max-width: 600px) {
      .btn-nav {
        padding: 8px 12px;
        font-size: 14px;
      }
    }

