/* =====================================================
   Maquinaria del Humaya — clon estructural
   Tokens extraídos del sitio original vía inspección DOM:
   - Fuente:        Roboto, sans-serif
   - Verde JD:       rgb(54,124,43) / #377C2B
   - Texto:          rgb(51,51,51)  / #333
   - Fondo body:     rgb(240,240,240) / #F0F0F0
   - Container:      1170px  (col-sm-9: 878px / col-sm-3: 282px)
   ===================================================== */

:root{
  --jd-green: #377C2B;
  --jd-yellow: #FFDE00;
  --text: #333333;
  --bg: #F0F0F0;
  --font: 'Roboto', sans-serif;
}

*{ box-sizing: border-box; }

body{
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  margin: 0;
}

.page-wrapper{
  max-width: 1170px;
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
}

a{ color: var(--jd-green); text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{ max-width: 1170px; margin: 0 auto; padding: 0 15px; }

h2{
  font-family: var(--font);
  font-size: 30px;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 20px;
}

/* ================= HEADER ================= */
.region-header{
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}
.header-inner{ padding: 0; }
.navbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  margin: 0;
}
.site-logo-text{
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
}
.site-logo-text:hover{ text-decoration: none; color: var(--jd-green); }

.navbar-nav{
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 28px;
}
.navbar-nav > li{ position: relative; }
.navbar-nav > li > a{
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding: 20px 0;
  display: inline-block;
}
.navbar-nav > li > a:hover{ color: var(--jd-green); text-decoration: none; }
.navbar-nav .caret{ margin-left: 4px; }

.dropdown-menu{
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  min-width: 220px;
  padding: 8px 0;
  z-index: 50;
  list-style: none;
  margin: 0;
}
.dropdown.open .dropdown-menu,
.dropdown:hover .dropdown-menu{ display: block; }
.dropdown-menu li a{
  display: block;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text);
}
.dropdown-menu li a:hover{ background: #f5f5f5; color: var(--jd-green); text-decoration: none; }

.navbar-right{ display: flex; align-items: center; gap: 16px; }
.search-icon{ background: none; border: none; cursor: pointer; color: var(--text); padding: 6px; }
.search-icon:hover{ color: var(--jd-green); }
.header-divider{ width: 3px; height: 30px; background: linear-gradient(180deg, var(--jd-green) 50%, var(--jd-yellow) 50%); }
.jd-logo{ height: 47px; width: auto; display: block; }   /* tamaño real de deere_logo.png (190x47) */

.navbar-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 8px 10px;
  cursor: pointer;
}
.navbar-toggle span{ width: 20px; height: 2px; background: var(--text); display: block; }

/* ================= HERO CARRUSEL ================= */
.hero-carousel{
  position: relative;
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--jd-green);
}
.hero-slides{ position: relative; height: 478px; }
.hero-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease;
}
.hero-slide.active{ opacity: 1; visibility: visible; }
.hero-bg-img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-dots{
  position: absolute;
  bottom: 8px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 5;
}
.dot{
  width: 20px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.6);
  color: #333;
  font-size: 11px;
  cursor: pointer;
  border-radius: 2px;
}
.dot.active{ background: var(--jd-yellow); font-weight: 700; }
.dot-pause{
  width: 20px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.6);
  font-size: 9px; cursor: pointer; border-radius: 2px;
}

