/*
Theme Name: Provident Futures
Theme URI: https://provident-futures.local
Author: Provident Futures
Description: Corporate WordPress theme for Provident Futures (Hong Kong) Limited.
Version: 1.0.0
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 8.2
Text Domain: provident-futures
*/

:root {
    --pf-brown: #6e4d2e;
    --pf-gold: #b58a45;
    --pf-gold-light: #d6bd86;
    --pf-blue: #132a46;
    --pf-gray: #f2f3f5;
    --pf-ink: #17202a;
    --pf-muted: #66717f;
    --pf-line: #d8dde3;
    --pf-white: #fff;
    --pf-radius: 6px;
    --pf-shadow: 0 14px 30px rgba(19, 42, 70, .10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--pf-ink);
    font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
    line-height: 1.65;
    background: var(--pf-white);
}

a {
    color: var(--pf-blue);
    text-decoration: none;
}

a:hover {
    color: var(--pf-gold);
}

img {
    max-width: 100%;
    height: auto;
}

.pf-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.pf-topbar {
    color: var(--pf-white);
    background: var(--pf-blue);
    font-size: 14px;
}

.pf-topbar .pf-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    gap: 16px;
}

.pf-phone {
    color: var(--pf-gold-light);
    font-weight: 700;
}

.pf-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--pf-line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
}

.pf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--pf-header-height, 56px);
    gap: 24px;
}

.pf-brand {
    display: flex;
    align-items: center;
    gap: var(--pf-brand-gap, 14px);
    min-width: var(--pf-brand-min-width, 96px);
    transform: translate(var(--pf-logo-offset-x, 0), var(--pf-logo-offset-y, 0));
}

.pf-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--pf-white);
    background: linear-gradient(135deg, var(--pf-brown), var(--pf-gold));
    border-radius: 50%;
    font-weight: 800;
}

.pf-logo {
    display: inline-flex;
    align-items: center;
    width: var(--pf-logo-width, 32px);
    max-width: var(--pf-logo-width, 32px);
    flex: 0 0 auto;
}

.pf-logo .custom-logo-link {
    display: inline-flex;
    width: 100%;
}

.pf-logo .custom-logo {
    display: block;
    width: var(--pf-logo-width, 32px) !important;
    max-width: var(--pf-logo-width, 32px) !important;
    max-height: var(--pf-logo-height, 24px) !important;
    height: auto !important;
    object-fit: contain;
}

.pf-brand strong {
    display: block;
    color: var(--pf-blue);
    font-size: 18px;
    line-height: 1.2;
}

.pf-brand span {
    display: block;
    color: var(--pf-muted);
    font-size: 12px;
    line-height: 1.3;
}

.pf-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-nav li {
    position: relative;
}

.pf-nav a {
    display: block;
    padding: 30px 12px;
    color: var(--pf-ink);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.pf-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--pf-line);
    background: var(--pf-white);
    box-shadow: var(--pf-shadow);
}

.pf-nav li:hover > .sub-menu,
.pf-nav li:focus-within > .sub-menu {
    display: block;
}

.pf-nav .sub-menu a {
    padding: 10px 12px;
}

.pf-menu-toggle {
    display: none;
}

.pf-hero {
    position: relative;
    overflow: hidden;
    background: var(--pf-blue);
}

.pf-slides {
    display: grid;
}

.pf-slide {
    grid-area: 1 / 1;
    min-height: 430px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .7s ease;
}

.pf-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.pf-slide-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(19, 42, 70, .94), rgba(19, 42, 70, .58), rgba(110, 77, 46, .56)), var(--pf-blue);
}

.pf-slide.has-image .pf-slide-bg {
    background-size: cover;
    background-position: center;
}

.pf-slide-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 430px;
    max-width: 680px;
    color: var(--pf-white);
}

.pf-slide-content h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.15;
    letter-spacing: 0;
}

.pf-slide-content p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, .88);
    font-size: 18px;
}

.pf-button,
button.pf-button,
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid var(--pf-gold);
    border-radius: var(--pf-radius);
    color: var(--pf-white);
    background: var(--pf-gold);
    font-weight: 700;
}

.pf-button:hover {
    color: var(--pf-white);
    background: var(--pf-brown);
}

.pf-secondary {
    color: var(--pf-blue);
    background: var(--pf-white);
}

.pf-hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 26px;
    display: flex;
    gap: 8px;
}

.pf-hero-dots button {
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, .45);
}

.pf-hero-dots button.is-active {
    background: var(--pf-gold-light);
}

.pf-section {
    padding: 58px 0;
}

.pf-section-alt {
    background: var(--pf-gray);
}

.pf-section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.pf-section-title h2,
.pf-page-title h1 {
    margin: 0;
    color: var(--pf-blue);
    font-size: 30px;
    line-height: 1.25;
}

.pf-section-title p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--pf-muted);
}

