/* =========================================================
   ITB FOOTER REDESIGN — v2, matching the real structure
   ---------------------------------------------------------
   WordPress only has 4 registered footer widget areas
   (Footer Widget 1-4). "Footer Widget 2" legitimately has
   4 nav menus assigned to it, stacked in ONE sidebar by
   design. The earlier version of this file fought that by
   flattening every widget into its own grid column, which
   is why title alignment kept breaking in inconsistent ways.
   This version designs WITH that structure: 4 real columns,
   each showing its widget(s) stacked vertically when a
   column has more than one.
   ========================================================= */

#footer-widgets {
    background-color: #14213D !important;   /* plain fallback in case a minifier mangles the gradient below */
    background-image: none !important; /* removes the old JPG background photo entirely */
    position: relative;
    padding: 56px 0 28px;
    border-top: 3px solid #FFB627;
    content-visibility: auto;
    contain-intrinsic-size: 900px;
}

#footer-widgets * { box-sizing: border-box; }

#footer-widgets .container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---- Responsive grid: naturally fits as many of the 4 real
   widget-area columns as the available width allows, instead
   of forcing exactly 4 regardless of how narrow that gets ---- */
#footer-widgets .inner-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px 24px;
    align-items: start;
}

/* Each wrapper IS a real column now — normal block flow,
   no unwrapping trick needed. */
#footer-widgets .footer-widget-area {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    columns: initial !important;
    column-count: 1 !important;
    float: none !important;
}

#footer-widgets aside.widget {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* Neutralize the theme's legacy clearfix on each widget —
   confirmed via inspector to interfere with margin collapsing */
#footer-widgets aside.widget::before,
#footer-widgets aside.widget::after {
    content: none !important;
    display: none !important;
}
#footer-widgets aside.widget {
    margin: 0 !important;
}

/* When a column has more than one widget stacked (e.g. Footer
   Widget 2's 4 nav menus), give clear separation between them */
#footer-widgets .footer-widget-area .widget + .widget {
    margin-top: 36px !important;
}

/* hide the stray empty widget (aside#text-7) without touching PHP */
#footer-widgets aside:has(> .textwidget:empty) { display: none; }

/* ---- Widget titles ---- */
#footer-widgets .widget-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin: 0 0 18px !important;
    padding-bottom: 12px;
    position: relative;
}
#footer-widgets .widget-title::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 28px; height: 3px;
    background: #FFB627;
    border-radius: 2px;
}

/* ---- Nav menu widgets (route link lists) ----
   Forced at every level (ul/li/a) because a plugin in this
   stack (wen-responsive-columns) or the theme itself may be
   applying column-count/flex/float constraints to widget
   menus — fixing just the <a> wasn't enough since 100% of a
   constrained parent is still constrained. */
#footer-widgets .widget_nav_menu,
#footer-widgets .widget_nav_menu ul,
#footer-widgets .widget_nav_menu .menu,
#footer-widgets .widget_nav_menu li {
    width: 100% !important;
    max-width: 100% !important;
    columns: initial !important;
    column-count: 1 !important;
    -webkit-column-count: 1 !important;
    float: none !important;
    flex: none !important;
    display: block !important;
}
#footer-widgets .widget_nav_menu ul,
#footer-widgets .widget_nav_menu .menu {
    list-style: none;
    margin: 0 !important; padding: 0 !important;
}
#footer-widgets .widget_nav_menu li { margin: 0 0 10px !important; }
/* Kill the theme's own default marker/icon on the <li> itself —
   this was showing alongside the round gold dot below, causing
   a double-bullet look */
#footer-widgets .widget_nav_menu li::before,
#footer-widgets .widget_nav_menu li::marker {
    content: none !important;
    display: none !important;
}
#footer-widgets .widget_nav_menu a {
    color: #A7B0C8;
    font-size: 13.5px;
    line-height: 1.5;
    text-decoration: none;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding-left: 14px;
    position: relative;
    box-sizing: border-box !important;
    white-space: normal !important;
    transition: color .15s ease, padding-left .15s ease;
}
#footer-widgets .widget_nav_menu a::before {
    content: "";
    position: absolute;
    left: 0; top: 8px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #FFB627;
    opacity: .55;
    transition: opacity .15s ease;
}
#footer-widgets .widget_nav_menu a:hover {
    color: #ffffff;
    padding-left: 18px;
}
#footer-widgets .widget_nav_menu a:hover::before { opacity: 1; }

/* ---- Contact / custom HTML widget ---- */
#footer-widgets .widget_custom_html .textwidget,
#footer-widgets .widget_text .textwidget {
    color: #A7B0C8;
    font-size: 13.5px;
    line-height: 1.9;
}
#footer-widgets .widget_custom_html .textwidget strong { color: #ffffff; }
#footer-widgets .widget_custom_html a[href^="mailto"],
#footer-widgets .widget_custom_html a[href^="tel"] {
    color: #FFB627;
    text-decoration: none;
}

/* social icons -> muted until hover, no new images requested */
#footer-widgets .widget_custom_html img[width="40"] {
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    padding: 8px;
    filter: grayscale(1) brightness(1.6) opacity(.75);
    transition: filter .15s ease, background .15s ease;
    vertical-align: middle;
}
#footer-widgets .widget_custom_html img[width="40"]:hover {
    filter: none;
    background: rgba(255,255,255,.12);
}

/* OLA / UBER partner badges */
#footer-widgets #text-6 img {
    background: #ffffff;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 10px;
    max-width: 140px;
    height: auto;
}

/* ---- Partner / resource text links (plain <a> list items) ---- */
#footer-widgets #menu-taxi-partners-resources a {
    color: #A7B0C8;
}
#footer-widgets #menu-taxi-partners-resources a:hover { color: #ffffff; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    #footer-widgets .inner-wrapper {
        gap: 34px 24px;
    }
}

@media (max-width: 500px) {
    #footer-widgets { padding: 40px 0 24px; }
    #footer-widgets .inner-wrapper {
        grid-template-columns: 1fr;   /* below the 300px floor's natural breakpoint, force single column to avoid horizontal overflow */
        gap: 30px;
    }
    #footer-widgets .widget-title { font-size: 14px; margin-bottom: 14px; }
}

/* =========================================================
   COLLAPSE EMPTY WIDGETS
   Prevents any unpopulated widget (blank text widget, or a
   nav-menu widget whose menu was removed) from reserving an
   empty grid column.
   ========================================================= */
#footer-widgets aside:empty { display: none !important; }
#footer-widgets aside:has(> .textwidget:empty) { display: none !important; }
#footer-widgets .widget_nav_menu:not(:has(li)) { display: none !important; }
#footer-widgets aside:not(:has(a)):not(:has(img)):not(:has(p)) { display: none !important; }

/* =========================================================
   NEUTRALIZE LEGACY CLEARFIX
   The parent theme uses ::before/::after clearfix on
   .inner-wrapper to clear floated columns. Since Grid
   replaces floats entirely here, that pseudo-element becomes
   a real (empty) grid item and reserves its own column.
   Switching it off removes the blank block on the left.
   ========================================================= */
#footer-widgets .inner-wrapper::before,
#footer-widgets .inner-wrapper::after {
    content: none !important;
    display: none !important;
}

/* =========================================================
   HIDE DYNAMIC FOOTER (cab-dynamic-footer)
   This is a separate section generated by
   wp-content/mu-plugins/cab-core/engine/class-footer-data.php
   — not part of the widget-based footer above. Hidden via
   CSS only per request, without touching that PHP file.
   ========================================================= */
.cab-dynamic-footer { display: none !important; }
