/* =========================================================
   AROPRESS V24 — MOBILE-FIRST RESPONSIVE UX LAYER
   Loaded last. Desktop layout remains intact; tablet/mobile receives
   dedicated navigation, spacing, typography and touch optimizations.
   ========================================================= */

html{
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
    overflow-x:hidden;
}
.site-public-body{
    overflow-x:clip;
    min-width:0;
}
.site-public-body img,
.site-public-body video,
.site-public-body iframe{
    max-width:100%;
}
.site-public-body button,
.site-public-body input,
.site-public-body select,
.site-public-body textarea{
    font:inherit;
}
.desktop-nav a.active{
    color:#b4232a;
}
.mobile-header-actions,
.mobile-nav-backdrop,
.mobile-nav-drawer{
    display:none;
}

/* Better keyboard/touch feedback */
.site-public-body a:focus-visible,
.site-public-body button:focus-visible,
.site-public-body input:focus-visible,
.site-public-body select:focus-visible,
.site-public-body textarea:focus-visible{
    outline:3px solid rgba(180,35,42,.22);
    outline-offset:2px;
}

/* Prevent rich content from forcing horizontal overflow */
.article-prose,
.event-prose{
    overflow-wrap:anywhere;
}
.article-prose img,
.event-prose img{
    height:auto;
}
.article-prose .rte-table-wrap,
.event-prose .rte-table-wrap{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}
.article-prose table,
.event-prose table{
    min-width:560px;
}

