/* site-chrome.css */

/* Top-bar "Independent Motor Carriers" submenu — dark dropdown panel */
#top-bar .top-links ul ul {
    width: auto;
    min-width: 240px;
    background: #2d2d2d;
    border-top: 1px solid #1ABC9C;
    border-bottom: 1px solid #444;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    white-space: nowrap;
}
#top-bar .top-links ul ul li {
    border-top: 1px solid #444;
    border-left: none;
}
#top-bar .top-links ul ul li:first-child { border-top: none; }
#top-bar .top-links ul ul li:hover { background-color: #383838; }
#top-bar .top-links ul ul a { color: #CCC; padding: 0 14px; }
#top-bar .top-links ul ul li:hover > a { color: #FFF; }

/* Top-bar (very top menu) hover — dark bluish grey */
#top-bar .top-links > ul > li:hover {
    background-color: #2d3340 !important;
}
#top-bar .top-links > ul > li:hover > a {
    color: #fff !important;
}

/* ── Primary menu (HOME, SERVICES, ABOUT US, …) hover — accent blue ───────
   Apply background to the <a> pill (style-3's button area), NOT the whole <li>.
   The <li> is 100px tall with 28px top+bottom margin around a 44px <a>;
   coloring the <li> bleeds the highlight 56px beyond the visible button. */
#primary-menu > ul > li:hover > a,
#primary-menu > ul > li.current > a {
    background-color: #001689 !important;
    color: #fff !important;
}
#primary-menu > ul > li:hover > a > div,
#primary-menu > ul > li.current > a > div {
    color: #fff !important;
}

/* ── Footer social row (desktop) — moved out of the left col_one_third into
   its own full-width row below the 3-column copyright layout. Centered,
   with a small top gap. Hover tints the icons accent-blue. */
.footer-social-desktop {
    margin-top: 30px;          /* gap above the social row */
    text-align: center;
    clear: both;               /* sit below the col_one_third row */
}
.footer-social-desktop nav#top-social {
    display: inline-block;
    margin: 0;
}
.footer-social-desktop nav#top-social ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 14px;
    align-items: center;
    justify-content: center;
}
.footer-social-desktop nav#top-social li {
    margin: 0;
    border: none !important;
    float: none;
}

/* ── Footer watermark — the Siboney "S" shield, huge / angled / cropped,
   theme-aware so it stays visible on both light and dark footers.
   Implemented via CSS mask so we can recolor it per theme. */
#footer {
    position: relative;
    overflow: hidden;
}
#footer::before {
    content: "";
    position: absolute;
    width: 720px;
    height: 720px;
    top: -160px;
    right: -200px;
    -webkit-mask: url("../images/siboney-s-shield.svg") no-repeat center / contain;
            mask: url("../images/siboney-s-shield.svg") no-repeat center / contain;
    background-color: #001689;        /* default: brand blue (light theme) */
    opacity: 0.08;
    transform: rotate(-18deg);
    pointer-events: none;
    z-index: 0;
}
/* Dark theme — white S, slightly higher opacity so it's actually visible */
[data-theme="dark"] #footer::before {
    background-color: #ffffff;
    opacity: 0.06;
}
/* Keep real content above the watermark */
#footer > *,
#copyrights {
    position: relative;
    z-index: 1;
}

/* ── Mobile footer (xs + sm) — show ALL info, fix the float-collapsed
   social nav, stack everything vertically and centered. */
@media (max-width: 991px) {
    /* ── Content side gutters on narrow viewports.
       Ultra-specific (html body section#...) to beat every other rule.
       Covers page-title bar AND content body AND any container inside. */
    html body section#page-title .container,
    html body section#content .container,
    html body section#content .content-wrap > .container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }
    /* Bootstrap rows + cols inside content bleed out of container via
       margin: 0 -15px / padding 0 15px — neutralise so our 20px wins. */
    html body section#content .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    html body section#content [class*="col-md-"],
    html body section#content [class*="col-sm-"],
    html body section#content [class*="col-xs-"],
    html body section#content [class*="col-lg-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Fslider / images inside content shouldn't overflow either */
    html body section#content .fslider,
    html body section#content .fslider img,
    html body section#content img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* The mobile-only column inside #copyrights — center everything.
       (Social nav is now physically last in the markup, so no flex order
       gymnastics needed.) */
    #copyrights .col-sm-12.visible-xs.visible-sm {
        text-align: center;
        padding: 0 15px;
    }
    /* Gap above the social nav so it visually separates from the info text */
    #copyrights .col-sm-12.visible-xs.visible-sm nav#top-social {
        margin-top: 20px !important;
    }
    /* Social nav: undo Canvas-theme's mobile rule that hides #top-social
       (it was meant for the top-bar use case, not our footer use case).
       Then kill the legacy float layout that collapses to height 0 and
       use inline-flex so the nav has size and centers nicely. */
    #copyrights .col-sm-12.visible-xs.visible-sm nav#top-social {
        display: block !important;
        text-align: center;
        margin: 14px 0;
    }
    #copyrights .col-sm-12.visible-xs.visible-sm nav#top-social ul {
        display: inline-flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    #copyrights .col-sm-12.visible-xs.visible-sm nav#top-social li {
        float: none;
        margin: 0;
        border: none !important;
    }
    /* New mobile info rows (copyright + Call Us + Send Email) */
    .footer-mobile-info {
        margin-top: 12px;
        line-height: 1.55;
    }
    .footer-mobile-info .footer-mobile-copy {
        margin: 0 0 10px;
        opacity: 0.85;
        font-size: 13px;
    }
    .footer-mobile-info .footer-mobile-contact {
        margin: 0 0 6px;
        font-size: 14px;
    }
    .footer-mobile-info .footer-mobile-contact span {
        opacity: 0.7;
        margin-right: 4px;
    }
}

/* (Footer social icon normal/hover colors are handled in site-theme.css per theme.) */

/* ── Footer Siboney logo — 75% bigger (both themes, both desktop + mobile) */
#copyrights .col_one_third.hidden-xs.hidden-sm > img {
    width: 263px !important;          /* was 150px → ×1.75 */
}
#copyrights .col-sm-12.visible-xs.visible-sm > img {
    width: 525px !important;          /* was 300px → ×1.75 */
    max-width: 100% !important;       /* cap on very narrow viewports */
    height: auto !important;
}

/* ── Desktop footer column widths — give the copyright (logo+text) column
   more room, shrink Call Us / Send Email. Drop the Canvas gutter and use
   internal padding instead so the columns sum to a clean 100%. */
@media (min-width: 992px) {
    #copyrights .col_one_third {
        margin-right: 0 !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }
    #copyrights .col_one_third.col_last {
        padding-right: 0 !important;
    }
    #copyrights .col_one_third.hidden-xs.hidden-sm           { width: 50% !important; }  /* copyright */
    #copyrights .col_one_third:not(.hidden-xs):not(.col_last) { width: 22% !important; }  /* Call Us */
    #copyrights .col_one_third.col_last                       { width: 28% !important; }  /* Email */

    /* Align the copyright text with the Call Us / Email *values* (not the
       small "CALL US:" / "SEND AN EMAIL:" labels) by pushing the column
       contents down ~18px, then pulling the logo back to its original
       position with a matching negative margin. */
    #copyrights .col_one_third.hidden-xs.hidden-sm {
        padding-top: 18px;
    }
    #copyrights .col_one_third.hidden-xs.hidden-sm > img {
        margin-top: -18px !important;
    }
}
