/* ==========================================================================
   ELAWADY Marine Supplies - Responsive Breakpoints & Mobile Adaptations
   ========================================================================== */


/* ==========================================================================
   TABLET - max 992px
   ========================================================================== */

@media (max-width: 992px) {
  :root {
    --header-height: 70px;
    --space-huge: 3.5rem;
  }

  .hero-frame {
    padding: var(--space-xl) var(--space-lg);
  }

  .hero-frame::before,
  .hero-frame::after {
    width: 30px;
    height: 30px;
  }

  .logo-link {
    min-width: 82px;
  }

  .brand-logo-nav {
    height: 62px;
  }
}


/* ==========================================================================
   MOBILE LANDSCAPE / SMALL TABLET - max 768px
   ========================================================================== */

@media (max-width: 768px) {

  .nav-container {
    justify-content: space-between;
  }

  .nav-container > nav {
    flex: 0 0 auto;
    gap: var(--space-md);
  }

  .logo-link {
    min-width: 0;
  }

  .brand-logo-nav {
    height: 54px;
  }

  .brand-logo-footer {
    height: 70px;
  }

  /* --- Mobile Drawer Navigation --- */
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: auto;
    inset-inline-start: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    background-color: rgba(2, 5, 8, 0.97);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    flex-direction: column;
    padding: var(--space-xxl) var(--space-lg);
    gap: var(--space-md);
    border-top: 1px solid var(--clr-header-border);
    overflow-y: auto;
    align-items: center;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform var(--transition-normal),
                opacity var(--transition-normal);
    pointer-events: none;
  }

  html[dir="rtl"] .nav-menu {
    transform: translateX(100%);
  }

  .nav-menu.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    font-size: var(--font-size-md);
    padding: var(--space-sm) 0;
    letter-spacing: 0;
  }

  .nav-toggle {
    display: block;
  }

  /* Hamburger → X transforms */
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* --- Hero Adjustments --- */
  .hero-viewport {
    padding-top: calc(var(--header-height) + var(--space-lg));
    padding-bottom: 5rem;
  }

  .hero-frame {
    padding: var(--space-lg) var(--space-md);
  }

  .hero-frame::before,
  .hero-frame::after {
    width: 24px;
    height: 24px;
  }

  .hero-eyebrow {
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
  }

  .hero-eyebrow::before,
  .hero-eyebrow::after {
    width: 20px;
  }

  .hero-subtitle {
    letter-spacing: 0;
  }

  .hero-desc {
    font-size: var(--font-size-sm);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-glow {
    width: 400px;
    height: 400px;
  }

  .hero-title {
    font-size: 4rem;
  }

  .page-hero {
    min-height: 44vh;
    padding-top: calc(var(--header-height) + var(--space-xxl));
  }

  .page-hero h1 {
    font-size: var(--font-size-xxl);
  }

  /* --- Footer --- */
  .footer-top {
    text-align: center;
    justify-items: center;
  }

  .footer-brand {
    max-width: 100%;
  }

  .social-links,
  .contact-item {
    justify-content: center;
  }

  .footer-title {
    margin-inline-start: auto;
    margin-inline-end: auto;
  }
}


/* ==========================================================================
   MOBILE PORTRAIT - max 480px
   ========================================================================== */

@media (max-width: 480px) {
  :root {
    --font-size-xxl: 1.95rem;
    --font-size-xl: 1.56rem;
    --font-size-lg: 1.25rem;
    --space-huge: 2.5rem;
  }

  section {
    padding: var(--space-xxl) 0;
  }

  .hero-frame::before,
  .hero-frame::after {
    width: 18px;
    height: 18px;
  }

  .brand-logo-nav {
    height: 46px;
  }

  .brand-logo-footer {
    height: 62px;
  }

  .scroll-indicator {
    bottom: var(--space-lg);
  }

  .scroll-line {
    height: 24px;
  }

  .hero-title {
    font-size: 3.05rem;
  }

  .hero-frame {
    padding-inline: 0;
  }

  .nav-controls {
    gap: var(--space-xs);
  }

  .lang-selector {
    width: 40px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
  }

  .lang-selector .lang-label {
    display: none;
  }

  .lang-selector .icon {
    width: 16px;
    height: 16px;
    margin: 0;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }
}


/* ==========================================================================
   SHORT VIEWPORTS (Landscape phones)
   ========================================================================== */

@media (max-height: 600px) {
  .hero-viewport {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-md));
    padding-bottom: var(--space-xxl);
  }

  .hero-frame {
    padding: var(--space-md) var(--space-sm);
  }

  .hero-eyebrow {
    margin-bottom: var(--space-md);
  }

  .hero-title-group {
    margin-bottom: var(--space-sm);
  }

  .hero-divider {
    margin: var(--space-md) auto;
  }

  .hero-desc {
    margin-bottom: var(--space-md);
  }

  .scroll-indicator {
    display: none;
  }
}
