/* ==========================================================
   Royal Crown Engineering Ltd - shared footer + cookie notice
   Loaded on every page. Everything is scoped (.site-footer,
   .ft-*, .cookie-notice) so it cannot clash with page styles.
   ========================================================== */

.site-footer {
    --ft-bg: #0c2d4a;
    --ft-bg-deep: #081f35;
    --ft-line: rgba(255, 255, 255, 0.14);
    --ft-text: #d6e4f0;
    --ft-muted: #9db6cb;
    --ft-accent: #63a2c6;
    --ft-gold: #c9a24b;
    background: var(--ft-bg);
    color: var(--ft-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    border-top: 3px solid var(--ft-gold);
}
.site-footer *,
.site-footer *::before,
.site-footer *::after { box-sizing: border-box; }
.site-footer h2,
.site-footer h3 { margin: 0; color: #fff; font-family: inherit; }
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer address { font-style: normal; }
/* Pages style the bare <nav> element for the top menu (dark bar, sticky).
   Cancel that for the navs inside the footer. */
.site-footer nav {
    background: none;
    padding: 0;
    position: static;
    z-index: auto;
    box-shadow: none;
    transition: none;
    width: auto;
}
.site-footer a { color: var(--ft-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:focus-visible {
    outline: 2px solid var(--ft-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.ft-wrap { width: min(1120px, 90%); margin: 0 auto; }

/* Call-to-action strip */
.ft-cta { background: #1a4d80; }
.ft-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    padding: 1.75rem 0;
}
.ft-cta h2 { font-size: 1.4rem; }
.ft-cta p { margin-top: 0.25rem; color: #d6eaf8; }
.site-footer .ft-btn {
    display: inline-block;
    background: #fff;
    color: #0c2d4a;
    font-weight: bold;
    padding: 0.75rem 1.6rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.site-footer .ft-btn:hover { background: #d6eaf8; color: #0c2d4a; text-decoration: none; }

/* Main grid */
.ft-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
    gap: 2.5rem;
    padding: 3rem 0 2.5rem;
}
.site-footer .ft-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-weight: bold;
    font-size: 1.05rem;
    line-height: 1.25;
    text-decoration: none;
}
.ft-logo img {
    width: 48px;
    height: 48px;
    flex: none;
    /* The circle is cut with clip-path, not border-radius: border-radius on an <img>
       with padding also shrinks the picture's own clip to a smaller inner circle and
       trims the logo. The 2px ring is drawn as part of the background instead. */
    clip-path: circle(50%);
    object-fit: contain;
    padding: 5px; /* fixed px: a % here would resolve against the wider link, not the image */
    background: radial-gradient(circle closest-side, #f0f9fd calc(100% - 2px), rgba(255, 255, 255, 0.45) calc(100% - 2px));
}
.ft-brand p { margin: 1rem 0 1.25rem; color: var(--ft-muted); max-width: 36ch; }

.ft-social { display: flex; gap: 0.6rem; }
.site-footer .ft-social a {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.site-footer .ft-social a:hover { background: var(--ft-accent); text-decoration: none; }

.ft-col h3 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--ft-line);
}
.ft-col li + li { margin-top: 0.55rem; }

.ft-contact li { display: block; }
.ft-contact .ft-label { display: block; color: var(--ft-muted); font-size: 0.82rem; }
.ft-contact li + li { margin-top: 0.9rem; }
.ft-contact .ft-sub { color: var(--ft-muted); font-size: 0.85rem; }

/* Bottom bar */
.ft-bottom { background: var(--ft-bg-deep); border-top: 1px solid var(--ft-line); }
.ft-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    padding: 1.1rem 0;
    font-size: 0.88rem;
    color: var(--ft-muted);
}
.ft-legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.ft-legal li { margin: 0; }

@media (max-width: 1000px) {
    .ft-grid { grid-template-columns: 1fr 1fr; gap: 2.25rem; }
    .ft-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .ft-grid { grid-template-columns: 1fr; padding-top: 2.25rem; }
    .ft-cta-inner { flex-direction: column; align-items: flex-start; }
    .ft-bottom-inner { flex-direction: column; align-items: flex-start; }
}

/* Cookie notice (injected by site.js) */
.cookie-notice {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 1100;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    max-width: 460px;
    padding: 1rem 1.1rem;
    background: #fff;
    color: #333;
    border-left: 4px solid #1a4d80;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    font: 0.9rem/1.5 Arial, Helvetica, sans-serif;
}
.cookie-notice p { margin: 0; }
.cookie-notice a { color: #1a4d80; font-weight: bold; }
.cookie-notice button {
    flex: none;
    padding: 0.6rem 1.1rem;
    border: 0;
    border-radius: 4px;
    background: #1a4d80;
    color: #fff;
    font: bold 0.9rem Arial, Helvetica, sans-serif;
    cursor: pointer;
}
.cookie-notice button:hover { background: #3a7ca5; }
.cookie-notice a:focus-visible,
.cookie-notice button:focus-visible { outline: 2px solid #63a2c6; outline-offset: 2px; }

@media (max-width: 600px) {
    .cookie-notice {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        max-width: none;
        flex-direction: column;
        align-items: stretch;
    }
}
@media print {
    .site-footer, .cookie-notice { display: none; }
}