/*
 * BagIra — public mobile/tablet layout audit (2026-11-05)
 * Loaded LAST; no desktop changes.
 * Prevent clipped words, competing header widths, squeezed grids and
 * overlapping cards while retaining the brand design and editable CMS data.
 */
@media (max-width:1100px){
  .site-header,
  .site-header.scrolled,
  .site-header.solid{
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-width:0;
    width:100%;
    gap:12px;
  }
  .site-header .desktop-nav{display:none}
  .site-header .brand.bagira-header-brand{
    flex:0 1 auto;
    min-width:0;
    max-width:calc(100% - 62px);
  }
  .site-header .bagira-header-logo-shell,
  .site-header.scrolled .bagira-header-logo-shell,
  .site-header.solid .bagira-header-logo-shell{
    max-width:100%;
  }
  .site-header .bagira-header-logo{
    display:block;
    max-width:100%;
    object-fit:contain;
  }
  .site-header .header-actions{
    display:flex;
    flex:0 0 auto;
    align-items:center;
    justify-content:flex-end;
    min-width:44px;
    gap:0;
    margin-left:auto;
  }
  .site-header .header-cta{display:none!important}
  .site-header .burger{
    display:block;
    flex:0 0 44px;
    width:44px;
    min-width:44px;
    height:44px;
  }
  .mobile-menu{
    box-sizing:border-box;
    max-width:100vw;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  .mobile-menu-body,
  .mobile-menu-links,
  .mobile-menu-links a,
  .mobile-menu-cta{box-sizing:border-box;max-width:100%}
  .mobile-menu-body{min-width:0}
  .mobile-menu .mobile-menu-links a{
    white-space:normal;
    text-align:center;
    overflow-wrap:break-word;
  }
}

/* Tablet breakpoint: no half-width editorial columns containing long titles. */
@media (min-width:701px) and (max-width:970px){
  .container,
  .hero-inner,
  .hero-bottom{max-width:calc(100% - 44px)}
  .intro-layout,
  .about-layout,
  .services-body,
  .services-top,
  .section-head,
  .consultation-layout,
  .faq-layout,
  .review-wrap{
    grid-template-columns:minmax(0,1fr);
  }
  .intro-layout,
  .about-layout,
  .services-body{gap:26px}
  .intro-collage,
  .about-visual{max-width:min(100%,620px)}
  .services-body .service-photo{
    width:100%;
    height:clamp(280px,48vw,415px);
    max-width:100%;
  }
  .section-head-copy,
  .services-top>p{max-width:650px}
  .project-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:19px;
  }
  .project-grid>.project-card{
    min-width:0;
    grid-column:auto!important;
    grid-row:auto!important;
  }
  .journal-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:19px;
  }
  .subpage-hero h1{
    font-size:clamp(47px,7vw,76px);
    line-height:1.03;
    overflow-wrap:break-word;
  }
  .subpage-hero p{max-width:720px}
  .footer-modern .footer-modern-middle{grid-template-columns:minmax(0,1fr)}
}

