/* =========================================================
   AIO VEND — INDUSTRIES 6.0
   Enterprise Selector — Fully Responsive & Optimized
========================================================= */

/* =========================================================
   SECTION WRAPPER
========================================================= */

.vending-industries {
  position: relative;
  padding: clamp(3.5rem, 6vw, 6rem) 1.5rem; /* Reduced top padding */
  background:
    linear-gradient(
      180deg,
      var(--body-bg-color) 0%,
      rgba(37,99,235,0.05) 55%,
      var(--body-bg-color) 100%
    );
}

/* Remove excess spacing from previous section */
.vending-features + .vending-industries {
  margin-top: -1.5rem;
}

/* =========================================================
   HEADER
========================================================= */

.industries-header {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 3rem auto;
}

.industries-header h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}

.industries-intro {
  font-size: 1.05rem;
  line-height: 1.75;
  opacity: 0.9;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.industries-interface {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

/* =========================================================
   LEFT NAVIGATION
========================================================= */

.industries-nav-wrapper {
  position: relative;
}

.industries-nav {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Tabs */

.industry-tab {
  padding: 1.05rem 1.3rem;
  border-radius: 16px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--clr-border);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}

:root[data-theme="dark"] .industry-tab {
  background: rgba(15,23,42,0.75);
}

.industry-tab:hover {
  transform: translateX(6px);
  box-shadow: 0 12px 28px rgba(37,99,235,0.12);
}

.industry-tab.active {
  background: linear-gradient(
    135deg,
    var(--clr-primary),
    var(--clr-secondary)
  );
  color: #fff;
  box-shadow: 0 18px 40px rgba(37,99,235,0.35);
}

/* Arrow indicator */

.industry-indicator {
  position: absolute;
  left: -26px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-primary);
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

/* =========================================================
   RIGHT PANEL
========================================================= */

.industries-panel {
  position: relative;
}

/* IMPORTANT FIX:
   Remove absolute stacking to prevent height collapse
*/

.industry-content {
  display: none;
  animation: fadeUp 0.35s ease forwards;
}

.industry-content.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.industry-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.industry-content p {
  font-size: 1rem;
  line-height: 1.7;
}

/* =========================================================
   IMAGE MODULE — REBUILT
========================================================= */

.industry-image {
  margin-top: 1.75rem;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 20px 45px rgba(0,0,0,0.12),
    0 6px 16px rgba(0,0,0,0.06);
}

/* Removed forced fixed height */

.industry-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 20px;
  transition: transform 0.6s ease;
}

@media (hover: hover) and (pointer: fine) {
  .industry-image:hover img {
    transform: scale(1.03);
  }
}

/* Subtle depth overlay */

.industry-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.05),
    rgba(0,0,0,0.15)
  );
  pointer-events: none;
  border-radius: 20px;
}

:root[data-theme="dark"] .industry-image {
  box-shadow:
    0 25px 60px rgba(0,0,0,0.6),
    0 10px 30px rgba(0,0,0,0.4);
}

/* =========================================================
   RESPONSIVE REBUILD
========================================================= */

@media (max-width: 1024px) {

  .industries-interface {
    grid-template-columns: 260px 1fr;
  }

}

