:root {
    --primary: #E74C3C;
    --nav-footer-bg: #070a10d6;
    --nav-header-bg: #ffffffd6;
    --text: #111827;
    --muted: #6b7280;
    --surface: #ffffff;
    --bg: #f3f4f6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Inter, Arial, sans-serif; color: var(--text); background: var(--bg); }
.container { width: min(1200px, 92%); margin: 0 auto; }

.topbar { position: sticky; top: 0; z-index: 60; background: var(--nav-header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,.12); }
.nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { color: #000; text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: .04em; }
.menu { display: flex; align-items: center; gap: .9rem; }
.menu a, .dropbtn { color: var(--text); text-decoration: none; font-size: .92rem; border: none; background: none; cursor: pointer; }
.dropbtn { display: inline-flex; align-items: center; gap: .35rem; }
.submenu-indicator { font-size: .72rem; opacity: .8; }
.menu a:hover, .dropbtn:hover { color: var(--primary); }

.dropdown { position: relative; padding-bottom: 10px; margin-bottom: -10px; }
.dropdown::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; }
.menu > a, .menu .dropdown > .dropbtn { white-space: nowrap; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 230px;
    padding: .45rem;
    border-radius: 12px;
    border: 1px solid #4a4b4e;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
    z-index: 80;
}
.dropdown-menu a { display: block; color: #111827; padding: .6rem .7rem; border-radius: 8px; font-size: .9rem; }
.dropdown-menu a:hover { background: #f3f4f6; color: var(--primary); }

.dropdown-sub { position: relative; }
.dropdown-sub::after { content: ''; position: absolute; top: 0; left: 100%; width: 12px; height: 100%; }
.dropdown-submenu {
    display: none;
    position: absolute;
    top: -6px;
    left: 100%;
    min-width: 210px;
    background: #fff;
    border: 1px solid #4a4b4e;
    border-radius: 12px;
    padding: .45rem;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
}
.dropdown-sub:hover .dropdown-submenu, .dropdown-sub:focus-within .dropdown-submenu { display: block; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: block; }

.auth { display: flex; align-items: center; gap: .5rem; }
.btn { border: 1px solid var(--primary); color: #fff; text-decoration: none; padding: .52rem .85rem; border-radius: 999px; font-size: .9rem; background: var(--primary); }
.btn-solid { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-maroon { background: var(--primary); color: #fff; border-color: var(--primary); }

.search-icon-btn, .profile-trigger {
    border: 1px solid rgba(255,255,255,.35);
    color: var(--text);
    background: transparent;
    border-radius: 999px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.search-icon-btn:hover, .profile-trigger:hover { color: var(--primary); border-color: var(--primary); }

.profile-dropdown { position: relative; }
.profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 220px;
    background: #fff;
    border: 1px solid #4a4b4e;
    border-radius: 12px;
    padding: .45rem;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
    display: none;
    z-index: 90;
}
.profile-menu.show { display: block; }
.profile-menu a { display: block; padding: .58rem .68rem; border-radius: 8px; color: #111827; text-decoration: none; font-size: .9rem; }
.profile-menu a:hover { background: #f3f4f6; color: var(--primary); }

.search-modal { position: fixed; inset: 0; z-index: 120; display: none; }
.search-modal.show { display: block; }
.search-modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.62); backdrop-filter: blur(4px); }
.search-modal-dialog { position: relative; width: min(760px, 92%); margin: 12vh auto 0; background: #fff; border-radius: 16px; box-shadow: 0 28px 55px rgba(2,6,23,.25); padding: 1rem; }
.search-modal-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .7rem; }
.search-modal-title { margin: 0; font-size: 1.1rem; }
.search-modal-close { border: 1px solid #4a4b4e; background: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; }
.search-modal-input { width: 100%; border: 1px solid #d1d5db; border-radius: 12px; padding: .9rem 1rem; font-size: 1rem; outline: none; }
.search-modal-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(231,76,60,.16); }
.search-modal-help { color: #6b7280; font-size: .9rem; margin: .6rem .1rem .1rem; }
.modal-search-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-bottom: .75rem; }
.modal-tab { border: 1px solid #d1d5db; border-radius: 8px; background: #fff; padding: .55rem; font-weight: 600; cursor: pointer; }
.modal-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.modal-suggest { margin-top: .45rem; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 12px 26px rgba(15,23,42,.12); max-height: 230px; overflow: auto; display: none; }
.modal-suggest.show { display: block; }
.modal-suggest-item { display: flex; align-items: center; gap: .62rem; padding: .55rem .65rem; cursor: pointer; background: #f0f7ff; border-bottom: 1px solid #e2e8f0; }
.modal-suggest-item:last-child { border-bottom: none; }
.modal-suggest-item:hover { background: #e2eefc; }
.modal-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid #cbd5e1; flex-shrink: 0; }
.modal-name { font-size: .9rem; font-weight: 700; color: #0f172a; line-height: 1.1; }
.modal-meta { font-size: .78rem; color: #64748b; line-height: 1.1; }
.modal-search-btn { margin-top: .6rem; width: 100%; border: none; border-radius: 10px; background: var(--primary); color: #fff; padding: .75rem; font-weight: 600; cursor: pointer; }

.hamburger { display: none; border: 1px solid rgba(90, 90, 90, 0.35); color: #000; background: transparent; border-radius: 10px; padding: .42rem .55rem; line-height: 1; }
.hamburger svg { width: 20px; height: 20px; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.mobile-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 115;
}
.mobile-drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 360px);
    height: 100vh;
    background: #1f2937;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,.15);
    transform: translateX(-102%);
    transition: transform .24s ease;
    z-index: 116;
    flex-direction: column;
}
.mobile-drawer.show { transform: translateX(0); }
.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .85rem .95rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.mobile-drawer-close {
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    background: transparent;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    cursor: pointer;
}
.mobile-drawer-body { padding: .4rem 0 .9rem; overflow: auto; }
.mobile-link, .mobile-accordion-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    color: #fff;
    text-decoration: none;
    border: none;
    background: transparent;
    border-bottom: 1px dashed rgba(255,255,255,.2);
    padding: .66rem .95rem;
    font-size: 1.02rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.mobile-link:hover, .mobile-accordion-btn:hover { color: #fca5a5; }
.mobile-submenu { display: none; }
.mobile-accordion-item.open > .mobile-submenu { display: block; }
.mobile-accordion-item.open > .mobile-accordion-btn .mobile-caret { transform: rotate(180deg); }
.mobile-caret { transition: transform .2s ease; }
body.mobile-menu-open { overflow: hidden; }

.section { padding: 4.2rem 0; }
.page-hero {
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    position: relative;
    background:
        linear-gradient(rgba(10,14,22,.45), rgba(10,14,22,.62)),
        url('https://images.unsplash.com/photo-1589391886645-d51941baf7fb?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.page-hero-inner { padding: 1.8rem 0; color: #fff; }
.page-hero-title { margin: 0 0 .35rem; font-size: 3rem; line-height: 1.05; font-weight: 700; }
.breadcrumb { display: flex; align-items: center; gap: .55rem; color: #e5e7eb; font-weight: 500; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.crumb-sep { opacity: .8; }

.site-footer { background: var(--nav-footer-bg); color: #d1d5db; padding: 2.8rem 0; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 1.2rem; }
.site-footer h4 { color: #fff; margin: .1rem 0 .9rem; font-size: 1rem; }
.site-footer a { color: #d1d5db; text-decoration: none; display: block; margin: .42rem 0; font-size: .93rem; }
.site-footer a:hover { color: var(--primary); }
.muted { color: #94a3b8; }

@media (max-width: 860px) {
    .menu, .auth { display: none; }
    .hamburger { display: inline-block; }
    .mobile-drawer, .mobile-drawer-backdrop { display: flex; }
    .page-hero { min-height: 160px; }
    .page-hero-title { font-size: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

.public-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 1rem;
    align-items: start;
}
.public-layout > * {
    min-width: 0;
    width: 100%;
}
@media (max-width: 1100px) {
    .public-layout {
        grid-template-columns: 1fr;
    }
}
