/*
 * My City Connect - Shared theme
 * Loaded on every page (after bootstrap + style.css) via pincludes/head.php.
 * Holds the brand colours, header, footer and the shared UI pieces
 * (buttons, cards, forms, alerts, page header) so every page looks the same.
 *
 * Brand colours:
 *   --ig / --ig-90 / --ig-135  the purple → red → orange brand gradient (buttons, highlights)
 *   --mc-accent                a solid red from the middle of the gradient, for small
 *                              things where a gradient doesn't work (text links, borders)
 */

/* ══════════════════════════════════════
   FONT
══════════════════════════════════════ */
@font-face { font-family: "Poppins"; src: url("../fonts/poppins/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins/Poppins-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins/Poppins-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

/* ══════════════════════════════════════
   TOKENS
══════════════════════════════════════ */
:root {
    --mc-accent: #f0304a;

    --ig: linear-gradient(45deg, #833ab4, #fd1d1d, #fcb045);
    --ig-90: linear-gradient(90deg, #833ab4, #fd1d1d, #fcb045);
    --ig-135: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);

    --mc-bg: #0b0b0b;
    --mc-surface: #111;
    --mc-card: #141414;
    --mc-border: #232323;
    --mc-border-strong: #353535;
    --mc-text: #f2f2f2;
    --mc-text-soft: #c4c4c4;
    --mc-muted: #8a8a8a;
    --mc-success: #4caf6a;
    --mc-radius: 10px;
    --mc-radius-sm: 6px;
    --mc-nav-h: 64px;
    --mc-container: 1200px;
    --mc-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* ══════════════════════════════════════
   BASE
══════════════════════════════════════ */
html,
body {
    background: var(--mc-bg);
    color: var(--mc-text);
    font-family: var(--mc-font);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > main,
body > .mc-main {
    flex: 1 0 auto;
}

a:hover {
    color: var(--mc-accent);
}

::selection {
    background: var(--mc-accent);
    color: #fff;
}

.ig-text {
    background: var(--ig-90);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mc-container {
    max-width: var(--mc-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ══════════════════════════════════════
   HEADER / NAVBAR
══════════════════════════════════════ */
.mc-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #000;
    border-bottom: 1px solid #1c1c1c;
    font-family: var(--mc-font);
}

/* Thin brand gradient along the top edge */
.mc-nav::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--ig-90);
}

.mc-nav-inner {
    max-width: var(--mc-container);
    margin: 0 auto;
    padding: 0 20px;
    height: var(--mc-nav-h);
    display: flex;
    align-items: center;
    gap: 36px;
}

.mc-nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.mc-nav-logo img {
    width: auto;
    height: 40px;
    display: block;
}

.mc-nav-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 20px;
    align-self: stretch;
}

.mc-nav-links {
    display: flex;
    align-items: stretch;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-self: stretch;
}

.mc-nav-links > li {
    display: flex;
}

.mc-nav-link,
.mc-nav-dd-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: #b5b5b5;
    font-family: var(--mc-font);
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s;
}

.mc-nav-link:hover,
.mc-nav-dd-toggle:hover,
.mc-nav-dd.open .mc-nav-dd-toggle {
    color: #fff;
}

/* Current page: white text + accent underline on the bottom edge of the bar */
.mc-nav-link.active,
.mc-nav-dd-toggle.active {
    color: #fff;
}

.mc-nav-link.active::after,
.mc-nav-dd-toggle.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--ig-90);
}

.mc-caret {
    font-size: 9px;
    opacity: .7;
    transition: transform .15s;
}

.mc-nav-dd.open .mc-caret {
    transform: rotate(180deg);
}

/* Dropdowns (Advertise + user menu) */
.mc-nav-dd {
    position: relative;
    display: flex;
}

.mc-nav-dd-menu {
    position: absolute;
    top: calc(100% + 1px);
    left: -14px;
    min-width: 230px;
    background: #111;
    border: 1px solid var(--mc-border);
    border-radius: 0 0 var(--mc-radius-sm) var(--mc-radius-sm);
    padding: 6px 0;
    display: none;
    z-index: 1040;
}

.mc-nav-dd-menu.right {
    left: auto;
    right: 0;
}

.mc-nav-dd.open .mc-nav-dd-menu {
    display: block;
}

.mc-nav-dd-item {
    display: block;
    padding: 9px 16px;
    color: var(--mc-text-soft);
    font-size: 14px;
    transition: background .15s, color .15s;
}

.mc-nav-dd-item:hover {
    background: #1a1a1a;
    color: #fff;
}

.mc-nav-dd-item small {
    display: block;
    color: var(--mc-muted);
    font-size: 12px;
}

.mc-nav-dd-head {
    padding: 8px 16px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--mc-border);
}