@media (max-width: 900px) {

  .industries-interface {
    grid-template-columns: 1fr;
  }

  .industries-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .industry-tab {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .industry-indicator {
    display: none;
  }

}

@media (max-width: 600px) {

  .vending-industries {
    padding: 3rem 1.25rem;
  }

  .industries-header {
    margin-bottom: 2.25rem;
  }

  .industry-content h3 {
    font-size: 1.2rem;
  }

  .industry-image {
    margin-top: 1.25rem;
    border-radius: 14px;
  }

  .industry-image img {
    border-radius: 14px;
  }

}





/* =========================================================
   AIO VEND — MOBILE OPTIMIZATION LAYER 1.0
   Apply Below 768px Only
========================================================= */

@media (max-width: 768px) {

  /* =======================================================
     GLOBAL MOBILE REFINEMENT
  ======================================================= */

  html, body {
    overflow-x: hidden;
  }

  section {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  h1 {
    font-size: 1.9rem !important;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.55rem !important;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.15rem !important;
  }

  p {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  /* Improve tap targets everywhere */
  button,
  .btn,
  .industry-tab,
  .nav__link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* =======================================================
     HERO
  ======================================================= */

  .vending-hero {
    padding: 4.5rem 1.25rem 3.5rem !important;
    text-align: center;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.9rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* =======================================================
     FEATURES
  ======================================================= */

  .vending-features {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 1.4rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .features-trust {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .trust-item {
    padding: 1rem;
  }

  /* =======================================================
     INDUSTRIES — FULL MOBILE REBUILD
  ======================================================= */

  .vending-industries {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .industries-interface {
    display: block !important;
  }

  /* Horizontal scroll tabs */
  .industries-nav {
    flex-direction: row !important;
    gap: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    margin-bottom: 1.75rem;
  }

  .industries-nav::-webkit-scrollbar {
    display: none;
  }

  .industry-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
  }

  .industries-panel {
    position: relative !important;
  }

  .industry-content {
    display: none;
  }

  .industry-content.active {
    display: block;
  }

  .industry-image {
    margin-top: 1.25rem;
    border-radius: 14px;
  }

  .industry-image img {
    border-radius: 14px;
  }

  /* =======================================================
     STATES GRID
  ======================================================= */

  .states-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .state-card {
    padding: 1.4rem;
  }

  .states-cta {
    margin-top: 2.5rem;
    text-align: center;
  }

  .states-cta .btn {
    width: 100%;
    margin-top: 1rem;
  }

  /* =======================================================
     MICRO MARKET SECTION
  ======================================================= */

  .micro-pro__grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .micro-pro__visual {
    order: -1; /* Image first for mobile */
  }

  .micro-pro__points {
    gap: 0.85rem;
  }

  .micro-point {
    padding: 0.75rem 0;
  }

  /* =======================================================
     COFFEE SECTION
  ======================================================= */

  .coffee-pro__grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .coffee-pro__visual {
    order: -1;
  }

  .coffee-point {
    padding: 0.75rem 0;
  }

  /* =======================================================
     PROPOSAL CTA
  ======================================================= */

  .vending-cta {
    padding: 2.75rem 1.25rem !important;
    text-align: center;
  }

  .cta-actions {
    flex-direction: column;
    gap: 0.9rem;
  }

  .cta-actions .btn {
    width: 100%;
  }

  /* =======================================================
     NAVIGATION MOBILE IMPROVEMENTS
  ======================================================= */

  .nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nav__primary {
    padding: 1.5rem 1.25rem;
  }

  .nav__link {
    padding: 0.9rem 0;
    font-size: 1rem;
  }

  /* =======================================================
     FOOTER MOBILE CLEANUP
  ======================================================= */

  .footer__grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .footer-contact-inner {
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer-contact-inner input {
    width: 100%;
  }

  .footer__bar {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }

}


/* =========================================================
   INDUSTRIES — PROFESSIONAL MOBILE ACCORDION
   Replaces horizontal scrolling tabs under 768px
========================================================= */

@media (max-width: 768px) {

  /* Hide desktop layout logic */
  .industries-interface {
    display: block !important;
  }

  .industries-nav-wrapper {
    display: none !important;
  }

  .industries-panel {
    position: relative !important;
  }

  /* Convert each industry block into accordion card */

  .industry-content {
    display: block !important;
    border: 1px solid var(--clr-border);
    border-radius: 16px;
    padding: 1.25rem 1.25rem 1.5rem 1.25rem;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
  }

  :root[data-theme="dark"] .industry-content {
    background: rgba(15,23,42,0.8);
  }

  /* Accordion Header Style */

  .industry-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
    position: relative;
    padding-right: 28px;
  }

  /* Chevron Indicator */

  .industry-content h3::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.2rem;
    font-weight: 600;
    transition: transform 0.25s ease;
  }

  /* Collapsed State */

  .industry-content p,
  .industry-content .industry-image {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
  }

  /* Active State */

  .industry-content.active {
    padding-bottom: 1.5rem;
  }

  .industry-content.active h3::after {
    content: "–";
  }

  .industry-content.active p,
  .industry-content.active .industry-image {
    max-height: 800px;
    opacity: 1;
    margin-top: 0.85rem;
  }

  /* Image refinement */

  .industry-image {
    border-radius: 14px;
    margin-top: 1rem;
  }

  .industry-image img {
    border-radius: 14px;
  }

}
