/* Bottom navigation for phones (resources/views/frontend/includes/mobile-nav.blade.php).
   Visibility (<=575px) still comes from custom.css .add_newp. */
.sg-bnav.add_newp {
    padding: 0 6px env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid #E3E7EC;
    box-shadow: 0 -4px 16px rgba(18, 22, 28, .08);
    z-index: 1000;
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
    transition: transform .2s ease;
}
.sg-bnav.is-hidden { transform: translateY(110%); }
.sg-bnav ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; margin: 0; padding: 0; list-style: none; }
.sg-bnav li { display: flex; justify-content: center; }
.sg-bnav a { -webkit-tap-highlight-color: transparent; text-decoration: none; }
.sg-bnav-item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    width: 100%; min-height: 60px; padding: 8px 2px 6px; color: #5B6470;
}
.sg-bnav-item:hover, .sg-bnav-item:focus { color: #12161C; text-decoration: none; }
.sg-bnav-item.is-active { color: #157A2C; }
.sg-bnav-item.is-active::before {
    content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 3px; margin-left: -14px;
    border-radius: 0 0 3px 3px; background: #157A2C;
}
.sg-bnav-ic { position: relative; display: flex; }
.sg-bnav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sg-bnav-item.is-active svg { stroke-width: 2.2; }
.sg-bnav-label { font-size: 11px; font-weight: 500; line-height: 1.2; white-space: nowrap; color: inherit; margin: 0; }
.sg-bnav-item.is-active .sg-bnav-label { font-weight: 600; }
.sg-bnav-badge {
    position: absolute; top: -5px; left: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #D92D20; color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.sg-bnav-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* Post ad: raised green button */
.sg-bnav-post { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 2px 6px; color: #157A2C; }
.sg-bnav-post:hover, .sg-bnav-post:focus { color: #11662A; text-decoration: none; }
.sg-bnav-fab {
    display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-top: -22px;
    border-radius: 50%; background: #157A2C; color: #fff;
    box-shadow: 0 6px 16px rgba(21, 122, 44, .35), 0 0 0 4px #fff;
    transition: transform .15s ease, background-color .15s ease;
}
.sg-bnav-fab svg { width: 28px; height: 28px; stroke-width: 2.4; }
.sg-bnav-post:active .sg-bnav-fab { transform: scale(.94); }
.sg-bnav-post:hover .sg-bnav-fab, .sg-bnav-post.is-active .sg-bnav-fab { background: #11662A; }
.sg-bnav-post .sg-bnav-label { font-weight: 600; }

.sg-bnav a:focus-visible { outline: 3px solid #0070C0; outline-offset: -3px; border-radius: 10px; }
.sg-bnav-post:focus-visible { outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .sg-bnav, .sg-bnav-fab { transition: none; }
}

/* Header (logged in): notifications + messages buttons and avatar.
   Same look as the designs: 40px round icon buttons, red count badge. */
/* The old wrappers drew their own white circle with padding; the button
   inside is now the circle, so the wrapper is just a 40px box. */
.userNotifications, .userMessages { width: 40px !important; height: 40px !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; position: relative; vertical-align: middle; }
.sg-hbtn { position: relative; display: flex !important; align-items: center; justify-content: center; flex: none; width: 40px !important; height: 40px !important; padding: 0 !important; margin: 0 !important; border-radius: 50%; background: #fff; color: #12161C; text-decoration: none; transition: background-color .15s; }
.sg-hbtn:hover, .sg-hbtn:focus { background: #E6F1FA; color: #12161C; text-decoration: none; }
.sg-hbtn:focus-visible { outline: 3px solid #4DA3E0; outline-offset: 2px; }
.sg-hbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sg-hbadge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #C62828; color: #fff; font: 700 11px/18px Poppins, system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px #000; }
.sg-hinitials { width: 36px; height: 36px; border-radius: 50%; background: #0070C0; color: #fff; font: 600 13px/36px Poppins, system-ui, sans-serif; text-align: center; display: block; float: left; margin: 5px 10px 0 0; }
/* Logged in, 769px+: the bell / messages buttons are placed from the right
   edge, so stop the search box before them (they overlapped up to ~1150px). */
@media (min-width: 769px) {
    .hom-nav:has(#userNotification) .top-ser { max-width: calc(100vw - 780px); }
}

/* "Install the app" banner (resources/views/frontend/includes/pwa-install.blade.php) */
.sg-install { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 999; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #fff; box-shadow: 0 6px 24px rgba(18, 22, 28, .22); font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; }
.sg-install[hidden] { display: none; }
.sg-install img { flex: none; width: 44px; height: 44px; border-radius: 10px; }
.sg-install-text { flex: 1; min-width: 0; line-height: 1.3; }
.sg-install-text strong { display: block; font-size: 14px; font-weight: 600; color: #12161C; }
.sg-install-text span { display: block; font-size: 12px; color: #5B6470; }
.sg-install-yes { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: #157A2C; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.sg-install-yes:hover, .sg-install-yes:focus { background: #11662A; }
.sg-install-no { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 44px; padding: 0; border: 0; background: none; color: #5B6470; cursor: pointer; }
.sg-install-no svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- Footer on phones and small tablets (frontend/includes/footer) ---------- */
@media (max-width: 767.98px) {
    /* The old CSS floats the footer and sizes .dn-div with a % flex-basis; Safari
       measures that wrongly and ends the blue background early. Normal flow here. */
    .wed-hom-footer { float: none; display: flow-root; width: 100%; padding: 24px 0 20px; }
    .wed-hom-footer .dn-div, .wed-hom-footer .appl-div, .wed-hom-footer .p-btnss { flex: none; height: auto; }
    .cr { float: none; display: flow-root; width: 100%; }
    .wed-hom-footer .container { padding-left: 16px; padding-right: 16px; }
    .wed-hom-footer .row { margin-left: 0; margin-right: 0; }
    .wed-hom-footer .foot-supp { justify-content: center; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
    .wed-hom-footer .foot-supp h2 { font-size: 13px; line-height: 1.6; text-align: center; margin: 0; padding: 0; word-break: break-word; }
    /* App download: centered, logo above the text */
    .wed-hom-footer .frc { padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
    .wed-hom-footer .frc .col-sm-12 { padding: 0; }
    .wed-hom-footer .appl-div { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; float: none; width: 100%; margin: 0; padding: 0; }
    .wed-hom-footer .dn-div { display: flex; flex-direction: column; align-items: center; gap: 8px; float: none; width: 100%; margin: 0; }
    .wed-hom-footer .dn-left, .wed-hom-footer .dn-right { float: none; width: auto; padding: 0; margin: 0; text-align: center; }
    .wed-hom-footer .dn-left img { max-width: 120px; height: auto; margin: 0 auto; }
    .wed-hom-footer .b-stars { justify-content: center; margin: 4px auto 0; }
    .wed-hom-footer .p-btnss { display: flex; justify-content: center; gap: 10px; float: none; width: 100%; margin: 0; padding: 0; }
    .wed-hom-footer .p-btnss a { margin: 0; }
    .wed-hom-footer .p-btnss img { height: 42px; width: auto; }
    /* Links: one section per row, two link columns inside */
    .wed-hom-footer .wed-foot-link { display: block; padding: 18px 0 0; }
    .wed-hom-footer .wed-foot-link > div { float: none; width: 100% !important; max-width: 100%; flex: none; padding: 0 0 14px !important; margin: 0 0 14px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
    .wed-hom-footer .wed-foot-link > div:last-child { border-bottom: 0; margin-bottom: 0; }
    .wed-hom-footer .wed-foot-link h4 { float: none; width: auto; margin: 0 0 10px; padding: 0; font-size: 13px; letter-spacing: .06em; }
    .wed-hom-footer .wed-foot-link ul { clear: both; width: 100%; float: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin: 0; padding: 0; }
    .wed-hom-footer .wed-foot-link ul li { float: none; width: auto !important; margin: 0; min-width: 0; }
    .wed-hom-footer .wed-foot-link ul li a { display: block; padding: 6px 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
    .wed-hom-footer .wed-foot-link ul.sopcials { display: flex; flex-wrap: wrap; gap: 12px; }
    .wed-hom-footer .wed-foot-link ul.sopcials li a { padding: 0; }
    .wed-hom-footer .wed-foot-link ul.sopcials img { width: 36px; height: 36px; }
}
/* Phones have a fixed bar at the bottom (menu, ad contact bar or wizard buttons):
   leave room after the copyright line, the last thing on the page, so it isn't hidden.
   (Padding on <body> doesn't work here: the old CSS limits the body's height.) */
@media (max-width: 575px) {
    .cr { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}
