@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .page {
    max-width: 100%;
    width: 100%;
    padding: 16px 12px 40px;
    overflow-x: hidden;
  }

  header {
    margin-bottom: 12px;
  }

  .top-actions,
  .content-grid,
  .program-grid,
  .spain-visas-program-grid,
  .spain-visas-info-row,
  .spain-life-adaptation-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .top-actions {
    gap: 8px;
    margin-bottom: 12px;
  }

  .btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .card,
  .main-card,
  .sidebar-section,
  .spain-life-adaptation,
  .spain-life-adaptation-card,
  .spain-visas-program-card,
  .program,
  .cta {
    max-width: 100%;
    min-width: 0;
    border-radius: 12px;
  }

  .main-card,
  .sidebar-section,
  .spain-life-adaptation {
    padding: 14px 12px;
    overflow: hidden;
  }

  .cta {
    padding: 12px;
    margin: 12px 0;
  }

  h1 {
    font-size: 20px;
    line-height: 1.25;
    margin-bottom: 10px;
  }

  h2 {
    font-size: 16px;
    line-height: 1.35;
    margin: 16px 0 8px;
  }

  h3 {
    font-size: 15px;
    line-height: 1.35;
  }

  .facts {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.35;
  }

  .facts th,
  .facts td {
    padding: 8px;
    min-width: 112px;
  }

  .spain-visas-price-table th:last-child,
  .spain-visas-price-table td:last-child {
    width: auto;
    white-space: normal;
  }

  .spain-visas-program-card {
    padding: 12px;
  }

  .spain-visas-program-card h2 {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 10px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .spain-visas-info-pill {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .input,
  textarea {
    min-width: 0;
    font-size: 16px;
  }

  aside {
    position: static;
  }

  .theme-toggle {
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }

  .passportu-widget {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(72px, env(safe-area-inset-bottom));
  }

  .passportu-widget__launcher {
    width: 44px;
    height: 44px;
    padding: 5px;
  }
}
