/* css/mobile/navbar.css */

/* Global resets — safe for all viewports */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background-color: #fdfaf5;
    font-family: 'Outfit', sans-serif;
    color: #122136;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ════════════════════════════════
   ALL MOBILE-ONLY STYLES
════════════════════════════════ */
@media (max-width: 1024px) {

/* lock scroll when drawer is open */
body.drawer-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ── TOP NAVBAR BAR ── */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.navbar-container {
    pointer-events: auto;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #efe6d2 0%, #e7dcc4 100%);
    border: 1px solid rgba(255,248,235,0.7);
    border-radius: 22px;
    padding: 10px 14px;
    box-shadow: 0 10px 30px rgba(120,85,40,0.16);
    overflow: hidden;
    isolation: isolate;
    max-height: 80px;
}

.navbar-shine {
    position: absolute;
    top: 0;
    left: -160px;
    width: 120px;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.85) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    animation: shineLoop 7.5s infinite ease-in-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes shineLoop {
    0%        { left: -160px; opacity: 0; }
    5%        { opacity: 1; }
    25%       { opacity: 1; }
    30%, 100% { left: calc(100% + 160px); opacity: 0; }
}

.navbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 12px;
    padding: 7px 13px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    position: relative;
    z-index: 5;
    order: 1;
}

.brand-logo-img {
    height: 32px;
    width: auto;
    display: block;
}

/* hide desktop nav links */
.nav-wrapper { display: none !important; }

/* Hamburger */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    margin-left: auto;
    border: none;
    background: rgba(255,255,255,0.55);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    z-index: 5;
    order: 3;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.mobile-toggle .bar {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: #1a1a1a;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), opacity 0.3s ease;
}

.mobile-toggle.active .bar:nth-child(1) { transform: translate3d(0, 7.5px, 0) rotateZ(45deg); }
.mobile-toggle.active .bar:nth-child(2) { opacity: 0; }
.mobile-toggle.active .bar:nth-child(3) { transform: translate3d(0, -7.5px, 0) rotateZ(-45deg); }

/* ── BACKDROP ── */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,18,34,0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-backdrop.open {
    display: block;
    opacity: 1;
}

/* ── RIGHT SIDE DRAWER ── */
.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 80vw;
    max-width: 300px;
    height: 100dvh;
    background: #fdfaf6;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.16,1,0.3,1);
    box-shadow: -10px 0 50px rgba(0,0,0,0.20);
    border-radius: 20px 0 0 20px;
    overflow: hidden;
}

.nav-drawer.open { transform: translateX(0); }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px 16px;
    border-bottom: 1px solid rgba(185,139,44,0.15);
    background: linear-gradient(135deg, #efe6d2 0%, #e7dcc4 100%);
    flex-shrink: 0;
}

.drawer-logo { height: 28px; width: auto; }

.drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #e53e3e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(229,62,62,0.40);
    transition: background 0.2s, transform 0.15s;
}

.drawer-close:active { background: #c53030; transform: scale(0.92); }

.drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px 6px;
}

.drawer-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.drawer-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #0a1222;
    font-weight: 600;
    font-size: 0.88rem;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.drawer-item a:active { background: #fdf3e0; box-shadow: 0 2px 8px rgba(185,139,44,0.15); }

.drawer-item.active a {
    background: linear-gradient(135deg, #fdf3e0 0%, #faecd0 100%);
    border-color: rgba(185,139,44,0.25);
    color: #8a5c10;
    box-shadow: 0 2px 10px rgba(185,139,44,0.15);
}

.drawer-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: none;
    transition: transform 0.2s ease;
}

.drawer-item:nth-child(1) .drawer-icon { background: linear-gradient(135deg, #4f8ef7, #1a6fdd); color: #fff; box-shadow: 0 4px 12px rgba(79,142,247,0.40); }
.drawer-item:nth-child(2) .drawer-icon { background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff; box-shadow: 0 4px 12px rgba(168,85,247,0.40); }
.drawer-item:nth-child(3) .drawer-icon { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,0.40); }
.drawer-item:nth-child(4) .drawer-icon { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,0.40); }
.drawer-item:nth-child(5) .drawer-icon { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 4px 12px rgba(239,68,68,0.40); }
.drawer-item:nth-child(6) .drawer-icon { background: linear-gradient(135deg, #facc15, #eab308); color: #fff; box-shadow: 0 4px 12px rgba(234,179,8,0.40); }

.drawer-item.active .drawer-icon { filter: brightness(1.1); transform: scale(1.08); }

.drawer-item-label { flex: 1; letter-spacing: 0.1px; }
.drawer-arrow { font-size: 0.7rem; color: #ccc; }
.drawer-item.active .drawer-arrow { color: #B98B2C; }

/* ── Person image ── */
.drawer-person-wrap {
    flex-shrink: 0;
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #fdfaf6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-person-img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center 38%;
    mix-blend-mode: multiply;
    filter: contrast(1.05) saturate(1.08);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s cubic-bezier(0.16,1,0.3,1) 0.3s;
}

.nav-drawer.open .drawer-person-img { opacity: 1; transform: translateY(0); }

/* ── Credit footer ── */
.drawer-credit {
    padding: 12px 16px 20px;
    border-top: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fdf8f0 0%, #f7f0e4 100%);
    border-radius: 0 0 0 20px;
}

.drawer-credit span:first-child {
    font-size: 0.58rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #c49a62, #B98B2C);
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(185,139,44,0.35);
}

.drawer-credit-by { font-size: 0.65rem; color: #bbb; font-weight: 500; letter-spacing: 0.2px; }
.drawer-credit-by strong { color: #4A2063; font-weight: 800; font-size: 0.7rem; }

/* ── slide-in stagger ── */
.nav-drawer.open .drawer-item { animation: drawerItemIn 0.32s cubic-bezier(0.16,1,0.3,1) both; }
.nav-drawer.open .drawer-item:nth-child(1) { animation-delay: 0.06s; }
.nav-drawer.open .drawer-item:nth-child(2) { animation-delay: 0.10s; }
.nav-drawer.open .drawer-item:nth-child(3) { animation-delay: 0.14s; }
.nav-drawer.open .drawer-item:nth-child(4) { animation-delay: 0.18s; }
.nav-drawer.open .drawer-item:nth-child(5) { animation-delay: 0.22s; }

@keyframes drawerItemIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

} /* end @media (max-width: 1024px) */

/* Hide drawer elements completely on desktop */
@media (min-width: 1025px) {
    .nav-drawer,
    .nav-backdrop {
        display: none !important;
    }
    .mobile-toggle {
        display: none !important;
    }
}
