/* ==========================================================================
   Site footer - shared by /footer.php and the Stories theme
   (stories/wp-content/themes/newspiper/template-parts/rangeela-footer.php).
   Every selector starts with "body footer.rg-footer" so the legacy footer rules
   in style.css, styles.css, home.min.css and rangeela-chrome.css
   (e.g. footer a { color:#fff !important }) cannot leak in.
   Colours and fonts follow the tokens in css/rangeela-premium.css.
   ========================================================================== */

body footer.rg-footer {
    --rf-bg: #17120d;
    --rf-bg-2: #211a13;
    --rf-gold: #d4af37;
    --rf-gold-2: #b08d3f;
    --rf-head: #ffffff;
    --rf-text: rgba(255, 255, 255, .74);
    --rf-dim: rgba(255, 255, 255, .58);
    --rf-line: rgba(255, 255, 255, .1);
    --rf-font-head: 'Playfair Display', 'Playfair Fallback', Georgia, 'Times New Roman', serif;
    --rf-font-body: 'Open Sans', 'Open Sans Fallback', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

    display: block;
    position: relative;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: var(--rf-bg);
    border-top: 1px solid rgba(212, 175, 55, .35);
    color: var(--rf-text) !important;
    font-family: var(--rf-font-body);
    font-size: 14.5px;
    line-height: 1.6;
    text-align: left;
}
body footer.rg-footer *,
body footer.rg-footer *::before,
body footer.rg-footer *::after { box-sizing: border-box; }

/* Reset what the legacy footer rules set on bare elements */
body footer.rg-footer p,
body footer.rg-footer li,
body footer.rg-footer span,
body footer.rg-footer address {
    color: var(--rf-text) !important;
    font-family: var(--rf-font-body);
    font-size: 14.5px;
    font-style: normal;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}
body footer.rg-footer ul { list-style: none; margin: 0; padding: 0; }
body footer.rg-footer a {
    color: var(--rf-text) !important;
    font-size: inherit;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
body footer.rg-footer a:hover,
body footer.rg-footer a:focus-visible { color: var(--rf-gold) !important; text-decoration: none; }
body footer.rg-footer a:focus-visible { outline: 2px solid var(--rf-gold); outline-offset: 3px; border-radius: 3px; }

/* ---------- Layout ---------- */
body footer.rg-footer .rg-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 0;
}
body footer.rg-footer .rg-footer__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr .85fr 1.45fr;
    grid-template-areas: "brand services quick useful contact";
    gap: 36px 32px;
    padding-bottom: 44px;
}
body footer.rg-footer .rg-footer__brand { grid-area: brand; }
body footer.rg-footer .rg-footer__col--services { grid-area: services; }
body footer.rg-footer .rg-footer__col--quick { grid-area: quick; }
body footer.rg-footer .rg-footer__col--useful { grid-area: useful; }
body footer.rg-footer .rg-footer__col--contact { grid-area: contact; }

/* ---------- Brand ---------- */
body footer.rg-footer .rg-footer__logo { display: inline-block; margin: 0 0 16px; }
body footer.rg-footer .rg-footer__logo img {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
    margin: 0;
    border-radius: 8px;
}
body footer.rg-footer .rg-footer__about { max-width: 280px; margin: 0 0 18px; }

body footer.rg-footer .rg-footer__social { display: flex; flex-wrap: wrap; gap: 10px; }
body footer.rg-footer .rg-footer__social li { margin: 0; padding: 0; }
body footer.rg-footer .rg-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    background: transparent;
    color: var(--rf-head) !important;
}
body footer.rg-footer .rg-footer__social i { color: inherit !important; font-size: 16px; line-height: 1; }
body footer.rg-footer .rg-footer__social a:hover,
body footer.rg-footer .rg-footer__social a:focus-visible {
    background: var(--rf-gold);
    border-color: var(--rf-gold);
    color: var(--rf-bg) !important;
}

