/* Shared navigation: quiet surfaces and a single emerald accent. */
.yc-navbar {
    --nav-ink: #233c35;
    --nav-muted: #56665f;
    background: #fff !important;
    border-bottom: 1px solid #e4e8e3 !important;
    box-shadow: none !important;
}
.yc-navbar .container { max-width: 1280px; min-height: 64px; gap: 24px; }
.yc-navbar .navbar-brand { display: inline-flex; align-items: center; padding: 0; margin-right: 0 !important; }
.yc-navbar .navbar-brand .yc-brand-logo { width: 216px; height: 48px; }
.yc-navbar-search-slot { flex: 1; min-width: 0; max-width: 480px; }
.yc-navbar .search-trigger {
    display: flex; align-items: center; gap: 0; width: 100%; min-height: 66px;
    padding: 7px 8px 7px 24px; border: 1px solid #dde3de; border-radius: 999px;
    background: #fff; color: #263e33; text-align: left; cursor: pointer;
    box-shadow: 0 3px 10px #203c3010;
    transition: box-shadow .18s, border-color .18s;
}
.yc-navbar .search-trigger:hover { border-color: #a4b9ab; box-shadow: 0 5px 18px #203c301c; }
.yc-navbar .search-trigger-segment { flex: 1; min-width: 0; display: grid; gap: 3px; padding-right: 14px; }
.yc-navbar .search-trigger-segment strong { font-size: .78rem; font-weight: 700; }
.yc-navbar .search-trigger-segment > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: #6b766f; }
.yc-navbar .search-trigger-topic { border-left: 1px solid #e3e7e2; padding-left: 20px; }
.yc-navbar .search-trigger-action { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border-radius: 50%; background: #285b46; color: #fff; font-size: 1.05rem; }
.yc-navbar .nav-link { color: var(--nav-muted) !important; font-size: .86rem; font-weight: 500 !important; }
.yc-navbar .nav-link:hover { color: #245b45 !important; }
.nav-icon-link, .nav-login-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px !important; border-radius: 8px; white-space: nowrap; }
.nav-icon-link:hover, .nav-login-link:hover { background: #f2f5f0; }
.nav-icon-link { width: 42px; }
.yc-navbar .btn-emerald {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
    border: 1px solid #285b46; border-radius: 8px; background: #285b46;
    color: #fff !important; font-size: .85rem; font-weight: 600 !important; box-shadow: none !important;
}
.yc-navbar .btn-emerald:hover { background: #204c3a; border-color: #204c3a; }
.yc-navbar-toggler { width: 42px; height: 42px; border-radius: 8px; background: #f2f5f0; }
.yc-navbar .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23285b46' stroke-linecap='round' stroke-width='1.6' d='M5 8h20M5 15h20M5 22h20'/%3E%3C/svg%3E"); }
.user-nav-pill { display: flex; align-items: center; gap: 12px; padding: 4px 4px 4px 12px; border: 1px solid #e0e6dd; border-radius: 9px; background: #fff; }
.user-avatar-small { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; background: #e9f0e8; color: #285b46; font-weight: 600; }
.yc-navbar .dropdown-menu { min-width: 250px; border: 1px solid #e0e6dd !important; border-radius: 12px !important; box-shadow: 0 12px 32px #233c3512 !important; }
.yc-navbar .dropdown-item { font-size: .875rem; color: #4a5e53; }
.yc-navbar .dropdown-item:hover { background: #eff4ed; color: #285b46; }
.yc-navbar :is(a, button):focus-visible, .search-btn-cancel:focus-visible, .search-btn-submit:focus-visible { outline: 3px solid #779b87; outline-offset: 3px; }
@media (min-width: 992px) {
    .yc-navbar .navbar-brand { flex: 0 0 calc(25% - 12px); }
    .yc-navbar .navbar-collapse { flex: 0 0 auto; }
    .yc-navbar .navbar-nav { gap: 8px !important; }
}
/* ===== SEARCH MODAL ===== */
#detailedSearchModal .modal-dialog { max-width: 760px; margin-left: auto; margin-right: auto; padding: 0 12px; }
#detailedSearchModal .search-modal-content {
    border: 1px solid #e0e6df;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#detailedSearchModal .search-modal-header {
    background: #ffffff;
    padding: 2rem 2rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}
#detailedSearchModal .search-modal-header::before { display: none; }

#detailedSearchModal .search-modal-close {
    position: absolute;
    top: 1.25rem; right: 1.25rem;
    width: 2.5rem; height: 2.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    color: #64748b;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
#detailedSearchModal .search-modal-close:hover { background: #f1f5f9; color: #0f172a; }

#detailedSearchModal .search-modal-eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; color: #52705d; font-size: .65rem; font-weight: 700; letter-spacing: .12em; }

#detailedSearchModal .search-modal-title {
    color: #243c32;
    font-size: 2rem;
    font-weight: 750;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}
#detailedSearchModal .search-modal-subtitle {
    color: #6b766f;
    font-size: .875rem;
    line-height: 1.6;
    margin: 8px 0 0;
}

#detailedSearchModal .search-modal-body {
    padding: 1.5rem 2rem;
    background: #fafbf8;
}

/* Keyword input */
#detailedSearchModal .search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dce3dc;
    border-radius: 18px;
    padding: 1rem 1.25rem;
    transition: all 0.2s;
}
#detailedSearchModal .search-input-wrap:focus-within {
    border-color: #059669;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
    background: #ffffff;
}
#detailedSearchModal .search-input-icon {
    color: #285b46;
    font-size: 1.3rem;
    margin-right: 1rem;
    flex-shrink: 0;
}
#detailedSearchModal .search-input-wrap:focus-within .search-input-icon { color: #059669; }
#detailedSearchModal .search-keyword-field { flex: 1; min-width: 0; }
#detailedSearchModal .search-keyword-field label { display: block; color: #263e33; font-size: .78rem; font-weight: 700; margin-bottom: 5px; cursor: text; }
#detailedSearchModal .search-keyword-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: .9375rem;
    font-weight: 500;
    color: #0f172a;
}
#detailedSearchModal .search-keyword-input::placeholder { color: #758078; opacity: 1; }

/* Section cards */
#detailedSearchModal .search-section-card {
    background: #fff;
    border: 1px solid #e1e6dc;
    border-radius: 20px;
    padding: 1.5rem;
}
#detailedSearchModal .search-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
#detailedSearchModal .search-section-icon {
    width: 2.25rem; height: 2.25rem;
    border-radius: 0.625rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.search-section-icon-green, .search-section-icon-blue { background: #eaf0e6; color: #52734b; }
#detailedSearchModal .search-section-label {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}
#detailedSearchModal .search-section-hint { margin: 5px 0 0; color: #6b766f; font-size: .75rem; line-height: 1.5; }

/* Selects */
#detailedSearchModal .modern-select-wrapper .form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
}
#detailedSearchModal .modern-select {
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    min-height: 48px;
    padding: .75rem 2.25rem .75rem .875rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    background-color: #ffffff;
    transition: all 0.2s;
}
#detailedSearchModal .modern-select:disabled { background-color: #f5f6f3; color: #7a827b; border-color: #e7eae4; cursor: not-allowed; }
#detailedSearchModal .modern-select:focus {
    border-color: #059669;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
    outline: none;
}

/* Action buttons */
#detailedSearchModal .search-btn-cancel {
    background: #ffffff;
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: #354b3d;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
#detailedSearchModal .search-btn-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: none;
    box-shadow: none;
}
#detailedSearchModal .search-btn-submit {
    background: #285b46;
    border: none;
    border-radius: 999px;
    padding: .875rem 2rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: #ffffff;
    box-shadow: none;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
