/*
═══════════════════════════════════════════════════════════
  OneClikDeal Toolkit - Advanced Responsive System
  Mobile-First, Performance-Optimized
═══════════════════════════════════════════════════════════
*/

/* ═══════════════════════════════════════════════════════════
   BREAKPOINT SYSTEM
   Mobile: < 480px
   Tablet: 481px - 768px
   Desktop: 769px - 1024px
   Large: > 1024px
   ═══════════════════════════════════════════════════════════ */

/* Extra Small Devices (Phones, < 480px) */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .hero-text h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }
  
  .hero-text .subtitle {
    font-size: 0.95rem;
  }
  
  .trust-badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  
  .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  .logo-icon {
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }
  
  .hero-image-placeholder {
    height: 250px;
    font-size: 1rem;
  }
}

/* Small Devices (Tablets, 481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .container {
    padding: 0 1.5rem;
  }
  
  .hero {
    padding: 2.5rem 0;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .hero-text h1 {
    font-size: 2.25rem;
  }
  
  .hero-text .subtitle {
    font-size: 1.1rem;
  }
  
  .cta-buttons {
    justify-content: center;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  section {
    padding: 2.5rem 0;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .hero-image-placeholder {
    height: 300px;
  }
}

/* Medium Devices (Small Laptops, 769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 960px;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  
  .hero-text h1 {
    font-size: 2.75rem;
  }
  
  .cta-buttons {
    justify-content: center;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large Devices (Desktops, > 1024px) */
@media (min-width: 1025px) {
  .container {
    max-width: 1280px;
  }
  
  .hero-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Extra Large Devices (> 1400px) */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-text h1 {
    font-size: 3.5rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE NAVIGATION
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .header-content {
    padding: 0.75rem 0;
  }
  
  .nav-menu {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    z-index: var(--z-dropdown);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .nav-link {
    width: 100%;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .theme-toggle {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
}

/* ═══════════════════════════════════════════════════════════
   TOUCH-FRIENDLY ENHANCEMENTS
   ═══════════════════════════════════════════════════════════ */

@media (hover: none) and (pointer: coarse) {
  /* Touch device optimizations */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .card {
    cursor: pointer;
  }
  
  .card:active {
    transform: scale(0.98);
  }
}

/* ═══════════════════════════════════════════════════════════
   LANDSCAPE ORIENTATION
   ═══════════════════════════════════════════════════════════ */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 1.5rem 0;
  }
  
  .hero-text h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero-text .subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .trust-badge {
    margin-bottom: 1rem;
  }
  
  .hero-image-placeholder {
    height: 200px;
  }
}

/* ═══════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════ */

@media print {
  .header,
  .footer,
  .cta-buttons,
  .theme-toggle,
  .mobile-menu-toggle {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  a {
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

/* ═══════════════════════════════════════════════════════════
   HIGH DPI DISPLAYS
   ═══════════════════════════════════════════════════════════ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Sharper rendering for retina displays */
  body {
    -webkit-font-smoothing: subpixel-antialiased;
  }
}
