/* Additional color fixes for CleanHouse theme */

/* Ensure CSS variables are always available */
html,
html.dark {
    --navy: #0b2348;
    --navy-2: #102f5e;
    --ink: #172033;
    --muted: #637188;
    --sky: #edf5ff;
    --line: #dce6f1;
    --accent: #2f74ff;
    --page: #f5f8fc;
}

/* Override any Tailwind conflicts */
.bg-\[var\(--navy\)\] {
    background-color: var(--navy) !important;
}

.text-\[var\(--navy\)\] {
    color: var(--navy) !important;
}

.text-\[var\(--accent\)\] {
    color: var(--accent) !important;
}

.border-\[var\(--accent\)\] {
    border-color: var(--accent) !important;
}

/* Ensure buttons show correctly */
a[href*="offert"],
button[type="submit"] {
    background-color: var(--navy);
    color: white;
}

/* Fix for Elementor editor */
.elementor-editor-active {
    --navy: #0b2348;
    --accent: #2f74ff;
}

/* Ensure header stays visible */
.site-header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
}

.dark .site-header {
    background: rgba(7, 17, 31, 0.75);
}

/* Fix mega menu colors */
.mega-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

.dark .mega-panel {
    background: rgba(7, 17, 31, 0.95);
}

/* Ensure all icons render properly */
svg {
    display: inline-block;
    vertical-align: middle;
}

/* Fix image placeholders */
img[src*="placeholder"] {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
}

/* WordPress admin bar fix */
.admin-bar .site-header.sticky {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header.sticky {
        top: 46px;
    }
}

/* Elementor compatibility */
.elementor-widget-container {
    color: inherit;
}

.elementor-widget-container a {
    color: var(--accent);
}

/* Ensure prose styles work */
.prose {
    max-width: 65ch;
}

.prose h1, .prose h2, .prose h3 {
    color: var(--navy);
    font-weight: 900;
}

.dark .prose h1,
.dark .prose h2,
.dark .prose h3 {
    color: white;
}

/* Fix for services and cities archives */
.post-type-archive-ch_service .site-main,
.post-type-archive-ch_city .site-main,
.single-ch_service .site-main,
.single-ch_city .site-main {
    min-height: 60vh;
}

