/* =====================================================================
   Home layout chrome (navbar + footer) — modern light redesign to match
   the homepage. Scoped to the public layout (body.public-panel) and
   loaded on every page that extends layouts.home. Local assets only.
   ===================================================================== */

/* ---------------- LAYOUT: stop horizontal scroll ----------------
   Decorative gradients/blobs and full-bleed bands can spill past the
   viewport edge and create a horizontal scrollbar. Clip it at the layout
   level. `overflow-x: clip` is used (not `hidden`) because it does NOT
   create a scroll container, so the sticky navbar keeps working and the
   vertical page scroll stays on the viewport. */
body.public-panel {
    overflow-x: clip;
    max-width: 100%;
}

/* ---------------- NAVBAR ---------------- */
body.public-panel > .navbar.sticky-top {
    background: rgba(255, 255, 255, 0.82) !important;
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

body.public-panel .navbar-brand {
    font-weight: 800;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

body.public-panel .navbar .navbar-nav .nav-link {
    font-weight: 600;
    color: #334155 !important;
    border-radius: 10px;
    padding: 0.5rem 0.9rem !important;
    transition: color 0.2s ease, background 0.2s ease;
}

body.public-panel .navbar .navbar-nav .nav-link:hover,
body.public-panel .navbar .navbar-nav .nav-link:focus {
    color: #5b5bf0 !important;
    background: rgba(99, 102, 241, 0.08);
}

body.public-panel .navbar .navbar-nav .nav-link.active {
    color: #5b5bf0 !important;
    background: rgba(99, 102, 241, 0.10);
}

/* Auth buttons */
body.public-panel .home-nav-auth__btn.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 12px;
    padding: 0.55rem 1.15rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.32);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
body.public-panel .home-nav-auth__btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.42);
}

body.public-panel .home-nav-auth__btn.btn-outline-primary {
    border-radius: 12px;
    border-color: #d4d8e8;
    color: #334155;
    padding: 0.55rem 1.15rem;
    font-weight: 700;
    transition: all 0.22s ease;
}
body.public-panel .home-nav-auth__btn.btn-outline-primary:hover {
    background: #f5f6fc;
    color: #5b5bf0;
    border-color: #5b5bf0;
}

/* User pill */
body.public-panel .home-nav-user {
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e7e9f3;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}
body.public-panel .home-nav-user:hover {
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.18);
    transform: translateY(-1px);
}

body.public-panel .navbar .dropdown-menu {
    border-radius: 14px;
    padding: 0.5rem;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
}
body.public-panel .navbar .dropdown-item {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.55rem 0.85rem;
}
body.public-panel .navbar .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.10);
    color: #4f46e5;
}

/* ---------------- FOOTER (redesigned) ---------------- */
body.public-panel .footer {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(99, 102, 241, 0.18), transparent 45%),
        radial-gradient(120% 120% at 100% 0%, rgba(6, 182, 212, 0.14), transparent 45%),
        linear-gradient(180deg, #0a0f1f 0%, #0d1326 60%, #0b1020 100%);
    color: #aab3c5;
    padding: 84px 0 28px;
    margin-top: auto;
}

/* Gradient hairline across the very top */
body.public-panel .footer::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
}

/* Soft glow accent */
body.public-panel .footer::after {
    content: "";
    position: absolute;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.16), transparent 70%);
    top: -16rem;
    inset-inline-end: -10rem;
    pointer-events: none;
}

body.public-panel .footer .container { position: relative; z-index: 1; }

/* Brand block */
body.public-panel .footer .footer-title {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 1.1rem;
}

/* Section headings (the column titles) get an accent underline */
body.public-panel .footer .col-lg-2 .footer-title,
body.public-panel .footer .col-md-4 .footer-title {
    position: relative;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #e7eaf3;
    padding-bottom: 0.7rem;
}
body.public-panel .footer .col-lg-2 .footer-title::after,
body.public-panel .footer .col-md-4 .footer-title::after {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    width: 2.2rem;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

body.public-panel .footer-link {
    color: #99a2b6;
    position: relative;
    width: fit-content;
    transition: color 0.2s ease, transform 0.2s ease;
}
body.public-panel .footer-link::before {
    content: "\203A"; /* › */
    position: absolute;
    inset-inline-start: -0.85rem;
    opacity: 0;
    color: #8b5cf6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
[dir="rtl"] body.public-panel .footer-link::before { content: "\2039"; /* ‹ */ }
body.public-panel .footer-link:hover {
    color: #ffffff;
    transform: translateX(0.5rem);
}
[dir="rtl"] body.public-panel .footer-link:hover { transform: translateX(-0.5rem); }
body.public-panel .footer-link:hover::before { opacity: 1; }

/* Social icons → rounded squares with gradient hover */
body.public-panel .social-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #ffffff;
    transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
body.public-panel .social-icon:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 14px 26px rgba(99, 102, 241, 0.45);
}

body.public-panel .copyright {
    margin-top: 56px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #6f788d;
    font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
    body.public-panel .home-nav-auth__btn,
    body.public-panel .social-icon,
    body.public-panel .footer-link,
    body.public-panel .home-nav-user { transition: none; }
}
