/* ============================================
   POP Remote - Responsive Stylesheet
   Mobile-First Responsive Design
   ============================================ */

/* ============================================
   Tablet (768px and up)
   ============================================ */

@media (min-width: 768px) {
  /* Typography adjustments */
  h1 {
    font-size: var(--font-size-5xl);
  }

  h2 {
    font-size: var(--font-size-4xl);
  }

  /* Hero section */
  .hero {
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  /* Section spacing */
  .section {
    padding: var(--spacing-2xl) 0;
  }

  /* Grid improvements */
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Pricing cards */
  .pricing-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  /* Features grid */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   Desktop (1024px and up)
   ============================================ */

@media (min-width: 1024px) {
  /* Typography */
  h1 {
    font-size: 4rem;
  }

  .hero h1 {
    font-size: 4.5rem;
  }

  /* Grid improvements */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Features grid */
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Pricing cards */
  .pricing-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Hero section */
  .hero {
    padding: 5rem 0 4rem;
  }
}

/* ============================================
   Large Desktop (1280px and up)
   ============================================ */

@media (min-width: 1280px) {
  /* Container adjustments */
  .container {
    padding: 0 var(--spacing-lg);
  }

  /* Hero section */
  .hero {
    padding: 6rem 0 5rem;
  }

  /* Section spacing */
  .section {
    padding: 5rem 0;
  }
}

/* ============================================
   Mobile (below 768px)
   ============================================ */

@media (max-width: 767px) {
  /* Typography scaling */
  h1 {
    font-size: var(--font-size-4xl);
  }

  h2 {
    font-size: var(--font-size-3xl);
  }

  h3 {
    font-size: var(--font-size-2xl);
  }

  .hero h1 {
    font-size: var(--font-size-4xl);
  }

  .hero p {
    font-size: var(--font-size-base);
  }

  /* Mobile navigation */
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    flex-direction: column;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    gap: var(--spacing-sm);
  }

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

  .navbar-toggle {
    display: block;
  }

  .navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }

  .navbar-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  /* Hero section mobile */
  .hero {
    padding: var(--spacing-xl) 0;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  /* Section spacing */
  .section {
    padding: var(--spacing-xl) 0;
  }

  /* Grid mobile */
  .grid {
    gap: var(--spacing-md);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Cards */
  .card {
    padding: var(--spacing-md);
  }

  /* Pricing cards mobile */
  .pricing-cards {
    grid-template-columns: 1fr;
  }

  .pricing-card {
    max-width: 100%;
  }

  /* Platform badges mobile */
  .platform-badges {
    flex-direction: column;
    align-items: stretch;
  }

  .platform-badge {
    justify-content: center;
    width: 100%;
  }

  /* Button adjustments */
  .btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-base);
  }

  /* Footer mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* Table responsive */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Comparison table mobile */
  .comparison-table {
    display: block;
    overflow-x: auto;
  }

  /* Feature list mobile */
  .feature-list {
    gap: var(--spacing-sm);
  }

  /* Documentation navigation mobile */
  .docs-nav {
    position: static;
    margin-bottom: var(--spacing-lg);
  }

  /* Contact form mobile */
  .contact-form {
    padding: var(--spacing-md);
  }

  /* Hide on mobile */
  .hide-mobile {
    display: none;
  }
}

/* ============================================
   Small Mobile (below 480px)
   ============================================ */

@media (max-width: 479px) {
  /* Even smaller typography */
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  .hero h1 {
    font-size: var(--font-size-3xl);
  }

  /* Tighter spacing */
  :root {
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
  }

  /* Container tighter padding */
  .container {
    padding: 0 var(--spacing-sm);
  }

  /* Button adjustments */
  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
  }

  /* Card adjustments */
  .card {
    padding: var(--spacing-sm);
  }

  .card-icon {
    width: 48px;
    height: 48px;
    font-size: var(--font-size-2xl);
  }
}

/* ============================================
   Tablet Landscape (768px - 1024px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1024px) {
  /* Optimize for tablet landscape */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  /* Hide navigation and footer */
  .navbar,
  .footer,
  .hero-cta,
  .platform-badges {
    display: none;
  }

  /* Reset colors for print */
  body {
    color: #000;
    background: #fff;
  }

  /* Page breaks */
  .section {
    page-break-inside: avoid;
  }

  /* Remove shadows and transitions */
  * {
    box-shadow: none !important;
    transition: none !important;
  }
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode support */
  /*
  :root {
    --color-text: #F9FAFB;
    --color-text-light: #D1D5DB;
    --color-text-lighter: #9CA3AF;
    --color-bg: #111827;
    --color-bg-light: #1F2937;
    --color-bg-dark: #374151;
    --color-border: #374151;
  }

  .hero {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  }

  .card {
    background-color: var(--color-bg-light);
  }
  */
}

/* ============================================
   High Contrast Mode
   ============================================ */

@media (prefers-contrast: high) {
  :root {
    --color-text: #000;
    --color-bg: #fff;
    --color-border: #000;
  }

  .btn-primary {
    background: #000;
    color: #fff;
    border: 2px solid #000;
  }

  .btn-outline {
    border-width: 3px;
  }

  .card {
    border-width: 2px;
  }
}

/* ============================================
   Landscape Orientation
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  /* Reduce vertical spacing on short landscape screens */
  .hero {
    padding: var(--spacing-lg) 0;
  }

  .section {
    padding: var(--spacing-lg) 0;
  }
}
