/*
 * Site footer (markup: footer.php, classes .gnm-footer*). Mobile-first, one component for every screen:
 *   phone  (<= 768px)   : one centred column. Brand, link pills, rating, contact card, copyright
 *   tablet (769-991px)  : two columns
 *   desktop (>= 992px)  : three columns (brand + rating | links | contact card) and a copyright bar
 * Scoped under .gnm-footer so the older .ak_footer_* rules in style2.css (still used by footer2.php) don't apply.
 * Sizes are in px: the site changes the root font-size, which makes rem unreliable.
 */

.gnm-footer {
    --f-accent: #f57e2f;                     /* brand orange, same accent as the menu */
    --f-line: rgba(255, 255, 255, .22);
    position: relative;
    margin-top: 10px;
    color: #fff;
    font-family: "Lato", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    text-align: left;
    /* A dark veil guarantees readable white text whatever the page background gradient is underneath */
    background: linear-gradient(180deg, rgba(4, 14, 58, .55) 0%, rgba(4, 14, 58, .85) 100%);
    border-top: 1px solid rgba(255, 255, 255, .28);
    overflow-x: clip;
}
.gnm-footer::before {                         /* thin brand-orange accent along the top edge */
    content: "";
    position: absolute;
    left: 0; right: 0; top: -1px;
    height: 3px;
    background: linear-gradient(90deg, var(--f-accent), rgba(245, 126, 47, 0) 70%);
    pointer-events: none;
}

/* Reset against the site's global element styles. :where() = zero specificity, so classes below always win.
   box-sizing matters: without it, width:100% + padding made the contact card overflow the screen. */
:where(.gnm-footer) *, :where(.gnm-footer) *::before, :where(.gnm-footer) *::after { box-sizing: border-box; }
:where(.gnm-footer) ul { list-style: none; margin: 0; padding: 0; }
:where(.gnm-footer) li { margin: 0; padding: 0; float: none; width: auto; list-style: none; }
:where(.gnm-footer) a { color: inherit; text-decoration: none; }
:where(.gnm-footer) address { font-style: normal; }
:where(.gnm-footer) h3 { margin: 0; padding: 0; background: none; border: 0; }
.gnm-footer a:focus-visible { outline: 2px solid #ffd166; outline-offset: 3px; border-radius: 8px; }

/* ================================================================ layout (phone first) */
.gnm-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "links" "stats" "contact" "bottom";
    gap: 26px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 18px calc(22px + env(safe-area-inset-bottom, 0px));
}
.gnm-footer-brand   { grid-area: brand; }
.gnm-footer-links   { grid-area: links; }
.gnm-footer-stats   { grid-area: stats; }
.gnm-footer-contact { grid-area: contact; }
.gnm-footer-bottom  { grid-area: bottom; }

/* section headings: shown from tablet up (on phones the layout speaks for itself) */
.gnm-footer-h { display: none; }

