/* ============================================================
   SITE FOOTER — Benqu's dark two-part footer (markup: footer.php):
     .site-footer__top     three widget columns
     .site-footer__bottom  category row, then legal menu + copyright
   Fixed dark band in both schemes, see the --c-footer-* tokens in
   variables.css. The shared .socials rules live in base.css.
   ============================================================ */

.site-footer {
    background: var(--c-footer-bg);
    color: var(--c-footer-ink-soft);
    font-family: var(--font-body);
}

.site-footer__inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 56px);
}

.site-footer__top .site-footer__inner {
    padding-top: clamp(40px, 6vw, 72px);
    padding-bottom: clamp(28px, 4vw, 48px);
    display: grid;
    gap: clamp(28px, 4vw, 48px);
}

/* Brand | latest posts | tag cloud. Two columns on a tablet, where
   the tag cloud drops under the other two and takes the full row. */
@media (min-width: 640px) {
    .site-footer__top .site-footer__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__top .footer-col:last-child:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1000px) {
    .site-footer__top .site-footer__inner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .site-footer__top .footer-col:last-child:nth-child(3) {
        grid-column: auto;
    }
}

.footer-title {
    margin: 0 0 28px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--c-footer-ink);
}

/* ------------------------------------------------------------
   Column 1 — brand
   ------------------------------------------------------------ */
.footer-brand__title {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.footer-brand__title a {
    color: var(--c-footer-ink);
    text-decoration: none;
}

.footer-brand__title a:hover {
    color: var(--c-accent);
}

.footer-brand__tagline {
    margin: 0 0 24px;
    max-width: 42ch;
    font-size: 0.95rem;
    line-height: 1.75;
}

/* ------------------------------------------------------------
   Contact addresses under the tagline. Filled in at Настройки →
   Данни за контакт (inc/contact.php) — an address
   nobody has entered is not in the list, so this block shrinks
   rather than showing an empty row.
   ------------------------------------------------------------ */
.footer-brand__contact {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
    font-size: 0.92rem;
}

/*
 * Two columns: the icon, then the label over the address. The icon
 * spans both rows so it sits against the whole entry rather than
 * against the label alone.
 */
.footer-brand__contact li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 1px;
    align-items: start;
}

/*
 * Neutral, not the accent. The design brief keeps colour out of the
 * footer entirely — it lives in the category badges — and the accent
 * indigo on this near-black is barely visible anyway, which is the
 * same complaint that made these links plain white.
 */
.footer-brand__contact-icon {
    grid-row: 1 / 3;
    display: block;
    margin-top: 2px;
    color: #fff;
    opacity: 0.55;
}

.footer-brand__contact-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

.footer-brand__contact-label {
    grid-column: 2;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.55;
}

/*
 * White, stated rather than inherited. Left to the theme's ordinary
 * link colour these read as the indigo accent, which on the near-black
 * footer is barely a colour at all.
 */
.footer-brand__contact a {
    grid-column: 2;
    color: #fff;
    text-decoration: none;
    justify-self: start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    transition: border-color 0.18s ease, color 0.18s ease;
}

.footer-brand__contact a:hover,
.footer-brand__contact a:focus-visible {
    color: #fff;
    border-bottom-color: var(--c-accent);
}

@media (prefers-reduced-motion: reduce) {
    .footer-brand__contact a {
        transition: none;
    }
}

.socials--footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.socials--footer .socials__label {
    font-style: italic;
    color: var(--c-footer-ink);
}

.socials--footer .socials__list {
    gap: 18px;
}

.socials--footer .socials__list a {
    color: var(--c-footer-ink-soft);
}

.socials--footer .socials__list a:hover {
    color: #fff;
}

.socials--footer .socials__list svg {
    width: 18px;
    height: 18px;
}

/* ------------------------------------------------------------
   Column 2 — latest posts
   ------------------------------------------------------------ */
.footer-post {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.footer-post + .footer-post {
    margin-top: 20px;
}

.footer-post__media {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.footer-post__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0 0 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-footer-ink-soft);
}

.footer-post__meta span + span::before {
    content: "|";
    margin-right: 8px;
    opacity: 0.45;
}

/* The category hue comes in as --cat-color, then gets lifted toward
   white before use: several of the palette's hues (the #7e0ad1 purple
   especially) sit at roughly 2:1 against this near-black footer, which
   is unreadable at this size. The mix keeps each hue identifiable while
   pulling the dark end up to a legible contrast. */
.footer-post__cat {
    color: color-mix(in srgb, var(--cat-color, var(--c-accent)) 75%, #fff);
}

.footer-post__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
}

.footer-post__title a {
    color: var(--c-footer-ink);
    text-decoration: none;
}

.footer-post__title a:hover {
    color: var(--c-accent);
}

/* ------------------------------------------------------------
   Column 3 — tag cloud
   ------------------------------------------------------------
   Benqu uppercases these chips. Not done here: the site's tags are
   multi-word Bulgarian phrases ("апартаменти под наем Никопол"),
   which uppercase into unreadably long pills. The chip shape and
   outline carry the look instead.
   ------------------------------------------------------------ */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tag-cloud a {
    display: inline-block;
    padding: 6px 18px;
    border: 1px solid var(--c-footer-chip-border);
    border-radius: var(--radius-badge);
    color: var(--c-footer-ink-soft);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tag-cloud a:hover {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
}

/* ------------------------------------------------------------
   Bottom bar
   ------------------------------------------------------------ */
.site-footer__bottom {
    border-top: 1px solid var(--c-footer-border);
}

.site-footer__bottom .site-footer__inner {
    padding-top: 22px;
    padding-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-bottom-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom-nav a {
    color: var(--c-footer-ink-soft);
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-bottom-nav a:hover {
    color: var(--c-footer-ink);
}

/* The legal menu and the copyright share the last row, under a rule
   that separates them from the categories above. */
.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding-top: 16px;
    border-top: 1px solid var(--c-footer-border);
}

.footer-legal-nav .menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-legal-nav a {
    color: var(--c-footer-ink-soft);
    font-size: 0.85rem;
    text-decoration: none;
}

.footer-legal-nav a:hover {
    color: var(--c-footer-ink);
    text-decoration: underline;
}

.site-footer__copy {
    margin: 0;
    font-size: 0.85rem;
}

.site-footer__copy strong {
    color: var(--c-footer-ink);
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .tag-cloud a {
        transition: none;
    }
}
