/**
 * Mobile Enhancements for weretrade-landing
 * Comprehensive responsive design for all viewports
 *
 * Breakpoints:
 * - 1200px+: Desktop (full layout)
 * - 900px-1199px: Tablet landscape
 * - 600px-899px: Tablet portrait
 * - 400px-599px: Large mobile
 * - <400px: Small mobile
 */

/* ========================================
   Tablet Landscape (900px - 1199px)
   ======================================== */
@media (max-width: 1199px) {
  header {
    padding: 14px clamp(12px, 3vw, 32px);
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    height: 40px;
  }

  .sections {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
  }
}

/* ========================================
   Tablet Portrait (600px - 899px)
   ======================================== */
@media (max-width: 899px) {
  /* Header adjustments */
  header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    width: 100%;
    justify-content: center;
    order: 1;
  }

  .brand > div {
    text-align: center;
  }

  .nav-container {
    order: 2;
    width: 100%;
  }

  /* Hero section */
  .hero {
    padding: clamp(24px, 5vw, 60px) 16px;
    gap: 14px;
  }

  .hero h1 {
    font-size: clamp(26px, 4.5vw, 44px);
  }

  .hero p {
    font-size: clamp(15px, 2.2vw, 18px);
  }

  .logo-strip {
    justify-content: center;
  }

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

  /* Cards grid */
  .sections {
    padding: 16px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 16px;
  }

  /* Stat grid */
  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }

  /* Footer */
  footer {
    padding: 24px 16px;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

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

  .foot-links {
    justify-content: center;
  }

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

  /* Cookie consent modal */
  .wt-cookie-banner {
    max-width: min(440px, 90vw);
    padding: 14px;
  }

  .wt-cookie-actions {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Large Mobile (400px - 599px)
   ======================================== */
@media (max-width: 599px) {
  /* Header - more compact */
  header {
    padding: 10px 12px;
  }

  .brand-logo {
    height: 36px;
  }

  .badge {
    font-size: 11px;
    padding: 4px 10px;
  }

  .brand > div > div:last-child {
    font-size: 13px;
  }

  /* Navigation - simplified */
  .nav-left {
    gap: 8px;
  }

  .nav-left a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .nav-icon-btn {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .theme-icon {
    width: 16px;
    height: 16px;
  }

  /* Hero */
  .hero {
    padding: 20px 12px;
    gap: 12px;
  }

  .hero h1 {
    font-size: clamp(24px, 6vw, 32px);
    line-height: 1.1;
  }

  .hero p {
    font-size: 14px;
    line-height: 1.5;
  }

  .logo-tile {
    height: 50px;
  }

  /* CTA buttons */
  .btn {
    padding: 10px 14px;
    font-size: 14px;
    gap: 8px;
  }

  .btn .icon {
    height: 16px;
    width: 16px;
  }

  .cta-row {
    gap: 8px;
  }

  /* Banner placeholders */
  .banner-placeholder {
    padding: 16px;
    font-size: 13px;
  }

  .banner-placeholder.small {
    min-height: 100px;
  }

  .banner-placeholder.wide {
    min-height: 140px;
  }

  .banner-pill {
    font-size: 11px;
    padding: 4px 8px;
  }

  .banner-note {
    font-size: 0.8rem;
  }

  /* Cards */
  .sections {
    padding: 12px;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .card h3 {
    font-size: 18px;
  }

  .kicker {
    font-size: 11px;
  }

  /* Stats */
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stat {
    padding: 10px;
  }

  .stat .label {
    font-size: 11px;
  }

  .stat .value {
    font-size: 20px;
  }

  .stat .sub {
    font-size: 11px;
  }

  /* Link list */
  .link-list {
    gap: 8px;
  }

  .link-list a {
    font-size: 14px;
  }

  .link-list img {
    height: 20px;
  }

  /* Quotes */
  .quote {
    padding: 10px;
  }

  .quote .author {
    font-size: 11px;
  }

  .quote .text {
    font-size: 14px;
  }

  /* Footer */
  footer {
    padding: 20px 12px;
  }

  .footer-brand img {
    height: 42px;
  }

  .social-row a {
    height: 32px;
    width: 32px;
  }

  .social-row svg {
    height: 16px;
    width: 16px;
  }

  /* Cookie consent - more compact */
  .wt-cookie-banner {
    max-width: min(400px, 94vw);
    padding: 12px;
    border-radius: 14px;
  }

  .wt-cookie-title {
    font-size: 15px;
  }

  .wt-cookie-body {
    font-size: 13px;
  }

  .wt-cookie-label .name {
    font-size: 13px;
  }

  .wt-cookie-label .desc {
    font-size: 11px;
  }

  .wt-cookie-btn {
    padding: 9px 10px;
    font-size: 13px;
  }

  .wt-cookie-links {
    font-size: 11px;
  }
}

/* ========================================
   Small Mobile (<400px)
   ======================================== */
@media (max-width: 399px) {
  /* Ultra compact header */
  header {
    padding: 8px 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    height: 32px;
  }

  .badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .brand > div > div:last-child {
    font-size: 12px;
  }

  /* Hide long company name on very small screens */
  .brand > div > div:last-child {
    display: none;
  }

  /* Navigation - minimal */
  .nav-left {
    gap: 6px;
  }

  .nav-left a {
    padding: 5px 8px;
    font-size: 12px;
  }

  .nav-brands {
    gap: 6px;
  }

  .nav-brand-icon {
    height: 24px !important;
  }

  .nav-icon-btn {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  /* Hero */
  .hero {
    padding: 16px 10px;
    gap: 10px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero p {
    font-size: 13px;
  }

  .logo-tile {
    height: 44px;
  }

  /* Buttons - stack vertically */
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  /* Cards */
  .card {
    padding: 12px;
  }

  .card h3 {
    font-size: 16px;
  }

  /* Stats - single column */
  .stat {
    padding: 8px;
  }

  .stat .value {
    font-size: 18px;
  }

  /* Footer */
  footer {
    padding: 16px 10px;
    gap: 16px;
  }

  .footer-brand {
    flex-direction: column;
    gap: 8px;
  }

  .footer-brand img {
    height: 38px;
  }

  /* Cookie modal - full width on tiny screens */
  .wt-cookie-banner {
    max-width: 96vw;
    padding: 10px;
  }

  .wt-cookie-title {
    font-size: 14px;
  }

  .wt-cookie-body {
    font-size: 12px;
  }

  .wt-toggle {
    width: 42px;
    height: 24px;
  }

  .wt-slider:before {
    height: 18px;
    width: 18px;
  }

  .wt-toggle input:checked + .wt-slider:before {
    transform: translateX(16px);
  }
}

/* ========================================
   Touch device optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn,
  .nav-left a,
  .nav-brand-btn,
  .nav-icon-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Remove hover effects on touch */
  .btn:hover,
  .nav-left a:hover,
  .nav-brand-btn:hover,
  .nav-icon-btn:hover {
    transform: none;
  }

  /* Active states instead */
  .btn:active {
    transform: scale(0.98);
  }

  .nav-brand-btn:active {
    transform: scale(0.97);
  }
}

/* ========================================
   Landscape orientation adjustments
   ======================================== */
@media (max-height: 600px) and (orientation: landscape) {
  /* Reduce vertical padding in landscape */
  .hero {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .sections {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  /* Make cookie modal scrollable */
  .wt-cookie-banner {
    max-height: 85vh;
  }
}

/* ========================================
   Print styles
   ======================================== */
@media print {
  /* Hide interactive elements */
  header,
  .nav-container,
  .wt-cookie-overlay,
  .wt-cookie-banner,
  .cta-row,
  .social-row,
  .banner-placeholder {
    display: none !important;
  }

  /* Optimize for print */
  body {
    background: white;
    color: black;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}
