/* Navigation Styles (from white-label-site) */
:root {
    --color-primary: #4f46e5;
    --color-gray: #64748b;
    --color-white: #ffffff;
    --color-black: #0f172a;
}

.navbar {
    padding: 16px 5%;
    box-shadow: 0px 0.605px 1.814px 0px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    background-color: var(--color-white);
    z-index: 1000;
    width: 100%;
}

.navbar.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon-mobile,
.logo-full {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo-icon-mobile {
    display: none;
    height: 32px;
    width: auto;
}

.logo-full {
    display: block;
    height: 32px;
    width: auto;
    max-width: 180px;
}

.logo:hover .logo-icon-mobile,
.logo:hover .logo-full {
    transform: scale(1.05);
}

/* Show icon only on mobile */
@media (max-width: 640px) {
    .logo-icon-mobile {
        display: block;
        height: 28px;
    }

    .logo-full {
        display: none;
    }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-gray);
    text-decoration: none;
    padding: 12px 16px;
    transition: color 0.3s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-buttons {
    display: flex;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #1869f5 0%, #0e3f93 100%) !important;
    color: #ffffff !important;
    padding: 14px 24px !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(24, 105, 245, 0.4) !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 12px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger {
    width: 28px;
    height: 3px;
    background: var(--color-gray);
    transition: all 0.3s;
}

.mobile-menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 640px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-right {
        display: none;
    }

    .nav-right.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
    }

    .nav-buttons {
        width: 100%;
    }

    .nav-buttons a {
        width: 100%;
        text-align: center;
    }
}

/* Global */
body.admin-theme {
    background: #0f172a;
    color: #e2e8f0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
}

/* Login */
.login-wrapper {
    max-width: 420px;
    margin: 80px auto;
    padding: 32px 24px;
    background: #0b1221;
    border-radius: 16px;
    border: 1px solid #1e293b;
}

.login-wrapper h1 {
    margin-bottom: 8px;
}

.login-wrapper p {
    color: #94a3b8;
    margin-bottom: 16px;
}

/* Inputs / buttons (login + admin) */
.admin-input,
.admin-select,
.admin-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #f1f5f9;
    margin-bottom: 18px;
    transition: all .2s ease;
    box-sizing: border-box;
}

.admin-input::placeholder,
.admin-textarea::placeholder {
    color: #94a3b8;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
    border-color: #38bdf8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}

.admin-textarea {
    resize: vertical;
    min-height: 80px;
}

.admin-select {
    background: #1e293b;
    appearance: none;
}

/* Primary & secondary buttons */
.admin-button {
    background: linear-gradient(90deg, #38bdf8, #6366f1);
    color: #0b1221;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

.admin-button.secondary {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid #334155;
}

/* Alerts */
.alerts {
    margin: 16px 0;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 14px;
}

.alert.success {
    background: #0f766e;
}

.alert.error {
    background: #b91c1c;
}

/* Admin layout */
.admin-wrapper {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-card {
    background: #0b1221;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.admin-card h2 {
    margin: 0 0 12px;
    color: #e2e8f0;
}

.admin-card p {
    color: #94a3b8;
}

/* Typography helpers */
.blog-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
    margin: 0 0 4px;
}

.section-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Grid form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

/* Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #1e293b;
    padding: 12px;
    text-align: left;
}

.admin-table th {
    font-weight: 600;
    color: #cbd5e1;
}

.admin-table tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.4);
}

/* Hide keyword section on small screens */
#keywordSection {
    display: none;
}

@media (min-width: 1024px) {
    #keywordSection {
        display: block;
    }
}

/* Mobile expandable search panel */
.search-toggle {
    display: none;
}

@media (max-width: 640px) {
    .search-toggle {
        display: inline-flex;
    }

    #searchCard.is-collapsed #searchPanel {
        display: none;
    }

    #searchCard.is-collapsed .search-toggle svg {
        transform: rotate(0deg);
        transition: transform 0.2s ease;
    }

    #searchCard.is-expanded .search-toggle svg {
        transform: rotate(180deg);
        transition: transform 0.2s ease;
    }

    #searchCard.is-expanded {
        position: fixed;
        inset: 0;
        z-index: 1100;
        border-radius: 0;
        padding: 20px;
        background: #ffffff;
        overflow-y: auto;
    }

    body.search-modal-open {
        overflow: hidden;
    }

    body.search-modal-open #directory,
    body.search-modal-open #keywordSection,
    body.search-modal-open footer {
        display: none;
    }
}

/* Misc */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    background: #1e293b;
    color: #cbd5e1;
    font-size: 12px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.small-text {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 4px;
}

/* Outline buttons used in header */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #334155;
    color: #e2e8f0;
    font-size: 13px;
    text-decoration: none;
    background: transparent;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.btn-outline:hover {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.6);
}

/* Utility stuff you already had */
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-in.in-view {
    opacity: 1;
    transform: translateY(0);
}

.scrollbar-thin::-webkit-scrollbar {
    height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.2);
    border-radius: 999px;
}

details[open] .chevron {
    transform: rotate(180deg);
}