/* Tablet navigation */
@media(max-width:900px){
    body.mobile-nav-open{
        overflow:hidden;
        touch-action:none;
    }

    .public-header{
        position:sticky;
        top:0;
        z-index:100;
        padding-top:env(safe-area-inset-top);
        background:rgba(255,255,255,.97);
        box-shadow:0 1px 0 rgba(15,23,42,.08);
    }
    .public-header .nav-inner{
        min-height:66px;
        height:66px;
        padding:0;
        flex-wrap:nowrap!important;
        gap:12px;
    }
    .desktop-nav,
    .desktop-actions{
        display:none!important;
    }
    .mobile-header-actions{
        display:flex;
        align-items:center;
        gap:8px;
        margin-left:auto;
    }
    .mobile-language-switch{
        min-height:38px;
        padding:4px 7px;
        font-size:10px;
    }
    .mobile-language-switch a{
        min-width:25px;
        min-height:28px;
        display:grid;
        place-items:center;
    }
    .mobile-menu-toggle{
        width:44px;
        height:44px;
        display:grid;
        align-content:center;
        justify-items:center;
        gap:5px;
        padding:0;
        border:1px solid #e2e7ed;
        border-radius:13px;
        background:#fff;
        cursor:pointer;
    }
    .mobile-menu-toggle span{
        width:19px;
        height:2px;
        border-radius:999px;
        background:#172033;
        transition:transform .18s ease,opacity .18s ease;
    }
    .mobile-nav-backdrop{
        display:block;
        position:fixed;
        inset:0;
        z-index:108;
        visibility:hidden;
        opacity:0;
        background:rgba(15,23,42,.42);
        backdrop-filter:blur(3px);
        transition:opacity .2s ease,visibility .2s ease;
    }
    .mobile-nav-backdrop.open{
        visibility:visible;
        opacity:1;
    }
    .mobile-nav-drawer{
        display:flex;
        flex-direction:column;
        position:fixed;
        top:0;
        right:0;
        bottom:0;
        z-index:110;
        width:min(88vw,370px);
        padding:
            max(18px,env(safe-area-inset-top))
            18px
            max(20px,env(safe-area-inset-bottom));
        background:#fff;
        box-shadow:-24px 0 60px rgba(15,23,42,.18);
        transform:translateX(104%);
        transition:transform .24s cubic-bezier(.22,.75,.25,1);
    }
    .mobile-nav-drawer.open{
        transform:translateX(0);
    }
    .mobile-nav-head{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        padding-bottom:17px;
        border-bottom:1px solid #edf0f4;
    }
    .mobile-nav-brand{
        min-width:0;
        display:flex;
        align-items:center;
        gap:10px;
    }
    .mobile-nav-brand .brand-logo{
        flex:0 0 40px;
        width:40px;
        height:40px;
    }
    .mobile-nav-brand>span:last-child{
        min-width:0;
        display:grid;
        gap:2px;
    }
    .mobile-nav-brand strong{
        color:#172033;
        font-size:15px;
        line-height:1.1;
    }
    .mobile-nav-brand small{
        overflow:hidden;
        color:#667085;
        font-size:7.5px;
        font-weight:850;
        letter-spacing:.06em;
        text-transform:uppercase;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .mobile-nav-close{
        flex:0 0 42px;
        width:42px;
        height:42px;
        border:1px solid #e4e8ee;
        border-radius:12px;
        background:#f8fafc;
        color:#344054;
        font-size:25px;
        line-height:1;
        cursor:pointer;
    }
    .mobile-nav-links{
        display:grid;
        gap:4px;
        margin:18px 0;
    }
    .mobile-nav-links a{
        min-height:54px;
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:14px;
        padding:10px 13px;
        border-radius:13px;
        color:#344054;
        font-size:15px;
        font-weight:850;
        transition:background .16s ease,color .16s ease,transform .16s ease;
    }
    .mobile-nav-links a b{
        color:#b4bdc9;
        font-size:9px;
        letter-spacing:.08em;
    }
    .mobile-nav-links a:hover,
    .mobile-nav-links a.active{
        background:#fff3f3;
        color:#a51f29;
        transform:translateX(2px);
    }
    .mobile-nav-links a.active b{
        color:#b4232a;
    }
    .mobile-nav-footer{
        display:grid;
        gap:12px;
        margin-top:auto;
        padding-top:16px;
        border-top:1px solid #edf0f4;
    }
    .mobile-nav-cta{
        width:100%;
        min-height:48px;
    }
    .mobile-nav-footer p{
        margin:0;
        color:#98a2b3;
        font-size:10px;
        line-height:1.55;
    }

    /* Fluid site foundations */
    .container{
        width:min(100% - 36px,1120px)!important;
    }
    section{
        padding-left:0;
        padding-right:0;
    }
    .btn{
        min-height:44px;
    }

    /* Internal hero */
    .public-page-hero{
        padding:46px 0!important;
    }
    .public-page-hero-content{
        max-width:none;
    }
    .public-page-hero h1{
        max-width:780px;
        font-size:clamp(34px,7vw,48px)!important;
        line-height:1.04;
    }
    .public-page-hero p{
        font-size:14px!important;
        line-height:1.7;
    }
    .breadcrumbs{
        max-width:100%;
        overflow-x:auto;
        scrollbar-width:none;
        white-space:nowrap;
        -webkit-overflow-scrolling:touch;
    }
    .breadcrumbs::-webkit-scrollbar{display:none}

    /* Homepage */
    .home-v3-hero{
        padding:56px 0 50px!important;
    }
    .home-v3-hero-grid{
        grid-template-columns:1fr!important;
        gap:34px!important;
    }
    .home-v3-copy h1{
        max-width:760px;
        font-size:clamp(40px,7.8vw,58px)!important;
        line-height:1.01!important;
    }
    .home-v3-lead{
        max-width:700px;
        font-size:15px!important;
        line-height:1.72;
    }
    .home-v3-console{
        width:100%;
        max-width:620px!important;
        justify-self:start!important;
    }
    .home-v3-stats{
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:10px!important;
    }
    .home-v3-service-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
    .home-v3-article-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
    .home-v3-company-grid,
    .home-v3-opportunity-layout{
        grid-template-columns:1fr!important;
    }

    /* Content listings */
    .content-filter-panel{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
    .content-filter-search{
        grid-column:1/-1;
    }
    .article-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
    .competition-grid{
        grid-template-columns:1fr!important;
    }

    /* Repository */
    .repository-tools{
        grid-template-columns:1fr!important;
        gap:16px!important;
    }
    .repository-search-panel{
        padding:22px!important;
    }
    .course-directory-grid,
    .meeting-page-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .course-page-heading{
        grid-template-columns:1fr!important;
    }

    /* Event detail */
    .event-detail-layout{
        grid-template-columns:1fr!important;
    }
    .event-detail-sidebar{
        position:static!important;
    }
    .event-detail-card{
        max-width:none;
    }

    /* Contact/footer */
    .contact-page-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .site-public-body>footer .footer-inner{
        align-items:flex-start!important;
    }
}

/* Phone */
@media(max-width:640px){
    :root{
        --mobile-gutter:16px;
    }
    .container,
    .home-customizable .container{
        width:calc(100% - (var(--mobile-gutter) * 2))!important;
    }

    .public-header .nav-inner{
        min-height:62px;
        height:62px;
    }
    .brand{
        min-width:0!important;
        gap:9px!important;
    }
    .brand-logo{
        flex:0 0 39px;
        width:39px!important;
        height:39px!important;
    }
    .brand-copy{
        min-width:0;
    }
    .brand-copy strong{
        font-size:14px!important;
    }
    .brand-copy small{
        max-width:155px;
        overflow:hidden;
        font-size:7.2px!important;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .mobile-language-switch{
        display:none;
    }

    /* Buttons are thumb-friendly */
    .btn{
        min-height:46px;
        padding:11px 15px;
        font-size:13px;
    }

    /* Internal page hero */
    .public-page-hero{
        padding:36px 0!important;
    }
    .public-page-hero .eyebrow{
        font-size:9px;
        padding:6px 9px;
    }
    .public-page-hero h1{
        margin:12px 0 10px;
        font-size:clamp(30px,9.4vw,40px)!important;
        line-height:1.04;
        letter-spacing:-.04em;
        text-wrap:balance;
    }
    .public-page-hero p{
        font-size:13px!important;
        line-height:1.66;
    }
    .breadcrumbs{
        margin-bottom:12px!important;
        font-size:10px;
    }

    /* Homepage mobile composition */
    .home-v3-hero{
        padding:42px 0 38px!important;
    }
    .home-v3-brandline{
        margin-bottom:18px!important;
        font-size:8px!important;
    }
    .home-v3-copy h1{
        font-size:clamp(35px,10vw,44px)!important;
        letter-spacing:-.05em!important;
    }
    .home-v3-lead{
        margin-top:20px!important;
        font-size:13px!important;
        line-height:1.7!important;
    }
    .home-v3-actions{
        display:grid!important;
        grid-template-columns:1fr;
        gap:10px!important;
        margin-top:24px!important;
    }
    .home-v3-actions .btn,
    .home-v3-primary{
        width:100%;
    }
    .home-v3-text-link{
        min-height:44px;
        justify-content:center;
    }
    .home-v3-stats{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:12px!important;
        margin-top:34px!important;
        padding-top:20px!important;
    }
    .home-v3-stats div{
        padding:10px 0;
    }
    .home-v3-stats strong{
        font-size:25px!important;
    }
    .home-v3-console{
        border-radius:20px!important;
    }
    .home-v3-console-grid{
        grid-template-columns:1fr!important;
    }
    .home-v3-section{
        padding:42px 0!important;
    }
    .home-v3-section-head,
    .home-v3-section-head-row{
        align-items:flex-start!important;
        flex-direction:column!important;
        gap:10px!important;
    }
    .home-v3-section-head h2,
    .home-v3-opportunity-intro h2{
        font-size:28px!important;
        line-height:1.08;
    }
    .home-v3-service-grid,
    .home-v3-article-grid{
        grid-template-columns:1fr!important;
        gap:14px!important;
    }
    .home-v3-service,
    .home-v3-article-card{
        border-radius:18px!important;
    }
    .home-v3-event-item{
        grid-template-columns:72px minmax(0,1fr)!important;
        gap:12px!important;
        padding:14px!important;
    }
    .home-v3-event-date{
        min-height:72px!important;
    }
    .home-v3-company-grid{
        gap:22px!important;
    }
    .home-v3-company-main h2{
        font-size:29px!important;
    }
    .home-v3-principles{
        grid-template-columns:1fr!important;
    }

    /* Search / filter forms */
    .content-discovery-section{
        padding-top:18px!important;
    }
    .content-filter-panel{
        grid-template-columns:1fr!important;
        gap:9px!important;
        padding:13px!important;
        border-radius:14px!important;
    }
    .content-filter-search{
        grid-column:auto!important;
    }
    .content-filter-panel input,
    .content-filter-panel select{
        min-height:46px!important;
        font-size:14px!important;
    }
    .content-filter-actions{
        grid-column:auto!important;
        display:grid!important;
        grid-template-columns:1fr 1fr;
    }
    .content-filter-actions .btn{
        width:100%;
    }
    .content-result-bar{
        align-items:flex-start!important;
        flex-direction:column!important;
        gap:3px!important;
        padding-top:12px!important;
    }

    /* Article/list cards */
    .article-grid,
    .competition-grid,
    .related-content-grid{
        grid-template-columns:1fr!important;
        gap:14px!important;
    }
    .article-card,
    .competition-card{
        border-radius:18px!important;
    }
    .article-card-body,
    .competition-card-body{
        padding:17px!important;
    }
    .article-card h2,
    .competition-card h2{
        font-size:20px!important;
    }
    .article-card-footer,
    .competition-card-actions{
        gap:8px!important;
    }
    .competition-card-actions{
        display:grid!important;
        grid-template-columns:1fr;
    }
    .competition-card-actions .btn{
        width:100%;
        min-height:44px!important;
    }

    /* Article detail */
    .narrow{
        width:calc(100% - 32px)!important;
    }
    .article-detail{
        padding:34px 0 54px!important;
    }
    .article-detail h1{
        font-size:clamp(31px,9vw,42px)!important;
        line-height:1.06;
        margin:11px 0 9px!important;
    }
    .article-byline{
        font-size:11px!important;
        line-height:1.6;
    }
    .article-cover{
        margin:18px 0!important;
        border-radius:16px!important;
    }
    .article-prose{
        font-size:15.5px!important;
        line-height:1.78!important;
    }
    .article-prose h2{
        font-size:25px;
        line-height:1.18;
    }
    .article-prose h3{
        font-size:21px;
        line-height:1.22;
    }
    .article-prose p{
        margin:0 0 1.15em;
    }
    .related-content-section{
        padding:38px 0 52px!important;
    }
    .related-content-head{
        align-items:flex-start!important;
        flex-direction:column!important;
        gap:14px!important;
    }
    .related-content-head .btn{
        width:100%;
    }

    /* Course repository */
    .repository-content{
        padding:30px 0 54px!important;
    }
    .repository-tools{
        margin-bottom:24px!important;
    }
    .repository-stats{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
        gap:7px!important;
        padding:12px!important;
    }
    .repository-stat{
        min-width:0!important;
        padding:11px 6px!important;
        border-radius:12px!important;
    }
    .repository-stat strong{
        font-size:20px!important;
    }
    .repository-stat span{
        font-size:8px!important;
        line-height:1.35;
    }
    .repository-search-panel{
        padding:17px!important;
        border-radius:16px!important;
    }
    .repository-search{
        display:grid!important;
        grid-template-columns:1fr!important;
        gap:8px!important;
    }
    .repository-search-field input{
        height:48px!important;
        font-size:14px;
    }
    .repository-search .btn{
        width:100%;
    }
    .repository-heading-row h2{
        font-size:27px!important;
    }
    .course-directory-grid,
    .meeting-page-grid{
        grid-template-columns:1fr!important;
        gap:14px!important;
    }
    .course-directory-card,
    .meeting-page-card{
        min-height:0!important;
        padding:19px!important;
        border-radius:18px!important;
    }
    .course-directory-card h3,
    .meeting-page-card h3{
        font-size:21px!important;
    }
    .course-directory-footer{
        grid-template-columns:1fr 1fr!important;
        gap:12px!important;
    }
    .course-enter{
        grid-column:1/-1!important;
        justify-self:stretch!important;
        min-height:42px;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:11px;
        background:#fff3f3;
    }
    .course-page-heading{
        display:grid!important;
        gap:18px!important;
    }
    .course-page-count{
        width:100%!important;
        height:auto!important;
        min-height:66px;
        display:flex!important;
        flex-direction:row!important;
        justify-content:center!important;
        gap:8px!important;
        padding:12px!important;
        border-radius:16px!important;
    }

    /* V23 meeting page mobile refinement */
    .meeting-hero-grid{
        grid-template-columns:1fr!important;
        gap:20px!important;
    }
    .meeting-hero-panel{
        padding:17px!important;
        border-radius:19px!important;
    }
    .meeting-hero-stats{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
        gap:7px!important;
    }
    .meeting-hero-stats article{
        padding:11px 8px!important;
        border-radius:13px!important;
    }
    .meeting-hero-stats strong{
        font-size:22px!important;
    }
    .meeting-hero-stats span{
        font-size:8.5px!important;
    }
    .meeting-showcase-grid{
        grid-template-columns:1fr!important;
        gap:14px!important;
    }
    .meeting-focus-card,
    .meeting-material-shell{
        padding:19px!important;
        border-radius:20px!important;
    }
    .meeting-focus-head h2{
        font-size:27px!important;
    }
    .meeting-objective-list{
        gap:9px!important;
    }
    .meeting-objective-list li{
        padding:14px 13px 14px 48px!important;
        border-radius:15px!important;
        font-size:14px!important;
        line-height:1.62!important;
    }
    .meeting-objective-list li::before{
        left:13px!important;
        top:14px!important;
        width:25px!important;
        height:25px!important;
    }
    .meeting-material-grid{
        grid-template-columns:1fr!important;
        gap:13px!important;
    }
    .meeting-material-card{
        min-height:210px!important;
        padding:17px!important;
        border-radius:19px!important;
    }
    .meeting-material-card-body h3{
        font-size:22px!important;
    }

    /* Event detail */
    .event-detail-content{
        padding:28px 0 48px!important;
    }
    .event-detail-layout{
        gap:16px!important;
    }
    .event-detail-poster{
        margin-bottom:16px!important;
        border-radius:16px!important;
    }
    .event-prose{
        padding:19px 17px!important;
        border-radius:16px!important;
    }
    .event-detail-card{
        padding:18px!important;
        border-radius:16px!important;
    }
    .event-detail-register{
        min-height:48px;
    }

    /* Contact */
    .contact-page-content{
        padding:30px 0 50px!important;
    }
    .contact-page-grid{
        grid-template-columns:1fr!important;
        gap:11px!important;
    }
    .contact-info-card,
    .contact-info-card-wide{
        grid-column:auto!important;
        min-height:0!important;
        padding:18px!important;
        border-radius:16px!important;
    }
    .contact-info-card>span{
        margin-bottom:16px!important;
    }
    .contact-info-card a{
        min-height:44px;
        display:flex;
        align-items:center;
        padding-top:13px!important;
    }

    /* Legal */
    .legal-page-content{
        padding:32px 0 52px!important;
    }
    .legal-document{
        padding:20px!important;
        border-radius:18px!important;
    }
    .legal-document-body{
        font-size:14.5px!important;
        line-height:1.75!important;
    }

    /* Footer */
    .site-public-body>footer{
        padding:
            26px 0
            max(28px,env(safe-area-inset-bottom))!important;
    }
    .site-public-body>footer .footer-inner{
        min-height:0!important;
        padding-top:18px!important;
        gap:20px!important;
    }
    .footer-brand{
        max-width:none!important;
    }
    .footer-legal{
        display:flex;
        flex-wrap:wrap;
        gap:6px 14px!important;
    }
    .footer-legal a{
        min-height:36px;
        display:inline-flex;
        align-items:center;
    }
    .footer-copyright{
        margin-top:8px;
        line-height:1.6;
    }
}

/* Narrow phones */
@media(max-width:390px){
    :root{--mobile-gutter:13px}
    .brand-copy small{max-width:125px}
    .mobile-menu-toggle{width:42px;height:42px}
    .home-v3-copy h1{font-size:34px!important}
    .home-v3-stats strong{font-size:22px!important}
    .repository-stats{gap:5px!important}
    .repository-stat{padding:10px 4px!important}
    .meeting-hero-stats{grid-template-columns:1fr!important}
    .meeting-hero-stats article{
        display:flex!important;
        align-items:center;
        justify-content:space-between;
    }
}


/* =========================================================
   AROPRESS V25 — PUBLIC GLOBAL MOBILE COMPLETION
   Small global safeguards so every public template inherits mobile UX.
   ========================================================= */
@media(max-width:900px){
    .site-public-body main,
    .site-public-body section,
    .site-public-body article,
    .site-public-body aside{
        min-width:0;
    }
    .site-public-body .grid,
    .site-public-body [class*="-grid"]{
        min-width:0;
    }
}
@media(max-width:640px){
    .site-public-body input,
    .site-public-body select,
    .site-public-body textarea{
        font-size:16px;
    }
    .site-public-body .btn,
    .site-public-body button{
        touch-action:manipulation;
    }
    .site-public-body iframe{
        width:100%;
    }
}


/* =========================================================
   AROPRESS V25.1 — MOBILE FOOTER HOTFIX
   Footer legal navigation must never inherit mobile header-nav pills.
   ========================================================= */
@media(max-width:900px){
    .site-public-body>footer .footer-meta{
        width:100%;
        min-width:0;
        justify-items:start;
    }

    .site-public-body>footer .footer-legal{
        width:100%;
        display:flex;
        flex-wrap:wrap;
        align-items:center;
        justify-content:flex-start;
        gap:8px 18px!important;
        overflow:visible;
        padding:0;
        margin:0;
    }

    .site-public-body>footer .footer-legal a{
        width:auto!important;
        min-width:0!important;
        min-height:32px!important;
        display:inline-flex!important;
        align-items:center;
        padding:0!important;
        margin:0!important;
        border:0!important;
        border-radius:0!important;
        background:transparent!important;
        box-shadow:none!important;
        color:rgba(255,255,255,.86)!important;
        font-size:11px!important;
        font-weight:750!important;
        line-height:1.35;
        white-space:nowrap;
        transform:none!important;
    }

    .site-public-body>footer .footer-legal a:hover,
    .site-public-body>footer .footer-legal a:focus-visible{
        color:#fff!important;
        background:transparent!important;
        text-decoration:underline;
        text-underline-offset:3px;
        box-shadow:none!important;
        transform:none!important;
    }

    .site-public-body>footer .footer-copyright{
        width:100%;
        color:rgba(255,255,255,.68)!important;
        text-align:left!important;
    }
}

@media(max-width:640px){
    .site-public-body>footer .footer-inner{
        display:grid!important;
        grid-template-columns:1fr!important;
        align-items:start!important;
        gap:20px!important;
        width:calc(100% - 32px)!important;
    }

    .site-public-body>footer .footer-brand{
        display:grid;
        gap:7px;
    }

    .site-public-body>footer .footer-brand strong{
        font-size:18px!important;
    }

    .site-public-body>footer .footer-brand span{
        font-size:12px!important;
        line-height:1.65!important;
    }

    .site-public-body>footer .footer-legal{
        gap:5px 16px!important;
    }

    .site-public-body>footer .footer-legal a{
        min-height:34px!important;
        font-size:11px!important;
    }

    .site-public-body>footer .footer-copyright{
        margin-top:6px!important;
        font-size:10.5px!important;
        line-height:1.6!important;
    }
}
