/* Device-friendly refinements for the deployed build. */
:root { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
img, video, iframe, svg { max-width: 100%; }
button, input, select, textarea { max-width: 100%; }
input, select, textarea { font-size: 16px; }
a, button { -webkit-tap-highlight-color: transparent; }
button, .button, .workshop-primary, .workshop-secondary, .card-select-button, .prebook-submit { min-height: 44px; }
.page-width, .workshop-page-width { width: min(1180px, calc(100% - 40px)); }
.hero h1, .workshop-hero h1, .about-story__header h2, .workshop-gallery-heading h2,
.section-heading h2, .about-copy h2, .contact-info h2 { overflow-wrap: anywhere; }
.program-card, .calendar-card, .workshop-gallery-card, .team-card, .admin-post { min-width: 0; }

@media (max-width: 900px) {
  .header { gap: 16px; padding-inline: 20px; }
  .desktop-nav { gap: 14px; }
  .header-actions { gap: 10px; }
  .footer-main, .footer-inner { gap: 34px; }
  .about-story__header, .workshop-gallery-heading { gap: 28px; }
  .contact-box { padding: 38px; }
}

@media (max-width: 700px) {
  .page-width, .workshop-page-width { width: min(100% - 30px, 1180px); }
  .announcement { height: auto; min-height: 34px; padding: 7px 15px; line-height: 1.3; text-align: center; }
  .header { height: auto; padding-inline: 15px; }
  .brand img { height: 40px; max-width: 175px; }
  .header .header-actions { flex: 0 1 auto; min-width: 0; margin-left: auto; flex-wrap: wrap; gap: 8px; align-items: center; }
  .header .header-contact { display: inline-flex; min-width: 0; padding: 8px 10px; font-size: 13px; white-space: nowrap; align-items: center; gap: 6px; }
  .header .header-contact::before { display: inline-block; font-size: 16px; line-height: 1; }
  .header .header-contact[href*="/about"]::before { content: '👥'; }
  .header .header-contact[href*="/blog"]::before { content: '📝'; }
  .header .header-contact[href*="#contact"]::before { content: '✉️'; }
  .header .header-book-button { display: inline-flex; max-width: 100%; margin: 0; padding: 10px 14px; white-space: nowrap; }
  .mobile-nav { top: 68px; max-height: calc(100svh - 68px); overflow-y: auto; }
  .hero, .workshop-hero { min-height: auto; }
  .hero { height: auto; padding-block: 80px 64px; }
  .hero h1, .workshop-hero h1 { font-size: clamp(34px, 10vw, 46px); line-height: 1.04; }
  .hero-content > p, .workshop-hero p { font-size: 16px; }
  .hero-buttons, .workshop-hero-actions, .final-cta-actions { width: 100%; }
  .hero-buttons > *, .workshop-hero-actions > *, .final-cta-actions > * { flex: 1 1 auto; }
  .hero-buttons > * { max-width: 100%; }
  .hero-buttons .button, .workshop-hero-actions .button { min-height: 44px; padding: 12px 16px; }
  .hero-buttons .button svg, .workshop-hero-actions .button svg { width: 16px; height: 16px; }
  .trust-inner, .contact-details, .field-grid, .form-two, .two-columns { grid-template-columns: 1fr; }
  .trust p { grid-column: auto; margin: 0 0 3px; }
  .trust div { border-left: 0; border-top: 1px solid #d2deea; padding: 14px 0 0; }
  .section, .why-section, .about-intro, .gallery-section, .contact { padding-block: 64px; }
  .why-photo img, .about-visual, .about-story__media, .about-story__media img { height: auto; min-height: 0; }
  .about-visual { padding-left: 42px; }
  .purpose-cards { width: 125px; top: 12px; }
  .purpose-cards article { min-height: 94px; padding: 9px; }
  .purpose-cards p { font-size: 9px; }
  .contact-box, .enquiry-form, .prebook-form { padding: 26px 20px; }
  .footer-bottom, .gallery-footnote { align-items: flex-start; }
  .month-tabs { margin-inline: -2px; padding-bottom: 7px; overflow-x: auto; scrollbar-width: thin; }
  .month-tabs button { flex: 0 0 auto; min-height: 44px; }
  .calendar-card-body { padding: 18px; }
  .calendar-card-title h4 { font-size: 19px; }
  .workshop-choice-grid button { min-height: 52px; }
  .admin-header { height: auto; min-height: 64px; gap: 12px; padding: 12px 15px; }
  .admin-header strong { font-size: 15px; }
}

@media (max-width: 430px) {
  .page-width, .workshop-page-width { width: calc(100% - 24px); }
  .header { padding-inline: 12px; flex-wrap: wrap; gap: 10px; }
  .brand img { height: 36px; max-width: 150px; }
  .header .header-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
  .header .header-contact { display: inline-flex !important; min-width: 0; padding: 9px 10px; font-size: 13px; white-space: nowrap; align-items: center; gap: 6px; }
  .header .header-contact::before { display: inline-block; margin-right: 6px; font-size: 14px; line-height: 1; }
  .header .header-contact[href*="/about"]::before { content: '👥'; }
  .header .header-contact[href*="/blog"]::before { content: '📝'; }
  .header .header-contact[href*="#contact"]::before { content: '✉️'; }
  .header .header-book-button { padding: 9px 11px; font-size: 12px; }
  .hero { padding-block: 64px 48px; }
  .hero h1, .workshop-hero h1 { font-size: clamp(32px, 10.2vw, 42px); }
  .hero-points { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .hero-buttons, .workshop-hero-actions, .confirmation-actions { display: grid !important; grid-template-columns: 1fr; gap: 12px; width: 100%; }
  .hero-buttons > *, .workshop-hero-actions > *, .confirmation-actions > * { flex: 1 1 auto !important; width: 100% !important; max-width: 100% !important; min-height: 44px !important; }
  .hero-buttons { justify-items: center; }
  .hero-buttons > * { max-width: 100%; }
  .hero-buttons .button, .workshop-hero-actions .button, .confirmation-actions .button { min-height: 44px !important; padding: 12px 18px !important; }
  .hero-buttons .button svg, .workshop-hero-actions .button svg, .confirmation-actions .button svg { width: 16px !important; height: 16px !important; }
  .section-heading h2, .about-copy h2, .contact-info h2 { font-size: 30px; }
  .testimonial-grid { gap: 10px; }
  .gallery-mosaic { gap: 8px; }
  .gallery-mosaic img { height: 112px; }
  .gallery-mosaic .large { height: 232px; }
  .contact-box, .enquiry-form, .prebook-form { padding: 23px 15px; }
  .footer-bottom { padding-inline: 15px; }
  .footer-bottom div { flex-wrap: wrap; }
  .workshop-meta { align-items: flex-start; line-height: 1.45; }
  .workshop-lightbox { padding-inline: 12px; }
}

@media (max-width: 360px) {
  .header { gap: 8px; padding-inline: 10px; }
  .brand img { max-width: 122px; height: 32px; }
  .header .header-actions { gap: 6px; }
  .header .header-contact { font-size: 12px; padding: 8px 9px; }
  .header .header-book-button { min-height: 40px; padding-inline: 10px; font-size: 12px; }
  .hero-buttons > * { max-width: 100%; }
  .hero-buttons .button { padding: 11px 14px; }
}

@media (max-width: 1024px) {
  .hero { min-height: auto; padding-block: 78px 62px; }
  .hero-content { max-width: 100%; }
  .hero h1, .workshop-hero h1 { max-width: 100%; }
  .hero-points { flex-wrap: wrap; }
  .about-story__media, .about-visual, .why-photo img { height: auto; min-height: 0; }
}

@media (max-width: 768px) {
  .program-grid, .testimonial-grid, .team-grid, .workshop-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-mosaic { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 100%; overflow: visible; }
  .gallery-mosaic > * { width: 100%; min-width: 0; }
  .gallery-mosaic img { width: 100%; height: auto; object-fit: cover; }
  .explore-media { width: 100%; max-width: 100%; }
  .footer-main, .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .contact-details { gap: 16px; }
}

@media (max-width: 560px) {
  .page-width, .workshop-page-width { width: min(100% - 24px, 1180px); }
  .announcement { font-size: 12px; }
  .hero, .workshop-hero { padding-block: 56px 44px; }
  .hero h1, .workshop-hero h1 { font-size: clamp(30px, 8vw, 40px); }
  .hero-content > p, .workshop-hero p { font-size: 15px; line-height: 1.5; }
  .hero-buttons, .workshop-hero-actions, .final-cta-actions { flex-direction: column; align-items: stretch; }
  .hero-buttons > *, .workshop-hero-actions > *, .final-cta-actions > * { width: 100%; }
  .program-grid, .testimonial-grid, .team-grid, .workshop-choice-grid { grid-template-columns: 1fr; }
  .section-heading h2, .about-copy h2, .contact-info h2 { font-size: 28px; }
  .gallery-mosaic { grid-template-columns: 1fr; }
  .gallery-mosaic .large { height: auto; min-height: 180px; }
  .contact-box, .enquiry-form, .prebook-form { padding: 22px 16px; }
  .footer-main, .footer-inner, .footer-bottom { padding-inline: 0; }
}

/* Keep the homepage classroom carousel in one continuously scrolling row. */
.gallery-carousel-shell .gallery-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
}

.gallery-carousel-shell .gallery-track > * {
  flex-shrink: 0 !important;
  width: auto;
  min-width: 0;
}

.gallery-carousel-shell .gallery-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: none) {
  .program-card:hover, .calendar-card:hover, .workshop-gallery-card:hover { transform: none; }
  .calendar-card:hover .calendar-card-image img, .workshop-gallery-card:hover img { transform: none; }
}

/* Accessible responsive header navigation. */
.mobile-menu-toggle,
.responsive-mobile-nav { display: none; }

/* The source logo is close to square, so height-based sizing made it appear too small. */
.header .brand {
  flex: 0 0 auto;
  height: 100%;
  overflow: hidden;
}

.header .brand img {
  width: 118px;
  max-width: none;
  height: auto;
}

@media (max-width: 850px) {
  .header {
    min-height: 82px;
    height: 82px;
    flex-wrap: nowrap;
    position: sticky;
  }

  .header .header-actions { display: none !important; }

  .mobile-menu-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin-left: auto;
    padding: 0;
    color: #fff;
    background: #0b6f68;
    border: 2px solid #fff;
    border-radius: 7px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .24);
    cursor: pointer;
  }

  .mobile-menu-toggle svg { width: 25px; height: 25px; }
  .mobile-menu-toggle:hover,
  .mobile-menu-toggle:focus-visible { background: #075b56; }

  .responsive-mobile-nav {
    display: flex;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    position: absolute;
    z-index: 20;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    max-height: calc(100dvh - 82px);
    padding: 10px 16px 18px;
    overflow-y: auto;
    color: #173a2a;
    background: linear-gradient(180deg, #f4faf3 0%, #e7f4e8 100%);
    border-top: 1px solid #c9dfc9;
    box-shadow: 0 14px 28px rgba(19, 59, 42, .24);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }

  .responsive-mobile-nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .responsive-mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 8px;
    color: #173a2a !important;
    border-bottom: 1px solid #cddfce;
    font-size: 15px;
    font-weight: 700;
    transition: color .18s ease, background-color .18s ease, padding-left .18s ease;
  }

  .responsive-mobile-nav a:not(.header-book-button):hover,
  .responsive-mobile-nav a:not(.header-book-button):focus-visible {
    color: #08746d !important;
    background: rgba(11, 122, 117, .08);
    padding-left: 14px;
  }

  .responsive-mobile-nav .header-contact::before {
    display: none !important;
    content: none !important;
  }

  .responsive-mobile-nav .header-book-button {
    justify-content: center;
    margin-top: 14px;
    color: #fff !important;
    background: #0b7a75;
    border: 1px solid #096b66;
    border-radius: 5px;
    box-shadow: 0 5px 14px rgba(3, 20, 10, .2);
  }

  .responsive-mobile-nav .header-book-button:hover,
  .responsive-mobile-nav .header-book-button:focus-visible {
    color: #fff !important;
    background: #096761;
    transform: translateY(-1px);
  }
}

@media (max-width: 430px) {
  .header { padding-inline: 12px; }
  .header .brand img { width: 112px; max-width: calc(100vw - 88px); height: auto; }
}

@media (max-width: 360px) {
  .header { padding-inline: 10px; }
  .header .brand img { width: 102px; max-width: calc(100vw - 76px); height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .responsive-mobile-nav { transition: none; }
}
