/*
 * SANITECH shared brand bridge
 *
 * Page modules in frontend-v2 were built at different times and expose their
 * own color tokens. Keep those modules independent, but map their visual
 * accents back to one palette so Settings and the seeder stay authoritative.
 */

:root {
    --sanitech-primary: var(--v2-header-bar-bg, #007A70);
    --sanitech-primary-dark: var(--v2-header-main-nav-active-bg, #005B59);
    --sanitech-accent: var(--v2-site-accent, #008F63);
    --sanitech-accent-hover: var(--v2-site-accent-hover, #007554);
    --sanitech-navy: #071B4A;
    --sanitech-navy-deep: #041632;
    --sanitech-surface: #F4F7F8;
    --sanitech-surface-soft: #EAF3F2;
    --sanitech-border: #DCE8E6;
    --sanitech-teal-rgb: 0, 122, 112;
    --sanitech-accent-rgb: 0, 143, 99;
}

/* Legacy theme hooks that otherwise keep the old generic green. */
body.home-paste-color .search-modal,
body.home-paste-color .rs-carousel .owl-dots .owl-dot,
body.home-paste-color .rs-carousel .owl-dots .owl-dot:hover,
body.home-paste-color .rs-carousel .owl-dots .owl-dot.active,
body.home-paste-color .gridFilter button:hover,
body.home-paste-color .gridFilter button.active {
    background: var(--sanitech-accent) !important;
}

body.home-paste-color .full-width-header .right_menu_togle .canvas-contact .address-area .address-list .info-content em a:hover,
body.home-paste-color .full-width-header .right_menu_togle .canvas-contact .address-area .address-list .info-icon i::before {
    color: var(--sanitech-accent) !important;
}

body.home-paste-color .full-width-header .rs-header .expand-btn-inner ul .humburger .nav-expander .bar span,
body.home-paste-color .full-width-header .right_menu_togle .close-btn:hover .nav-close .line span {
    background: var(--sanitech-accent) !important;
}

/* Header utility bar: soft navy → deep teal (industrial sample). */
.full-width-header .topbar-area--slim {
    background: linear-gradient(90deg, #25575b 0%, #176064 48%, #157a7d 100%) !important;
}

.full-width-header .topbar-slim__item i::before {
    color: #7fd4d0 !important;
}

/* Home modules */
.home-about-v2 {
    --home-about-v2-brand: var(--sanitech-primary);
    --home-about-v2-brand-dark: var(--sanitech-primary-dark);
    --home-about-v2-brand-muted: var(--sanitech-accent);
    --home-about-v2-heading: var(--sanitech-navy);
    --home-about-v2-panel: var(--sanitech-surface);
    --home-about-v2-border: var(--sanitech-border);
    --home-about-v2-divider: rgba(var(--sanitech-teal-rgb), 0.16);
}

.home-services-v2 {
    --hsv2-brand: var(--sanitech-primary);
    --hsv2-brand-dark: var(--sanitech-primary-dark);
    --hsv2-heading: var(--sanitech-navy);
    --hsv2-panel: var(--sanitech-surface);
    --hsv2-border: var(--sanitech-border);
    --hsv2-icon-bg: var(--sanitech-surface-soft);
    --hsv2-trust-brand: var(--sanitech-primary);
    --hsv2-trust-deep: var(--sanitech-primary-dark);
}

.home-services-flip {
    --home-services-brand: var(--sanitech-primary);
    --home-services-heading: var(--sanitech-navy);
    --home-services-panel: var(--sanitech-surface);
    --home-services-border: var(--sanitech-border);
    --home-services-icon-ring: rgba(var(--sanitech-teal-rgb), 0.28);
    --home-services-icon-bg: var(--sanitech-surface-soft);
}

.home-blog-v2 {
    --hbv2-primary: var(--sanitech-primary);
    --hbv2-primary-deep: var(--sanitech-primary-dark);
    --hbv2-heading: var(--sanitech-navy);
    --hbv2-border: var(--sanitech-border);
    --hbv2-featured: var(--sanitech-navy-deep);
    --hbv2-featured-mid: var(--sanitech-navy);
    --hbv2-cta-bg: var(--sanitech-surface-soft);
}

.home-contact {
    --home-contact-navy: var(--sanitech-navy-deep);
    --home-contact-navy-mid: var(--sanitech-navy);
    --home-contact-accent: #39D3B1;
    --home-contact-accent-deep: var(--sanitech-accent);
    --home-contact-btn-blue: var(--sanitech-accent);
    --home-contact-btn-blue-mid: var(--sanitech-primary);
    --home-contact-btn-blue-dark: var(--sanitech-primary-dark);
    --home-contact-btn-border: rgba(var(--sanitech-accent-rgb), 0.55);
}

.home-products-v2 {
    --hpv2-primary: var(--sanitech-primary);
    --hpv2-primary-deep: var(--sanitech-primary-dark);
    --hpv2-primary-hover: var(--sanitech-primary-dark);
    --hpv2-primary-glow: rgba(var(--sanitech-teal-rgb), 0.42);
    --hpv2-accent: #39D3B1;
    --hpv2-accent-soft: rgba(var(--sanitech-accent-rgb), 0.14);
    --hpv2-accent-border: rgba(var(--sanitech-accent-rgb), 0.5);
    --hpv2-accent-glow: rgba(var(--sanitech-accent-rgb), 0.28);
    --hpv2-featured-img-bg: #BFE6DF;
    --hpv2-bg: var(--sanitech-navy-deep);
    --hpv2-bg-mid: var(--sanitech-navy);
}

/* About */
.about-purpose {
    --about-purpose-blue: var(--sanitech-primary);
    --about-purpose-blue-deep: var(--sanitech-primary-dark);
    --about-purpose-blue-light: var(--sanitech-surface-soft);
    --about-purpose-blue-glow: rgba(var(--sanitech-teal-rgb), 0.16);
    --about-purpose-navy: var(--sanitech-navy);
    --about-purpose-card-border: rgba(var(--sanitech-teal-rgb), 0.1);
}

.about-values {
    --about-values-deep: var(--sanitech-navy-deep);
    --about-values-gradient-start: #004F55;
    --about-values-gradient-mid: var(--sanitech-primary-dark);
    --about-values-gradient-end: var(--sanitech-primary);
    --about-values-glass-border: rgba(142, 229, 211, 0.42);
    --about-values-glass-border-featured: rgba(142, 229, 211, 0.66);
}

.about-journey {
    --about-journey-blue: var(--sanitech-primary);
    --about-journey-blue-bright: var(--sanitech-accent);
    --about-journey-blue-deep: var(--sanitech-primary-dark);
    --about-journey-blue-light: #DDF2EE;
    --about-journey-blue-soft: #BFE6DF;
    --about-journey-blue-glow: rgba(var(--sanitech-teal-rgb), 0.24);
    --about-journey-blue-muted: rgba(var(--sanitech-teal-rgb), 0.16);
    --about-journey-blue-fade: rgba(var(--sanitech-teal-rgb), 0.2);
    --about-journey-blue-shadow: rgba(0, 91, 89, 0.3);
    --about-journey-navy: var(--sanitech-navy);
    --about-journey-header-navy: var(--sanitech-navy);
    --about-journey-header-accent-border: rgba(var(--sanitech-teal-rgb), 0.5);
    --about-journey-surface: var(--sanitech-surface-soft);
    --about-journey-card-border: rgba(var(--sanitech-teal-rgb), 0.14);
}

.about-cta {
    --about-cta-blue: var(--sanitech-primary);
    --about-cta-blue-hover: var(--sanitech-accent-hover);
    --about-cta-blue-deep: var(--sanitech-primary-dark);
    --about-cta-navy: var(--sanitech-navy);
    --about-cta-icon-bg: linear-gradient(145deg, #E7F5F2 0%, #CFEAE5 100%);
    --about-cta-icon-ring: rgba(var(--sanitech-teal-rgb), 0.12);
}

/* Product, contact and content pages */
.products-page {
    --products-heading: var(--sanitech-navy);
    --products-surface: var(--sanitech-surface);
    --products-border: var(--sanitech-border);
}

.contact-page {
    --contact-ink: var(--sanitech-navy);
    --contact-panel: var(--sanitech-surface);
    --contact-border: var(--sanitech-border);
}

.blog-page {
    --blog-title: var(--sanitech-navy);
    --blog-surface: var(--sanitech-surface);
    --blog-border: var(--sanitech-border);
    --blog-shadow: 0 6px 25px rgba(var(--sanitech-teal-rgb), 0.09);
}

.quotation-page {
    --quote-title: var(--sanitech-navy);
    --quote-navy: var(--sanitech-navy);
    --quote-navy-deep: var(--sanitech-navy-deep);
    --quote-surface: var(--sanitech-surface);
    --quote-border: var(--sanitech-border);
}

.privacy-policy-page {
    --pp-title: var(--sanitech-navy);
    --pp-surface: var(--sanitech-surface);
    --pp-border: var(--sanitech-border);
    --pp-accent-soft: rgba(var(--sanitech-accent-rgb), 0.1);
}

.order-delivery-page {
    --od-navy: var(--sanitech-navy);
    --od-navy-deep: var(--sanitech-navy-deep);
    --od-navy-bar: #0B3652;
    --od-order-accent: var(--sanitech-accent);
    --od-order-accent-deep: var(--sanitech-primary);
    --od-order-accent-soft: #EAF7F3;
    --od-order-icon-circle: #D9F0EA;
    --od-order-accent-border: rgba(var(--sanitech-accent-rgb), 0.22);
    --od-order-shadow: rgba(var(--sanitech-accent-rgb), 0.3);
    --od-delivery-accent: #1CB89A;
    --od-delivery-accent-light: #7ADAC7;
}

/* Footer: replace the legacy gold treatment with the reference teal palette. */
.fv2-footer {
    --fv2-footer-gold: var(--sanitech-accent);
    --fv2-footer-gold-bright: #39D3B1;
    --fv2-footer-gold-deep: var(--sanitech-primary-dark);
    --fv2-footer-blue: var(--sanitech-accent);
    --fv2-footer-blue-bright: #39D3B1;
    --fv2-footer-navy-deep: #003E46;
    --fv2-footer-navy-mid: #005B59;
    --fv2-footer-navy-glow: #007A70;
    --fv2-footer-gradient: linear-gradient(90deg, #005B59 0%, #007A70 48%, #008F63 100%);
    --fv2-footer-border: rgba(160, 230, 216, 0.2);
    --fv2-footer-panel: rgba(0, 47, 52, 0.42);
    --fv2-footer-social-bg: #004A50;
}

/*
 * Footer backgrounds follow Master Settings → Footer (footer_background_*).
 * Do not force teal over color/image/none — that blocked admin changes.
 * Default (no custom bg) keeps a soft brand fallback without fighting
 * Appearance v2_footer_top_* from theme-primary-buttons (!important).
 */
.rs-footer.fv2-footer.style1 .footer-top:not(.fv2-footer__top--custom-bg),
.rs-footer.fv2-footer.style1.footer-home3-style .footer-top:not(.fv2-footer__top--custom-bg) {
    background:
        radial-gradient(ellipse 72% 85% at 88% 12%, rgba(0, 168, 117, 0.24) 0%, transparent 62%),
        linear-gradient(115deg, #003E46 0%, #005B59 48%, #007A70 100%);
}

.rs-footer.fv2-footer.style1 .footer-top.fv2-footer__top--image {
    background-color: #003E46;
}

.rs-footer.fv2-footer.style1 .footer-bottom.fv2-footer__bottom:not([style*="background-color"]) {
    background:
        radial-gradient(ellipse 80% 140% at 80% 0%, rgba(0, 122, 112, 0.24) 0%, transparent 68%),
        linear-gradient(180deg, #003E46 0%, #00343B 100%) !important;
}

footer.fv2-footer ~ #scrollUp i {
    background: #005B59 !important;
    border-color: #39D3B1;
    color: #FFFFFF !important;
}

footer.fv2-footer ~ #scrollUp i:hover {
    background: #008F63 !important;
}

/* Keyboard focus remains visible on both white and dark surfaces. */
:where(a, button, input, select, textarea):focus-visible {
    outline-color: var(--sanitech-accent);
}