/* ================= MAIN CONTENT ================= */
.main-content{ padding: 30px 15px; }
.row{ display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col-sm-9{ width: 75%; padding: 0 15px; }
.col-sm-3{ width: 25%; padding: 0 15px; }

/* Promo cards (mismo grid y proporción que Destacadas, para simetría entre ambas secciones) */
.promo-cards{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}
.promo-card img{
  width: 100%;
  aspect-ratio: 252 / 280;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

/* Destacadas / news grid */
.news-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.news-card img{
  width: 100%;
  aspect-ratio: 252 / 180;
  object-fit: cover;
  display: block;
  margin-bottom: 12px;
  border-radius: 2px;
}
.news-card h3{
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}
.news-card h3 a{ color: var(--text); }
.news-card p{ font-size: 14px; color: #555; margin: 0 0 8px; }
.leer-mas{ font-size: 14px; font-weight: 700; color: var(--jd-green); }

.ver-mas-wrap{ text-align: center; margin-top: 10px; }
.btn-ver-mas{
  display: inline-block;
  border: 2px solid var(--jd-green);
  color: var(--jd-green);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 30px;
  border-radius: 0;
}
.btn-ver-mas:hover{ background: var(--jd-green); color: #fff; text-decoration: none; }

/* Sidebar */
.sidebar{ font-size: 14px; }
.sucursal-label{ display: block; margin-bottom: 6px; font-weight: 700; }
.sucursal-select{
  width: 100%;
  border: 2px solid var(--jd-green);
  color: var(--jd-green);
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 2px;
  margin-bottom: 16px;
  background: #fff;
}
.sucursal-info p{ margin: 0 0 10px; line-height: 1.5; }
.horarios-title{ font-weight: 700; margin-top: 16px !important; }
.enviar-email{ font-weight: 700; }
.map-wrap{ margin-top: 16px; border: 1px solid #ddd; }
.map-wrap iframe{ display: block; }

/* ================= FOOTER ================= */
.region-footer{
  background: #fff;
  border-top: 1px solid #e5e5e5;
  padding: 24px 0;
  margin-top: 20px;
  font-size: 13px;
}
.jd-trademark{ color: #777; margin: 0 0 20px; }
.footer-bottom-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
}
.footer-links{ display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a{ color: var(--jd-green); font-weight: 700; font-size: 14px; padding: 4px 0; }
.social-icons{ display: flex; gap: 14px; }
.social-icons a{ display: flex; }
.social-icons a:hover{ opacity: .75; }
.copyright{ color: #777; margin: 0; }

/* ================= WHATSAPP FLOTANTE ================= */
.whatsapp-float{
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  z-index: 100;
}
.whatsapp-float img{ width: 100%; height: 100%; display: block; }

/* =====================================================
   RESPONSIVE
   Breakpoints tipo Bootstrap 3: 768px (tablet), 480px (mobile)
   ===================================================== */

/* Tablet */
@media (max-width: 992px){
  .col-sm-9, .col-sm-3{ width: 100%; }
  .sidebar{ margin-top: 30px; }
}

/* Mobile: colapsa el menú a hamburguesa, como Bootstrap 3 navbar-collapse */
@media (max-width: 768px){
  .navbar{ flex-wrap: wrap; height: auto; padding: 12px 0; }
  .navbar-toggle{ display: flex; order: 2; }
  .navbar-right{ order: 3; }
  .navbar-nav{
    order: 4;
    flex-direction: column;
    width: 100%;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .navbar-nav.open{ max-height: 600px; margin-top: 12px; }
  .navbar-nav > li{ width: 100%; border-top: 1px solid #eee; }
  .navbar-nav > li > a{ display: block; padding: 12px 0; width: 100%; }
  .dropdown-menu{ position: static; box-shadow: none; border: none; padding-left: 12px; display: none; }
  .dropdown.open .dropdown-menu{ display: block; }
  .dropdown:hover .dropdown-menu{ display: none; } /* en mobile solo por click */
  .dropdown.open:hover .dropdown-menu{ display: block; }

  .hero-slides{ height: 260px; }

  .promo-cards{ grid-template-columns: repeat(2, 1fr); }

  .news-grid{ grid-template-columns: repeat(2, 1fr); }

  .footer-bottom-row{ flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px){
  .promo-cards{ grid-template-columns: 1fr; }
  .news-grid{ grid-template-columns: 1fr; }
  .hero-slides{ height: 200px; }
}

/* =====================================================
   PÁGINAS INTERNAS (subpáginas clonadas)
   ===================================================== */
.page-wrap{ padding-top: 30px; padding-bottom: 50px; }
.page-title{
  font-size: 30px;
  font-weight: 400;
  margin: 0 0 6px;
  color: var(--text);
}
.page-date{ color: #888; font-size: 13px; margin: 0 0 24px; }
.breadcrumb{ font-size: 12px; color: #888; margin-bottom: 14px; }
.breadcrumb a{ color: #888; }
.breadcrumb a:hover{ color: var(--jd-green); }

.page-article{ max-width: 900px; }
.page-article p{ line-height: 1.7; margin: 0 0 16px; font-size: 15px; color: #444; }
.page-article h2{ font-size: 22px; margin: 30px 0 12px; }
.page-article h3{ font-size: 17px; margin: 22px 0 8px; color: var(--jd-green); }
.page-article ul{ margin: 0 0 16px; padding-left: 20px; }
.page-article li{ margin-bottom: 6px; line-height: 1.6; font-size: 15px; color: #444; }

.share-row{ margin-top: 30px; padding-top: 16px; border-top: 1px solid #eee; font-size: 13px; color: #888; }
.share-row a{ margin-right: 12px; font-weight: 700; }

/* Grid de categorías (Agricultura / Jardín / Refacciones) */
.category-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin: 20px 0 36px;
}
.category-card{
  border: 1px solid #eee;
  border-radius: 3px;
  padding: 18px;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.category-card:hover{ box-shadow: 0 4px 14px rgba(0,0,0,.08); border-color: var(--jd-green); }
.category-card h3{ font-size: 15px; margin: 0 0 4px; color: var(--text); }
.category-card span{ font-size: 12px; color: var(--jd-green); font-weight: 700; text-transform: uppercase; }

/* Tarjetas de servicio (Nuestros servicios, Otros productos) */
.service-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 24px 0;
}
.service-card{ border: 1px solid #eee; border-radius: 3px; overflow: hidden; }
.service-card img{ width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.service-card-body{ padding: 16px; }
.service-card-body h3{ font-size: 16px; margin: 0 0 8px; }
.service-card-body p{ font-size: 14px; color: #555; margin: 0 0 10px; }

/* FAQ / Acordeón */
.faq{ margin: 20px 0 36px; max-width: 800px; }
.faq-item{ border-bottom: 1px solid #eee; }
.faq-q{
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q:hover{ color: var(--jd-green); }
.faq-a{
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}
.faq-item.open .faq-a{ max-height: 300px; padding-bottom: 14px; }
.faq-icon{ transition: transform .2s ease; }
.faq-item.open .faq-icon{ transform: rotate(45deg); }

/* Ubicaciones */
.branch-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.branch-card{ border: 1px solid #eee; border-radius: 3px; padding: 18px; }
.branch-card h3{ font-size: 16px; margin: 0 0 4px; color: var(--jd-green); }
.branch-tag{ font-size: 11px; text-transform: uppercase; color: #999; margin-bottom: 10px; display: block; }
.branch-card p{ font-size: 13px; margin: 3px 0; color: #444; line-height: 1.5; }
.branch-card .branch-hours{ margin-top: 10px; font-size: 12px; color: #666; }

/* Nuestra gente */
.staff-toolbar{ display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.staff-toolbar select{ border: 2px solid var(--jd-green); color: var(--jd-green); font-weight: 700; padding: 6px 10px; }
.staff-table{ width: 100%; border-collapse: collapse; font-size: 14px; }
.staff-table th{ text-align: left; padding: 10px; background: #f5f5f5; font-size: 12px; text-transform: uppercase; color: #777; }
.staff-table td{ padding: 12px 10px; border-bottom: 1px solid #eee; }
.staff-table td a{ color: var(--jd-green); }

/* Formulario de contacto */
.contact-form{ max-width: 560px; margin-top: 20px; }
.form-group{ margin-bottom: 18px; }
.form-group label{ display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea{
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 14px;
}
.form-group textarea{ min-height: 110px; resize: vertical; }
.form-checkbox{ display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 20px; }
.form-checkbox input{ width: auto; }
.btn-submit{
  background: var(--jd-green);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 12px 34px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
}
.btn-submit:hover{ background: #2c6222; }
.form-success{
  display: none;
  background: #e9f6e6;
  border: 1px solid var(--jd-green);
  color: #2c6222;
  padding: 14px 16px;
  border-radius: 2px;
  margin-top: 16px;
  font-size: 14px;
}
.form-success.show{ display: block; }

/* Galerías */
.gallery-caption{ font-size: 14px; color: #555; margin-top: 12px; line-height: 1.6; }
.video-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin-top: 20px; }
.video-card{ border: 1px solid #eee; border-radius: 3px; overflow: hidden; }
.video-card .thumb{ position: relative; }
.video-card img{ width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.play-btn{
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.play-btn::before{
  content: ''; width: 0; height: 0;
  border-top: 12px solid transparent; border-bottom: 12px solid transparent;
  border-left: 20px solid #fff; margin-left: 4px;
  filter: drop-shadow(0 0 4px rgba(0,0,0,.5));
}
.video-card-body{ padding: 14px; }
.video-card-body h3{ font-size: 14px; margin: 0 0 6px; }
.video-card-body p{ font-size: 13px; color: #666; margin: 0; }

/* Mapa del sitio */
.sitemap-list{ columns: 2; column-gap: 40px; }
.sitemap-list li{ break-inside: avoid; margin-bottom: 10px; }
.sitemap-list a{ font-weight: 700; }
@media (max-width: 600px){ .sitemap-list{ columns: 1; } }

.note-box{
  background: #fff8e1;
  border-left: 3px solid var(--jd-yellow);
  padding: 12px 16px;
  font-size: 13px;
  color: #665c00;
  margin: 20px 0;
}
