/* ==========================================================================
   WP Footer Pro – Frontend Styles
   Version: 1.0.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (overridden inline by shortcode)
   -------------------------------------------------------------------------- */
:root {
    --wfp-bg:         #0f172a;
    --wfp-bg-alt:     #1e293b;
    --wfp-bg-bottom:  #080f1d;
    --wfp-accent:     #f59e0b;
    --wfp-text:       #e2e8f0;
    --wfp-muted:      #94a3b8;
    --wfp-border:     #1e293b;
    --wfp-link-hover: #f59e0b;
    --wfp-container:  1200px;

    /* Derived / static */
    --wfp-radius:      6px;
    --wfp-transition:  0.25s ease;
    --wfp-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                       'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    --wfp-shadow:      0 4px 24px rgba(0,0,0,0.4);
}

/* --------------------------------------------------------------------------
   Reset scope
   -------------------------------------------------------------------------- */
.wfp-footer *,
.wfp-footer *::before,
.wfp-footer *::after {
    box-sizing: border-box;
    margin:     0;
    padding:    0;
}

/* --------------------------------------------------------------------------
   Footer shell
   -------------------------------------------------------------------------- */
.wfp-footer {
    font-family:     var(--wfp-font);
    font-size:       15px;
    line-height:     1.65;
    color:           var(--wfp-text);
    background:      var(--wfp-bg);
    position:        relative;
    overflow:        hidden;
}

/* Subtle noise texture overlay */
.wfp-footer::before {
    content:    '';
    position:   absolute;
    inset:      0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' fill='rgba(255,255,255,0.015)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index:    0;
}

.wfp-footer > * {
    position: relative;
    z-index:  1;
}

/* --------------------------------------------------------------------------
   Top accent bar — gradient + animated shimmer
   -------------------------------------------------------------------------- */
.wfp-accent-bar {
    height:  4px;
    background: linear-gradient(
        90deg,
        var(--wfp-accent)   0%,
        color-mix(in srgb, var(--wfp-accent) 60%, white) 50%,
        var(--wfp-accent)   100%
    );
    background-size: 200% 100%;
    animation: wfp-shimmer 3s linear infinite;
}

@keyframes wfp-shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.wfp-container {
    max-width:    var(--wfp-container);
    margin-left:  auto;
    margin-right: auto;
    padding-left:  24px;
    padding-right: 24px;
}

/* --------------------------------------------------------------------------
   Main body
   -------------------------------------------------------------------------- */
.wfp-footer-body {
    padding: 72px 0 56px;
}

/* --------------------------------------------------------------------------
   Grid layout
   -------------------------------------------------------------------------- */
.wfp-grid {
    display:               grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap:                   48px 40px;
    align-items:           start;
}

/* Brand column is always first */
.wfp-col-brand { grid-column: 1; }

/* --------------------------------------------------------------------------
   Brand column
   -------------------------------------------------------------------------- */
.wfp-brand-inner {
    margin-bottom: 28px;
}

.wfp-logo-link { display: inline-block; }

.wfp-logo {
    display:    block;
    max-height: 60px;
    width:      auto;
    filter:     brightness(0) invert(1);
    transition: filter var(--wfp-transition), opacity var(--wfp-transition);
}
.wfp-logo:hover { opacity: 0.85; }

.wfp-site-name {
    display:         inline-block;
    font-size:       1.6rem;
    font-weight:     800;
    letter-spacing:  -0.02em;
    color:           var(--wfp-text);
    text-decoration: none;
    transition:      color var(--wfp-transition);
}
.wfp-site-name:hover { color: var(--wfp-accent); }

/* Decorative accent under site name */
.wfp-site-name::after {
    content:    '';
    display:    block;
    width:      40px;
    height:     3px;
    background: var(--wfp-accent);
    margin-top: 6px;
    border-radius: 2px;
}

.wfp-tagline {
    font-size:   0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color:       var(--wfp-accent);
    margin-top:  10px;
    margin-bottom: 12px;
}

.wfp-about {
    font-size:   0.875rem;
    color:       var(--wfp-muted);
    line-height: 1.8;
}

/* --------------------------------------------------------------------------
   Social icons
   -------------------------------------------------------------------------- */
.wfp-social-list {
    display:   flex;
    flex-wrap: wrap;
    gap:       10px;
    margin-top: 24px;
}

.wfp-social-link {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           40px;
    height:          40px;
    border-radius:   50%;
    border:          1px solid rgba(255,255,255,0.12);
    color:           var(--wfp-muted);
    background:      rgba(255,255,255,0.04);
    text-decoration: none;
    transition:      background var(--wfp-transition),
                     border-color var(--wfp-transition),
                     color var(--wfp-transition),
                     transform var(--wfp-transition);
}

