@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

/* === KILL ALL BOTTOM GAPS === */
:root { --theme-content-spacing: 0px !important; }
.site-main { padding-bottom: 0 !important; margin-bottom: 0 !important; }
article.page, article.post, .entry-content, .page .entry-content { padding-bottom: 0 !important; margin-bottom: 0 !important; }
.ct-container, .ct-container[data-content-area] { padding-bottom: 0 !important; margin-bottom: 0 !important; }
.entry-content > *:last-child, .entry-content > .st-page:last-child, .is-layout-constrained > *:last-child, .is-layout-flow > *:last-child { margin-bottom: 0 !important; }
.ct-footer, footer#footer { margin-top: 0 !important; }
.wp-block-html { margin-bottom: 0 !important; }
.site-main + footer, .site-main + .ct-footer { margin-top: 0 !important; }

/* ============================================
   HEADER SYSTEM v4 â€” DM SANS
   ============================================ */

/* ===== TOP BAR ===== */
[data-row="top"] {
    background: #1a1a2e !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
[data-row="top"] * {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 12.5px !important;
    letter-spacing: 0.2px;
}
[data-row="top"] .ct-container { display: flex !important; justify-content: center !important; gap: 40px !important; }
[data-row="top"] .ct-widget-area > * { display: flex !important; justify-content: center !important; gap: 40px !important; }
[data-row="top"] div[style] { gap: 40px !important; }
[data-row="top"] a, [data-row="top"] span { white-space: nowrap; }

/* ===== MAIN NAV ROW ===== */
[data-row="middle"] {
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

/* ===== NAV LINKS ===== */
.ct-header .menu > li > a {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px !important;
    color: #1a1a2e !important;
    text-transform: uppercase !important;
    padding: 10px 18px !important;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
}

.ct-header .menu > li > a:hover,
.ct-header .menu > li.current-menu-item > a {
    color: #c0392b !important;
}

.ct-header .menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: #c0392b;
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ct-header .menu > li > a:hover::after,
.ct-header .menu > li.current-menu-item > a::after {
    transform: scaleX(1);
}

/* ===== LANGUAGE TOGGLE ===== */
.ct-header .menu > li[class*="lang-item"] > a {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    color: #1a1a2e !important;
    background: transparent !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 5px 14px !important;
    margin-left: 6px !important;
    transition: all 0.25s ease !important;
}

.ct-header .menu > li[class*="lang-item"] > a:hover {
    border-color: #c0392b !important;
    color: #c0392b !important;
    background: rgba(192, 57, 43, 0.05) !important;
}

.ct-header .menu > li[class*="lang-item"] > a::after {
    display: none !important;
}

/* ===== DROPDOWN ===== */
.ct-header .sub-menu {
    background: #141424 !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 14px !important;
    padding: 6px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.04) inset !important;
    min-width: 260px !important;
    margin-top: 0px !important;
    animation: dropIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ct-header .sub-menu li {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ct-header .sub-menu li a {
    font-family: 'DM Sans', sans-serif !important;
    color: rgba(255,255,255,0.8) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 11px 16px !important;
    border-radius: 8px !important;
    margin: 1px 0 !important;
    transition: all 0.2s ease !important;
    display: block !important;
    border-left: 2px solid transparent !important;
    line-height: 1.3 !important;
}

.ct-header .sub-menu li a:hover {
    background: rgba(192, 57, 43, 0.12) !important;
    color: #ffffff !important;
    border-left: 2px solid #c0392b !important;
    padding-left: 20px !important;
}

.ct-header .sub-menu li + li { border-top: none !important; }
.ct-header .sub-menu li:not(:last-child) { border-bottom: none !important; }

/* ===== CTA BUTTON ===== */
.ct-header .ct-button,
.ct-header [class*="ct-button"] {
    font-family: 'DM Sans', sans-serif !important;
    background: #c0392b !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    text-transform: none !important;
    letter-spacing: 0.3px;
    border: none !important;
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3) !important;
    transition: all 0.3s ease !important;
}

.ct-header .ct-button:hover,
.ct-header [class*="ct-button"]:hover {
    background: #a93226 !important;
    box-shadow: 0 6px 25px rgba(192, 57, 43, 0.45) !important;
    transform: translateY(-1px);
}

/* ===== DROPDOWN ARROW ===== */
.ct-header .menu > li > a svg,
.ct-header .menu > li > a .ct-arrow {
    width: 10px !important;
    height: 10px !important;
    opacity: 0.4;
    transition: all 0.25s ease;
}
.ct-header .menu > li:hover > a svg,
.ct-header .menu > li:hover > a .ct-arrow {
    opacity: 1;
    transform: rotate(180deg);
}

/* ===== STICKY HEADER ===== */
.ct-header[data-sticky] [data-row="middle"] {
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.08) !important;
}

/* ============================================
   MOBILE FIXES
   ============================================ */
@media (max-width: 768px) {
    html, body { overflow-x: hidden !important; width: 100% !important; }
    .st-page, .entry-content.is-layout-constrained > .st-page, .entry-content > .st-page, .is-layout-constrained > .st-page { width: 100% !important; max-width: 100vw !important; margin-left: 0 !important; margin-right: 0 !important; overflow-x: hidden !important; }
    .st-container { padding: 0 16px !important; max-width: 100% !important; overflow: hidden !important; }
    .st-hero h1 { font-size: 28px !important; word-break: break-word !important; }
    .st-hero-text { font-size: 15px !important; }
    .st-hero-models { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
    .st-section-title { font-size: 24px !important; word-break: break-word !important; }
    .st-bento { grid-template-columns: 1fr !important; }
    .st-bento-screen, .st-bento-cell { grid-column: span 1 !important; grid-row: span 1 !important; }
    .st-bento-screen { grid-row: span 2 !important; }
    .st-hero-inner { grid-template-columns: 1fr !important; gap: 24px !important; }
    .st-hero-visual { max-width: 100% !important; min-height: 300px !important; margin: 0 auto !important; }
    .st-other-services-layout { grid-template-columns: 1fr !important; }
    .st-other-services-grid { grid-template-columns: 1fr !important; }
    .st-reviews-grid { grid-template-columns: 1fr !important; }
    .st-why-grid { grid-template-columns: 1fr !important; }
    .st-process-grid { grid-template-columns: 1fr !important; }
    .st-cta-banner h2 { font-size: 24px !important; }
    .st-footer-grid { grid-template-columns: 1fr !important; }
    .st-footer-banner { flex-direction: column !important; text-align: center !important; padding: 24px 16px !important; }
    .st-footer-banner-text strong { font-size: 20px !important; }
    .st-footer-bottom { flex-direction: column !important; text-align: center !important; gap: 12px !important; }
    .st-footer-payments { justify-content: center !important; }
    .st-footer-legal { justify-content: center !important; }

    /* Mobile top bar stack */
    [data-row="top"] div[style] { flex-direction: column !important; gap: 4px !important; padding: 8px 16px !important; text-align: center !important; }
    [data-row="top"] span[style*="opacity"] { display: none !important; }
}

/* Language-based footer switching */
html[lang="en-CA"] .footer-fr { display: none !important; }
html[lang="fr-CA"] .footer-en { display: none !important; }