/* Footer frontend-v2 — โทน SANITECH DELIVERY (navy + gold) */

.fv2-footer {
    --fv2-footer-gold: #f5b820;
    --fv2-footer-gold-bright: #ffd24a;
    --fv2-footer-gold-deep: #e09a00;
    --fv2-footer-blue: var(--fv2-footer-gold);
    --fv2-footer-blue-bright: var(--fv2-footer-gold-bright);
    --fv2-footer-navy-deep: #000914;
    --fv2-footer-navy-mid: #001a33;
    --fv2-footer-navy-glow: #0a2a4a;
    --fv2-footer-gradient: linear-gradient(90deg, #e09a00 0%, #f5b820 48%, #ffd24a 100%);
    --fv2-footer-text: rgba(255, 255, 255, 0.92);
    --fv2-footer-muted: rgba(255, 255, 255, 0.64);
    --fv2-footer-border: rgba(140, 190, 230, 0.16);
    --fv2-footer-panel: rgba(0, 12, 28, 0.42);
    --fv2-footer-social-bg: #0c1c30;
    font-family: var(--fv2-font-sans, 'Poppins', sans-serif);
    font-size: 15px;
}

.fv2-footer.fv2-page-gutter {
    overflow-x: clip;
}

.rs-footer.fv2-footer.style1 .footer-top,
.rs-footer.fv2-footer.style1 .footer-bottom {
    font-size: 15px;
}

/* ความกว้าง footer — ต้อง !important เพราะ responsive.css บังคับ .container ที่ 1140px (≥1300px) */
.rs-footer.fv2-footer.style1 .footer-top > .container.custom > .fv2-footer__row {
    --bs-gutter-x: 2rem;
}

.rs-footer.fv2-footer.style1 .footer-top > .container.custom,
.rs-footer.fv2-footer.style1 .footer-bottom > .container.custom {
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .rs-footer.fv2-footer.style1 .footer-top > .container.custom,
    .rs-footer.fv2-footer.style1 .footer-bottom > .container.custom {
        max-width: 1200px !important;
        width: 100%;
    }
}

.fv2-footer__col {
    min-width: 0;
}

/* พื้นหลัง .footer-top จาก Settings → Footer (footer_background_*) */
.rs-footer.fv2-footer.style1 .footer-top.fv2-footer__top--custom-bg {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.rs-footer.fv2-footer.style1 .footer-top.fv2-footer__top--custom-bg > .container.custom {
    position: relative;
    z-index: 2;
}

.rs-footer.fv2-footer.style1 .footer-top.fv2-footer__top--image {
    background-color: rgb(var(--fv2-footer-overlay-rgb));
}

.rs-footer.fv2-footer.style1 .footer-top.fv2-footer__top--image .fv2-footer__top-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.rs-footer.fv2-footer.style1 .footer-top.fv2-footer__top--image .fv2-footer__top-bg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
    /* เบาลง — ให้ความโปร่งใสจาก Settings ควบคุมการมองเห็นรูป */
    filter: saturate(0.92) brightness(0.88) contrast(1.04);
}

/* ชั้นฟิลเตอร์รอง — ความเข้มตาม opacity จาก Settings */
.rs-footer.fv2-footer.style1 .footer-top.fv2-footer__top--image .fv2-footer__top-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 70% 55% at 50% 35%, rgba(var(--fv2-footer-overlay-rgb), 0.35) 0%, transparent 70%),
        linear-gradient(
            105deg,
            rgba(var(--fv2-footer-overlay-rgb), 0.45) 0%,
            rgba(var(--fv2-footer-overlay-rgb), 0.22) 48%,
            rgba(var(--fv2-footer-overlay-rgb), 0.08) 100%
        );
    opacity: var(--fv2-footer-overlay-opacity, 0.8);
    pointer-events: none;
}

.rs-footer.fv2-footer.style1 .footer-top.fv2-footer__top--image .fv2-footer__top-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        90deg,
        rgba(var(--fv2-footer-overlay-rgb), calc(var(--fv2-footer-overlay-opacity) * 0.55)) 0%,
        rgba(var(--fv2-footer-overlay-rgb), calc(var(--fv2-footer-overlay-opacity) * 0.72)) 42%,
        rgba(var(--fv2-footer-overlay-rgb), calc(var(--fv2-footer-overlay-opacity) * 0.88)) 78%,
        rgba(var(--fv2-footer-overlay-rgb), var(--fv2-footer-overlay-opacity)) 100%
    );
}

.rs-footer.fv2-footer.style1 .footer-top.fv2-footer__top--color {
    background: rgba(var(--fv2-footer-overlay-rgb), var(--fv2-footer-overlay-opacity)) !important;
}