.wfp-social-link:hover {
    background:   var(--wfp-accent);
    border-color: var(--wfp-accent);
    color:        #000;
    transform:    translateY(-3px);
    box-shadow:   0 6px 16px rgba(0,0,0,0.3);
}

.wfp-social-link svg {
    display:        block;
    flex-shrink:    0;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Column headings
   -------------------------------------------------------------------------- */
.wfp-col-heading {
    font-size:      0.75rem;
    font-weight:    700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color:          var(--wfp-text);
    margin-bottom:  14px;
    white-space:    nowrap;
}

.wfp-heading-line {
    width:         32px;
    height:        2px;
    background:    var(--wfp-accent);
    border-radius: 2px;
    margin-bottom: 22px;
    transition:    width var(--wfp-transition);
}
.wfp-col:hover .wfp-heading-line { width: 48px; }

/* --------------------------------------------------------------------------
   Nav links
   -------------------------------------------------------------------------- */
.wfp-nav-list {
    list-style: none;
}

.wfp-nav-list li {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.wfp-nav-list li:last-child {
    border-bottom: none;
}

.wfp-nav-link {
    display:         flex;
    align-items:     center;
    gap:             8px;
    padding:         7px 0;
    font-size:       0.875rem;
    color:           var(--wfp-muted);
    text-decoration: none;
    transition:      color var(--wfp-transition), padding-left var(--wfp-transition);
}

.wfp-nav-link:hover {
    color:        var(--wfp-link-hover);
    padding-left: 4px;
}

.wfp-nav-arrow {
    font-size:   1.1rem;
    color:       var(--wfp-accent);
    line-height: 1;
    transition:  transform var(--wfp-transition);
}
.wfp-nav-link:hover .wfp-nav-arrow { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Contact list
   -------------------------------------------------------------------------- */
.wfp-contact-list {
    list-style: none;
    display:    flex;
    flex-direction: column;
    gap:        14px;
}

.wfp-contact-item {
    display:    flex;
    align-items: flex-start;
    gap:        12px;
    font-size:  0.875rem;
    color:      var(--wfp-muted);
    line-height: 1.6;
}

.wfp-contact-icon {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           32px;
    height:          32px;
    border-radius:   50%;
    background:      rgba(255,255,255,0.06);
    flex-shrink:     0;
    color:           var(--wfp-accent);
    margin-top:      -2px;
}

.wfp-contact-icon svg {
    width:  16px;
    height: 16px;
}

.wfp-contact-item a {
    color:           inherit;
    text-decoration: none;
    transition:      color var(--wfp-transition);
}
.wfp-contact-item a:hover { color: var(--wfp-link-hover); }

.wfp-map-link { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Payment Logos Slider  —  full-width, horizontal, professional
   ========================================================================== */

/* ── Section shell ─────────────────────────────────────────────────────── */
.wfp-payment-section {
    width:          100%;
    overflow:       hidden;             /* never let content escape            */
    padding:        24px 0;
    background:     rgba(0, 0, 0, 0.20);
    border-top:     1px solid rgba(255, 255, 255, 0.06);
    border-bottom:  1px solid rgba(255, 255, 255, 0.04);
    position:       relative;
    box-sizing:     border-box;
}

/* Section label */
.wfp-payment-label {
    text-align:     center;
    font-size:      0.65rem;
    font-weight:    700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color:          rgba(255, 255, 255, 0.22);
    margin-bottom:  16px;
    line-height:    1;
}

/* ── Clipping viewport ─────────────────────────────────────────────────── */
.wfp-payment-viewport {
    position:   relative;
    width:      100%;
    overflow:   hidden;         /* clips the moving track */
}

/* ── Gradient edge masks ───────────────────────────────────────────────── */
.wfp-pay-mask {
    position:       absolute;
    top:            0;
    bottom:         0;
    width:          160px;
    z-index:        3;
    pointer-events: none;
}
.wfp-pay-mask-left  {
    left: 0;
    background: linear-gradient(to right, var(--wfp-bg) 0%, transparent 100%);
}
.wfp-pay-mask-right {
    right: 0;
    background: linear-gradient(to left, var(--wfp-bg) 0%, transparent 100%);
}

/* ── Scrolling track ───────────────────────────────────────────────────── */
/* JS (RAF) owns all translateX animation — no CSS animation on track.     */
.wfp-payment-track {
    display:     block;          /* block container — no flex conflicts     */
    white-space: nowrap;         /* keep all items on one horizontal line   */
    font-size:   0;              /* remove inline-block gap between items   */
    line-height: 1;
    position:    relative;
    will-change: transform;      /* hint for GPU compositing                */
}

/* ── Individual payment item ─────────────────────────────────────────────
   Fixed 110 px width → perfectly equal spacing.
   Layout: logo centered on top, bank name text below.
   Geometry driven by inline styles (theme-safe); CSS handles hover & effects.
   ───────────────────────────────────────────────────────────────────────── */
.wfp-pay-item {
    position:   relative;
    cursor:     default;
    font-size:  1rem;           /* reset from parent font-size:0              */
    transition: opacity 0.3s ease, transform 0.25s ease;
}
.wfp-pay-item:hover {
    opacity: 1 !important;      /* restore if wave effect has dimmed the item  */
}

/* Logo image */
.wfp-pay-item img {
    display:    inline-block;
    width:      auto;
    height:     auto;
    max-width:  86px;
    object-fit: contain;
    transition: filter 0.35s ease, transform 0.35s ease, opacity 0.35s ease;
}
.wfp-pay-item:hover img {
    transform: scale(1.1);
}

/* Bank name label */
.wfp-pay-name {
    transition: color 0.3s ease;
}
.wfp-pay-item:hover .wfp-pay-name {
    color: var(--wfp-accent) !important;
}

/* Placeholder icon when no logo is uploaded */
.wfp-pay-icon {
    transition: background 0.3s ease;
}
.wfp-pay-item:hover .wfp-pay-icon {
    background: rgba(255, 255, 255, 0.14) !important;
}

/* ── Grayscale filter (checkbox setting) ──────────────────────────────── */
.wfp-pay-filter .wfp-pay-item img {
    filter: grayscale(100%) brightness(1.8) opacity(0.45);
}
.wfp-pay-filter .wfp-pay-item:hover img {
    filter:    grayscale(0%) brightness(1) opacity(1) !important;
    transform: scale(1.1);
}

/* ==========================================================================
   5 HIỆU ỨNG — JS (RAF) controls translateX + per-item transforms.
   CSS only adds decorative visual overlays where needed.
   ========================================================================== */

/* ── Effect 1: wfp-fx-scroll  —  Classic smooth marquee (JS only) ──────── */
/* No extra CSS needed — JS handles plain translateX */

/* ── Effect 2: wfp-fx-float  —  JS adds sin-wave Y offset per item ─────── */
/* No extra CSS needed — JS animates translateY on each item */

/* ── Effect 3: wfp-fx-glow  —  CSS spotlight sweeps across viewport ─────── */
.wfp-fx-glow .wfp-payment-viewport::after {
    content:        '';
    position:       absolute;
    top:            0;
    bottom:         0;
    width:          220px;
    background:     radial-gradient(ellipse 110px 100% at center,
                        rgba(255, 255, 255, 0.12) 0%,
                        transparent 100%);
    animation:      wfp-glow-sweep 4s ease-in-out infinite;
    pointer-events: none;
    z-index:        2;
}
@keyframes wfp-glow-sweep {
    0%   { left: -220px; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* ── Effect 4: wfp-fx-shine  —  CSS shimmer sweeps each badge ──────────── */
.wfp-fx-shine .wfp-pay-item {
    overflow: hidden;
}
.wfp-fx-shine .wfp-pay-item::after {
    content:        '';
    position:       absolute;
    top:            -50%;
    left:           -80%;
    width:          50%;
    height:         200%;
    background:     linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.20) 50%,
        transparent 80%
    );
    transform:      skewX(-15deg);
    animation:      wfp-item-shine 3.2s ease-in-out infinite;
    pointer-events: none;
}
.wfp-fx-shine .wfp-pay-item:nth-child(2n)::after { animation-delay: -0.8s;  }
.wfp-fx-shine .wfp-pay-item:nth-child(3n)::after { animation-delay: -1.6s;  }
.wfp-fx-shine .wfp-pay-item:nth-child(4n)::after { animation-delay: -2.4s;  }
.wfp-fx-shine .wfp-pay-item:nth-child(5n)::after { animation-delay: -0.4s;  }
.wfp-fx-shine .wfp-pay-item:nth-child(6n)::after { animation-delay: -1.2s;  }
@keyframes wfp-item-shine {
    0%   { left: -80%;  }
    60%  { left: 130%; }
    100% { left: 130%; }
}

/* ── Effect 5: wfp-fx-wave  —  JS adds sin-wave scale + opacity per item ── */
/* No extra CSS needed — JS animates scale/opacity on each item */

/* --------------------------------------------------------------------------
   Bottom bar
   -------------------------------------------------------------------------- */
.wfp-footer-bottom {
    background:   var(--wfp-bg-bottom);
    border-top:   1px solid rgba(255,255,255,0.06);
    padding:      20px 0;
}

.wfp-bottom-inner {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             20px;
    flex-wrap:       wrap;
}

.wfp-copyright {
    font-size: 0.8rem;
    color:     var(--wfp-muted);
}
.wfp-copyright a {
    color:           var(--wfp-link-hover);
    text-decoration: none;
}

.wfp-legal-nav {
    display:  flex;
    flex-wrap: wrap;
    gap:      6px 20px;
    align-items: center;
}

.wfp-legal-link {
    font-size:       0.8rem;
    color:           var(--wfp-muted);
    text-decoration: none;
    transition:      color var(--wfp-transition);
    position:        relative;
}
.wfp-legal-link::after {
    content:    '';
    position:   absolute;
    bottom:     -2px;
    left:       0;
    width:      0;
    height:     1px;
    background: var(--wfp-accent);
    transition: width var(--wfp-transition);
}
.wfp-legal-link:hover { color: var(--wfp-link-hover); }
.wfp-legal-link:hover::after { width: 100%; }

/* --------------------------------------------------------------------------
   Back to top button
   -------------------------------------------------------------------------- */
.wfp-back-to-top {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           36px;
    height:          36px;
    border-radius:   50%;
    border:          1px solid rgba(255,255,255,0.12);
    background:      rgba(255,255,255,0.04);
    color:           var(--wfp-muted);
    cursor:          pointer;
    flex-shrink:     0;
    transition:      background var(--wfp-transition),
                     border-color var(--wfp-transition),
                     color var(--wfp-transition),
                     transform var(--wfp-transition);
}
.wfp-back-to-top:hover {
    background:   var(--wfp-accent);
    border-color: var(--wfp-accent);
    color:        #000;
    transform:    translateY(-3px);
}

/* --------------------------------------------------------------------------
   Reveal animation (JS adds .wfp-visible)
   -------------------------------------------------------------------------- */
.wfp-col {
    opacity:    0;
    transform:  translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.wfp-col.wfp-visible {
    opacity:   1;
    transform: translateY(0);
}
/* Stagger delay */
.wfp-col:nth-child(1) { transition-delay: 0.05s; }
.wfp-col:nth-child(2) { transition-delay: 0.10s; }
.wfp-col:nth-child(3) { transition-delay: 0.15s; }
.wfp-col:nth-child(4) { transition-delay: 0.20s; }
.wfp-col:nth-child(5) { transition-delay: 0.25s; }
.wfp-col:nth-child(6) { transition-delay: 0.30s; }

/* --------------------------------------------------------------------------
   Responsive – Tablet (≤ 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .wfp-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .wfp-col-brand {
        grid-column: 1 / -1;
    }
    .wfp-brand-inner {
        max-width: 520px;
    }

    /* Payment slider: reduce fade mask width on tablet */
    .wfp-pay-mask { width: 80px; }
}

/* --------------------------------------------------------------------------
   Responsive – Large mobile (≤ 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .wfp-footer-body { padding: 48px 0 36px; }

    .wfp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap:                   36px 24px;
    }
    .wfp-col-brand   { grid-column: 1 / -1; }
    .wfp-col-contact { grid-column: 1 / -1; }

    .wfp-bottom-inner {
        flex-direction: column;
        align-items:    center;
        text-align:     center;
        gap:            12px;
    }
    .wfp-legal-nav { justify-content: center; }

    /* Payment slider on mobile */
    .wfp-pay-item    { padding: 0 18px; height: 56px; }
    .wfp-pay-mask    { width: 48px; }
    .wfp-payment-section { padding: 20px 0 16px; }
}

/* --------------------------------------------------------------------------
   Responsive – Small mobile (≤ 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .wfp-grid { grid-template-columns: 1fr; }
    .wfp-social-list { justify-content: flex-start; }
    .wfp-container   { padding-left: 16px; padding-right: 16px; }

    .wfp-pay-item { padding: 0 14px; height: 50px; }
    .wfp-pay-item img { max-height: 28px; }
    .wfp-pay-mask { width: 32px; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
    .wfp-footer {
        background: white !important;
        color:      #000   !important;
    }
    .wfp-accent-bar,
    .wfp-social-list,
    .wfp-newsletter-form,
    .wfp-back-to-top { display: none !important; }
}
