/* ==========================================================================
   MOBILE-REFINEMENTS.CSS — OranjeLift.nl
   Responsive fine-tuning voor mobiel (max-width: 767px)
   ========================================================================== */

/* ---------- Touch-friendly improvements ---------- */
@media (max-width: 767px) {
  /* Bigger tap targets */
  .btn {
    min-height: 48px;
    padding: 14px 24px;
  }

  /* Better text sizing on small screens */
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  h2 {
    font-size: 1.375rem;
    line-height: 1.3;
  }

  /* Content sections: tighter spacing on mobile */
  .content-section {
    padding: var(--space-lg) 0;
  }

  .content-section h2 {
    margin-bottom: var(--space-md);
  }

  /* Images: full width on mobile, reduced border radius */
  .content-image {
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    border-radius: 0;
  }

  .content-image img {
    border-radius: 0;
    max-height: 280px;
  }

  /* Footer: stack columns nicely */
  .footer-grid {
    gap: var(--space-xl);
  }

  .footer-col:not(:first-child) {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Hero: ensure text is readable */
  .hero--image .hero-content h1 {
    font-size: 1.75rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .hero-subtitle {
    font-size: 0.9375rem;
  }

  /* Review badge smaller on mobile */
  .hero-review {
    padding: 8px var(--space-md);
  }

  .hero-review-text {
    font-size: 0.75rem;
  }

  /* Tables: make scrollable on mobile */
  .content-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .content-table thead,
  .content-table tbody,
  .content-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }
  .content-table thead {
    background: linear-gradient(135deg, #1C1E21 0%, #000000 100%);
  }
  .content-table thead th {
    color: #ffffff;
  }

  /* Sticky CTA: larger icons for touch */
  .sticky-cta svg {
    width: 24px;
    height: 24px;
  }

  /* Better spacing for mobile sections */
  .section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  /* CTA sections on mobile */
  .cta-section {
    padding: var(--space-xl) 0;
  }

  .cta-section h2 {
    font-size: 1.25rem;
  }
}

/* ---------- Small phones (max-width: 359px) ---------- */
@media (max-width: 359px) {

  /* Container: meer ruimte voor content */
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }

  /* Typography: voorkom tekst-overflow */
  body { font-size: 15px; }
  h1 { font-size: 1.5rem !important; line-height: 1.2; }
  h2 { font-size: 1.2rem; }
  .hero--image .hero-content h1 { font-size: 1.5rem !important; }
  .hero-subtitle { font-size: 0.875rem; }

  /* Buttons: full-width + kleiner */
  .btn {
    font-size: 0.875rem;
    padding: 12px 16px;
    width: 100%;
    justify-content: center;
  }

  /* Hero CTA: stack verticaal */
  .hero-cta,
  .cta-btn-group {
    flex-direction: column;
    gap: var(--space-sm);
  }
  .cta-btn-group .cta-btn-item { width: 100%; }
  .cta-btn-group .btn { width: 100%; }

  /* Hero tags: kleiner + scroll */
  .hero-tags {
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .hero-tag {
    font-size: 0.75rem;
    padding: 6px 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Stats grid: 1 kolom op extra kleine schermen */
  .stats-grid,
  .stats-row {
    grid-template-columns: 1fr !important;
  }
  .stat-number { font-size: 1.75rem !important; }

  /* Page TOC: scrollbaar */
  .page-toc .container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding: 8px 4px;
  }
  .toc-link {
    font-size: 0.75rem;
    padding: 6px 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Grids: alles naar 1 kolom */
  .usp-grid,
  .lift-cards,
  .services-grid,
  .info-boxes,
  .locatie-cards,
  .intro-with-image {
    grid-template-columns: 1fr !important;
  }

  /* Tabellen: kleiner + scrollbaar */
  .info-table,
  .comparison-table,
  .content-table {
    font-size: 0.8125rem;
    min-width: unset !important;
  }
  .info-table th,
  .info-table td,
  .comparison-table th,
  .comparison-table td {
    padding: 8px 8px;
  }

  /* Pricing box */
  .pricing-box {
    padding: var(--space-lg) var(--space-md) !important;
  }
  .price-range { font-size: 2rem !important; }

  /* CTA section buttons */
  .cta-section-buttons {
    flex-direction: column;
    gap: var(--space-sm);
  }
  .cta-section-buttons .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.9375rem;
  }

  /* Sticky CTA: compacter */
  .sticky-cta {
    height: 56px;
  }
  .sticky-cta a {
    font-size: 13px;
    gap: 4px;
  }
  .sticky-cta svg {
    width: 18px;
    height: 18px;
  }

  /* Review badge */
  .hero-review {
    flex-direction: column;
    gap: 4px;
    padding: 6px 10px;
  }
  .hero-review-text { font-size: 0.7rem; }

  /* Breadcrumb: compacter */
  .breadcrumb-nav {
    padding: 8px;
    font-size: 0.75rem;
  }

  /* Tech specs: 1 kolom */
  .tech-specs {
    grid-template-columns: 1fr !important;
    gap: var(--space-sm);
  }

  /* Stappen: compacter */
  .steps-grid {
    gap: var(--space-sm);
  }

  /* FAQ: betere touch targets */
  .faq-question {
    padding: 14px 0;
    font-size: 0.9375rem;
  }

  /* Footer: strakker */
  .footer-bottom p {
    font-size: 0.7rem !important;
  }

  /* Hamburger menu: iets kleiner */
  .hamburger {
    width: 44px;
    height: 44px;
  }
}

/* ---------- Tablet refinements (768px - 1023px) ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .content-image {
    max-width: 380px;
  }

  .galerij-grid {
    gap: var(--space-md);
  }
}

/* ---------- Touch hover prevention ---------- */
@media (hover: none) {
  .btn:hover,
  .review-badge:hover,
  .footer-review-badge:hover,
  .footer-social a:hover,
  .cta-section-buttons .btn:hover,
  .faq-item:hover {
    transform: none;
  }

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

  .content-image:hover img {
    transform: none;
  }

  .galerij-item:hover {
    transform: none;
  }
}

/* ---------- Active states for touch feedback ---------- */
.btn:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.header-logo a:active {
  opacity: 0.8;
}

.header-nav a:active,
.mobile-menu a:active {
  color: var(--color-primary);
}

.footer-col a:active,
.footer-links a:active,
.footer-contact-list a:active {
  color: #fff;
  opacity: 0.85;
}

.footer-review-badge:active {
  transform: scale(0.98);
}

.footer-social a:active {
  transform: scale(0.92);
  opacity: 0.85;
}

.review-badge:active {
  transform: scale(0.98);
}

.faq-question:active {
  color: var(--color-primary);
}

.cta-section-buttons .btn:active {
  transform: scale(0.97);
}

/* ---------- Focus-visible for keyboard navigation ---------- */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(255, 128, 0, 0.2);
}

.header-nav a:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.header-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.faq-question:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  color: var(--color-primary);
}

.footer-social a:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.sticky-cta a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Fallback for browsers without :focus-visible */
@supports not selector(:focus-visible) {
  *:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
  }
}

/* ---------- Safe area insets (iPhone notch) ---------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sticky-cta {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(60px + env(safe-area-inset-bottom));
  }

  @media (max-width: 768px) {
    body {
      padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
  }

  @media (max-width: 359px) {
    .sticky-cta {
      height: calc(56px + env(safe-area-inset-bottom));
    }
    body {
      padding-bottom: calc(56px + env(safe-area-inset-bottom));
    }
  }
}
