/* Shared phone refinements for the public pages linked from the site footer. */
@media (max-width: 768px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  .header {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    z-index: 100;
    width: 100% !important;
    max-width: none !important;
    min-height: 72px;
    padding: 12px 16px !important;
  }

  .header-inner {
    width: 100%;
    max-width: none !important;
    gap: 10px;
  }

  .header-left {
    width: auto !important;
    min-width: 0;
    justify-content: flex-start !important;
  }

  .header-left a {
    display: inline-flex;
  }

  .header-left img.icon {
    display: block;
    width: clamp(120px, 34vw, 145px) !important;
    max-width: 100%;
    height: auto;
    margin: 0 !important;
  }

  .header-right {
    min-width: 0;
    gap: 8px;
  }

  .header-right a,
  .login-btn,
  .cta-btn,
  .btn-outline,
  .btn-ghost {
    min-height: 44px;
  }

  main,
  .site-content {
    min-width: 0;
  }

  h1,
  h2 {
    text-wrap: balance;
  }

  img {
    max-width: 100%;
  }

  /* About */
  .about-us-section {
    gap: 30px;
    margin-bottom: 0;
    padding: 48px 20px 64px;
  }

  .about-container h1 {
    margin-top: 0;
    font-size: clamp(2.15rem, 10vw, 2.75rem);
    line-height: 1.1;
  }

  .about-container p {
    font-size: 1.05rem;
    line-height: 1.7;
  }

  .about-image {
    width: min(78%, 300px);
    max-width: 300px !important;
    margin-top: 4px !important;
  }

  /* Careers */
  .careers-section {
    padding: 48px 20px 64px !important;
  }

  .careers-container h1 {
    margin-top: 0;
    font-size: clamp(2.15rem, 10vw, 2.75rem);
    line-height: 1.1;
  }

  .careers-card {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .careers-actions,
  .educators-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .careers-actions a,
  .educators-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  /* Educators */
  .educators-section {
    padding: 48px 20px 64px !important;
  }

  .educators-text h1 {
    margin-top: 0;
    font-size: clamp(2.15rem, 10vw, 2.75rem);
    line-height: 1.1;
  }

  .educators-block {
    padding: 20px;
    text-align: left;
    border-radius: 18px;
  }

  .educators-image {
    width: min(82%, 320px);
    max-width: 320px !important;
  }

  /* Pricing */
  .pricing-page {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  .pricing-title {
    font-size: clamp(2.15rem, 10vw, 2.8rem);
    line-height: 1.08;
  }

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

  .pricing-card {
    min-width: 0;
    border-radius: 20px;
  }

  /* Contact, university features and enquiry */
  .contact-page .header,
  .universities-page .header {
    right: auto;
  }

  .universities-page .login-btn {
    background: #ffffff;
    border-color: #d1d5db;
    color: #0f172a;
  }

  .contact-hero,
  .uni-hero,
  .enquiry-hero {
    min-width: 0;
  }

  .contact-details-section,
  .uni-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .contact-card,
  .uni-card,
  .enquiry-form-card {
    min-width: 0;
    border-radius: 20px;
  }

  .universities-page .site-content {
    padding-top: 0 !important;
  }

  .enquiry-title {
    font-size: clamp(2.15rem, 10vw, 2.8rem);
    line-height: 1.08;
  }

  /* Legal pages */
  .legal-section {
    padding: 32px 16px 64px;
  }

  .legal-card {
    min-width: 0;
    padding: 28px 20px 36px;
    border-radius: 20px;
  }

  .legal-heading h1 {
    overflow-wrap: anywhere;
    font-size: clamp(2rem, 9vw, 2.5rem);
    line-height: 1.12;
  }

  .legal-content {
    overflow-wrap: anywhere;
  }

  .legal-table-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 360px) {
  .header {
    padding-right: 14px !important;
    padding-left: 14px !important;
  }

  .header-left img.icon {
    width: 116px !important;
  }

  .header-right a {
    padding-right: 13px !important;
    padding-left: 13px !important;
  }
}
