@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.rd-logo {
    display: inline-flex;
    flex-direction: column;
    width: 176px;
    font-family: "Inter", Arial, sans-serif;
    color: #26383b;
    line-height: 1;
}

.rd-logo-main {
    display: block;
    width: 100%;
    font-family: "Inter", Arial, sans-serif;
    font-size: 26px;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.055em;
    white-space: nowrap;
}

.rd-logo-rule {
    display: block;
    width: 100%;
    height: 1px;
    margin: 7px 0 6px;
    background: currentColor;
    opacity: 0.72;
}

.rd-logo-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-family: "Inter", Arial, sans-serif;
    font-size: 8px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.19em;
    white-space: nowrap;
}

/* Header */
.header > .brand .rd-logo {
    width: 176px;
    color: #26383b;
}

/* Footer */
.footer-identity .rd-logo {
    width: 196px;
    color: #f4f2ea;
}

.footer-identity .rd-logo-main {
    font-size: 29px;
}

.footer-identity .rd-logo-sub {
    font-size: 8.8px;
}

/* Mobile */
@media (max-width: 768px) {
    .header > .brand .rd-logo {
        width: 150px;
    }

    .header > .brand .rd-logo-main {
        font-size: 22px;
    }

    .header > .brand .rd-logo-sub {
        font-size: 6.8px;
    }

    .footer-identity .rd-logo {
        width: 172px;
    }

    .footer-identity .rd-logo-main {
        font-size: 25px;
    }

    .footer-identity .rd-logo-sub {
        font-size: 7.5px;
    }
}

/* REALDEEN subtitle precision alignment */
.rd-logo-sub {
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    width: 100% !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
}

.rd-logo-sub > span {
    display: block;
    flex: 0 0 auto;
    font: inherit;
}

.rd-logo-sub .rd-logo-gap {
    width: 7px;
    flex: 0 0 7px;
}

/* Final REALDEEN logo refinement */
.rd-logo-rule {
    height: 1px;
    opacity: 0.52;
    margin: 6px 0 5px;
}

.rd-logo-sub {
    font-size: 7.6px;
}

.footer-identity .rd-logo-sub {
    font-size: 8.4px;
}

.rd-logo-sub .rd-logo-gap {
    width: 5px;
    flex-basis: 5px;
}

@media (max-width: 768px) {
    .header > .brand .rd-logo-sub {
        font-size: 6.5px;
    }

    .footer-identity .rd-logo-sub {
        font-size: 7.2px;
    }
}

/* EXACT ALIGNMENT:
   DIGITAL LIBRARY + separator must begin at R
   and end exactly at N of REALDEEN
*/
.rd-logo {
    width: max-content !important;
}

.rd-logo-main {
    display: block;
    width: max-content !important;
}

.rd-logo-rule {
    width: 100% !important;
}

.rd-logo-sub {
    width: 100% !important;
}

/* Remove previous forced logo widths */
.header > .brand .rd-logo,
.footer-identity .rd-logo {
    width: max-content !important;
}

@media (max-width: 768px) {
    .header > .brand .rd-logo,
    .footer-identity .rd-logo {
        width: max-content !important;
    }
}

/* DESKTOP: keep website/header full width */
@media (min-width: 769px) {
    .header {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
    }

    .footer-inner {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
    }

    /* Only the logo itself hugs REALDEEN */
    .rd-logo,
    .header > .brand .rd-logo,
    .footer-identity .rd-logo {
        width: max-content !important;
    }

    .rd-logo-main {
        width: max-content !important;
    }

    .rd-logo-rule,
    .rd-logo-sub {
        width: 100% !important;
    }
}
