/* =========================================================
   SCREEN-SIZE MEDIA QUERIES (collected at bottom)
   Move these to responsive.css as you planned.
   ========================================================= */
/* ===== TABLETS + MOBILE: Flip arrows UP ===== */
@media (max-width: 1024px) {
  .scroll-arrows span {
    transform: rotate(135deg); /* Flip upwards */
    animation-name: arrowBounceUp; /* Use upward bounce */
  }
}

@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

/* Mobile dropdown menu layout */
@media (max-width: 768px) {
  #dropdownMenu {
    width: 100vw;
    left: 0;
    right: 0;
    max-width: 100vw;
    box-sizing: border-box;
  }

  #dropdownMenu ul.menu {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  #dropdownMenu .menu-item {
    display: flex;
    align-items: center;
    width: fit-content;
    box-sizing: border-box;
    padding: 0.75em 1em;
    border-bottom: 1px solid var(--color-border);
    gap: 5%;
  }

  #dropdownMenu .menu-item > a {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    font-size: 1.1em;
    min-width: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }

  #dropdownMenu .submenu-arrow {
    margin-left: 0.5em;
    flex-shrink: 0;
    font-size: 1em;
    color: var(--color-accent);
    transition: transform 0.3s ease;
  }

  #dropdownMenu .sub-menu {
    width: fit-content;
    left: 0;
    right: 0;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    background: var(--color-base);
    position: static;
  }

  #dropdownMenu .sub-menu .menu-item {
    padding-left: 2em;
    border-bottom: 1px solid var(--color-border);
  }
}

@media (max-width: 768px) {
  /* Top header stacking */
  #topHeader {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 6px;
    column-gap: 10px;
    text-align: center;
    padding-top: 6px;
    padding-bottom: 6px;
    width: 100%;
  }
  .header-left,
  .header-center,
  .header-right {
    flex: 1 1 100%;
    justify-content: center;
    font-size: 13px;
  }
  .header-right a {
    padding: 6px;
  }

  /* Logo centering */
  .header-row {
    justify-content: space-between;
    min-height: 56px;
  }
  #centerHeader {
    position: static;
    transform: none;
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
  }
  .site-logo {
    max-height: 48px;
  }

  /* Dropdown menu shape */
  #dropdownMenu {
    left: 0;
    right: auto;
    width: auto;
    min-width: 220px;
    padding: 12px;
    border: 1px solid var(--neutral-12);
    border-radius: 12px;
  }
  #dropdownMenu a {
    margin: 4px 0;
    font-size: 15px;
    background: transparent;
    border: 1px solid transparent;
  }
  #dropdownMenu a + a {
    box-shadow: none;
  }

  /* About stack */
  #about .about-content .content-row {
    flex-direction: column;
  }
  #about .about-content img {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
  #about .about-content p {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  #topHeader i,
  #topHeader svg {
    width: 13px;
    height: 13px;
  }
  .site-logo {
    max-height: 45px;
  }
  #dropdownMenu {
    width: 100%;
    border-radius: 0;
  }
  #experiences > a > div,
  #gallery > a {
    width: 235px;
  }
  section {
    padding: 60px 15px;
  }
}

/* 404 Page Styling */
/* Tablets */
@media (max-width: 992px) {
  .page-404 .page-title {
    font-size: 1.8rem;
  }
  .page-404 .page-description {
    font-size: 1rem;
  }
  .page-404 .error-image img {
    max-width: 220px;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .page-404 {
    padding: 3rem 1rem;
  }
  .page-404 .page-title {
    font-size: 1.5rem;
  }
  .page-404 .page-description {
    font-size: 0.95rem;
  }
  .page-404 .error-actions {
    flex-direction: column; /* stack buttons */
    gap: 0.75rem;
  }
  .page-404 .btn-bl {
    width: 100%; /* full width buttons */
  }
  .page-404 .error-image img {
    max-width: 180px;
  }
}

/* What We RAWk Page Styles IMG Stack vertically on mobile */
/* Responsive adjustments */
@media (max-width: 768px) {
  .page-image img {
    width: 150px; /* smaller on tablets */
  }
}

@media (max-width: 480px) {
  .page-image img {
    display: block;
    margin: 0 auto 16px auto; /* center images on mobile */
    width: 120px; /* smaller on phones */
  }
}
