/* Mobile/tablet stability + refreshed gallery layout */
html,body{max-width:100%;overflow-x:clip}
body{min-width:0}
img,video,iframe,svg{max-width:100%}
section,header,footer,main,.container,.section-head,.hero-shell,.hero-grid,.mentor-grid,.cta-grid{min-width:0}
.display,h1,h2,h3,h4,p,blockquote,li,a,span,small{overflow-wrap:break-word;word-break:normal}

/* Refreshed gallery: spaced editorial masonry cards, original pink overlay retained */
.photo-gallery-section{padding:96px 0;background:#f2efe6}
.photo-gallery-section .gallery-heading{width:min(1320px,calc(100% - 44px));margin:0 auto 42px;text-align:left}
.photo-gallery-section .gallery-heading .kicker{justify-content:flex-start;max-width:760px}
.photo-gallery-section .gallery-heading h2{max-width:1000px;line-height:.92}
.photo-gallery-grid{
  width:min(1400px,calc(100% - 44px));
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  grid-auto-rows:105px;
  gap:16px;
}
.photo-gallery-item{grid-column:span 3;grid-row:span 3;border-radius:22px;box-shadow:0 12px 34px rgba(17,17,15,.10)}
.photo-gallery-item:nth-child(1),.photo-gallery-item:nth-child(6){grid-column:span 6;grid-row:span 4}
.photo-gallery-item:nth-child(3),.photo-gallery-item:nth-child(8){grid-row:span 4}
.photo-gallery-item:nth-child(5){grid-column:span 3;grid-row:span 3}
.photo-gallery-item img{transform:scale(1.001)}
.photo-gallery-item:focus-visible{outline:3px solid var(--pink);outline-offset:4px}

@media (max-width:1100px){
  .container{width:min(100% - 36px,1320px)}
  .photo-gallery-grid{width:min(100% - 36px,1320px);grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:95px;gap:14px}
  .photo-gallery-item{grid-column:span 2;grid-row:span 3}
  .photo-gallery-item:nth-child(1),.photo-gallery-item:nth-child(6){grid-column:span 4;grid-row:span 4}
  .photo-gallery-item:nth-child(3),.photo-gallery-item:nth-child(8){grid-column:span 2;grid-row:span 4}
}

@media (max-width:860px){
  :root{--mobile-pad:18px}
  .container,.photo-gallery-section .gallery-heading{width:calc(100% - (var(--mobile-pad) * 2)) !important;max-width:none !important}
  .section,.mentor,.cta,.media-showcase-section{padding-left:0;padding-right:0}
  .section-head,.mentor-grid,.cta-grid,.about-grid,.hero-grid{grid-template-columns:minmax(0,1fr) !important}
  .section-head>*{width:100%;max-width:100%}

  /* Prevent oversized desktop typography from escaping viewport */
  .hero-main-title,.hero h1{font-size:clamp(2.65rem,11vw,4.5rem) !important;line-height:.92 !important;max-width:100% !important}
  .section h2,.mentor-copy h2,.cta h2,.media-showcase-head h2,.photo-gallery-section .gallery-heading h2{
    font-size:clamp(2.35rem,9.5vw,4.25rem) !important;
    line-height:.98 !important;
    letter-spacing:-.055em !important;
    max-width:100% !important;
  }
  div#workshop-day{font-size:clamp(1.8rem,7vw,2.7rem) !important;line-height:1.05 !important;letter-spacing:-.04em !important}
  .hero-copy,.mentor-copy,.section-intro{max-width:100% !important;width:100% !important}
  .hero-copy p,.mentor-copy p,.section-intro{font-size:1rem !important;line-height:1.65}

  /* Fixed-width desktop elements */
  .hero-portrait,.hero-portrait img,.mentor-image,.portrait-card,.cta-box,.day-card,.audience-card,.stat-box{
    width:100% !important;max-width:100% !important;min-width:0 !important;
  }
  .hero-portrait img{height:auto !important;object-fit:contain}
  .mentor-image,.portrait-card{min-height:0 !important;height:auto !important;aspect-ratio:4/5}
  .media-showcase-head{display:block !important}
  .media-slide{grid-template-columns:minmax(0,1fr) !important}
  .media-video-frame{width:100%;aspect-ratio:16/9}
  .media-card-meta h3{font-size:1.05rem}

  /* Gallery tablet */
  .photo-gallery-section{padding:72px 0}
  .photo-gallery-section .gallery-heading{margin-bottom:28px}
  .photo-gallery-grid{width:calc(100% - 36px);grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:155px;gap:12px}
  .photo-gallery-item,.photo-gallery-item:nth-child(n){grid-column:span 1;grid-row:span 1;border-radius:18px}
  .photo-gallery-item:nth-child(1),.photo-gallery-item:nth-child(4),.photo-gallery-item:nth-child(7){grid-column:span 2;grid-row:span 2}
  .photo-gallery-plus{width:54px;height:54px}

  .gallery-lightbox-prev{left:8px}.gallery-lightbox-next{right:8px}
  .gallery-lightbox-close{top:12px;right:12px}
}

@media (max-width:620px){
  :root{--mobile-pad:12px}
  body{font-size:15px}
  .container{width:calc(100% - 24px) !important}
  .nav{width:calc(100% - 16px) !important;padding:8px 10px !important;gap:8px}
  .nav .logo{min-width:0 !important;max-width:58%}
  .nav .logo img{width:auto !important;height:40px !important;max-width:100% !important}
  .nav-links{max-width:100%;min-width:0}
  .nav-cta{white-space:nowrap;padding:10px 12px !important;font-size:.72rem !important}

  .hero-main-title,.hero h1{font-size:clamp(2.35rem,12vw,3.45rem) !important}
  .section h2,.mentor-copy h2,.cta h2,.media-showcase-head h2,.photo-gallery-section .gallery-heading h2{font-size:clamp(2.15rem,11vw,3.3rem) !important}
  .hero-meta{display:flex !important;flex-wrap:wrap !important;gap:8px 12px !important;width:100% !important}
  .hero-meta span{min-width:0;font-size:.72rem !important}
  .hero-ctas,.cta-box .btn{width:100%}
  .hero-ctas .btn,.cta-box .btn{justify-content:center;text-align:center}

  .day-card h3{font-size:clamp(2rem,10vw,2.8rem) !important}
  .cta-price{font-size:clamp(3rem,15vw,4.2rem) !important}
  .quote-card{padding:24px 18px !important}
  .quote-card blockquote{font-size:1rem !important;line-height:1.55}
  .testimonial-person{align-items:flex-start}

  .trusted-logo-item{width:150px !important;flex-basis:150px !important;height:170px !important}
  .scroll-register-bar{width:calc(100% - 14px) !important;left:7px !important;right:7px !important}
  .scroll-register-copy{overflow:hidden}

  .photo-gallery-grid{width:calc(100% - 24px);grid-auto-rows:128px;gap:10px}
  .photo-gallery-item:nth-child(1),.photo-gallery-item:nth-child(4),.photo-gallery-item:nth-child(7){grid-row:span 2}
  .photo-gallery-item::before{opacity:.08}
  .photo-gallery-plus{opacity:1;width:42px;height:42px;font-size:1.25rem;transform:translate(-50%,-50%) scale(1);background:rgba(255,63,137,.78);border-width:1.5px}

  .gallery-lightbox-prev,.gallery-lightbox-next{width:40px;height:54px;font-size:1.35rem}
  .photo-gallery-lightbox{padding:14px}
}

@media (max-width:390px){
  .nav .logo{max-width:52%}
  .nav-cta{padding:9px 9px !important;font-size:.66rem !important}
  .hero-main-title,.hero h1{font-size:2.25rem !important}
  .photo-gallery-grid{grid-auto-rows:112px}
}

/* Reference-style gallery: editorial header, category filters and uniform 4-column grid */
.photo-gallery-section{
  padding:22px 0 84px !important;
  background:#f7f7f7 !important;
}
.photo-gallery-section .gallery-heading {
    width: min(1050px, calc(100% - 44px)) !important;
    margin: 0 auto 22px !important;
    padding: 12px 28px 10px !important;
    background: #f7f7f7 !important;
    text-align: center !important;
}
.photo-gallery-section .gallery-heading .kicker{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:12px !important;
  max-width:none !important;
  margin:0 auto 12px !important;
  font-size:.68rem !important;
  line-height:1.35 !important;
  letter-spacing:.16em !important;
  text-transform:uppercase !important;
  color:#111 !important;
}
.photo-gallery-section .gallery-heading .kicker::before{
  content:"";
  width:24px;
  height:1px;
  flex:0 0 24px;
  background:#f7f7f7 !important
}
.photo-gallery-section .gallery-heading h2{
  max-width:none !important;
  margin:0 !important;
  font-size:clamp(3.2rem,5vw,5rem) !important;
  line-height:.88 !important;
  letter-spacing:-.055em !important;
  text-align:center !important;
  color:#0c0c0b !important;
}
.gallery-filters{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px 18px;
  width:min(760px,calc(100% - 32px));
  margin:0 auto 46px;
}
.gallery-filter {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    padding: 11px 17px;
    color: #68666b;
    font: 600 .9rem / 1 Manrope, sans-serif;
    letter-spacing: .16em;
    cursor: pointer;
    transition: border-color .25s ease, color .25s ease, background .25s ease;
    text-transform: uppercase;
}
.gallery-filter:hover,.gallery-filter:focus-visible{color:#111;outline:none}
.gallery-filter.is-active{border-color:#111;color:#111;background:#fff}
.photo-gallery-grid{
  width:calc(100% - 46px) !important;
  max-width:none !important;
  margin:0 auto !important;
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  grid-auto-rows:auto !important;
  gap:22px !important;
}
.photo-gallery-item,.photo-gallery-item:nth-child(n){
  grid-column:auto !important;
  grid-row:auto !important;
  width:100% !important;
  aspect-ratio:1.36/1 !important;
  min-height:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  overflow:hidden !important;

}
.photo-gallery-item img{width:100%;height:100%;object-fit:cover;border-radius:5%;}
.photo-gallery-item.is-filtered-out{display:none !important}

@media (max-width:1100px){
  .photo-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:16px !important}
  .photo-gallery-section .gallery-heading h2{font-size:clamp(2.8rem,7vw,4.6rem) !important}
}
@media (max-width:640px){
  .photo-gallery-section{padding:18px 0 58px !important}
  .photo-gallery-section .gallery-heading{width:calc(100% - 24px) !important;padding:14px 12px 16px !important;margin-bottom:18px !important}
  .photo-gallery-section .gallery-heading .kicker{font-size:.57rem !important;letter-spacing:.11em !important;gap:8px !important}
  .photo-gallery-section .gallery-heading .kicker::before{width:16px;flex-basis:16px}
  .photo-gallery-section .gallery-heading h2{font-size:clamp(2.15rem,12vw,3.25rem) !important;line-height:.92 !important;overflow-wrap:anywhere}
  .gallery-filters{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;width:calc(100% - 24px);margin-bottom:24px;padding-bottom:5px;scrollbar-width:none}
  .gallery-filters::-webkit-scrollbar{display:none}
  .gallery-filter{flex:0 0 auto;padding:10px 13px;font-size:.66rem}
  .photo-gallery-grid{width:calc(100% - 24px) !important;grid-template-columns:1fr !important;gap:12px !important}
  .photo-gallery-item,.photo-gallery-item:nth-child(n){aspect-ratio:1.34/1 !important}
}

/* ===== FINAL MOBILE RESPONSIVE PASS: mentor + gallery + overflow safety ===== */
*,*::before,*::after{box-sizing:border-box}
html,body{width:100%;max-width:100%;overflow-x:hidden}
body{margin:0}
.container{max-width:100%;min-width:0}

/* Mentor section: preserve desktop, stack cleanly on tablet/mobile */
@media (max-width: 1024px){
  section#mentor.mentor-premium{padding:52px 18px !important}
  .mentor-card-shell{width:100% !important;max-width:920px !important;margin-inline:auto !important;padding:18px !important}
  .mentor-premium-grid{grid-template-columns:minmax(0,1fr) !important;gap:18px !important}
  .mentor-visual{min-height:0 !important;height:auto !important;aspect-ratio:4/5 !important}
  .mentor-details{min-width:0 !important;padding:30px !important}
  .mentor-details h2{font-size:clamp(3rem,9vw,4.8rem) !important;overflow-wrap:normal !important;word-break:normal !important}
  .mentor-logo-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
}

@media (max-width: 640px){
  section#mentor.mentor-premium{padding:34px 10px !important}
  .mentor-card-shell{width:100% !important;padding:10px !important;border-radius:20px !important}
  .mentor-premium-grid{gap:10px !important}
  .mentor-visual{aspect-ratio:4/5 !important;border-radius:15px !important}
  .mentor-visual>img{object-position:center top !important}
  .mentor-experience-card{left:10px !important;right:10px !important;bottom:10px !important;padding:14px !important;border-width:1px !important;border-radius:13px !important}
  .mentor-experience-card strong{font-size:.82rem !important;margin-bottom:6px !important}
  .mentor-experience-card span{font-size:.82rem !important;line-height:1.42 !important}
  .mentor-details{padding:22px 16px !important;border-radius:15px !important}
  .mentor-kicker{font-size:.72rem !important;gap:9px !important;margin-bottom:16px !important}
  .mentor-kicker::before{width:20px !important;height:2px !important}
  .mentor-details h2{font-size:clamp(2.45rem,13vw,3.55rem) !important;line-height:.94 !important;letter-spacing:-.045em !important;margin-bottom:10px !important}
  .mentor-details h3{font-size:.9rem !important;line-height:1.4 !important;margin-bottom:16px !important}
  .mentor-details blockquote{padding-left:13px !important;margin-bottom:18px !important;font-size:.9rem !important;line-height:1.5 !important}
  .mentor-details p{font-size:.86rem !important;line-height:1.58 !important}
  .mentor-tags{gap:7px !important;margin:18px 0 16px !important}
  .mentor-tags span{max-width:100%;padding:7px 10px !important;font-size:.62rem !important;white-space:normal !important}
  .mentor-stats-row{grid-template-columns:1fr !important;gap:8px !important}
  .mentor-stats-row>div{min-height:0 !important;padding:14px !important}
  .mentor-stats-row strong{font-size:1.7rem !important;margin-bottom:5px !important}
  .mentor-stats-row span{font-size:.72rem !important}
  .mentor-media-strip{margin-top:10px !important;padding:16px 10px !important;border-radius:15px !important}
  .mentor-media-strip>p{font-size:.63rem !important;line-height:1.4 !important;margin-bottom:12px !important;padding-inline:4px !important}
  .mentor-logo-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:8px !important}
  .mentor-logo-grid>div{height:78px !important;padding:10px !important;border-radius:10px !important}
  .mentor-logo-grid img{max-height:52px !important}
}

@media (max-width: 370px){
  .mentor-details{padding:20px 14px !important}
  .mentor-details h2{font-size:2.3rem !important}
  .mentor-logo-grid>div{height:70px !important}
}

/* Gallery tabs: reference underline navigation, touch-safe and no clipping */
.gallery-filters{max-width:100%;min-width:0}
.gallery-filter{min-width:max-content;white-space:nowrap}
@media (max-width: 760px){
  .photo-gallery-section{overflow:hidden !important}
  .gallery-filters{
    display:flex !important;
    justify-content:flex-start !important;
    flex-wrap:nowrap !important;
    gap:30px !important;
    width:calc(100% - 24px) !important;
    margin:0 12px 26px !important;
    padding:0 18px 6px 4px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }
  .gallery-filters::-webkit-scrollbar{display:none}
  .gallery-filter{scroll-snap-align:start;padding:8px 0 11px !important;font-size:.7rem !important;letter-spacing:.18em !important}
  .photo-gallery-grid{width:calc(100% - 24px) !important;margin-inline:12px !important;grid-template-columns:1fr !important;gap:12px !important}
  .photo-gallery-item,.photo-gallery-item:nth-child(n){width:100% !important;max-width:100% !important;aspect-ratio:4/3 !important}
}

/* Generic safeguards for narrow screens */
@media (max-width: 640px){
  section,.section{max-width:100%;overflow:hidden}
  h1,h2,h3,p,blockquote{max-width:100%}
  iframe,video{width:100%;height:auto}
  .btn,a.button,button{max-width:100%}
}