/* CleanHouse virtual service and city routes */
.ch-route-page { min-height:60vh; background:var(--page,#f5f8fc); }
.ch-route-hero { padding:clamp(3rem,8vw,6rem) 1rem; background:linear-gradient(135deg,#edf5ff 0%,#fff 56%,#e8f1ff 100%); border-bottom:1px solid var(--line,#dce6f1); }
.ch-route-hero .ch-container,.ch-route-section .ch-container { width:min(1180px,calc(100% - 32px)); margin-inline:auto; }
.ch-route-eyebrow { color:var(--accent); font-size:.8125rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.ch-route-hero h1 { max-width:820px; margin:.65rem 0 1rem; color:var(--navy); font-size:clamp(2.25rem,5vw,4rem); font-weight:900; line-height:1.08; }
.ch-route-hero p { max-width:680px; margin:0 0 2rem; color:var(--muted); font-size:1.1rem; line-height:1.75; }
.ch-route-actions { display:flex; flex-wrap:wrap; gap:.75rem; }
.ch-route-section { padding:clamp(3rem,7vw,5rem) 1rem; }
.ch-route-service-card { display:block; color:inherit; text-decoration:none; }
.ch-route-service-card .ch-card__body { height:100%; padding:1.5rem; }
.ch-route-service-card .ch-card__body p { margin:.6rem 0 1rem; color:var(--muted); line-height:1.65; }
.ch-route-prose { max-width:780px; font-size:1.05rem; line-height:1.8; }
.ch-route-contact-grid { display:grid; gap:2rem; }
.ch-contact-details { display:grid; gap:1rem; margin:2rem 0 0; }
.ch-contact-details div { padding:1rem 0; border-bottom:1px solid var(--line,#dce6f1); }
.ch-contact-details dt { color:var(--accent); font-size:.75rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.ch-contact-details dd { margin:.35rem 0 0; color:var(--ink,#172033); font-weight:700; }
@media(min-width:768px){ .ch-route-contact-grid { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); align-items:start; } }
.dark .ch-route-page { background:#07111f; }
.dark .ch-route-hero { background:linear-gradient(135deg,#0d1b2d,#07111f); border-color:#1e344d; }
.dark .ch-route-hero h1 { color:#fff; }
.dark .ch-route-hero p { color:#9db0c7; }
.dark .ch-contact-details div { border-color:#1e344d; }
.dark .ch-contact-details dd { color:#e9f0f8; }

/* Standard route page layout */
.ch-route-page{overflow:hidden}
.ch-route-hero__layout{display:grid;gap:2rem;align-items:center}
.ch-route-hero__content{max-width:760px}
.ch-route-hero__panel{padding:1.5rem;border:1px solid rgba(47,116,255,.18);border-radius:1.25rem;background:rgba(255,255,255,.72);box-shadow:0 20px 50px -30px rgba(11,35,72,.45)}
.ch-route-hero__panel-label{margin:0 0 .5rem;color:var(--accent);font-size:.75rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.ch-route-hero__panel strong{display:block;color:var(--navy);font-size:1.5rem;line-height:1.2}
.ch-route-hero__panel small{display:block;margin-top:.5rem;color:var(--muted);line-height:1.5}
.ch-route-section--muted{background:#eef4fa;border-top:1px solid rgba(220,230,241,.8);border-bottom:1px solid rgba(220,230,241,.8)}
.ch-route-section__head{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:2rem}
.ch-route-section__head h2{margin:0;color:var(--navy);font-size:clamp(1.6rem,3vw,2.25rem);font-weight:900;line-height:1.15}
.ch-route-section__head p{max-width:38rem;margin:.5rem 0 0;color:var(--muted);line-height:1.65}
.ch-route-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.ch-route-card{display:flex;flex-direction:column;min-height:100%;padding:1.35rem;border:1px solid var(--line);border-radius:1rem;background:#fff;box-shadow:var(--ch-shadow);text-decoration:none;color:inherit;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.ch-route-card:hover{transform:translateY(-3px);border-color:var(--accent);box-shadow:var(--ch-shadow-lg)}
.ch-route-card__icon{display:grid;place-items:center;width:2.75rem;height:2.75rem;margin-bottom:1rem;border-radius:.75rem;background:#eaf2ff;color:var(--accent);font-size:1.25rem}
.ch-route-card h3{margin:0;color:var(--navy);font-size:1.05rem;font-weight:800}
.ch-route-card p{margin:.55rem 0 1rem;color:var(--muted);font-size:.9rem;line-height:1.6}
.ch-route-card__meta{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:auto;color:var(--accent);font-size:.85rem;font-weight:800}
.ch-route-card__meta small{color:var(--muted);font-weight:600}
.ch-route-price-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}
.ch-route-price-card{padding:1.5rem;border:1px solid var(--line);border-radius:1rem;background:#fff}
.ch-route-price-card--featured{border:2px solid var(--accent);background:linear-gradient(145deg,#f0f6ff,#fff)}
.ch-route-price-card__label{color:var(--muted);font-size:.75rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.ch-route-price-card__value{display:block;margin-top:.5rem;color:var(--navy);font-size:2rem;font-weight:900}
.ch-route-price-card--featured .ch-route-price-card__value{color:var(--accent)}
.ch-route-price-card__value small{margin-left:.25rem;color:var(--muted);font-size:.85rem;font-weight:600}
.ch-route-card-grid .ch-city-card{min-height:100%}
@media(min-width:768px){.ch-route-hero__layout{grid-template-columns:minmax(0,1fr) minmax(260px,360px)}}
.dark .ch-route-hero__panel,.dark .ch-route-card,.dark .ch-route-price-card{background:rgba(13,22,38,.9);border-color:#1e344d}
.dark .ch-route-hero__panel strong,.dark .ch-route-section__head h2,.dark .ch-route-card h3,.dark .ch-route-price-card__value{color:#fff}
.dark .ch-route-section--muted{background:#0d1a2b;border-color:#1e344d}

/* Elementor full-width page template */
.elementor-template-full-width .site-main,
.elementor-template-full-width article,
.page-template-elementor-full-width .site-main,
.page-template-elementor-full-width article,
.page-template-page-templates-elementor-full-width .site-main,
.page-template-page-templates-elementor-full-width article{width:100%;max-width:none;margin:0;padding:0}
.elementor-template-full-width .elementor,
.page-template-elementor-full-width .elementor,
.page-template-page-templates-elementor-full-width .elementor{width:100%;max-width:none}
.elementor-template-full-width .elementor-section.elementor-section-full_width,
.page-template-elementor-full-width .elementor-section.elementor-section-full_width,
.page-template-page-templates-elementor-full-width .elementor-section.elementor-section-full_width{width:100%;max-width:none}
.elementor-template-full-width .elementor-section.elementor-section-boxed>.elementor-container,
.page-template-elementor-full-width .elementor-section.elementor-section-boxed>.elementor-container,
.page-template-page-templates-elementor-full-width .elementor-section.elementor-section-boxed>.elementor-container{width:100%}
.ch-elementor-page{width:100%;max-width:none;margin:0;padding:0}

/* Keep Elementor pages free from theme container constraints. */
body.elementor-page .elementor,
body.elementor-page .elementor-section-wrap,
body.elementor-page .elementor-widget-wrap{width:100%;max-width:none;margin-inline:0;padding-inline:0}
body.elementor-page .elementor-container{box-sizing:border-box}
