/*------------------------------
  -------------------Media Queries
------------------------------*/

@media (max-width: 480px) {
  .footer-menu {
    gap: 1rem;
  }
}


@media (max-width: 600px) {
  .master-title {
    font-size: 1.5rem;
  }
  .master-description {
    font-size: 1rem;
  }
  .master::after {
    width: 60px;
  }
}
 
@media (min-width: 700px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .about-preview,
  .dev-preview {
    padding: 5rem 3rem;
  }

  .about-preview p,
  .dev-preview p {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .primary-navigation {
    width: 100%;
  }

  .primary-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  .primary-menu.active {
    display: flex;
  }

  .primary-menu li {
    width: 100%;
  }

  .primary-menu a {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
  }

  .primary-menu ul {
    position: static;
    border: none;
  }

  .primary-menu li:hover > ul {
    display: none; /* disable hover dropdown on mobile */
  }

  .primary-menu li:focus-within > ul,
  .primary-menu li.open > ul {
    display: block;
  }
  
  .artwork-detail {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .artwork-meta {
    text-align: center;
    align-items: center;
  }

  .artwork-meta h1 {
    text-align: center;
  }

  .artwork-gallery {
    gap: 1rem;
  }
  
}

/*======================================================================
  Media Queries - Griffin Artwork
  File: media-queries.css
  Last Updated: 2025-08-31
  Purpose: Mobile optimizations for Artwork Archive & Filters
======================================================================*/


/*======================================================================
  SECTION 1 — Base Mobile Fixes (≤ 768px)
  - Wraps filter items so they don't overflow on smaller screens
======================================================================*/
@media (max-width: 768px) {
  .artwork-filters ul {
    display: flex;
    flex-wrap: wrap;            /* Allows wrapping to avoid horizontal scrolling */
    justify-content: center;    /* Center align the filters */
    gap: 0.5rem;                /* Reduce spacing for smaller screens */
    padding: 0.5rem 1rem;
    margin: 0 auto;
    max-width: 100%;
    overflow-x: hidden;         /* Prevent horizontal scrollbars */
  }

  .artwork-filters li {
    flex: 1 1 auto;             /* Flexible width */
    min-width: 45%;             /* Two-column layout where possible */
    text-align: center;
  }

  .artwork-filters a {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 0.25rem;
  }
}


/*======================================================================
  SECTION 2 — Collapsible Filters (≤ 768px)
  - Enhances mobile UX by hiding filters under a toggle button
======================================================================*/
@media (max-width: 768px) {
  /* Hide filter list by default */
  .artwork-filters ul {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }

  /* Show filters when wrapper has .open class */
  .artwork-filters.open ul {
    max-height: 500px; /* Large enough to show all filters */
    opacity: 1;
  }

  /* Toggle button styling */
  .filters-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #f5f5f5;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .filters-toggle:hover {
    background: #eaeaea;
  }

  /* Toggle icon rotation when open */
  .artwork-filters.open .toggle-icon {
    transform: rotate(45deg);
  }

  .toggle-icon {
    margin-left: 0.5rem;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
  }
}


/*======================================================================
  SECTION 3 — Small Phone Optimization (≤ 480px)
  - Refines filters for narrow viewports
======================================================================*/
@media (max-width: 480px) {
  .artwork-filters ul {
    flex-direction: column;      /* Stack filters vertically */
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .artwork-filters li {
    min-width: 100%;            /* Full-width buttons */
  }

  .artwork-filters a {
    padding: 0.6rem 1rem;       /* Larger tap targets */
    font-size: 0.95rem;
  }
}

/*--------------------------------
  Artwork Filters Toggle Visibility
--------------------------------*/

/* Hide toggle button by default (desktop) */
.filters-toggle {
  display: none;
}

/* Show toggle button only on mobile/tablet */
@media (max-width: 768px) {
  .filters-toggle {
    display: flex;       /* Keep flex styling from mobile collapsible CSS */
    align-items: center;
    justify-content: center;
  }
}
