/**
 * ToolsHub Pro - COMPLETE Responsive CSS
 * Mobile & Tablet optimization
 */

/* ==========================================================================
   TABLET - 1024px and below
   ========================================================================== */

@media (max-width: 1024px) {
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  /* Header */
  .site-header-inner {
    gap: var(--spacing-md);
  }
  
  .header-search {
    max-width: 400px;
  }
  
  .main-navigation {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Content Area */
  .content-area {
    flex-direction: column;
  }
  
  .sidebar-area {
    width: 100%;
  }
  
  /* Tools Grid */
  .tools-grid {
    grid-template-columns: repeat(var(--grid-columns-tablet), 1fr);
  }
  
  /* Footer */
  .footer-widgets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
  
}

/* ==========================================================================
   MOBILE - 640px and below
   ========================================================================== */

@media (max-width: 640px) {
  
  /* Typography */
  :root {
    --spacing-3xl: 2.5rem;
    --spacing-2xl: 2rem;
    --spacing-xl: 1.5rem;
  }
  
  /* Header */
  .site-header-inner {
    flex-wrap: wrap;
    padding: var(--spacing-md) 0;
  }
  
  .site-logo img {
    max-height: 40px;
  }
  
  .header-search {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin: var(--spacing-md) 0 0;
  }
  
  .header-search input {
    font-size: 0.875rem;
    padding: 12px var(--spacing-lg);
  }
  
  .header-search button span {
    display: none;
  }
  
  .mobile-menu-toggle {
    order: 2;
  }
  
  /* Mobile Navigation */
  .mobile-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.3s ease;
  }
  
  .mobile-navigation.active {
    right: 0;
  }
  
  .mobile-menu-wrapper {
    padding: var(--spacing-xl);
  }
  
  .mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mobile-menu li {
    border-bottom: 1px solid var(--color-gray-200);
  }
  .mobile-menu{ display: block;}
  .mobile-menu a {
    display: block;
    padding: var(--spacing-md);
    color: var(--text-heading);
    font-weight: 600;
  }
  
  .mobile-menu a:hover {
    background: var(--color-gray-50);
    color: var(--color-primary);
  }
  
  /* Tools Grid */
  .tools-grid {
    grid-template-columns: repeat(var(--grid-columns-mobile), 1fr);
    gap: var(--spacing-md);
  }
  
  /* Tool Cards */
  .tool-design-1 .tool-card {
    padding: var(--spacing-lg);
  }
  
  .tool-design-1 .tool-card-image {
    width: 56px;
    height: 56px;
  }
  
  .tool-design-1 .tool-card-title {
    font-size: 0.875rem;
  }
  
  .tool-design-2 .tool-card {
    padding: var(--spacing-md);
  }
  
  .tool-design-2 .tool-card-image {
    width: 36px;
    height: 36px;
  }
  
  .tool-design-2 .tool-card-title {
    font-size: 0.875rem;
  }
  
  .tool-design-3 .tool-card {
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  .tool-design-3 .tool-card-image {
    width: 40px;
    height: 40px;
  }
  
  .tool-design-3 .tool-card-title {
    font-size: 0.9375rem;
  }
  
  /* Homepage Sections */
  .homepage-section {
    margin-bottom: var(--spacing-2xl);
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-description {
    font-size: 1rem;
  }
  
  /* Single Post */
  .single-tool-post {
    padding: var(--spacing-lg);
  }
  
  .post-title {
    font-size: 1.75rem;
  }
  
  .post-content {
    font-size: 1rem;
  }
  
  /* Footer */
  .footer-widgets-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-menus-wrapper {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }
  
  /* Back to Top */
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
  
  /* 404 */
  .error-404-title {
    font-size: 80px;
  }
  
  /* Pagination */
  .page-numbers {
    min-width: 40px;
    height: 40px;
    font-size: 0.875rem;
  }
  
}

/* ==========================================================================
   EXTRA SMALL - 480px
   ========================================================================== */

@media (max-width: 480px) {
  
  .tools-grid {
    grid-template-columns: 1fr !important;
  }
  
  .mobile-navigation {
    width: 100%;
    max-width: 100%;
  }
  
}

/* ==========================================================================
   LANDSCAPE MOBILE
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
  
  .mobile-navigation {
    overflow-y: scroll;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
  }
  
}