/* Narrow devices: keep actual content in a safe single column. */
@media (max-width:700px){
  html{scroll-padding-top:78px}
  .container,
  .hero-inner,
  .hero-bottom,
  .subpage-hero .container,
  .subpage-content .container{
    box-sizing:border-box;
    width:calc(100% - 36px);
    max-width:calc(100% - 36px);
    min-width:0;
    margin-inline:auto;
  }
  .section-head,
  .intro-layout,
  .about-layout,
  .services-top,
  .services-body,
  .review-wrap,
  .faq-layout,
  .consultation-layout{
    grid-template-columns:minmax(0,1fr);
    min-width:0;
  }
  .section-head > *,
  .intro-layout > *,
  .about-layout > *,
  .services-top > *,
  .services-body > *,
  .review-wrap > *,
  .faq-layout > *,
  .consultation-layout > *,
  .journal-grid > *,
  .project-grid > *{
    min-width:0;
    max-width:100%;
  }
  .display,
  .section-head .display,
  .intro-copy .display,
  .services-top .display,
  .process-head .display,
  .about-content .display,
  .journal-heading .display{
    max-width:100%;
    font-size:clamp(39px,10vw,56px);
    line-height:1.04;
    letter-spacing:-.025em;
    overflow-wrap:break-word;
    hyphens:auto;
  }
  .display i{line-height:inherit}
  .text-arrow,
  .outline-light,
  .filterbar button,
  .service-item,
  .project-caption,
  .journal-card,
  .ir-seo-related a{max-width:100%;min-width:0}
  .text-arrow{white-space:normal;overflow-wrap:break-word}
  .overline,
  .light-overline{max-width:100%;overflow-wrap:break-word}

  /* Header and overlay menu always leave a tappable 44px menu control. */
  .site-header,
  .site-header.scrolled,
  .site-header.solid{
    height:68px;
    min-height:68px;
    padding-inline:16px;
    gap:10px;
  }
  .site-header .brand.bagira-header-brand{
    max-width:calc(100% - 57px);
  }
  .site-header .bagira-header-logo-shell,
  .site-header.scrolled .bagira-header-logo-shell,
  .site-header.solid .bagira-header-logo-shell{
    width:min(168px,calc(100vw - 101px));
    height:52px;
  }
  .site-header .header-actions{flex:0 0 44px}
  .mobile-menu{
    top:68px;
    bottom:0;
    height:calc(100dvh - 68px);
    max-height:calc(100dvh - 68px);
  }
  .mobile-menu-body{
    width:100%;
    min-height:100%;
    padding:20px 18px 25px;
  }
  .mobile-menu .mobile-menu-links{width:100%;gap:6px}
  .mobile-menu .mobile-menu-links a{
    width:100%;
    max-width:340px;
    min-width:0;
    min-height:42px;
    font-size:clamp(17px,4.3vw,20px);
    line-height:1.25;
  }
  .mobile-menu .mobile-menu-cta{
    min-width:0;
    width:min(100%,340px);
    min-height:44px;
  }

  /* First screen: allow its actual content to determine the height. */
  .hero{
    box-sizing:border-box;
    height:auto;
    max-height:none;
    min-height:max(620px,90svh);
    padding:101px 0 21px;
  }
  .hero .hero-inner{flex:0 0 auto;justify-content:center}
  .hero .hero-inner h1{
    max-width:100%;
    font-size:clamp(45px,10.5vw,68px);
    line-height:.98;
    letter-spacing:-.037em;
    overflow-wrap:break-word;
    hyphens:auto;
    margin-bottom:15px;
  }
  .hero .hero-eyebrow{
    display:flex;
    align-items:flex-start;
    gap:9px;
    width:100%;
    max-width:100%;
    white-space:normal;
    overflow-wrap:break-word;
    font-size:clamp(12px,3.2vw,15px);
    line-height:1.45;
    letter-spacing:.075em;
  }
  .hero .hero-eyebrow .hairline{
    flex:0 0 28px;
    width:28px;
    max-width:28px;
    margin-top:.7em;
  }
  .hero .hero-lead{
    max-width:min(100%,470px);
    margin:0;
    font-size:clamp(16px,4vw,18px);
    line-height:1.56;
    overflow-wrap:break-word;
  }
  .hero .hero-buttons{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    flex-wrap:wrap;
    gap:13px;
    margin-top:19px;
  }
  .hero .hero-buttons a{
    box-sizing:border-box;
    max-width:100%;
    min-width:0;
    white-space:normal;
    text-align:center;
    overflow-wrap:break-word;
  }
  .hero .hero-buttons .btn-solid{
    min-height:44px;
    padding:12px 17px;
    font-size:clamp(14px,3.6vw,16px);
  }
  .hero .ir-hero-socials{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    max-width:380px;
    gap:8px;
    margin-top:16px;
  }
  .hero .ir-hero-socials .ir-social-chip{
    box-sizing:border-box;
    min-width:0;
    min-height:44px;
    padding:6px 7px;
    gap:7px;
    font-size:clamp(12px,3.5vw,14px);
    line-height:1.3;
    white-space:normal;
    overflow-wrap:break-word;
  }
  .hero .ir-social-mark{flex-shrink:0}
  .hero .ir-social-label{min-width:0;overflow-wrap:break-word}
  .hero .hero-bottom{
    position:relative;
    left:auto;
    bottom:auto;
    width:calc(100% - 36px);
    margin:20px auto 0;
    justify-content:flex-end;
    transform:none;
  }
  .hero .hero-pages{
    min-width:0;
    max-width:100%;
    gap:8px;
  }
  .hero .hero-pages button{
    flex:0 0 40px;
    width:40px;
    height:40px;
  }

  /* Photos and cards: natural one-column flow. */
  .intro-layout{gap:18px}
  .intro-copy{min-width:0;max-width:100%}
  .intro-collage{
    position:relative;
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    min-height:0;
    height:clamp(265px,92vw,390px);
    margin:0;
  }
  .intro-image-lg{max-width:100%;height:82%;object-fit:cover}
  .intro-image-sm{
    max-width:52%;
    height:49%;
    object-fit:cover;
  }
  .project-grid,
  .subpage-content .project-grid,
  .journal-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:17px;
    min-width:0;
    width:100%;
  }
  .project-grid .project-card,
  .project-grid .project-card:nth-child(n),
  .project-grid .p-wide,
  .project-grid .p-portrait{
    grid-column:auto!important;
    grid-row:auto!important;
    min-width:0;
    width:100%;
  }
  .project-grid .project-card:nth-child(n) .project-media,
  .subpage-content .project-card .project-media{
    height:clamp(210px,72vw,345px)!important;
    max-width:100%;
  }
  .project-media img,.journal-img img{max-width:100%}
  .project-caption{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
  }
  .project-caption h3{
    max-width:100%;
    font-size:clamp(26px,7vw,36px);
    line-height:1.1;
    overflow-wrap:break-word;
    hyphens:auto;
  }
  .filterbar{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
    max-width:100%;
    white-space:normal;
    overflow:visible;
  }
  .filterbar .filter-btn{
    white-space:normal;
    min-height:39px;
    line-height:1.25;
    text-align:left;
    overflow-wrap:break-word;
  }
  .journal-card h3{
    max-width:100%;
    font-size:clamp(27px,7.5vw,37px);
    line-height:1.15;
  }
  .journal-img{height:clamp(205px,62vw,320px)}
  .services-top,.services-body{gap:18px}
  .services-top>p,.section-head-copy{max-width:100%;min-width:0}
  .services-body .service-list{min-width:0;width:100%}
  .service-item{
    display:grid;
    grid-template-columns:34px minmax(0,1fr);
    align-items:start;
    gap:8px;
    padding-block:13px;
  }
  .service-item > div{min-width:0}
  .service-item h3{
    max-width:100%;
    font-size:clamp(24px,6.8vw,32px);
    line-height:1.16;
    overflow-wrap:break-word;
    hyphens:auto;
  }
  .service-item p{
    max-width:100%;
    font-size:16px;
    line-height:1.48;
    overflow-wrap:break-word;
  }
  .service-photo{
    width:100%;
    min-width:0;
    height:clamp(230px,70vw,350px);
    overflow:hidden;
  }
  .service-photo-line{
    max-width:100%;
    font-size:12px;
    letter-spacing:.1em;
    overflow-wrap:break-word;
  }

  /* About image stays inside its column; floating emblem cannot hit the text. */
  .about-layout{gap:20px}
  .about-visual{
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    min-height:0;
    height:clamp(265px,85vw,430px);
    margin:0;
  }
  .about-visual > img{width:100%;height:100%;object-fit:cover}
  .about-visual .about-visual-frame{
    right:0;
    bottom:0;
    max-width:44%;
    max-height:37%;
  }
  .about-content{width:100%;min-width:0}
  .about-content .display{overflow-wrap:break-word}
  .about-text{max-width:100%;line-height:1.55}

  /* Quote and reviews should grow instead of covering adjacent sections. */
  .quote-banner{
    box-sizing:border-box;
    height:auto;
    min-height:290px;
    padding-block:30px;
    overflow:hidden;
  }
  .quote-banner .quote-inner{
    width:calc(100% - 36px);
    max-width:calc(100% - 36px);
    position:relative;
    z-index:2;
  }
  .quote-inner p{
    max-width:100%;
    font-size:clamp(38px,9.7vw,54px);
    line-height:1.08;
    overflow-wrap:break-word;
    hyphens:auto;
  }
  .quote-banner .ir-decorative-panther{
    right:-5%;
    bottom:0;
    width:44%;
    max-width:220px;
    opacity:.13;
    pointer-events:none;
  }
  .review-wrap{gap:17px}
  .review-sample,.review-heading{min-width:0;max-width:100%}
  .review-sample>p{overflow-wrap:break-word}

  /* FAQ: fixed-size +/− stays inside the card even for a two-line question. */
  .faq .faq-layout,
  .ir-article-faq .faq-layout{
    grid-template-columns:minmax(0,1fr);
    gap:16px;
  }
  .faq .accordion,.faq .accordion details{min-width:0;max-width:100%}
  .faq .accordion summary{
    grid-template-columns:minmax(0,1fr) 32px;
    gap:10px;
    width:100%;
    min-height:44px;
    height:auto;
    align-items:center;
    overflow-wrap:break-word;
  }
  .faq .accordion summary .faq-question{min-width:0;max-width:100%}
  .faq .accordion summary .faq-toggle-icon{
    justify-self:end;
    width:32px;
    height:32px;
    transform:none;
    flex-shrink:0;
  }

  /* Native controls: no side spill or iOS autofocus zoom. */
  .consultation .consultation-layout{grid-template-columns:minmax(0,1fr)}
  .consultation .consult-left{min-width:0;max-width:100%}
  .consultation .consult-left .display{
    font-size:clamp(39px,9.6vw,56px);
    line-height:1.08;
    overflow-wrap:break-word;
  }
  .consultation .consult-form{
    box-sizing:border-box;
    min-width:0;
    width:100%;
    max-width:100%;
    margin:0;
  }
  .consultation .consult-form input:not([type=checkbox]),
  .consultation .consult-form textarea{
    box-sizing:border-box;
    max-width:100%;
    font-size:16px;
  }
  .consultation .consult-form .privacy-check{
    display:flex;
    align-items:flex-start;
    flex-wrap:nowrap;
    gap:9px;
    min-width:0;
  }
  .consultation .consult-form .privacy-check > *{
    min-width:0;
    overflow-wrap:break-word;
  }
  .consultation .consult-form .privacy-check input{flex:0 0 15px}
  .consultation .consult-form button[type=submit]{
    box-sizing:border-box;
    max-width:100%;
    white-space:normal;
    min-height:44px;
  }

  /* Internal pages: article and project titles, galleries, related links. */
  .subpage-hero{
    box-sizing:border-box;
    padding:104px 0 28px;
  }
  .subpage-hero h1{
    max-width:100%;
    font-size:clamp(39px,9.6vw,60px);
    line-height:1.04;
    letter-spacing:-.027em;
    overflow-wrap:anywhere;
    hyphens:auto;
  }
  .subpage-hero p{max-width:100%;font-size:16px;line-height:1.55}
  .subpage-content{min-width:0;padding:26px 0 46px}
  .subpage-content .article-body{
    box-sizing:border-box;
    max-width:100%;
    min-width:0;
    font-size:clamp(19px,5.3vw,24px);
    line-height:1.5;
  }
  .subpage-content .article-body h2{
    max-width:100%;
    font-size:clamp(29px,7.7vw,43px);
    line-height:1.14;
    overflow-wrap:anywhere;
  }
  .subpage-content .article-body p,
  .subpage-content .article-body div{
    max-width:100%;
    overflow-wrap:break-word;
  }
  .subpage-lead-photo{display:block;max-width:100%;height:auto}
  .ir-project-gallery,
  .ir-project-gallery .ir-gallery-feature{min-width:0;max-width:100%}
  .ir-project-gallery .ir-gallery-feature .subpage-lead-photo{
    width:100%;
    height:auto;
    aspect-ratio:4/3;
    object-fit:cover;
  }
  .subpage-gallery.ir-project-photos{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    min-width:0;
  }
  .ir-project-photos .ir-gallery-photo{min-width:0}
  .ir-project-photos .ir-gallery-photo img{
    width:100%;
    height:clamp(135px,42vw,235px);
    object-fit:cover;
  }
  .ir-gallery-zoom{
    box-sizing:border-box;
    max-width:calc(100% - 22px);
    right:11px;
    bottom:11px;
    padding:9px 11px;
    font-size:13px;
    overflow-wrap:break-word;
  }
  .ir-lightbox{max-width:100vw;box-sizing:border-box}
  .ir-lightbox-frame{box-sizing:border-box;min-width:0;max-width:calc(100vw - 84px)}
  .ir-lightbox-frame img{max-width:100%;max-height:calc(100dvh - 130px)}
  .ir-seo-related-grid{
    grid-template-columns:minmax(0,1fr);
  }
  .ir-seo-related-grid a{
    box-sizing:border-box;
    max-width:100%;
    overflow-wrap:break-word;
  }
  .ir-seo-related-more{display:flex;flex-wrap:wrap;gap:10px}
  .ir-seo-related-more a{min-width:0;overflow-wrap:break-word}

  /* Footer: long policy, messenger names and development credit wrap naturally. */
  .footer-modern .footer-modern-inner{box-sizing:border-box;min-width:0}
  .footer-modern-top,
  .footer-modern-middle,
  .footer-modern-sitemap,
  .footer-modern-socials{min-width:0;max-width:100%}
  .footer-modern .footer-modern-logo{max-width:100%;min-width:0}
  .footer-modern .footer-modern-logo-image{max-width:38%;flex-shrink:0}
  .footer-modern .footer-modern-logo-type{min-width:0;overflow-wrap:break-word}
  .footer-modern .footer-modern-headline a{
    max-width:100%;
    white-space:normal;
    overflow-wrap:break-word;
  }
  .footer-modern .footer-modern-phone{
    box-sizing:border-box;
    max-width:100%;
    min-width:0;
  }
  .footer-modern .footer-modern-phone-text{min-width:0}
  .footer-modern .footer-modern-phone-text strong{
    white-space:normal;
    overflow-wrap:break-word;
  }
  .footer-modern .footer-modern-sitemap{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
  }
  .footer-modern .footer-modern-nav-grid{grid-template-columns:minmax(0,1fr)}
  .footer-modern .footer-modern-nav-grid a{
    max-width:100%;
    white-space:normal;
    overflow-wrap:break-word;
  }
  .footer-modern .footer-modern-socials{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }
  .footer-modern .footer-modern-social{
    box-sizing:border-box;
    min-width:0;
    max-width:100%;
  }
  .footer-modern .footer-modern-social-name{
    min-width:0;
    white-space:normal;
    overflow-wrap:break-word;
  }
  .footer-modern .footer-modern-bottom{
    display:flex;
    align-items:flex-start;
    flex-wrap:wrap;
    gap:8px 14px;
  }
  .footer-modern .footer-modern-credit{max-width:100%;overflow-wrap:break-word}
}
@media(max-width:400px){
  .site-header,.site-header.scrolled,.site-header.solid{padding-inline:13px}
  .site-header .bagira-header-logo-shell,
  .site-header.scrolled .bagira-header-logo-shell,
  .site-header.solid .bagira-header-logo-shell{
    width:min(148px,calc(100vw - 95px));
    height:47px;
  }
  .hero .hero-inner h1{
    font-size:clamp(40px,11.1vw,45px);
    line-height:1;
  }
  .hero .hero-eyebrow{font-size:12px;letter-spacing:.035em}
  .hero .ir-hero-socials{gap:7px}
  .hero .ir-hero-socials .ir-social-chip{
    font-size:12px;
    padding:5px;
    gap:5px;
  }
  .hero .ir-hero-socials .ir-social-mark{
    flex:0 0 27px;
    width:27px;
    height:27px;
  }
  .project-caption h3{font-size:clamp(25px,7.7vw,31px)}
  .service-item{grid-template-columns:27px minmax(0,1fr)}
  .footer-modern .footer-modern-sitemap{gap:11px}
  .footer-modern .footer-modern-social{gap:5px}
  .footer-modern .footer-modern-social-name{font-size:12px}
  .footer-modern .footer-modern-logo-image{max-width:42%}
}
@media(max-width:340px){
  .container,
  .hero-inner,
  .hero-bottom,
  .subpage-hero .container,
  .subpage-content .container{
    width:calc(100% - 28px);
    max-width:calc(100% - 28px);
  }
  .hero .hero-inner h1{font-size:39px}
  .hero .hero-bottom{width:calc(100% - 28px)}
  .hero .hero-pages button{flex-basis:38px;width:38px;height:38px}
  .footer-modern .footer-modern-sitemap{
    grid-template-columns:minmax(0,1fr);
    gap:16px;
  }
  .footer-modern .footer-modern-nav-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px 9px;
  }
  .footer-modern .footer-modern-socials{
    grid-template-columns:minmax(0,1fr);
  }
}
@media(max-width:700px) and (max-height:650px){
  .mobile-menu-body{justify-content:flex-start;padding-top:15px;padding-bottom:22px}
  .mobile-menu .mobile-menu-links{gap:2px}
  .mobile-menu .mobile-menu-links a{min-height:37px;padding-block:5px}
  .mobile-menu .mobile-menu-cta{min-height:42px;margin-top:10px}
}
@media(prefers-reduced-motion:reduce){
  .hero .hero-slide.active,
  .process .process-card,
  .footer-modern .footer-modern-social{
    animation:none!important;
    transition:none!important;
  }
}
/* Mobile notification toast: never extend outside the safe viewport. */
@media(max-width:700px){
  #toast{
    box-sizing:border-box;
    left:12px;
    right:12px;
    bottom:max(14px,env(safe-area-inset-bottom,0px));
    width:auto;
    max-width:calc(100vw - 24px);
    padding:12px 14px;
    font-size:15px;
    line-height:1.4;
    overflow-wrap:break-word;
  }
}
