/* Shared layout fixes; header rules are isolated from legacy page navigation. */
html { -webkit-text-size-adjust:100%; scroll-padding-top:84px; }
body { margin:0; min-width:0; }
*,*::before,*::after { box-sizing:border-box; }
img,video,iframe { max-width:100%; }
img { object-fit:contain; }
input,select,textarea { max-width:100%; }
main,section,article,.container,.container-fluid,.main-content,.app-content,.card,.card-body,.content-wrapper,.row>* { min-width:0; }
a,button,input,select,textarea { touch-action:manipulation; }
:focus-visible { outline:3px solid #35bc95; outline-offset:3px; }
.f0i-header.site-header { padding:0!important; background:#0d171c; color:#fff; position:sticky; top:0; z-index:1100; box-shadow:0 3px 14px #0002; line-height:1.4; }
.f0i-header .f0i-header-inner { width:calc(100% - 48px); max-width:1500px; min-height:76px; margin:auto; display:flex; align-items:center; gap:24px; }
.f0i-header .f0i-brand { display:flex; flex:none; padding:5px 0; }
.f0i-header .f0i-brand img { width:52px; height:56px; object-fit:contain; border-radius:5px; }
.f0i-header .f0i-navigation { display:flex; flex:1; min-width:0; align-items:center; justify-content:space-between; gap:20px; position:static; width:auto; background:transparent; padding:0; }
.f0i-header .f0i-menu,.f0i-header .f0i-submenu { list-style:none; margin:0; padding:0; }
.f0i-header .f0i-menu { display:flex; flex-direction:row; align-items:center; gap:4px; position:static; width:auto; background:transparent; box-shadow:none; }
.f0i-header .f0i-menu>li { margin:0; padding:0; border:0; position:relative; flex:none; }
.f0i-header .f0i-menu>li>a,.f0i-header .f0i-dropdown-toggle { display:flex; align-items:center; gap:7px; border:0; background:none; color:#edf4f5; text-decoration:none; padding:12px 10px; font-size:14px; font-weight:600; line-height:1.3; white-space:nowrap; border-radius:8px; cursor:pointer; }
.f0i-header .f0i-menu i { font-size:14px; width:17px; text-align:center; }
.f0i-header .f0i-menu>li>a:hover,.f0i-header .f0i-dropdown-toggle:hover,.f0i-header [aria-current="page"] { background:#ffffff12; color:#88dfb8; }
.f0i-header .f0i-dropdown-toggle::after { content:none; }
.f0i-header .f0i-submenu { position:absolute; top:calc(100% + 4px); left:0; width:230px; background:#fff; padding:6px; border:1px solid #e5ecef; border-radius:12px; box-shadow:0 12px 34px #0002; display:block; }
.f0i-header .f0i-submenu[hidden] { display:none; }
.f0i-header .f0i-submenu li { margin:0; padding:0; border:0; }
.f0i-header .f0i-submenu a { display:block; font-size:14px; color:#193039; text-decoration:none; padding:12px; border-radius:7px; white-space:normal; }
.f0i-header .f0i-submenu a:hover { background:#edf8f2; }
.f0i-header .f0i-header-actions { display:flex; align-items:center; gap:8px; flex:none; }
.f0i-header .f0i-header-actions a,.f0i-header .f0i-logout { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:11px 13px; font-size:13px; font-weight:650; white-space:nowrap; text-decoration:none; border-radius:8px; min-height:42px; line-height:1.2; }
.f0i-header .f0i-donate { background:#ed6c45; color:#fff; }
.f0i-header .f0i-register,.f0i-header .f0i-account { background:#218b5c; color:#fff; }
.f0i-header .f0i-login,.f0i-header .f0i-logout { background:none; border:1px solid #ffffff55; color:#fff; }
.f0i-header .f0i-logout-form { margin:0; }
.f0i-header .f0i-menu-toggle,.f0i-header .f0i-drawer-heading,.f0i-header .f0i-menu-backdrop { display:none; }
.f0i-table-scroll { width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
.f0i-table-scroll:focus-visible { outline-offset:-3px; }
.swal2-popup { max-width:calc(100vw - 24px)!important; }
.swal2-html-container { overflow-wrap:anywhere; }
.f0i-inline-errors { color:#9f2525; margin:8px 0; }
@media (max-width:1279px) {
 .f0i-header .f0i-header-inner { width:calc(100% - 32px); min-height:72px; justify-content:space-between; }
 .f0i-header .f0i-menu-toggle { display:flex; align-items:center; gap:9px; background:#ffffff0d; color:#fff; border:1px solid #ffffff38; border-radius:9px; min-height:44px; padding:8px 13px; font-size:15px; cursor:pointer; }
 .f0i-header .f0i-menu-toggle span:first-child { font-size:22px; }
 .f0i-header .f0i-navigation { display:none; position:fixed; inset:0 0 0 auto; height:100dvh; width:min(400px,calc(100vw - 24px)); padding:20px; overflow-y:auto; overscroll-behavior:contain; background:#0e1c23; box-shadow:-8px 0 38px #0004; z-index:1200; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:16px; }
 .f0i-header .f0i-navigation.open { display:flex; }
 .f0i-header .f0i-drawer-heading { display:flex; align-items:center; justify-content:space-between; color:#fff; font-size:17px; font-weight:650; padding-bottom:16px; border-bottom:1px solid #ffffff24; }
 .f0i-header .f0i-menu-close { color:#fff; background:#ffffff10; border:0; width:44px; height:44px; font-size:30px; border-radius:8px; cursor:pointer; }
 .f0i-header .f0i-menu { display:flex; flex-direction:column; position:static; padding:0; width:100%; gap:3px; align-items:stretch; }
 .f0i-header .f0i-menu>li>a,.f0i-header .f0i-dropdown-toggle { width:100%; min-height:48px; font-size:16px; padding:12px; }
 .f0i-header .f0i-dropdown-toggle { justify-content:space-between; }
 .f0i-header .f0i-submenu { position:static; width:100%; background:#ffffff08; box-shadow:none; border-color:#ffffff16; margin:4px 0 8px; }
 .f0i-header .f0i-submenu a { color:#eaf2f4; min-height:44px; }
 .f0i-header .f0i-submenu a:hover { background:#ffffff12; }
 .f0i-header .f0i-header-actions { flex-wrap:wrap; margin-top:auto; padding-top:18px; border-top:1px solid #ffffff24; gap:10px; }
 .f0i-header .f0i-header-actions>* { flex:1 1 45%; }
 .f0i-header .f0i-header-actions a,.f0i-header .f0i-logout { min-height:48px; width:100%; font-size:14px; }
 .f0i-header .f0i-menu-backdrop:not([hidden]) { display:block; position:fixed; inset:0; background:#0007; z-index:1199; }
 body.f0i-menu-open { overflow:hidden; }
}
@media (max-width:991px) {
 .app-content,.dashboard-content,.content-grid { padding:18px!important; gap:18px!important; }
 .filter-container,.filter-row,.filters,.header-actions,.action-buttons,.hero-buttons { flex-wrap:wrap; }
 .footer-content { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
 .map-layout { flex-direction:column!important; }
 .map-container { min-width:0!important; width:100%!important; }
}
@media (max-width:767px) {
 .container,.container-fluid { max-width:100%; width:100%; padding-left:16px; padding-right:16px; }
 .app-header { padding:12px 16px!important; height:auto!important; min-height:72px; gap:12px; flex-wrap:wrap; }
 .app-header .logo { font-size:1rem; }
 .app-container { grid-template-rows:auto 1fr!important; }
 .user-menu { gap:10px!important; flex-wrap:wrap; }
 .app-content,.dashboard-content,.content-grid { grid-template-columns:minmax(0,1fr)!important; padding:14px!important; }
 .stats-grid,.stat-cards,.cards-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:12px!important; }
 .stat-card { padding:16px!important; }
 .card-container,.team-grid,.partner-grid,.form-grid,.contact-container,.contact-content { grid-template-columns:minmax(0,1fr)!important; }
 .card-container { flex-wrap:wrap; }
 .card-container>.card { width:100%; min-width:0; flex:1 1 100%; }
 .card-body,.settings-container { padding:18px!important; }
 .hero { padding:48px 0!important; }
 .hero h1,.hero h2 { font-size:clamp(1.6rem,6vw,2.2rem)!important; line-height:1.25; }
 .hero p { font-size:1rem!important; }
 .section-title h2 { font-size:1.6rem!important; }
 .hero-buttons,.newsletter-form { display:flex; flex-wrap:wrap; gap:12px; }
 .newsletter-form input { width:100%; min-width:0; flex:1 1 100%; }
 .newsletter-form button { width:100%; }
 .filter-container,.filter-row,.filters { display:flex; flex-wrap:wrap; gap:10px; }
 .filter-container>*,.filter-row>*,.filters>* { min-width:0; flex:1 1 100%; }
 input:not([type=checkbox]):not([type=radio]),select,textarea { font-size:16px!important; }
 button,.btn,select { min-height:44px; }
 .form-control,.form-select { min-height:44px; }
 .nav-tabs { flex-wrap:wrap; }
 .auth-container { padding:24px 0!important; }
 .auth-card { margin:0!important; }
 .footer-content { grid-template-columns:minmax(0,1fr)!important; }
 .footer-links,.footer-bottom { flex-wrap:wrap; }
 .pagination { position:static!important; display:flex!important; flex-direction:row!important; width:auto!important; flex-wrap:wrap; justify-content:center; gap:4px; box-shadow:none!important; background:none!important; }
 .pagination li { margin:0!important; padding:0!important; border:0!important; }
 .map-section { padding:12px!important; }
 .map-interface { display:flex!important; flex-direction:column!important; height:auto!important; }
 #map,.map-view { min-height:340px; height:52dvh!important; max-height:540px; }
 .image-panel,.images-panel,.side-panel { position:static!important; width:100%!important; min-width:0!important; max-height:440px; }
 .swal-info-grid { grid-template-columns:minmax(0,1fr)!important; }
 .swal2-popup { padding:16px!important; }
 .detail-row { overflow-wrap:anywhere; }
}
@media (max-width:399px) {
 .stats-grid,.stat-cards { grid-template-columns:minmax(0,1fr)!important; }
 .f0i-header .f0i-header-inner { width:calc(100% - 24px); }
 .app-header .user-menu { width:100%; justify-content:flex-end; }
}
@media (prefers-reduced-motion:reduce) {
 *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; scroll-behavior:auto!important; }
 .slide-up,.setting-card { opacity:1!important; transform:none!important; }
}
/* The public map uses a real split layout instead of fixed width subtraction. */
.f0i-map-page { height:auto!important; overflow-y:auto!important; overflow-x:clip; padding:0!important; color:#243b43; }
.f0i-map-page .hero-subpage { display:flex; height:calc(100dvh - 76px); min-height:480px; padding:0!important; margin:0; }
.f0i-map-page .main-container { flex:1 1 auto; min-width:0; height:100%; margin:0; }
.f0i-map-page #mapContainer { width:100%!important; height:100%; }
.f0i-map-page #map { width:100%; height:100%!important; min-height:0; max-height:none; }
.f0i-map-page #rightPanel { position:static; width:340px; flex:0 0 340px; height:100%; transform:none; box-shadow:none; border-left:1px solid #dfe8eb; background:#f4f7f8; overflow-y:auto; }
.f0i-map-page #rightPanel.collapsed { display:none; }
.f0i-map-page .panel-content { height:auto; overflow:visible; padding:16px; }
.f0i-map-page .panel-header { padding:16px; gap:12px; flex-wrap:wrap; }
.f0i-map-page .panel-toggle { left:auto; right:12px; top:12px; transform:none; border-radius:9px; width:44px; height:44px; padding:8px; z-index:1001; }
.f0i-map-page .admin-controls { max-width:calc(100% - 24px); }
.f0i-map-page .legend-container { max-width:calc(100% - 24px); font-size:12px; }
.f0i-map-page .map-unavailable { height:100%; min-height:300px; display:flex; align-items:center; justify-content:center; padding:40px; background:#eaf1ef; color:#284339; text-align:center; }
@media(max-width:1279px){ .f0i-map-page .hero-subpage { height:calc(100dvh - 72px); } }
@media(max-width:767px){
 .f0i-map-page .hero-subpage { flex-direction:column; height:auto; min-height:0; }
 .f0i-map-page .main-container { flex:none; height:58dvh; min-height:400px; }
 .f0i-map-page #rightPanel { flex:none; width:100%; height:auto; max-height:none; border-left:0; border-top:1px solid #dfe8eb; }
 .f0i-map-page .panel-header { position:static; }
 .f0i-map-page .panel-content { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 .f0i-map-page .panel-content>.text-center,.f0i-map-page .panel-content>hr { display:none; }
 .f0i-map-page .panel-content>nav,.f0i-map-page .panel-content>.no-images { grid-column:1/-1; }
 .f0i-map-page .image-item { margin:0; padding:10px; }
 .f0i-map-page .image-item img { height:110px; width:100%; object-fit:cover; }
 .f0i-map-page .info-window-meta { flex-wrap:wrap; font-size:12px; }
 .f0i-map-page .admin-controls { left:12px!important; top:70px!important; right:auto; width:220px!important; }
 .f0i-map-page .search-container { left:12px!important; top:12px!important; right:70px!important; max-width:calc(100% - 82px); }
 .f0i-map-page .legend-container { left:12px!important; bottom:12px!important; }
 .f0i-map-page #geoBtn { right:12px!important; bottom:20px!important; }
}
@media(max-width:767px){
 .card-header { flex-wrap:wrap!important; gap:12px!important; }
 .card-header .card-title { min-width:0; max-width:100%; }
 .card-actions { display:flex; flex-wrap:wrap; gap:8px; width:100%; }
 .filter-input { min-width:0!important; width:100%!important; }
 .filter-group { min-width:0; max-width:100%; }
 .d-none { display:none!important; }
}
.f0i-map-page [hidden] { display:none!important; }
@media(max-width:991px){
 .side-panel:not(.open) { visibility:hidden; pointer-events:none; }
 .side-panel.open { visibility:visible; pointer-events:auto; max-width:100vw; }
 #mainContainer { grid-template-columns:minmax(0,1fr)!important; padding:14px; }
 #mainContainer #rightPanel { max-height:none!important; overflow:visible!important; }
 #mainContainer .form-scroll { max-height:none!important; overflow:visible!important; }
 #mainContainer .actions-sticky { position:static; bottom:auto; margin-top:14px; }
 #mainContainer #mapContainer { min-height:360px; height:48dvh; }
}
