/* ==========================================================================
   Paravel Affiliate Website - Responsive Styles
   Mobile-first responsive breakpoints
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tablet (768px - 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --text-6xl: 2.75rem;
    --text-5xl: 2.25rem;
    --text-4xl: 1.875rem;
  }

  .container {
    padding: 0 var(--space-5);
  }

  /* Navigation */
  .nav-list {
    gap: var(--space-4);
  }

  .nav-link {
    font-size: var(--text-xs);
  }

  /* Hero */
  .hero-split {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero-content {
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

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

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

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  /* Featured Product */
  .featured-product {
    grid-template-columns: 1fr;
    padding: var(--space-8);
  }

  /* Product Detail */
  .product-info {
    padding-left: 0;
    margin-top: var(--space-8);
  }

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

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

/* --------------------------------------------------------------------------
   Mobile Large (576px - 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --text-6xl: 2.25rem;
    --text-5xl: 2rem;
    --text-4xl: 1.5rem;
    --text-3xl: 1.25rem;
    --header-height: 70px;
  }

  /* Header */
  .header-inner {
    padding: 0 var(--space-4);
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    padding: calc(var(--header-height) + var(--space-6)) var(--space-6) var(--space-6);
    transition: right var(--transition);
    z-index: 1000;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    overflow-y: auto;
  }

  .nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-item {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-link {
    display: block;
    padding: var(--space-4) 0;
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--color-text);
  }

  .nav-link::after {
    display: none;
  }

  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding: 0 0 var(--space-4) var(--space-4);
    display: none;
    background: transparent;
  }

  .nav-dropdown a {
    display: block;
    padding: var(--space-2) 0;
    font-size: var(--text-base);
    color: var(--color-text-light);
  }

  .nav-dropdown a:hover {
    color: var(--color-text);
    background: transparent;
    padding-left: var(--space-2);
  }

  .nav-item.active .nav-dropdown {
    display: block;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
  }

  .nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-black);
    transition: all var(--transition);
  }

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

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

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

  /* Body overlay when menu is open */
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 1;
  }

  /* Hero */
  .hero {
    min-height: 70vh;
    padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-8);
  }

  .hero-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
  }

  .hero-subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

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

  /* Sections */
  .section {
    padding: var(--space-12) 0;
  }

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

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

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .value-props-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  /* Cards */
  .card-body {
    padding: var(--space-4);
  }

  /* Product Detail */
  .product-detail {
    padding-top: calc(var(--header-height) + var(--space-6));
  }

  .product-detail .container {
    display: flex;
    flex-direction: column;
  }

  .product-gallery {
    position: static;
    order: 1;
  }

  .product-info {
    order: 2;
    padding-left: 0;
    margin-top: var(--space-6);
  }

  .product-title {
    font-size: var(--text-2xl);
  }

  .product-price {
    font-size: var(--text-2xl);
  }

  .product-thumbnails {
    overflow-x: auto;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }

  .product-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
  }

  /* Specs Table */
  .specs-table {
    display: block;
    overflow-x: auto;
  }

  .specs-table th {
    width: auto;
    min-width: 120px;
  }

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

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-disclaimer {
    text-align: center;
    max-width: none;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-post-title {
    font-size: var(--text-3xl);
  }

  /* Newsletter */
  .newsletter-form {
    flex-direction: column;
  }

  /* Breadcrumbs */
  .breadcrumbs-list {
    flex-wrap: wrap;
  }

  /* Press Logos */
  .press-logos {
    gap: var(--space-6);
  }

  .press-logos img {
    height: 24px;
  }
}

/* --------------------------------------------------------------------------
   Mobile Small (max 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  :root {
    --text-6xl: 2rem;
    --text-5xl: 1.75rem;
    --text-4xl: 1.375rem;
    --text-3xl: 1.125rem;
    --text-2xl: 1rem;
  }

  .container {
    padding: 0 var(--space-4);
  }

  /* Logo */
  .logo img {
    height: 32px;
  }

  .logo-text {
    font-size: var(--text-lg);
    letter-spacing: 0.03em;
  }

  /* Buttons */
  .btn {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-xs);
  }

  .btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-sm);
  }

  /* Hero */
  .hero {
    min-height: 60vh;
  }

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

  /* Products Grid */
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  /* Value Props */
  .value-props-grid {
    grid-template-columns: 1fr;
  }

  .value-prop {
    padding: var(--space-4);
  }

  /* Cards */
  .product-card .card-title {
    font-size: var(--text-base);
  }

  .card-price {
    font-size: var(--text-xl);
  }

  /* FAQ */
  .faq-question {
    font-size: var(--text-base);
    padding: var(--space-4) 0;
  }

  /* Forms */
  .form-input,
  .form-textarea,
  .form-select {
    padding: var(--space-3);
    font-size: var(--text-sm);
  }

  /* Category Hero */
  .category-hero {
    padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-8);
  }

  /* Blog Post */
  .blog-post-content {
    font-size: var(--text-sm);
  }

  .blog-post-content h2 {
    font-size: var(--text-xl);
  }

  .blog-post-content h3 {
    font-size: var(--text-lg);
  }

  /* TOC */
  .toc {
    padding: var(--space-4);
  }
}

/* --------------------------------------------------------------------------
   Touch Device Optimizations
   -------------------------------------------------------------------------- */
@media (hover: none) {
  .card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .product-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .blog-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .btn-cta:hover {
    transform: none;
  }

  .card:hover .card-image img,
  .blog-card:hover .blog-card-image img {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .header,
  .footer,
  .nav,
  .btn-cta,
  .newsletter-section {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  a {
    text-decoration: underline;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  .product-detail {
    padding-top: 0;
  }
}

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

/* --------------------------------------------------------------------------
   High Contrast Mode Support
   -------------------------------------------------------------------------- */
@media (prefers-contrast: high) {
  :root {
    --color-text: #000000;
    --color-text-light: #333333;
    --color-border: #666666;
  }

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

  .nav-link::after {
    height: 3px;
  }
}

/* --------------------------------------------------------------------------
   Dark Mode Support (Optional Future Implementation)
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here if needed in the future */
  /* For now, we maintain the brand's light, warm aesthetic */
}

/* --------------------------------------------------------------------------
   Large Screens (1400px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  :root {
    --text-6xl: 4rem;
    --text-5xl: 3.25rem;
  }

  .container {
    padding: 0 var(--space-8);
  }

  .hero {
    min-height: 85vh;
  }

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

/* --------------------------------------------------------------------------
   Extra Large Screens (1800px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1800px) {
  :root {
    --max-width: 1400px;
    --max-width-wide: 1600px;
  }

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