/* fallback เมื่อไม่มี custom bg จาก settings (Appearance v2_footer_top_* จะทับด้วย !important) */
.rs-footer.fv2-footer.style1 .footer-top:not(.fv2-footer__top--custom-bg) {
    background:
        radial-gradient(ellipse 70% 55% at 48% 28%, #0a2a4a 0%, transparent 62%),
        linear-gradient(180deg, #001428 0%, #000914 100%);
}

/* —— Column 1 —— */
.rs-footer.fv2-footer.style1 .footer-top .footer-logo {
    margin-bottom: 1rem;
}

.fv2-footer__brand-desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: var(--fv2-footer-text);
}

/* —— Brand features (icon บน / ข้อความล่าง) —— */
.fv2-footer__features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 0.35rem;
    margin: 1rem 0 0;
    padding: 0.75rem 0;
    border-top: 1px solid var(--fv2-footer-border);
    border-bottom: 1px solid var(--fv2-footer-border);
}

.fv2-footer__feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.fv2-footer__feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0.45rem;
    border: 2px solid var(--fv2-footer-blue-bright);
    border-radius: 50%;
    color: var(--fv2-footer-blue-bright);
    line-height: 1;
}

.fv2-footer__feature-icon i {
    font-size: 17px;
}

.fv2-footer__feature-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.fv2-footer__feature-desc {
    display: block;
    margin-top: 0.15rem;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--fv2-footer-muted);
}

/* style.css ใส่ margin-top: 30px ให้ .footer-top p — reset แล้วใช้ padding บน–ล่างเท่ากัน */
.rs-footer.fv2-footer.style1 .footer-top p.fv2-footer__social-label {
    margin: 0 !important;
    padding: 0.75rem 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.fv2-footer__social {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.fv2-footer__social li {
    margin: 0;
}

.fv2-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--fv2-footer-social-bg);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fv2-footer__social a:hover {
    background: #14304a;
    color: var(--fv2-footer-gold-bright);
}

/* style.css ใส่พื้นหลังสี่เหลี่ยมบน <i> — ตัดออก ให้เหลือวงกลมบน <a> อย่างเดียว */
.rs-footer.fv2-footer.style1 .footer-top .footer-social li a i {
    background: none !important;
    width: auto;
    height: auto;
    line-height: 1;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

.rs-footer.fv2-footer.style1 .footer-top .footer-social li a i:hover {
    background: none !important;
    color: inherit;
}

/* —— Section titles —— */
.rs-footer.fv2-footer.style1 .footer-top .footer-title.fv2-footer__title {
    text-transform: none;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    margin: 0 0 1.15rem;
    color: #fff;
    text-align: center;
}

.rs-footer.fv2-footer.style1 .footer-top .footer-title.fv2-footer__title::after {
    width: 44px !important;
    height: 3px !important;
    bottom: 0 !important;
    left: 50% !important;
    right: auto !important;
    margin-left: 0 !important;
    transform: translateX(-50%) !important;
    border-radius: 2px;
    background: var(--fv2-footer-gradient) !important;
}

/* —— Services links —— */
.rs-footer.fv2-footer.style1 .footer-top .site-map.fv2-footer__links {
    margin-bottom: 0;
}

.rs-footer.fv2-footer.style1 .footer-top .site-map.fv2-footer__links li {
    margin: 0;
    padding: 0.55rem 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.18);
}

.rs-footer.fv2-footer.style1 .footer-top .site-map.fv2-footer__links li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.rs-footer.fv2-footer.style1 .footer-top .site-map.fv2-footer__links li a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 15px;
    color: var(--fv2-footer-text);
    text-decoration: none;
}

.rs-footer.fv2-footer.style1 .footer-top .site-map.fv2-footer__links li a::before {
    content: '\f105';
    font-family: FontAwesome;
    font-size: 15px;
    color: var(--fv2-footer-blue-bright) !important;
    line-height: 1;
}

.rs-footer.fv2-footer.style1 .footer-top .site-map.fv2-footer__links li a:hover {
    color: #fff !important;
}

/* —— CTA —— */
.fv2-footer__cta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(245, 184, 32, 0.55);
    border-radius: 6px;
    background: var(--fv2-footer-panel);
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.fv2-footer__cta:hover {
    background: rgba(245, 184, 32, 0.12);
    border-color: var(--fv2-footer-gold-bright);
    color: #fff;
}

.fv2-footer__cta-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--fv2-footer-gradient);
    color: #0a1628;
    font-size: 15px;
}

.fv2-footer__cta-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.fv2-footer__cta-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
}