#detailedSearchModal .search-btn-submit:hover {
    background: #204c3a;
    box-shadow: none;
    transform: none;
}

@media (max-width: 991.98px) {
    .yc-navbar .container {
        min-height: 56px;
        gap: 8px 12px;
    }

    .yc-navbar .navbar-brand { min-width: 0; max-width: calc(100% - 54px); }
    .yc-navbar .navbar-brand .yc-brand-logo {
        width: clamp(168px, 58vw, 216px);
        max-width: 100%;
        height: 48px;
    }
    .yc-navbar .yc-navbar-toggler { flex: 0 0 42px; padding: 0; }
    .yc-navbar .navbar-brand { order: 0; }
    .yc-navbar .yc-navbar-toggler { order: 1; margin-left: auto; }
    .yc-navbar-search-slot { order: 2; flex: 0 0 100%; max-width: none; padding-bottom: 6px; }
    .yc-navbar .navbar-collapse { order: 3; }

    .yc-navbar .navbar-collapse {
        margin-top: 0;
        padding: 0.85rem;
        border: 1px solid #e0e6dd;
        border-radius: 18px;
        background: #f8f9f6;
        box-shadow: none;
        backdrop-filter: blur(14px);
    }
    .yc-navbar .navbar-collapse.show { max-height: calc(100dvh - 88px); overflow-y: auto; overscroll-behavior: contain; }
    .yc-navbar .dropdown-menu { min-width: 0; width: 100%; }
    .yc-navbar .dropdown-header { white-space: normal; overflow-wrap: anywhere; }

    .yc-navbar .search-trigger {
        max-width: 100%;
    }

    .yc-navbar .navbar-nav {
        align-items: stretch !important;
        gap: 0.55rem !important;
    }

    .nav-login-link,
    .btn-emerald,
    .user-nav-pill {
        width: 100%;
    }

    .nav-login-link {
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
    }
}

#detailedSearchModal .search-modal-header { position: relative; }
#detailedSearchModal .search-modal-title, #detailedSearchModal .search-modal-subtitle { padding-right: 44px; }
#detailedSearchModal .search-modal-footer { padding: 16px 24px; border-top: 1px solid #e1e6dc; background: #fff; gap: 8px; }
#detailedSearchModal .search-modal-footer button { min-height: 44px; margin: 0; }

@media (max-width: 575.98px) {
    #detailedSearchModal .search-modal-footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
    #detailedSearchModal .search-modal-footer button { flex: 1; white-space: nowrap; padding: 10px 12px; font-size: .8rem; }
    #detailedSearchModal .search-modal-footer .search-btn-submit { flex: 1.5; }
    .yc-navbar .search-trigger { min-height: 62px; padding-left: 20px; }
    .yc-navbar .search-trigger-topic { padding-left: 14px; }
    .yc-navbar .search-trigger-segment strong { font-size: .73rem; }
    .yc-navbar .search-trigger-segment > span { font-size: .68rem; }
    .yc-navbar .search-trigger-action { flex-basis: 44px; height: 44px; }
    #detailedSearchModal .search-modal-title { font-size: 1.65rem; }
    #detailedSearchModal .search-modal-content { border-radius: 24px; }
    #detailedSearchModal .search-section-card { padding: 1rem; }

    #detailedSearchModal .search-modal-body,
    #detailedSearchModal .search-modal-header {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    #detailedSearchModal .search-btn-cancel,
    #detailedSearchModal .search-btn-submit {
        flex: 1;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .yc-navbar .search-trigger, #detailedSearchModal .search-modal-content * { transition: none; }
}
