@media (max-width: 768px) {

  /* ===== RESET HEADER ===== */
  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
  }

  /* Logo small like Freepik */
  .logo {
    font-size: 15px;
    font-weight: 600;
  }

  /* Hide desktop nav */
  .top-nav {
    display: none !important;
  }

  /* Auth buttons right side */
  .auth {
    display: flex;
    gap: 6px;
  }

  .auth a {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 14px;
  }

}

@media (max-width: 768px) {

  /* ===== SEARCH BAR MOBILE ===== */
  .search-area {
    padding: 8px 14px;
  }

  .search-box {
    width: 100%;
    display: flex;
    align-items: center;
    background: #1c1c1c;
    border-radius: 22px;
    padding: 6px 10px;
  }

  .search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
  }

  .search-box button {
    background: #000;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 13px;
  }

}

@media (max-width: 768px) {

  /* ===== FORCE SEARCH TO NEXT LINE ===== */
  .header-container {
    flex-wrap: wrap;
  }

  .search-area {
    width: 100%;
    order: 2;          /* moves search below header row */
    margin-top: 8px;
  }

  .top-nav {
    display: none;     /* hide Home/About/Contact on mobile */
  }

}

@media (max-width: 768px) {

  /* ===== MOBILE FILTER BAR (FREEPIK STYLE) ===== */
  .filter-bar {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
  }

  /* Hide everything first */
  .filter-bar > * {
    display: none;
  }

  /* SHOW All button */
  #allFilter {
    display: inline-flex;
    flex: 0.7;
    justify-content: center;
  }

  /* SHOW Category */
  .filter-bar .filter-dropdown:nth-of-type(1) {
    display: inline-flex;
    flex: 1;
  }

  /* SHOW Filters (using Color dropdown) */
  .filter-bar .filter-dropdown:nth-of-type(4) {
    display: inline-flex;
    flex: 1;
  }

  /* Button styling */
  .filter-chip,
  .filter-dropdown button {
    width: 100%;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 20px;
    justify-content: center;
  }

  @media (max-width: 768px) {

  /* ===== MOBILE FILTER BAR FINAL ===== */
  .filter-bar {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
  }

  /* Hide ALL items first */
  .filter-bar > * {
    display: none;
  }

  /* SHOW All */
  #allFilter {
    display: inline-flex;
    flex: 0.7;
    justify-content: center;
  }

  /* SHOW Category (1st dropdown) */
  .filter-bar .filter-dropdown:nth-of-type(1) {
    display: inline-flex;
    flex: 1;
  }

  /* SHOW License (3rd dropdown) */
  .filter-bar .filter-dropdown:nth-of-type(3) {
    display: inline-flex;
    flex: 1;
  }

  /* Button styling */
  .filter-chip,
  .filter-dropdown button {
    width: 100%;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 20px;
    justify-content: center;
  }

}

@media (max-width: 768px) {

  /* Force full dark background everywhere */
  body,
  main,
  .gallery,
  .filter-bar {
    background: #0b0b0b !important;
  }

  /* Remove any card glow mismatch */
  .wallpaper,
  .wallpaper-card {
    background: #0b0b0b !important;
  }

}

}

@media (max-width: 768px) {

  /* ===== FILTER BUTTON TAP ANIMATION ===== */
  .filter-chip {
    transition: transform 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .filter-chip:active {
    transform: scale(0.94);
  }

}

@media (max-width: 768px) {

  /* ===== SMOOTH MOBILE SCROLL ===== */
  html, body {
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent accidental horizontal scroll */
  body {
    overflow-x: hidden;
  }

}

@media (max-width: 768px) {

  /* ===== IMAGE TAP ZOOM EFFECT ===== */
  .wallpaper img {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
  }

  .wallpaper:active img {
    transform: scale(0.97);
  }

  /* Preview modal animation */
  .preview-modal {
    animation: fadeIn 0.25s ease;
  }

  .preview-content {
    animation: zoomIn 0.3s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  @keyframes zoomIn {
    from {
      transform: scale(0.9);
      opacity: 0;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  }

}


/* =====================================
   ABOUT HEADER – MOBILE FIX (REAL HTML)
   ===================================== */
@media (max-width: 768px) {

  .about-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 12px 16px !important;
    gap: 6px !important;
  }

  /* Brand name */
  .about-header-right {
    order: 1 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  /* Links container */
  .about-header-left {
    order: 2 !important;
    display: flex !important;
    gap: 14px !important;
    flex-wrap: nowrap !important;
  }

  .about-header-left a {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }
}


/* FREEPIK STYLE – MOBILE INTRO */

.gallery-intro {
  margin: 10px auto 6px;
  padding: 0 14px;
}

.gallery-intro h1 {
  font-size: 17px;
  font-weight: 600;
}

.gallery-intro p {
  font-size: 12.5px;
  line-height: 1.5;
}

.site-footer {
  padding: 32px 16px 16px;
}

.footer-inner {
  grid-template-columns: 1fr;
  gap: 30px;
}

.footer-links {
  grid-template-columns: 1fr 1fr;
}

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