:root {
    --brand-blue: #128cc2;
    --brand-dark: #052533;
    --brand-light: #e8f4fb;
    --brand-gray: #f7f8fa;
    --text-muted-custom: #6c757d;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    color: var(--brand-dark);
    background: #fff;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-sans);
    color: var(--brand-dark);
    font-weight: 700;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar-main {
    background: var(--brand-dark);
    padding: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(5,37,51,0.12);
}

.navbar-main .navbar-brand {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.navbar-main .navbar-brand .brand-title span {
    color: var(--brand-blue);
}

.navbar-main .navbar-brand .brand-text {
    line-height: 1.15;
}

.navbar-main .navbar-brand .brand-subtitle {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}

.navbar-main .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
    color: #fff !important;
    background: rgba(18,140,194,0.18);
}

.navbar-main .navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}

.navbar-main .navbar-toggler-icon {
    filter: invert(1);
}

/* ── Language switcher dropdown ─────────────────────────────── */
.lang-switcher .lang-btn {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.22);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.28rem 0.7rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.5;
    transition: background 0.15s, border-color 0.15s;
}

.lang-switcher .lang-btn:hover,
.lang-switcher .lang-btn:focus,
.lang-switcher .lang-btn:active,
.lang-switcher .lang-btn.show {
    background: rgba(18,140,194,0.28);
    border-color: var(--brand-blue);
    color: #fff;
    box-shadow: none;
}

.lang-switcher .flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-switcher .dropdown-menu {
    min-width: 150px;
    border: 1px solid rgba(5,37,51,0.12);
    box-shadow: 0 4px 16px rgba(5,37,51,0.14);
    border-radius: 6px;
    padding: 0.3rem 0;
    margin-top: 0.35rem !important;
}

.lang-switcher .dropdown-item {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-dark);
    transition: background 0.12s;
}

.lang-switcher .dropdown-item.active,
.lang-switcher .dropdown-item:active {
    background: var(--brand-light);
    color: var(--brand-blue);
    font-weight: 600;
}

.lang-switcher .dropdown-item:hover {
    background: var(--brand-light);
    color: var(--brand-blue);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-brand {
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.6rem 1.5rem;
    transition: background 0.15s;
}

.btn-brand:hover, .btn-brand:focus {
    background: #0e7aaa;
    color: #fff;
}

.btn-brand-outline {
    background: transparent;
    color: var(--brand-blue);
    border: 2px solid var(--brand-blue);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.55rem 1.4rem;
    transition: background 0.15s, color 0.15s;
}

.btn-brand-outline:hover {
    background: var(--brand-blue);
    color: #fff;
}

/* ── Sections ────────────────────────────────────────────────── */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-divider {
    width: 50px;
    height: 3px;
    background: var(--brand-blue);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

.section-divider-left {
    margin: 0 0 2rem;
}

/* ── Book cards ──────────────────────────────────────────────── */
.book-card {
    border: 1px solid #e8edf2;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(5,37,51,0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.book-card:hover {
    box-shadow: 0 6px 24px rgba(5,37,51,0.12);
    border-color: var(--brand-blue);
}

.book-card .book-cover-wrap {
    background: var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    min-height: 280px;
}

.book-card .book-cover-wrap img {
    max-height: 220px;
    object-fit: contain;
    box-shadow: 0 4px 16px rgba(5,37,51,0.18);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer-main {
    background: var(--brand-dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
}

.footer-main a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-main a:hover {
    color: var(--brand-blue);
}

.footer-title {
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
}

.footer-copy {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
}

.footer-legal-links {
    gap: 1.25rem;
}

.footer-legal-links a {
    font-size: 0.82rem;
}

/* ── Utilities ───────────────────────────────────────────────── */
.bg-brand-light { background: var(--brand-light); }
.bg-brand-dark  { background: var(--brand-dark); }
.text-brand     { color: var(--brand-blue) !important; }
.border-brand   { border-color: var(--brand-blue) !important; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert-success { background: #eaf7ee; border-color: #b8dfc4; color: #1a6b35; }
.alert-danger  { background: #fdf1f0; border-color: #f0c0bb; color: #8b1a1a; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb-wrap {
    background: var(--brand-gray);
    padding: 0.6rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-item a { color: var(--brand-blue); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-muted-custom); }

/* ── Form fields ─────────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem rgba(18,140,194,0.15);
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-header-brand {
    background: var(--brand-dark);
    color: #fff;
}

.modal-header-brand .modal-title { color: #fff; }
.modal-header-brand .btn-close { filter: invert(1) brightness(2); }

/* ── Video wrapper ───────────────────────────────────────────── */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}