.fv2-footer__cta-sub {
    font-size: 15px;
    line-height: 1.4;
    color: var(--fv2-footer-muted);
}

.fv2-footer__cta-arrow {
    flex-shrink: 0;
    color: var(--fv2-footer-blue-bright);
    font-size: 16px;
}

/* —— Contact —— */
.rs-footer.fv2-footer.style1 .footer-top .address-widget.fv2-footer__contact li {
    padding: 0.65rem 0 0.65rem 2.35rem;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.18);
}

.rs-footer.fv2-footer.style1 .footer-top .address-widget.fv2-footer__contact li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.rs-footer.fv2-footer.style1 .footer-top .address-widget.fv2-footer__contact li i {
    color: var(--fv2-footer-blue-bright) !important;
    top: 0.72rem;
    left: 0;
}

.rs-footer.fv2-footer.style1 .footer-top .address-widget.fv2-footer__contact li .desc,
.rs-footer.fv2-footer.style1 .footer-top .address-widget.fv2-footer__contact li .desc a,
.rs-footer.fv2-footer.style1 .footer-top .address-widget.fv2-footer__contact li .desc span {
    font-size: 15px;
    line-height: 1.65;
    font-weight: 400;
    color: var(--fv2-footer-text) !important;
}

.rs-footer.fv2-footer.style1 .footer-top .address-widget.fv2-footer__contact li .desc a:hover {
    color: #fff !important;
}

.fv2-footer__email-line {
    display: block;
}

.fv2-footer__email-line + .fv2-footer__email-line {
    margin-top: 0.15rem;
}

.fv2-footer__hours-line {
    display: block;
}

.fv2-footer__hours-holiday {
    display: block;
    margin-top: 0.2rem;
    color: var(--fv2-footer-muted);
}

/* —— Guarantee (ใต้สมัครรับข่าวสาร) —— */
.fv2-footer__guarantee {
    margin: 1.25rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--fv2-footer-border);
    text-align: center;
}

.rs-footer.fv2-footer.style1 .footer-top p.fv2-footer__newsletter-desc {
    margin: 0 0 0.85rem !important;
}

.rs-footer.fv2-footer.style1 .footer-top p.fv2-footer__newsletter-note {
    margin: 0.65rem 0 0 !important;
}

.fv2-footer__guarantee-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.fv2-footer__guarantee-line {
    flex: 1;
    max-width: 56px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--fv2-footer-blue-bright) 100%);
}

.fv2-footer__guarantee-line--end {
    background: linear-gradient(90deg, var(--fv2-footer-blue-bright) 0%, transparent 100%);
}

.rs-footer.fv2-footer.style1 .footer-top p.fv2-footer__guarantee-title {
    margin: 0 !important;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    white-space: nowrap;
}

.fv2-footer__guarantee-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 0.35rem;
    margin: 0;
    padding: 0;
}

.fv2-footer__guarantee-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.fv2-footer__guarantee-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0.45rem;
    border: 2px solid var(--fv2-footer-blue-bright);
    border-radius: 50%;
    color: var(--fv2-footer-blue-bright);
    line-height: 1;
}

.fv2-footer__guarantee-icon i {
    font-size: 17px;
}

.fv2-footer__guarantee-item-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.fv2-footer__guarantee-item-desc {
    display: block;
    margin-top: 0.15rem;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--fv2-footer-muted);
}

/* —— Newsletter (เก็บไว้เมื่อเปิดใช้งานอีกครั้ง) —— */
.fv2-footer__newsletter-desc {
    margin: 0 0 0.85rem;
    font-size: 15px;
    line-height: 1.65;
    color: var(--fv2-footer-text);
}

.fv2-footer__newsletter-form {
    margin: 0;
}

.fv2-footer__newsletter-field {
    position: relative;
    margin-bottom: 0.65rem;
}

.fv2-footer__newsletter-field i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fv2-footer-muted);
    font-size: 15px;
    pointer-events: none;
}

.fv2-footer__newsletter-field input[type="email"] {
    width: 100%;
    margin: 0;
    padding: 0.75rem 0.85rem 0.75rem 2.35rem;
    font-size: 15px;
    color: #fff;
    background: var(--fv2-footer-panel);
    border: 1px solid var(--fv2-footer-border);
    border-radius: 4px;
}

.fv2-footer__newsletter-field input[type="email"]:disabled {
    opacity: 0.9;
    cursor: not-allowed;
}

.fv2-footer__newsletter-field input::placeholder {
    color: var(--fv2-footer-muted);
    opacity: 1;
}

.fv2-footer__newsletter-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    margin: 0;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    color: #0a1628;
    background: var(--fv2-footer-gradient) !important;
    transition: opacity 0.2s ease;
}

