/*
 * DGL brand layer (see docs/brand.md).
 * Loaded after bootstrap.min.css and rms2.css. Overrides the vendor theme without editing it.
 * Build on the --dgl-* variables; don't hard-code hex values.
 */

:root {
    /* Brand tokens (docs/brand.md §2) */
    --dgl-red: #D9252C;
    --dgl-red-dark: #A81A20;
    --dgl-ink: #141414;
    --dgl-text: #1D1D1F;
    --dgl-text-2: #3A3A3D;
    --dgl-muted: #5F5F63;
    --dgl-panel: #F4F2EF;
    --dgl-line: #E2DFDA;
    --dgl-white: #FFFFFF;
    --dgl-font: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --dgl-font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;

    /* Remap rms2.css variables so its existing rules use brand colours */
    --white: var(--dgl-white);
    --black: var(--dgl-ink);
    --red: var(--dgl-red);
    --yellow: var(--dgl-red);       /* was already red in rms2.css */
    --darkBlue: var(--dgl-text);    /* body text, .infoBox, .btn-primary */
    --lightBlue: var(--dgl-red-dark); /* link hover (was purple) */
    --gray: var(--dgl-muted);
    --darkGray: var(--dgl-ink);
    --lightGray: var(--dgl-panel);
    --radius: 0;
}

/* Base text: rms2.css forces Verdana, Title Case and 1px tracking with !important */
body {
    font-family: var(--dgl-font) !important;
    color: var(--dgl-text) !important;
    text-transform: none !important;
    letter-spacing: normal;
}

body.lang-ar {
    font-family: var(--dgl-font-ar) !important;
    line-height: 1.7;
}

body.lang-ar * {
    letter-spacing: 0 !important;
}

/* Brand helpers (docs/brand.md §4, §9) */
.dgl-red { color: var(--dgl-red); }

.dgl-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--dgl-red);
}

body.lang-ar .dgl-eyebrow { text-transform: none; }

.dgl-card {
    background: var(--dgl-panel);
    border-top: 4px solid var(--dgl-red);
    padding: 20px;
    border-radius: 0;
}

.dgl-bullets { list-style: none; padding: 0; margin: 0; }
.dgl-bullets li { position: relative; padding-inline-start: 17px; margin-bottom: 6px; }
.dgl-bullets li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: .55em;
    width: 8px;
    height: 8px;
    background: var(--dgl-red);
}

.dgl-btn {
    display: inline-block;
    background: var(--dgl-red);
    color: #fff !important;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 2px;
    text-decoration: none;
}

.dgl-btn:hover { background: var(--dgl-red-dark); color: #fff !important; }

.dgl-btn-outline {
    background: transparent;
    color: var(--dgl-ink) !important;
    border: 1.5px solid var(--dgl-ink);
}

.dgl-btn-outline:hover { background: var(--dgl-ink); color: #fff !important; }

.dgl-band { background: var(--dgl-red); color: #fff; font-weight: 900; }

/* ---------- Navigation (nav.php) ---------- */

/* Logo: natural proportions (1000x564), never stretched.
   brand.md §5 says ~44px, but this compact logo is unreadable at that size: 64px desktop, 48px mobile. */
.navbar-brand { padding: 0; }
.navbar-brand img { height: 64px; width: auto; }
@media (max-width: 991.98px) {
    .navbar-brand img { height: 48px; }
}

/* Mobile menu button: square, thin line */
.navbar-toggler { border: 1px solid var(--dgl-line); border-radius: 0; box-shadow: none !important; }

/* Links: ink text, red on hover, thin red underline for the current page (no red blocks) */
.nav-link,
.dropdown-item {
    font-weight: 600;
    color: var(--dgl-ink) !important;
    background: transparent !important;
    border-bottom: 2px solid transparent !important;
}

.nav-link:hover,
.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--dgl-red) !important;
    background: transparent !important;
}

.nav-link.active {
    color: var(--dgl-red) !important;
    background: transparent !important;
    border-bottom-color: var(--dgl-red) !important;
}

/* Language switch: secondary (outline) button */
.nav-link.aaa {
    font-weight: 700;
    color: var(--dgl-ink) !important;
    background: transparent !important;
    border: 1.5px solid var(--dgl-ink) !important;
    border-radius: 2px;
    margin-inline-start: 8px !important;
    padding: 6px 14px !important;
    align-self: center;
}

.nav-link.aaa:hover {
    color: #fff !important;
    background: var(--dgl-ink) !important;
}

/* Dropdowns: flat, square, thin lines */
.dropdown-menu {
    border: 1px solid var(--dgl-line) !important;
    border-radius: 0;
    box-shadow: none;
}

.dropdown-menu .dropdown-item { border-bottom: 1px solid var(--dgl-line) !important; }
.dropdown-menu li:last-child .dropdown-item { border-bottom: 0 !important; }

/* ---------- Footer (footer.php) ---------- */

.footer .footerPart { padding: 40px 20px !important; }

/* Logo column: centre the logo */
.footer .footerPart:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Logo on the warm-grey panel: smaller, natural proportions */
.footer .footerPart > img {
    width: 100%;
    max-width: 220px;
    height: auto;
}

/* Red newsletter panel */
.footer h3 {
    font-weight: 800;
    letter-spacing: -.01em;
    color: #fff;
    margin-bottom: 16px;
}

.footer .form-control {
    border: 0;
    border-radius: 0;
    color: var(--dgl-text);
}

.footer .form-control::placeholder { color: var(--dgl-muted); }

.footer .btn-vera {
    background: var(--dgl-ink) !important;
    font-weight: 700;
    letter-spacing: .04em;
    width: 100%;
    height: 100%;
}

.footer .btn-vera:hover { background: #000 !important; }

/* The map column keeps its full-bleed iframe */
.footer .footerPart:last-child { padding: 0 !important; min-height: 260px; }

/* ---------- Copyright bar (copyright.php) ---------- */

.copyright {
    background: var(--dgl-white) !important;
    color: var(--dgl-muted) !important;
    border-top: 1px solid var(--dgl-line);
    padding: 16px 20px !important;
}

.copyright .row { font-size: 13px !important; line-height: 1.6; }
.copyright span { color: var(--dgl-red) !important; }
.copyright a:hover span { color: var(--dgl-red-dark) !important; }
