/* ==========================================================================
   ReducerImage - Responsive Breakpoints Stylesheet (responsive.css)
   ========================================================================== */

/* Large screens and desktops (Default style governs. Max-width constraints) */

/* Laptop & Large Tablets (Max 1024px) */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  
  .nav-menu {
    gap: 20px;
  }
  .nav-actions {
    gap: 12px;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
  .footer-brand {
    grid-column: span 4;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 32px;
    margin-bottom: 16px;
  }
  .footer-brand p {
    max-width: 480px !important;
    margin-left: auto;
    margin-right: auto;
  }
  .footer-newsletter-form {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-brand .social-links {
    justify-content: center;
  }
  
  .tools-panel {
    grid-template-columns: 1fr;
  }
  .controls-card {
    position: static;
  }
  
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
  }
  .pricing-card.popular {
    transform: none;
  }
  .pricing-card.popular:hover {
    transform: translateY(-4px);
  }
}

/* Medium Tablets & Landscape Mobile (Max 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.35rem; }
  
  /* Navigation Hamburger layout */
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-primary);
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    border-top: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 999;
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-link {
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
  }
  
  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:hover .dropdown-menu.dropdown-center {
    opacity: 0;
    visibility: hidden;
    transform: none !important;
    position: static !important;
    width: 100%;
    box-shadow: none;
    border: none;
    background-color: var(--bg-secondary);
    display: none;
  }
  .nav-dropdown.active-mobile .dropdown-menu,
  .nav-dropdown.active-mobile .dropdown-menu.dropdown-center {
    opacity: 1;
    visibility: visible;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: static !important;
    transform: none !important;
    width: 100%;
    box-shadow: none;
    background-color: var(--bg-secondary);
    margin-top: 8px;
    border: 1px solid var(--border-color);
    padding: 16px;
  }
  
  /* Hamburger button icon toggle */
  .hamburger {
    display: flex !important;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    z-index: 1000;
  }
  .hamburger:hover {
    color: var(--primary);
    border-color: var(--primary);
  }
  .hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    position: relative;
    transition: background-color var(--transition-fast);
  }
  .hamburger span::before, .hamburger span::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    transition: all var(--transition-fast);
  }
  .hamburger span::before { top: -6px; }
  .hamburger span::after { bottom: -6px; }
  
  .hamburger.active span {
    background-color: transparent;
  }
  .hamburger.active span::before {
    transform: rotate(45deg);
    top: 0;
  }
  .hamburger.active span::after {
    transform: rotate(-45deg);
    bottom: 0;
  }
  
  /* Grid structures collapsing */
  .grid-4, .grid-3, .grid-2, .hero-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-brand {
    grid-column: span 1;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
  }
  .footer-brand p {
    max-width: 280px !important;
    margin-left: 0;
    margin-right: auto;
  }
  .footer-newsletter-form {
    margin-left: 0;
  }
  .footer-brand .social-links {
    justify-content: flex-start;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .footer-legal-links {
    justify-content: center;
  }

  /* Compact dropdown styling for mobile */
  .dropdown-item p {
    display: none !important;
  }
  .dropdown-column {
    gap: 4px;
  }
  .dropdown-col-title {
    margin-bottom: 6px;
    font-size: 0.7rem;
  }
  .dropdown-item {
    padding: 6px 8px;
    font-size: 0.85rem;
  }
}

/* Portrait Mobile Screens (Max 480px) */
@media (max-width: 480px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }
  
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .btn {
    width: 100%;
    padding: 12px 20px;
  }
  .btn-icon-only {
    width: 44px;
    height: 44px;
  }
  
  .nav-actions .btn {
    display: none; /* Hide primary call to action button in navbar for very small screens */
  }
  
  .cookie-banner {
    bottom: 16px;
    padding: 16px;
    width: calc(100% - 32px);
  }
  
  .comparison-container {
    height: 280px;
  }

  /* Compact workspaces for small phones */
  .crop-canvas-el {
    max-height: 250px !important;
  }
  #upscale-workspace img {
    max-height: 250px !important;
  }
  .preview-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}