.pf-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.pf-quick-link,
.pf-card,
.pf-exchange,
.pf-download-list article {
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-radius);
    background: var(--pf-white);
    box-shadow: 0 8px 18px rgba(19, 42, 70, .05);
}

.pf-quick-link {
    padding: 22px;
    border-top: 4px solid var(--pf-gold);
}

.pf-quick-link strong {
    display: block;
    margin-bottom: 8px;
    color: var(--pf-blue);
    font-size: 18px;
}

.pf-quick-link span,
.pf-card p,
.pf-exchange p {
    color: var(--pf-muted);
}

.pf-intro {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 36px;
    align-items: center;
}

.pf-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.pf-stat {
    padding: 22px;
    border-left: 4px solid var(--pf-gold);
    background: var(--pf-gray);
}

.pf-stat strong {
    display: block;
    color: var(--pf-blue);
    font-size: 26px;
}

.pf-card-grid,
.pf-exchange-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.pf-card {
    padding: 20px;
}

.pf-card time {
    color: var(--pf-gold);
    font-size: 13px;
    font-weight: 700;
}

.pf-card h3,
.pf-download-list h3,
.pf-exchange h3 {
    margin: 8px 0;
    color: var(--pf-blue);
    font-size: 19px;
    line-height: 1.35;
}

.pf-card-image {
    display: block;
    height: 160px;
    margin: -20px -20px 16px;
    overflow: hidden;
    background: var(--pf-gray);
}

.pf-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-link {
    color: var(--pf-brown);
    font-weight: 800;
}

.pf-page-hero {
    padding: 54px 0;
    color: var(--pf-white);
    background: linear-gradient(115deg, var(--pf-blue), #26394d 58%, var(--pf-brown));
}

.pf-page-title p {
    max-width: 720px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .82);
}

.pf-page-title h1 {
    color: var(--pf-white);
}

.pf-content {
    padding: 52px 0;
}

.pf-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.pf-content th,
.pf-content td {
    padding: 12px 14px;
    border: 1px solid var(--pf-line);
    text-align: left;
}

.pf-content th {
    color: var(--pf-blue);
    background: var(--pf-gray);
}

.pf-document-library section {
    margin-bottom: 24px;
}

.pf-month-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.pf-month {
    display: grid;
    place-items: center;
    min-height: 54px;
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-radius);
    background: var(--pf-white);
    font-weight: 700;
}

.pf-download-list {
    display: grid;
    gap: 14px;
}

.pf-download-list article {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
}

.pf-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-actions img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.pf-faq details {
    margin-bottom: 12px;
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-radius);
    background: var(--pf-white);
}

.pf-faq summary {
    cursor: pointer;
    padding: 16px 18px;
    color: var(--pf-blue);
    font-weight: 800;
}

.pf-faq details > div {
    padding: 0 18px 18px;
    color: var(--pf-muted);
}

.pf-exchange {
    padding: 22px;
}

.pf-exchange img {
    width: 86px;
    height: 52px;
    object-fit: contain;
    margin-bottom: 12px;
}

.pf-contact-band {
    color: var(--pf-white);
    background: var(--pf-blue);
}

.pf-contact-band .pf-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 0;
}

.pf-footer {
    padding: 38px 0 24px;
    color: rgba(255, 255, 255, .72);
    background: #101820;
}

.pf-footer-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr .8fr;
    gap: 28px;
}

.pf-footer h3 {
    margin: 0 0 12px;
    color: var(--pf-white);
}

.pf-footer a {
    color: rgba(255, 255, 255, .78);
}

.pf-copyright {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 13px;
}

@media (max-width: 900px) {
    .pf-header-inner {
        min-height: 70px;
    }

    .pf-menu-toggle {
        display: inline-flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--pf-line);
        background: var(--pf-white);
    }

    .pf-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        border-top: 1px solid var(--pf-line);
        background: var(--pf-white);
    }

    .pf-nav.is-open {
        display: block;
    }

    .pf-nav ul,
    .pf-nav .sub-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: 0;
    }

    .pf-nav a {
        padding: 12px 20px;
    }

    .pf-nav .sub-menu a {
        padding-left: 34px;
    }

    .pf-intro,
    .pf-footer-grid,
    .pf-download-list article {
        grid-template-columns: 1fr;
    }

    .pf-quick-grid,
    .pf-card-grid,
    .pf-exchange-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pf-month-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 620px) {
    .pf-topbar .pf-container,
    .pf-contact-band .pf-container,
    .pf-section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .pf-brand {
        min-width: 0;
    }

    .pf-brand strong {
        font-size: 15px;
    }

    .pf-slide,
    .pf-slide-content {
        min-height: 380px;
    }

    .pf-quick-grid,
    .pf-card-grid,
    .pf-exchange-grid,
    .pf-stat-grid {
        grid-template-columns: 1fr;
    }

    .pf-month-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