.mc-nav-dd-head strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.mc-nav-dd-head span {
    color: var(--mc-muted);
    font-size: 12px;
    word-break: break-all;
}

.mc-nav-dd-sep {
    height: 1px;
    background: var(--mc-border);
    margin: 6px 0;
}

/* Right-hand side */
.mc-nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.mc-nav-login {
    color: #b5b5b5;
    font-size: 14px;
    font-weight: 500;
}

.mc-nav-login:hover {
    color: #fff;
}

.mc-user-btn {
    gap: 8px;
}

.mc-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2a2a2a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.mc-nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 991px) {
    .mc-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mc-nav-menu {
        display: none;
        position: absolute;
        top: var(--mc-nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #000;
        border-bottom: 1px solid var(--mc-border);
        padding: 4px 20px 20px;
        max-height: calc(100vh - var(--mc-nav-h));
        overflow-y: auto;
    }

    .mc-nav.open .mc-nav-menu {
        display: flex;
    }

    .mc-nav-links {
        flex-direction: column;
        gap: 0;
    }

    .mc-nav-links > li,
    .mc-nav-dd {
        display: block;
    }

    .mc-nav-link,
    .mc-nav-dd-toggle {
        display: flex;
        width: 100%;
        padding: 14px 0;
        font-size: 16px;
        border-bottom: 1px solid #1a1a1a;
    }

    .mc-nav-link.active::after,
    .mc-nav-dd-toggle.active::after {
        top: 14px;
        bottom: 14px;
        left: -20px;
        right: auto;
        width: 3px;
        height: auto;
    }

    .mc-nav-dd-toggle .mc-caret {
        margin-left: auto;
    }

    .mc-nav-dd-menu,
    .mc-nav-dd-menu.right {
        position: static;
        border: none;
        background: transparent;
        min-width: 0;
        padding: 0 0 8px;
    }

    .mc-nav-dd-item {
        padding: 10px 0 10px 14px;
    }

    .mc-nav-right {
        padding-top: 18px;
        gap: 14px;
    }

    .mc-nav-right .btn-ig {
        flex: 1;
        justify-content: center;
    }
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-ig,
.btn-ig-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--mc-radius-sm);
    font-family: var(--mc-font);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-ig {
    background: var(--ig);
    color: #fff;
    border: none;
    padding: 11px 21px;
}

.btn-ig:hover {
    color: #fff;
    filter: brightness(1.08);
}

.btn-ig.btn-ig-sm {
    padding: 8px 15px;
}

.btn-ig-outline {
    background: transparent;
    color: #fff;
    border: 1px solid var(--mc-border-strong);
}

.btn-ig-outline:hover {
    color: #fff;
    border-color: #6a6a6a;
}

.btn-ig-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-ig-block {
    width: 100%;
    justify-content: center;
}

/* ══════════════════════════════════════
   PAGE HEADER (inner pages)
══════════════════════════════════════ */
.mc-page-header {
    border-bottom: 1px solid var(--mc-border);
    padding: 44px 0 32px;
}

.mc-page-header > .mc-container > *:last-child {
    margin-bottom: 0;
}

.mc-crumbs {
    font-size: 13px;
    color: var(--mc-muted);
    margin-bottom: 10px;
}

.mc-crumbs a {
    color: var(--mc-muted);
}

.mc-crumbs a:hover {
    color: #fff;
}

.mc-page-header h1 {
    font-size: clamp(1.75rem, 3.2vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    margin: 0 0 8px;
}

.mc-page-header p {
    color: var(--mc-text-soft);
    font-size: 15px;
    max-width: 640px;
    margin: 0;
}

/* Small label above a heading — kept for pages that still use it, deliberately quiet */
.mc-eyebrow {
    display: inline-block;
    font-size: 13px;
    color: var(--mc-muted);
    margin-bottom: 6px;
}

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.mc-card {
    background: var(--mc-card);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    padding: 26px;
}

.mc-card-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 18px;
}

.mc-card-title i {
    display: none;
}

/* ══════════════════════════════════════
   FORMS (dark)
══════════════════════════════════════ */
.mc-form-group {
    margin-bottom: 16px;
}

.mc-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--mc-text-soft);
    margin-bottom: 6px;
}

.mc-input,
.mc-card .form-control,
.mc-card .form-select {
    width: 100%;
    padding: 10px 12px;
    background: #0b0b0b;
    border: 1px solid var(--mc-border-strong);
    color: #fff;
    border-radius: var(--mc-radius-sm);
    font-family: var(--mc-font);
    font-size: 14px;
}

.mc-input:focus,
.mc-card .form-control:focus,
.mc-card .form-select:focus {
    outline: none;
    border-color: #777;
    box-shadow: none;
    background: #0b0b0b;
    color: #fff;
}

.mc-input::placeholder,
.mc-card .form-control::placeholder {
    color: #5c5c5c;
}