/* ---------- Column headings + link lists ---------- */
body footer.rg-footer .rg-footer__title {
    position: relative;
    margin: 0 0 18px;
    padding: 0 0 10px;
    color: var(--rf-head) !important;
    font-family: var(--rf-font-head);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}
body footer.rg-footer .rg-footer__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 2px;
    background: var(--rf-gold-2);
}
body footer.rg-footer .rg-footer__links li { margin: 0 0 9px; padding: 0; }
body footer.rg-footer .rg-footer__links li:last-child { margin-bottom: 0; }
body footer.rg-footer .rg-footer__links a { display: inline-block; line-height: 1.45; }

/* ---------- Contact ---------- */
body footer.rg-footer .rg-footer__contact li {
    display: grid;
    grid-template-columns: 18px 1fr;
    column-gap: 10px;
    align-items: start;
    margin: 0 0 11px;
}
body footer.rg-footer .rg-footer__contact i {
    color: var(--rf-gold) !important;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    padding-top: 1px;
}
body footer.rg-footer .rg-footer__contact a {
    display: inline;          /* overrides the global a[href^="tel:"] inline-flex */
    color: var(--rf-head) !important;
    font-weight: 600;
    overflow-wrap: anywhere;
}
body footer.rg-footer .rg-footer__contact a:hover,
body footer.rg-footer .rg-footer__contact a:focus-visible { color: var(--rf-gold) !important; }
body footer.rg-footer .rg-footer__contact address { overflow-wrap: anywhere; }

body footer.rg-footer .rg-footer__map { margin-top: 6px; }
body footer.rg-footer .rg-footer__map iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 140px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    background: var(--rf-bg-2);
}
body footer.rg-footer .rg-footer__directions {
    display: inline-block;
    margin-top: 8px;
    color: var(--rf-gold) !important;
    font-size: 13.5px;
    font-weight: 600;
}
body footer.rg-footer .rg-footer__directions:hover { text-decoration: underline; }

/* ---------- Bottom bar ----------
   Desktop: copyright left + legal links right on one row, licence line below.
   Tablet: stacked, links stay in one dotted row. Mobile: stacked, links in a 2x2 grid. */
body footer.rg-footer .rg-footer__bottom {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "copy    legal"
        "license license";
    align-items: center;
    gap: 6px 40px;
    padding: 22px 0 26px;
}
/* hairline that fades into the background at both ends */
body footer.rg-footer .rg-footer__bottom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, .42) 50%, rgba(212, 175, 55, 0) 100%);
}

body footer.rg-footer .rg-footer__copy {
    grid-area: copy;
    color: var(--rf-text) !important;
    font-size: 13.5px;
    line-height: 1.6;
}
body footer.rg-footer .rg-footer__copy-year {
    color: var(--rf-dim) !important;
    font-size: inherit;
    letter-spacing: .02em;
    margin-right: 2px;
}
body footer.rg-footer .rg-footer__copy a {
    color: var(--rf-head) !important;
    font-weight: 600;
    letter-spacing: .01em;
}
body footer.rg-footer .rg-footer__copy a:hover,
body footer.rg-footer .rg-footer__copy a:focus-visible { color: var(--rf-gold) !important; }

body footer.rg-footer .rg-footer__license {
    grid-area: license;
    color: rgba(255, 255, 255, .52) !important;
    font-size: 12.5px;
    line-height: 1.6;
    letter-spacing: .01em;
}
body footer.rg-footer .rg-footer__sep {
    color: var(--rf-gold-2) !important;
    font-size: inherit;
    margin: 0 4px;
}

body footer.rg-footer .rg-footer__legal { grid-area: legal; justify-self: end; }
body footer.rg-footer .rg-footer__legal ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}
body footer.rg-footer .rg-footer__legal li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 13px;
}
/* small gold dot between links (no icons) */
body footer.rg-footer .rg-footer__legal li + li::before {
    content: "";
    width: 3px;
    height: 3px;
    margin: 0 14px;
    border-radius: 50%;
    background: var(--rf-gold-2);
    opacity: .7;
}
body footer.rg-footer .rg-footer__legal a {
    display: inline-block;
    padding: 4px 0;
    color: rgba(255, 255, 255, .7) !important;
    font-size: 13px;
    letter-spacing: .02em;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}
