/* ==========================================================================
   BENGAL AGRO ENTERPRISE - RESPONSIVE STYLESHEET
   Phase 2: Mobile, Tablet, and Large Screen Viewport Adaptations
   Tested viewports: 320px, 360px, 375px, 390px, 414px, 768px, 1024px, 1280px, 1440px, 1920px
   ========================================================================== */

/* Large Desktop / Widescreen (1440px - 1920px) */
@media (min-width: 1400px) {
  .container-custom {
    max-width: 1360px;
  }
  .hero-main-title {
    font-size: 2.75rem;
  }
}

/* Standard Desktop / Laptop (1200px - 1399px) */
@media (max-width: 1399px) {
  .hero-main-title {
    font-size: 2.35rem;
  }
  .category-img-wrap {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* Desktop Header Adaptation (992px - 1280px) */
@media (max-width: 1280px) {
  .brand-logo-img {
    height: 54px;
    max-width: 220px;
    aspect-ratio: 993 / 261;
  }
  .brand-text-tagline {
    display: none !important;
  }
  .nav-menu-desktop {
    gap: 3px;
  }
  .nav-menu-desktop .nav-link-item {
    padding: 6px 9px;
    font-size: 0.84rem;
  }
  .header-actions {
    gap: 10px;
  }
  .header-phone-box {
    font-size: 0.82rem;
  }
  .btn-bae-primary {
    padding: 6px 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 1100px) {
  .nav-menu-desktop .nav-link-item {
    padding: 5px 7px;
    font-size: 0.80rem;
  }
  .header-phone-box {
    font-size: 0.78rem;
  }
  .btn-bae-primary {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
}

/* Small Laptop / Landscape Tablet (992px - 1199px) */
@media (max-width: 1199px) {
  .hero-main-title {
    font-size: 2.05rem;
  }

  .hero-subtitle-italic {
    font-size: 1.25rem;
  }

  .highlights-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .highlight-item {
    border-right: none;
    border-bottom: 1px solid rgba(197, 155, 39, 0.15);
    padding-bottom: 8px;
  }

  .categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
  .nav-menu-desktop,
  .header-actions .header-phone-box,
  .header-actions .header-divider {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-section {
    padding: 24px 0;
  }

  .hero-visual-container {
    margin-top: 24px;
  }

  .highlights-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .workflow-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .stat-item-box {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 0;
  }

  .stat-item-box:last-child {
    border-bottom: none;
  }

  .factsheet-table td.label-col {
    width: 35%;
  }

  .cta-banner-flex {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

/* Mobile Devices (max-width: 767px - covers 320px, 360px, 375px, 390px, 414px) */
@media (max-width: 767px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
  }

  body {
    font-size: 0.9rem;
  }

  .site-header {
    padding: 8px 0;
  }

  .brand-logo-img {
    height: 48px;
    max-width: 190px;
    aspect-ratio: 993 / 261;
    object-fit: contain;
  }

  .hero-main-title {
    font-size: 1.85rem;
    line-height: 1.2;
  }

  .hero-subtitle-italic {
    font-size: 1.15rem;
    margin-bottom: 12px;
  }

  .hero-description {
    font-size: 0.88rem;
    margin-bottom: 18px;
  }

  .hero-visual-img {
    max-height: 320px;
    width: 100%;
    object-fit: contain;
  }

  .hero-cta-buttons {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-cta-buttons .btn-bae-primary,
  .hero-cta-buttons .btn-bae-outline,
  .hero-cta-buttons .btn-bae-gold {
    width: 100%;
    justify-content: center;
  }

  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .highlight-item {
    padding: 6px;
  }

  .highlight-icon-box {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .highlight-label {
    font-size: 0.74rem;
  }

  .section-head-wrap {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .section-subtitle {
    font-size: 0.85rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .category-img-wrap {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .about-intro-section {
    padding: 36px 0;
  }

  .about-intro-card h3 {
    font-size: 1.6rem;
  }

  .about-visual-box {
    margin-bottom: 20px;
  }

  .trusted-partner-box {
    margin-top: 20px;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filter-tabs-wrap {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .factsheet-table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  .factsheet-table th, .factsheet-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .cert-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cert-card-body h4 {
    justify-content: center;
    gap: 6px;
  }

  .certificate-preview {
    height: 300px;
    padding: 12px;
  }

  .cert-viewer-body {
    min-height: 360px;
    padding: 10px !important;
  }

  .cert-modal-img {
    max-height: 60vh;
  }

  .cert-zoom-toolbar {
    display: none !important;
  }

  .contact-info-card, .enquiry-form-card {
    padding: 18px 14px;
  }

  .footer-top-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-social-wrap {
    justify-content: flex-start;
  }
}

/* Very Small Mobile Screens (320px - 360px) */
@media (max-width: 360px) {
  .hero-main-title {
    font-size: 1.6rem;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
  }

  .highlight-item {
    border-bottom: 1px solid rgba(197, 155, 39, 0.15);
  }

  .brand-logo-img {
    height: 44px;
    max-width: 175px;
    aspect-ratio: 993 / 261;
    object-fit: contain;
  }
}

@media (max-width: 360px) {
  .brand-logo-img {
    height: 40px;
    max-width: 155px;
    aspect-ratio: 993 / 261;
    object-fit: contain;
  }

  .certificate-preview {
    height: 240px;
    padding: 8px;
  }
}

/* Offcanvas Mobile Navigation Custom Styling */
.offcanvas:not(.show) {
  display: none !important;
}

.offcanvas-bae {
  background-color: #ffffff;
  width: 300px !important;
}

.offcanvas-header-bae {
  background-color: var(--primary-deep);
  color: #ffffff;
  border-bottom: 2px solid var(--accent-gold);
  padding: 14px 18px;
}

.offcanvas-body-bae {
  padding: 20px 16px;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.mobile-nav-item {
  margin-bottom: 6px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-heading);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.mobile-nav-link:hover {
  background-color: var(--accent-gold-soft);
  color: var(--primary-green);
}

.mobile-nav-link.active {
  background-color: var(--primary-green);
  color: #ffffff;
}

.mobile-contact-box {
  background: var(--bg-cream-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
}

.mobile-contact-box a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-heading);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.mobile-contact-box a:last-child {
  margin-bottom: 0;
}