/* ══════════════════════════════════════
   ALERTS
══════════════════════════════════════ */
.mc-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--mc-radius-sm);
    border: 1px solid var(--mc-border);
    background: var(--mc-card);
    font-size: 14px;
    color: var(--mc-text-soft);
    margin-bottom: 16px;
}

.mc-alert i {
    margin-top: 3px;
}

.mc-alert-error {
    border-color: #5a2328;
    background: #1d1012;
    color: #f2a7ae;
}

.mc-alert-success {
    border-color: #24452d;
    background: #0f1a12;
    color: #8fd6a3;
}

.mc-alert-info a {
    color: #fff;
    text-decoration: underline !important;
}

/* ══════════════════════════════════════
   STATUS PAGES (success / cancelled)
══════════════════════════════════════ */
.mc-status-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 20px;
}

.mc-status-card {
    max-width: 540px;
    width: 100%;
    text-align: center;
}

.mc-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: #1f1f1f;
    color: var(--mc-success);
}

.mc-status-icon.muted {
    color: var(--mc-muted);
}

.mc-status-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
}

.mc-status-card p {
    color: var(--mc-text-soft);
    font-size: 15px;
    line-height: 1.7;
}

.mc-status-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.mc-footer {
    margin-top: auto;
    background: #000;
    border-top: 1px solid #1c1c1c;
    color: var(--mc-muted);
    font-family: var(--mc-font);
}

.mc-footer-inner {
    max-width: var(--mc-container);
    margin: 0 auto;
    padding: 52px 20px 28px;
}

.mc-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 32px;
}

.mc-footer-brand img {
    width: 110px;
    height: auto;
    margin-bottom: 14px;
}

.mc-footer-brand p {
    color: var(--mc-muted);
    font-size: 13px;
    line-height: 1.7;
    max-width: 300px;
}

.mc-footer-social {
    display: flex;
    gap: 16px;
    margin-top: 14px;
}

.mc-footer-social a {
    color: var(--mc-muted);
    font-size: 17px;
}

.mc-footer-social a:hover {
    color: #fff;
}

.mc-footer h6 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
}

.mc-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mc-footer li {
    margin-bottom: 8px;
}

.mc-footer li a {
    color: var(--mc-muted);
    font-size: 14px;
}

.mc-footer li a:hover {
    color: #fff;
}

.mc-footer-bottom {
    border-top: 1px solid #1c1c1c;
    margin-top: 40px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}

.mc-footer-bottom a {
    color: var(--mc-text-soft);
}

@media (max-width: 767px) {
    .mc-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mc-footer-brand {
        grid-column: 1 / -1;
    }
}

/* ══════════════════════════════════════
   STICKY ELEMENTS BELOW THE HEADER
══════════════════════════════════════ */
.city-tabs {
    top: var(--mc-nav-h);
    z-index: 1020;
}

.sidebar-sticky {
    top: calc(var(--mc-nav-h) + 1.5rem) !important;
}

/* Header buttons always look the same, even on pages whose own CSS restyles .btn-ig */
.mc-nav .btn-ig,
.mc-nav .btn-ig-outline {
    border-radius: var(--mc-radius-sm);
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 600;
    opacity: 1;
    transform: none;
    box-shadow: none;
}

.mc-nav .btn-ig-outline::before,
.mc-nav .btn-ig-outline::after {
    content: none;
}

/* ══════════════════════════════════════
   BRAND ACCENTS — small touches of the gradient, never whole surfaces
══════════════════════════════════════ */

/* Short gradient bar under page and section headings */
.mc-page-header h1::after,
.section-page-hdr h2::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    border-radius: 2px;
    background: var(--ig-90);
    margin-top: 12px;
}

/* Profile section headings: gradient underline instead of a grey rule */
.prof-section-head {
    position: relative;
}
.prof-section-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 64px;
    height: 2px;
    background: var(--ig-90);
}

/* Thin gradient line along the top of the footer (matches the header strip) */
.mc-footer {
    position: relative;
}
.mc-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 1px;
    background: var(--ig-90);
    opacity: .7;
}

/* Clickable cards get a gradient border on hover (the card itself stays dark) */
.adv-cta-card:hover,
.dir-card:hover,
.biz-card:hover,
.lb-card:hover,
.more-item:hover {
    border-color: transparent !important;
    background:
        linear-gradient(var(--mc-hover-bg, var(--mc-card)), var(--mc-hover-bg, var(--mc-card))) padding-box,
        var(--ig-135) border-box !important;
}
.more-item {
    --mc-hover-bg: var(--mc-bg);
}

/* Text links inside cards and alerts pick up the brand colour */
.mc-card a:not([class]),
.mc-alert a:not([class]) {
    color: var(--mc-accent);
}
