/**
 * VENDO GLOBAL TRADING - Responsive Media Queries & Mobile Drawer
 * High-performance layout adjustments across all viewport breakpoints
 */

/* ==========================================================================
   Mobile Navigation Drawer & Overlay
   ========================================================================== */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background-color: var(--color-white);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  overflow-y: auto;
}

[dir="rtl"] .mobile-nav-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(16, 36, 58, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.mobile-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-charcoal);
  padding: 6px;
  cursor: pointer;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.mobile-nav-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary-navy);
  display: block;
  padding-block: 6px;
}

.mobile-nav-link.active {
  color: var(--color-accent-gold-hover);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */

/* Keep the longest labels for wide screens; footer and the mobile menu still include them. */
@media (max-width: 1440px) {
  .nav-list .nav-secondary {
    display: none;
  }
}

/* Laptop & Compact Desktop (max 1180px) */
@media (max-width: 1180px) {
  .nav-list {
    gap: 12px;
  }
  .nav-link {
    font-size: 0.8rem;
  }
  .hero-grid {
    gap: 40px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item:nth-child(2) {
    border-inline-end: none;
  }
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) {
    border-bottom: 1px solid var(--color-border-subtle);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* Tablets (max 992px) */
@media (max-width: 992px) {
  .main-nav {
    display: none;
  }
  .header-actions {
    margin-inline-start: auto;
    margin-inline-end: 46px;
  }
  .mobile-nav-toggle {
    display: inline-flex !important;
    position: fixed;
    top: 14px;
    inset-inline-end: 12px;
    z-index: 1200;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(16, 36, 58, 0.12);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content p.hero-desc {
    margin-inline: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-image-card img,
  .hero-slide-images {
    height: 380px;
  }
  .pillars-grid,
  .services-grid,
  .industries-grid,
  .markets-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .workflow-step-card {
    grid-template-columns: 70px 1fr;
    gap: 20px;
  }
  .step-deliverable {
    grid-column: 1 / -1;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .contact-tabs-nav {
    flex-wrap: wrap;
  }
  .contact-tab-btn {
    flex: 1 1 45%;
  }
}

/* Mobile Devices (max 768px) */
@media (max-width: 768px) {
  :root {
    --container-padding: 18px;
    --section-spacing-md: 56px;
    --section-spacing-lg: 72px;
  }
  .header-inner {
    height: 70px;
    gap: 8px;
  }
  .brand-logo {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.95rem;
    gap: 8px;
  }
  .brand-logo .brand-name {
    min-width: 0;
  }
  .lang-current-btn {
    padding: 6px 8px;
    gap: 6px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .btn {
    display: none; /* Keep cleaner mobile header, CTA is inside mobile drawer */
  }
  .header-actions .lang-switcher-container {
    display: none;
  }
  .header-actions {
    margin-inline-end: 0;
  }
  .mobile-nav-toggle {
    position: static;
    background: transparent;
    box-shadow: none;
  }
  .hero-grid,
  .hero-content {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .hero-content .badge-tag,
  .hero-content h1,
  .hero-content .hero-desc {
    max-width: calc(100vw - 36px);
  }
  .hero-content .badge-tag {
    display: inline-block;
    width: auto;
    margin-inline: auto;
  }
  .hero-home {
    padding-top: 60px;
    padding-bottom: 60px;
  }
  .hero-image-card img,
  .hero-slide-images {
    height: 280px;
  }
  .hero-slides-text {
    min-height: 340px;
  }
  .hero-floating-badge {
    position: static;
    margin-top: 14px;
    width: 100%;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-item {
    border-inline-end: none;
    border-bottom: 1px solid var(--color-border-subtle);
    padding: 20px 12px;
  }
  .stat-item:last-child {
    border-bottom: none;
  }
  .stat-number {
    font-size: 2rem;
  }
  .pillars-grid,
  .services-grid,
  .industries-grid,
  .regions-grid,
  .markets-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .workflow-step-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .step-badge {
    margin-inline: auto;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .contact-tab-btn {
    flex: 1 1 100%;
  }
  .contact-form-pane {
    padding: 24px 18px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-slider-ui {
    justify-content: center;
  }
  .hero-slides-text {
    min-height: 0;
  }
  .page-hero {
    padding-block: 48px 40px;
  }
  .page-hero h1,
  .hero-content h1 {
    font-size: clamp(2.05rem, 9vw, 2.8rem);
  }
  .article-hero-media {
    height: 230px;
    margin: 0 0 18px;
  }
  .news-feature {
    min-height: 320px;
  }
  .news-feature-body {
    padding: 18px;
  }
  .premium-corridor {
    min-height: 440px;
  }
  .premium-corridor-copy {
    padding: 48px 0;
  }
  .premium-ledger-list li {
    grid-template-columns: 52px 1fr;
  }
  .service-card,
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .service-media,
  .industry-media,
  .project-media {
    height: 200px;
  }
  .house-intro-grid {
    grid-template-columns: 1fr !important;
  }
  .house-intro-media img {
    height: 240px;
  }
  .news-feature {
    height: 420px;
  }
  .news-card.featured,
  .news-grid,
  .news-feature-grid {
    grid-template-columns: 1fr !important;
  }
  .news-card img,
  .news-card.featured img {
    height: 210px;
    max-height: 210px;
  }
  .premium-corridor {
    min-height: 460px;
  }
  .container.premium-corridor-copy {
    padding-block: 48px;
  }
  .premium-corridor-copy h2 {
    max-width: none;
  }
}

/* Small Smartphone (max 480px) */
@media (max-width: 480px) {
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
  .brand-logo {
    font-size: 1.15rem;
  }
  .brand-logo svg {
    width: 32px;
    height: 32px;
  }
}
