/* Phone and tablet layouts, loaded after the component styles. */
/* Keep structural widths bounded; carousel content scrolls within its own track. */
html.dt-home-document {
    width: 100%;
    max-width: 100%;
}
body.dt-home-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
}
.dt-home-page > :is(.dt-header, .main-content, #rs-footer) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.dt-home > :is(section, div) { width: 100%; max-width: 100%; min-width: 0; }
.dt-home .dt-home-track { width: 100%; max-width: 100%; min-width: 0; }
.dt-home :is(.dt-hero-grid, .dt-home-enquiry-grid, .dt-achievements-carousel, .dt-visit-grid) { min-width: 0; max-width: 100%; }
.dt-home :is(.dt-hero-grid, .dt-home-enquiry-grid, .dt-achievements-carousel, .dt-visit-grid) > * { min-width: 0; }
.dt-home :is(video, iframe) { max-width: 100%; min-width: 0; }
.dt-home .dt-home-section > .container,
.dt-home .dt-home-section > .container > *,
.dt-home .dt-hero-grid > *,
.dt-home .dt-enquiry-fields > * { min-width: 0; }

/* Let the intro media determine its height instead of clipping it to a fixed grid row. */
.dt-home .dt-home-about .grid-area { align-items: start; }
.dt-home .dt-home-about .grid-area .image-grid { display: block; height: auto; min-height: 0; }
.dt-home .dt-home-about .grid-area .image-grid :is(video, img) {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    object-fit: contain;
    aspect-ratio: auto;
}

@media (max-width: 991px) {
    .dt-home-about > .container > .row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .dt-home-about > .container > .row > div { margin: 0; padding: 0; min-width: 0; }
    .dt-home-enquiry-grid, .dt-visit-grid { grid-template-columns: minmax(0, 1fr); }
    .dt-visit-map iframe { height: 340px; flex: auto; }
    .dt-results-cta-copy, .dt-results-cta-copy > div { min-width: 0; }
    .dt-results-cta { flex-wrap: wrap; }
}

@media (max-width: 767px) {
    .dt-home .container { width: 100%; max-width: 100%; min-width: 0; padding-inline: 20px; }
    .dt-home .dt-visit-grid { width: 100%; grid-template-columns: minmax(0, 1fr); }
    .dt-home :is(.dt-visit-copy, .dt-visit-map, .dt-home-enquiry-panel, .choose-us-part) { width: 100%; min-width: 0; max-width: 100%; }
    .dt-home .dt-home-callout .cta-content { width: 100%; min-width: 0; max-width: 100%; }
    .dt-home-page #rs-footer .footer-top > .container > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dt-home .dt-home-section { padding-block: 40px; }
    .dt-home .sec-title .title, .dt-home .sec-title6 .title { font-size: clamp(26px, 6vw, 30px); line-height: 1.3; }

    .dt-hero { padding-block: 30px; }
    .dt-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    /* Bring the callback ahead of the longer pathway content on phones. */
    .dt-hero-copy { display: contents; }
    .dt-hero-eyebrow { order: 0; margin: 0 0 15px; font-size: 11px; line-height: 1.6; }
    .dt-home .dt-hero-heading { order: 1; margin: 0 0 22px; font-size: clamp(29px, 6.7vw, 38px); line-height: 1.2; letter-spacing: -.6px; text-wrap: initial; overflow-wrap: break-word; }
    .dt-hero-main-action { order: 2; margin-bottom: 26px; }
    .dt-hero-button { min-height: 48px; }
    .dt-hero-aside { order: 3; width: 100%; max-width: 480px; justify-self: center; }
    .dt-hero-photo-item img { width: 100%; height: auto; object-fit: contain; }
    .dt-hero-callback { padding: 24px; }
    .dt-home .dt-hero-callback h2 { font-size: 23px; line-height: 1.35; }
    .dt-hero-callback form { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .dt-hero-callback input:not([type=hidden]), .dt-hero-callback select { height: 48px; font-size: 16px; }
    .dt-hero-callback button { min-height: 48px; font-size: 14px; }
    .dt-hero-programs { order: 4; grid-template-columns: minmax(0, 1fr); margin-top: 26px; }
    .dt-hero-program-card { padding: 22px; }
    .dt-hero-program-card + .dt-hero-program-card { border: 1px solid #ffffff30; }
    .dt-hero-program-label { font-size: 12px; }
    .dt-home .dt-hero-program-title { font-size: 14px; line-height: 1.8; margin-bottom: 16px; }
    .dt-hero-program-link { min-height: 32px; align-items: center; font-size: 14px; }
    .dt-home .dt-hero-photo-controls button { width: 44px; height: 44px; }
    .dt-home .dt-hero-photo-controls { bottom: -48px; }

    .dt-ref-stats-band { padding-block: 20px; }
    .dt-ref-stats-band .dt-home-stats .counter-item { padding: 3px 8px; }
    .dt-ref-stats-band .dt-home-stats .number { font-size: 28px; }
    .dt-ref-stats-band .dt-home-stats .title { font-size: 11px; line-height: 1.5; }

    .dt-home-about .about-intro { padding: 0; }
    .dt-home-about .grid-area { gap: 16px; }
    .dt-home-about .grid-area > div { min-width: 0; }
    .dt-home-about .grid-area .image-grid { height: auto; }
    .dt-home-about .image-grid img, .dt-home-about .image-grid video { width: 100%; height: auto; max-height: 420px; object-fit: contain; }

    .dt-home-programs .row.y-middle { margin-bottom: 24px; }
    .dt-home-programs .row.y-middle > div { margin-bottom: 0; }
    .dt-home-programs .btn-part { margin-top: 18px; text-align: left !important; }
    .dt-home-programs .row:last-child { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin: 0; }
    .dt-home-programs .row:last-child > div { width: auto; max-width: none; padding: 0; }
    .dt-home-programs .categories-item { width: 100%; min-height: 220px; gap: 18px; padding: 24px 24px 0; }
    .dt-home-programs .title { max-width: none; font-size: 25px; margin-bottom: 22px; }
    .dt-home-programs .courses { margin-inline: -24px; padding: 15px 24px; font-size: 14px; }

    .dt-home .dt-achievements-carousel { margin-top: 24px; }
    .dt-home-results .dt-home-controls { justify-content: center; padding: 0; }
    .dt-home-results .dt-achievements-heading .sec-title { max-width: 100%; }
    .dt-achievements-all { min-height: 44px; }
    .dt-results-cta-wrap { padding-bottom: 36px; }
    .dt-results-cta { padding: 24px; gap: 20px; }
    .dt-results-cta > a { min-height: 48px; white-space: normal; }
    .dt-results-cta-copy strong { font-size: 21px; }
    .dt-results-cta-copy > i { flex-shrink: 0; }

    .dt-home-testimonials .dt-home-track { gap: 16px; padding-inline: 0; scroll-padding: 0; }
    .dt-review-card { flex-basis: 100%; min-height: 280px; padding: 24px; }
    .dt-home .dt-review-preview { font-size: 15px; line-height: 1.8; }
    .dt-review-full summary { padding-block: 8px; }
    .dt-home .dt-home-controls { margin-top: 12px; }

    .dt-home-enquiry-grid { gap: 26px; }
    .dt-home-full-enquiry .single-facility { gap: 12px; }
    .dt-home-full-enquiry .single-facility .text-part { min-width: 0; }
    .dt-home-full-enquiry .single-facility h4 { font-size: 20px; line-height: 1.4; }
    .dt-home .dt-home-enquiry-panel > h2 { padding: 24px; font-size: 25px; }
    .dt-home-enquiry-panel form { padding: 24px; }
    .dt-enquiry-fields { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .dt-home-enquiry-panel input:not([type=hidden]), .dt-home-enquiry-panel select, .dt-home-enquiry-panel textarea { font-size: 16px; }
    .dt-home-enquiry-panel button[type=submit] { min-height: 48px; }

    .dt-visit-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 24px; }
    .dt-visit-map iframe { height: 280px; min-height: 280px; }
    .dt-visit-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dt-visit-actions a { justify-content: center; min-height: 48px; padding-inline: 10px; }
    .dt-home-callout .btn-part { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .dt-home-callout .btn-part a { justify-content: center; width: 100%; min-height: 48px; margin: 0; white-space: normal; }
}

@media (max-width: 575px) {
    .dt-home-about .grid-area { grid-template-columns: minmax(0, 1fr); }
    .dt-home .dt-achievements-carousel { gap: 16px; }
    .dt-achievements-carousel > .dt-achievement { flex-basis: 100%; }
    .dt-achievement-score { flex-direction: row; align-items: center; padding: 20px; }
    .dt-achievement-score > span { text-align: right; }
    .dt-achievement-score strong { font-size: 36px; }
    .dt-achievement-image { padding: 12px; }
    .dt-achievement-image img { height: auto; max-height: 360px; aspect-ratio: 4 / 5; }
    .dt-achievement-student { padding: 20px; }
    .dt-home .dt-achievement-student h3 { font-size: 22px; }
}

@media (max-width: 359px) {
    .dt-home .container { padding-inline: 16px; }
    .dt-hero-callback, .dt-home-enquiry-panel form, .dt-visit-grid { padding: 20px 16px; }
    .dt-visit-actions { grid-template-columns: minmax(0, 1fr); }
}