body footer.rg-footer .rg-footer__legal a:hover,
body footer.rg-footer .rg-footer__legal a:focus-visible {
    color: var(--rf-gold) !important;
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, .55);
}

/* The fixed WhatsApp/Call buttons (footer.php .floating) sit in the bottom-right ~75px x 145px
   of the viewport. Keep the bottom bar clear of them when the page is scrolled to the end. */
@media (min-width: 992px) {
    /* only kicks in when the side margin beside the 1200px container is too small (< ~1366px) */
    body footer.rg-footer .rg-footer__legal { margin-right: max(0px, calc(68px - max(0px, (100vw - 1200px) / 2))); }
}

@media (max-width: 991px) {
    body footer.rg-footer .rg-footer__bottom {
        padding-bottom: 150px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "copy"
            "license"
            "legal";
        gap: 4px;
    }
    body footer.rg-footer .rg-footer__legal { justify-self: start; margin-top: 8px; }
    body footer.rg-footer .rg-footer__legal ul { justify-content: flex-start; }
}

/* ---------- Tablet: brand row on top, three link columns, contact + map side by side ---------- */
@media (max-width: 1199px) {
    body footer.rg-footer .rg-footer__inner { padding: 48px 24px 0; }
    body footer.rg-footer .rg-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas:
            "brand brand brand"
            "services quick useful"
            "contact contact contact";
        gap: 32px 28px;
        padding-bottom: 36px;
    }
    body footer.rg-footer .rg-footer__brand {
        display: flex;
        align-items: center;
        gap: 24px;
        padding-bottom: 28px;
        border-bottom: 1px solid var(--rf-line);
    }
    body footer.rg-footer .rg-footer__logo { flex: none; margin: 0; }
    body footer.rg-footer .rg-footer__logo img { width: 180px; }
    body footer.rg-footer .rg-footer__about { max-width: 420px; margin-bottom: 14px; }
    body footer.rg-footer .rg-footer__contact-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px 28px;
        align-items: start;
    }
    body footer.rg-footer .rg-footer__map { margin-top: 0; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    body footer.rg-footer .rg-footer__inner { padding: 40px 16px 0; }
    body footer.rg-footer .rg-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "brand brand"
            "services quick"
            "useful useful"
            "contact contact";
        gap: 28px 20px;
        padding-bottom: 28px;
    }
    body footer.rg-footer .rg-footer__brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding-bottom: 24px;
    }
    body footer.rg-footer .rg-footer__logo img { width: 170px; }
    body footer.rg-footer .rg-footer__title { font-size: 17px; margin-bottom: 14px; }
    body footer.rg-footer .rg-footer__links li { margin-bottom: 2px; }
    body footer.rg-footer .rg-footer__links a { padding: 5px 0; }   /* ~32px tap targets */
    body footer.rg-footer .rg-footer__col--useful .rg-footer__links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 20px;
    }
    body footer.rg-footer .rg-footer__contact-body { grid-template-columns: 1fr; gap: 6px; }
    body footer.rg-footer .rg-footer__map iframe { height: 160px; }
    body footer.rg-footer .rg-footer__bottom { padding-top: 20px; }
    body footer.rg-footer .rg-footer__legal { width: 100%; margin-top: 10px; }
    body footer.rg-footer .rg-footer__legal ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, max-content));
        column-gap: 28px;
        row-gap: 0;
    }
    body footer.rg-footer .rg-footer__legal li + li::before { content: none; }
    body footer.rg-footer .rg-footer__legal a { padding: 7px 0; }   /* ~34px tap targets */
}