/* ---- brand ---- */
.gnm-footer-logo { display: inline-flex; align-items: center; gap: 14px; color: #fff; }
.gnm-footer-brand { display: flex; justify-content: center; }
.gnm-footer-logo img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.gnm-footer-logo span { font-size: 21px; font-weight: 700; line-height: 1.2; }

/* ---- quick links: pills on phones ---- */
.gnm-footer-links ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gnm-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;                         /* comfortable touch target */
    padding: 0 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-weight: 700;
    transition: background-color .15s ease;
}
.gnm-footer-links a:hover, .gnm-footer-links a:active { background: rgba(255, 255, 255, .26); color: #fff; }

/* ---- visitors + rating ---- */
.gnm-footer-stats { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.gnm-footer-visitors { font-size: 16px; }
.gnm-footer-visitors strong { font-weight: 700; }
.gnm-footer-rating { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gnm-footer-rating-label { font-size: 13.5px; letter-spacing: .3px; opacity: .85; }
.gnm-footer-stars { display: inline-flex; flex-wrap: nowrap; gap: 6px; }   /* all five stars always on one line */
.gnm-footer-stars svg { width: 26px; height: 26px; fill: #ffd224; margin: 0; flex: 0 0 auto; }

/* ---- contact card ---- */
.gnm-footer-contact {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 20px 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--f-line);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.gnm-footer-row { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; }
.gnm-footer-row address { line-height: 1.6; }
.gnm-footer-chip {                            /* white circle: dark icons stay readable on the dark gradient */
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    color: #0b2a8a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.gnm-footer-phone { font-size: 18px; font-weight: 700; letter-spacing: .3px; color: #fff; }
.gnm-footer-phone:hover { color: #ffd9bd; }
.gnm-footer-follow { margin-top: 4px; font-size: 14px; opacity: .88; }
.gnm-footer-social { display: flex; justify-content: center; gap: 14px; }
.gnm-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
    transition: transform .15s ease, box-shadow .15s ease;
}
.gnm-footer-social-link:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.gnm-footer-social-link img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; display: block; }
.gnm-footer-social-link svg { display: block; }

/* ---- copyright ---- */
.gnm-footer-bottom { padding-top: 16px; border-top: 1px solid var(--f-line); text-align: center; }
.gnm-footer-copy { font-size: 13px; line-height: 1.5; opacity: .9; }

/* ============================================================ tablet: 2 columns */
@media (min-width: 769px) {
    .gnm-footer { font-size: 15px; }
    .gnm-footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: "brand brand" "links contact" "stats stats" "bottom bottom";
        column-gap: 40px;
        row-gap: 30px;
        padding: 44px 28px 22px;
    }
    .gnm-footer-h {
        display: block;
        margin-bottom: 14px;
        padding-bottom: 10px;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 1.4px;
        text-transform: uppercase;
        color: #fff;
        border-bottom: 2px solid var(--f-accent);
        width: fit-content;
    }
    /* links become a plain vertical list */
    .gnm-footer-links ul { display: block; }
    .gnm-footer-links li + li { margin-top: 4px; }
    .gnm-footer-links a {
        min-height: 0;
        padding: 6px 0;
        border: 0;
        border-radius: 0;
        background: none;
        font-weight: 600;
        font-size: 15.5px;
        transition: color .15s ease, transform .15s ease;
    }
    .gnm-footer-links a:hover, .gnm-footer-links a:active { background: none; color: #ffb27a; transform: translateX(4px); }

    /* contact card: left-aligned, fills its column */
    .gnm-footer-contact { max-width: none; margin: 0; align-items: flex-start; text-align: left; padding: 22px 24px 24px; }
    .gnm-footer-contact .gnm-footer-h { margin-bottom: 4px; }
    .gnm-footer-row { justify-content: flex-start; }
    .gnm-footer-social { justify-content: flex-start; }

    .gnm-footer-stats { flex-direction: row; justify-content: center; gap: 36px; }
    .gnm-footer-rating { flex-direction: row; gap: 12px; }
    .gnm-footer-brand { justify-content: flex-start; }
    .gnm-footer-logo img { width: 72px; height: 72px; }
    .gnm-footer-logo span { font-size: 24px; }
}

/* ============================================================ desktop: 3 columns */
@media (min-width: 992px) {
    .gnm-footer-inner {
        grid-template-columns: 1.1fr .8fr 1.3fr;
        grid-template-rows: auto 1fr auto;
        grid-template-areas:
            "brand links contact"
            "stats links contact"
            "bottom bottom bottom";
        column-gap: 64px;
        row-gap: 18px;
        padding: 60px 32px 24px;
        align-items: start;
    }
    .gnm-footer-stats { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; text-align: left; margin-top: 6px; }
    .gnm-footer-rating { flex-direction: column; align-items: flex-start; gap: 6px; }
    .gnm-footer-visitors { font-size: 15.5px; }
    .gnm-footer-bottom { margin-top: 28px; padding-top: 20px; }
    .gnm-footer-copy { font-size: 13.5px; }
}

@media (max-width: 360px) {
    .gnm-footer-inner { padding-left: 12px; padding-right: 12px; }
    .gnm-footer-logo span { font-size: 19px; }
    .gnm-footer-stars svg { width: 24px; height: 24px; }
    .gnm-footer-social { gap: 10px; }
    .gnm-footer-links a { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .gnm-footer * { transition: none !important; }
}