.fv2-footer__newsletter-submit:disabled {
    opacity: 0.85;
    cursor: not-allowed;
}

.fv2-footer__newsletter-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.65rem 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--fv2-footer-muted);
}

.fv2-footer__newsletter-note i {
    flex-shrink: 0;
    color: var(--fv2-footer-blue-bright);
    font-size: 18px;
    line-height: 1;
}

/* —— Bottom bar —— */
/* พื้นหลังค่าเริ่มต้นจากธีม; ถ้าตั้ง v2_footer_bottom_bg_color หลังบ้าน จะใส่ inline style ทับ */
.rs-footer.fv2-footer.style1 .footer-bottom.fv2-footer__bottom:not([style*="background-color"]) {
    background:
        radial-gradient(ellipse 80% 120% at 50% 0%, #001a33 0%, transparent 70%),
        linear-gradient(180deg, #000d1c 0%, #000914 100%);
}

.rs-footer.fv2-footer.style1 .footer-bottom.fv2-footer__bottom {
    border-top: 1px solid var(--fv2-footer-border);
    padding: 16px 0;
}

.fv2-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.fv2-footer__bottom-copy p {
    margin: 0;
    font-size: 15px;
    color: var(--fv2-footer-muted);
}

.rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu.fv2-footer__bottom-nav {
    margin: 0;
    padding: 0;
    text-align: right;
}

.rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu.fv2-footer__bottom-nav li {
    padding: 0 0 0 22px;
}

.rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu.fv2-footer__bottom-nav li:first-child {
    padding-left: 0;
}

.rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu.fv2-footer__bottom-nav li a {
    font-size: 15px;
    color: var(--fv2-footer-text) !important;
}

.rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu.fv2-footer__bottom-nav li a:hover {
    color: var(--fv2-footer-blue-bright) !important;
}

.rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu.fv2-footer__bottom-nav li::before {
    width: 5px;
    height: 5px;
    background: var(--fv2-footer-blue) !important;
}

/* Scroll-up */
footer.fv2-footer ~ #scrollUp {
    bottom: 18px;
    right: 18px;
}

footer.fv2-footer ~ #scrollUp i {
    width: 42px;
    height: 42px;
    line-height: 38px;
    border-radius: 4px;
    background: #0a1628 !important;
    border: 2px solid var(--fv2-footer-gold);
    color: var(--fv2-footer-gold-bright) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    font-size: 22px;
}

footer.fv2-footer ~ #scrollUp i:hover {
    background: rgba(245, 184, 32, 0.18) !important;
    opacity: 1;
}

/* บังคับขนาดตัวอักษรขั้นต่ำ 15px (override style.css เดิม) */
.rs-footer.fv2-footer.style1 .footer-top .site-map li a,
.rs-footer.fv2-footer.style1 .footer-top .address-widget li .desc,
.rs-footer.fv2-footer.style1 .footer-top .address-widget li .desc a,
.rs-footer.fv2-footer.style1 .footer-top p,
.rs-footer.fv2-footer.style1 .footer-bottom .copyright p,
.rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu li a {
    font-size: 15px !important;
}

.rs-footer.fv2-footer.style1 .footer-top .site-map.fv2-footer__links li a::before {
    font-size: 15px !important;
}

/* Override theme accent (ส้ม) ใน footer */
.rs-footer.fv2-footer.style1.footer-home3-style .footer-top .site-map li a:hover,
.rs-footer.fv2-footer.style1.footer-home3-style .footer-top .address-widget li .desc a:hover,
.rs-footer.fv2-footer.style1.footer-home3-style .footer-bottom .copy-right-menu li a:hover {
    color: var(--fv2-footer-blue-bright) !important;
}

/* ระยะขอบซ้าย–ขวา (fv2-page-gutter) — desktop + mobile */
@media (max-width: 1199.98px) {
    .rs-footer.fv2-footer.fv2-page-gutter.style1 .footer-top > .container.custom,
    .rs-footer.fv2-footer.fv2-page-gutter.style1 .footer-bottom > .container.custom {
        padding-left: max(var(--fv2-page-gutter), env(safe-area-inset-left, 0px));
        padding-right: max(var(--fv2-page-gutter), env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 991.98px) {
    .rs-footer.fv2-footer.style1 .footer-top {
        padding-bottom: 48px;
    }

    .fv2-footer__bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu.fv2-footer__bottom-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem 1.25rem;
        text-align: left;
    }

    .rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu.fv2-footer__bottom-nav li {
        padding: 0;
    }

    .rs-footer.fv2-footer.style1 .footer-bottom .copy-right-menu.fv2-footer__bottom-nav li::before {
        display: none;
    }
}
