/* ==========================================================================
   ZTO Blog — Custom Theme Styles
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-dark-blue: #001669;
    --color-green: #01B68B;
    --color-light-green: #00FFB3;
    --color-red: #FF5A65;
    --color-yellow: #FDB52A;
    --color-white: #FFFFFF;
    --color-light-gray: #F5F7FA;
    --color-lighter-gray: #EBF0F5;
    --color-gray-text: #334155;
    --color-muted: #64748B;
    --color-border: #E2E8F0;
    --color-teal: #14B8A6;
    --color-purple: #7C3AED;
    --color-orange: #F97316;

    --font-primary: 'Lexend', sans-serif;
    --font-logo: 'MuseoModerno', sans-serif;

    --radius-card: 14px;
    --radius-small: 8px;
    --radius-pill: 40px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lift: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Button tokens */
    --btn-filled-bg: var(--color-green);
    --btn-filled-color: var(--color-white);
    --btn-filled-hover-bg: #00a070;
    --btn-filled-hover-shadow: var(--shadow-md);

    --btn-radius: var(--radius-pill);
    --btn-weight: 600;
    --btn-padding-sm: 10px 22px;
    --btn-padding-md: 0.875rem 1.75rem;
    --btn-font-sm: 14px;
    --btn-font-md: 16px;
    --btn-transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* ---------- Base Reset ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-gray-text);
    background: var(--color-white);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-dark-blue);
    font-weight: 700;
}

h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
h2 { font-size: 24px; line-height: 1.35; }
h3 { font-size: 30px; line-height: 38px; }
h4 { font-size: 24px; line-height: 32px; }
h5 { font-size: 18px; line-height: 28px; }
h6 { font-size: 16px; line-height: 24px; }

p  { font-size: 16px; }

a {
    text-decoration: none;
}

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

/* ---------- Utility Classes ---------- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding-inline: 1rem;
}

.section {
    padding-block: 4rem 0;
}

/* ==========================================================================
   NAVBAR — Floating Glassmorphism
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 24px 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.nav-hidden {
    transform: translateY(-120%);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.nav-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-pill);
    transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    cursor: pointer;
    padding: 10px 20px;
    height: 48px;
}

.logo-mark {
    width: 30px;
    height: auto;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.logo-text {
    font-family: var(--font-logo);
    font-size: 20px;
    font-weight: 500;
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links {
    display: flex;
    gap: 0;
    align-items: center;
    list-style: none;
    padding: 0 6px;
    height: 48px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 16px;
    border: none;
    border-radius: var(--radius-pill);
    display: block;
    overflow: hidden;
    position: relative;
    height: 32px;
    line-height: 20px;
    transition: color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link .link-text {
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link .link-text-hover {
    position: absolute;
    left: 16px;
    top: 6px;
    display: block;
    color: var(--color-light-green);
    transform: translateY(160%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover .link-text {
    transform: translateY(-160%);
}

.nav-link:hover .link-text-hover {
    transform: translateY(0);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    top: calc(var(--glow-y, 50%) * 1px - 60px);
    left: calc(var(--glow-x, 50%) * 1px - 60px);
    background: radial-gradient(circle, rgba(0, 255, 179, 0.25) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.nav-link:hover::after {
    opacity: 1;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    color: var(--color-light-green);
}

/* Nav Dark Mode */
.navbar.nav-dark .nav-glass {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.navbar.nav-dark .logo-text {
    color: var(--color-white);
}

.navbar.nav-dark .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar.nav-dark .nav-link .link-text-hover {
    color: var(--color-light-green);
}

.navbar.nav-dark .nav-link.active {
    color: var(--color-light-green);
}

.navbar.nav-dark .nav-link::after {
    background: radial-gradient(circle, rgba(0, 255, 179, 0.25) 0%, transparent 70%);
}

.navbar.nav-dark .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.navbar.nav-dark .logo-mark path[fill="#001669"] {
    fill: #FFFFFF;
}

.navbar.nav-dark .hamburger span {
    background: var(--color-white);
}

/* Nav Light Mode */
.navbar.nav-light .nav-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(0, 22, 105, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.navbar.nav-light .logo-text {
    color: var(--color-dark-blue);
}

.navbar.nav-light .nav-link {
    color: var(--color-gray-text);
}

.navbar.nav-light .nav-link .link-text-hover {
    color: var(--color-green);
}

.navbar.nav-light .nav-link.active {
    color: var(--color-green);
}

.navbar.nav-light .nav-link::after {
    background: radial-gradient(circle, rgba(1, 182, 139, 0.18) 0%, transparent 70%);
}

.navbar.nav-light .nav-link:hover {
    background: rgba(0, 22, 105, 0.04);
}

.navbar.nav-light .logo-mark path[fill="#001669"],
.navbar.nav-light .logo-mark path[fill="#FFFFFF"] {
    fill: #001669;
}

.navbar.nav-light .hamburger span {
    background: var(--color-dark-blue);
}

/* Nav CTA */
.nav-cta {
    background: var(--btn-filled-bg);
    color: var(--btn-filled-color);
    padding: var(--btn-padding-sm);
    height: 48px;
    display: flex;
    align-items: center;
    text-decoration: none !important;
    font-size: var(--btn-font-sm);
    font-weight: var(--btn-weight);
    cursor: pointer;
    border: none;
    border-color: transparent;
    white-space: nowrap;
    transition: var(--btn-transition);
}

.navbar.nav-light .nav-cta,
.navbar.nav-dark .nav-cta {
    background: var(--btn-filled-bg);
    border-color: transparent;
    box-shadow: none;
}

.nav-cta:hover {
    background: var(--btn-filled-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(1, 182, 139, 0.3);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    height: 48px;
    justify-content: center;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Panel */
.nav-mobile-panel {
    display: none;
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    background: rgba(0, 22, 105, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-card);
    padding: 16px;
    z-index: 999;
    flex-direction: column;
    gap: 4px;
}

.nav-mobile-panel.open {
    display: flex;
}

.nav-mobile-panel .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 12px 16px;
    border-radius: var(--radius-small);
    font-size: 16px;
    height: auto;
    overflow: visible;
    position: static;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.nav-mobile-panel .nav-link .link-text {
    display: inline;
    transform: none;
    transition: none;
}

.nav-mobile-panel .nav-link .link-text-hover {
    display: none;
}

.nav-mobile-panel .nav-link::after {
    display: none;
}

.nav-mobile-panel .nav-link:hover .link-text,
.nav-mobile-panel .nav-link.active .link-text {
    transform: none;
}

.nav-mobile-panel .nav-link:hover,
.nav-mobile-panel .nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-light-green);
}

.nav-mobile-panel .nav-cta-mobile {
    background: var(--btn-filled-bg);
    color: var(--btn-filled-color);
    padding: 14px;
    border-radius: var(--btn-radius);
    text-align: center;
    text-decoration: none !important;
    font-weight: var(--btn-weight);
    font-size: 15px;
    cursor: pointer;
    border: none;
    margin-top: 8px;
    transition: var(--btn-transition);
}

.nav-mobile-panel .nav-cta-mobile:hover {
    background: var(--btn-filled-hover-bg);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    padding: 32px;
    background: transparent;
}

.footer-container {
    background: var(--color-dark-blue);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.footer-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.footer-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(125% 125% at 50% 10%, rgba(0, 22, 105, 0.4) 50%, rgba(1, 182, 139, 0.15) 100%);
    pointer-events: none;
    z-index: 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 56px 0;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-decoration: none;
}

.footer-brand-logo svg {
    width: 40px;
    height: auto;
}

.footer-brand-logo span {
    font-family: var(--font-logo);
    font-size: 28px;
    font-weight: 500;
    color: var(--color-white);
}

.footer-brand-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    max-width: 280px;
}

.footer-brand-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s ease;
    text-decoration: none;
}

.footer-contact-item:hover {
    color: var(--color-light-green);
}

.footer-contact-item svg {
    width: 16px;
    height: 16px;
    color: var(--color-green);
    flex-shrink: 0;
}

.footer-col-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 1.25rem;
}

.footer-link {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    padding: 0.3rem 0;
    transition: color 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-primary);
}

.footer-link:hover {
    color: var(--color-light-green);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 56px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-social-btn {
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.footer-social-btn:hover {
    color: var(--color-light-green);
}

.footer-social-btn svg {
    width: 18px;
    height: 18px;
}

.footer-hover-text {
    position: relative;
    z-index: 1;
    height: 220px;
    margin-top: -160px;
    margin-bottom: -24px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: visible;
}

.footer-hover-text svg {
    width: 100%;
    max-width: 1100px;
    height: auto;
    pointer-events: auto;
    cursor: default;
    overflow: visible;
}

.footer-hover-text .text-stroke {
    fill: none;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 0.08;
    font-family: 'MuseoModerno', sans-serif;
    font-size: 90px;
    font-weight: 500;
    transition: stroke 0.4s ease;
}

.footer-hover-text .text-gradient {
    fill: none;
    stroke: url(#footerTextGrad);
    stroke-width: 0.08;
    font-family: 'MuseoModerno', sans-serif;
    font-size: 90px;
    font-weight: 500;
    opacity: 0.6;
    mask: url(#footerRevealMask);
}

.footer-hover-text .text-outline {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 0.08;
    font-family: 'MuseoModerno', sans-serif;
    font-size: 90px;
    font-weight: 500;
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: footerStrokeDraw 4s ease-in-out forwards;
}

@keyframes footerStrokeDraw {
    to { stroke-dashoffset: 0; }
}

/* ==========================================================================
   PAGE HERO
   ========================================================================== */
.page-hero {
    background: var(--color-dark-blue);
    padding: 110px 1rem 40px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 20% 80%, rgba(1, 182, 139, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse 60% 50% at 80% 20%, rgba(0, 255, 179, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-hero h1 {
    color: var(--color-white);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1rem;
    text-align: center;
}

.page-hero .hero-subtitle-center {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin: 0 auto;
}

.page-hero--center {
    text-align: center;
}

.page-hero--center h1 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Pull the first home section closer to the hero. */
.home .page-hero + .section,
.home .page-hero + .home-featured-section {
    padding-top: 2.5rem;
}

/* Inline text accents — usable inside any heading or paragraph,
   e.g. <h2>Welcome <span class="accent-green">từ ZTO</span></h2> */
.accent-dark-blue { color: var(--color-dark-blue); }
.accent-green     { color: var(--color-green); }
.accent-light-green { color: var(--color-light-green); }
.accent-teal      { color: var(--color-teal); }
.accent-yellow    { color: var(--color-yellow); }
.accent-orange    { color: var(--color-orange); }
.accent-red       { color: var(--color-red); }

/* ==========================================================================
   FIELD NOTES — Filter Bar
   ========================================================================== */
.fn-filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3.5rem;
}

.fn-filter {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: none;
    color: var(--color-muted);
    cursor: pointer;
    transition: all 0.25s ease;
}

.fn-filter:hover {
    border-color: var(--color-dark-blue);
    color: var(--color-dark-blue);
}

.fn-filter.active[data-cat="all"] {
    background: var(--color-light-gray);
    border-color: var(--color-dark-blue);
    color: var(--color-dark-blue);
}

.fn-filter.active[data-cat="activities"] {
    background: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.4);
    color: var(--color-teal);
}

.fn-filter.active[data-cat="industry"] {
    background: rgba(253, 181, 42, 0.08);
    border-color: rgba(253, 181, 42, 0.4);
    color: var(--color-yellow);
}

.fn-filter.active[data-cat="technical"] {
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.35);
    color: var(--color-orange);
}

/* ==========================================================================
   FIELD NOTES — Card Grid
   ========================================================================== */
.fn-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
    position: relative;
}

.fn-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.fn-col::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--color-border);
    transform: translateX(-50%);
    z-index: 0;
}

.fn-col--offset-down {
    padding-top: 5rem;
}

.fn-card {
    position: relative;
    z-index: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    width: 100%;
    max-width: 380px;
}

.fn-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 22, 105, 0.12);
}

.fn-card-img {
    width: 100%;
    aspect-ratio: 5 / 3;
    position: relative;
    overflow: hidden;
}

.fn-card-img.fn-cat-activities {
    background: linear-gradient(145deg, #0a2e26 0%, #0d4a3e 40%, #14b8a6 100%);
}

.fn-card-img.fn-cat-industry {
    background: linear-gradient(145deg, #2a1f0a 0%, #5c3d10 40%, #fdb52a 100%);
}

.fn-card-img.fn-cat-technical {
    background: linear-gradient(145deg, #2a1509 0%, #6b3410 40%, #f97316 100%);
}

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

.fn-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 22, 105, 0.7) 0%, rgba(0, 22, 105, 0.25) 60%, transparent 100%);
}

.fn-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-bottom: 10px;
}

.fn-badge-activities,
.fn-badge-industry,
.fn-badge-technical {
    transition: border-color 0.25s ease;
}

.fn-card-img:hover .fn-badge-activities {
    border-color: var(--color-teal);
}

.fn-card-img:hover .fn-badge-industry {
    border-color: var(--color-yellow);
}

.fn-card-img:hover .fn-badge-technical {
    border-color: var(--color-orange);
}

.fn-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fn-card-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

.fn-card-desc {
    padding: 1.25rem 0.5rem 0;
    text-align: center;
}

.fn-card-excerpt {
    font-size: 14px;
    color: var(--color-gray-text);
    line-height: 1.6;
}

.fn-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 0.75rem;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--wp--preset--color--green);
    transition: gap 0.3s ease;
}

.fn-card:hover ~ .fn-card-desc .fn-card-link,
.fn-card-link:hover {
    gap: 10px;
}

/* ==========================================================================
   HOME — Featured + Latest + Category Sections
   ========================================================================== */

/* Section headers shared across home-latest + home-cat-row */
.home-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.home-section-title {
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 700;
    color: var(--color-dark-blue);
    margin: 0;
    letter-spacing: -0.3px;
}

.home-section-title--activities { border-left: 4px solid var(--color-teal);   padding-left: 12px; }
.home-section-title--industry   { border-left: 4px solid var(--color-yellow); padding-left: 12px; }
.home-section-title--technical  { border-left: 4px solid var(--color-orange); padding-left: 12px; }

.home-section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-green);
    text-decoration: none;
    white-space: nowrap;
    transition: gap 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.home-section-link:hover {
    gap: 8px;
    text-decoration: underline;
}

/* Featured: 1 main + 3 mini stack */
.home-featured-section {
    padding-top: 3rem;
}

.home-featured {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 2rem;
    align-items: stretch;
}

.home-featured-main {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 5 / 3;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(0, 22, 105, 0.10);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.home-featured-main:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(0, 22, 105, 0.16);
}

.home-featured-main > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-featured-main.fn-cat-activities {
    background: linear-gradient(145deg, #0a2e26 0%, #0d4a3e 40%, #14b8a6 100%);
}

.home-featured-main.fn-cat-industry {
    background: linear-gradient(145deg, #2a1f0a 0%, #5c3d10 40%, #fdb52a 100%);
}

.home-featured-main.fn-cat-technical {
    background: linear-gradient(145deg, #2a1509 0%, #6b3410 40%, #f97316 100%);
}

.home-featured-main-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2rem 2.25rem 2.25rem;
    background: linear-gradient(to top, rgba(0, 22, 105, 0.85) 0%, rgba(0, 22, 105, 0.45) 60%, transparent 100%);
    color: #fff;
}

.home-featured-main-title {
    font-size: clamp(24px, 2.6vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0.5rem 0 0.75rem;
    letter-spacing: -0.3px;
}

.home-featured-main-excerpt {
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 0.85rem;
    max-width: 70ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-featured-main-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.home-featured-meta-sep { opacity: 0.5; }

.home-featured-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-featured-mini {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    padding: 0.5rem;
    transition: background 0.25s ease, transform 0.25s ease;
    align-items: center;
    min-width: 0;
    min-height: 0;
    flex: 1;
}

.home-featured-mini:hover {
    background: var(--color-light-gray);
    transform: translateY(-2px);
}

.home-featured-mini-thumb {
    width: 100%;
    aspect-ratio: 5 / 3;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.home-featured-mini-text {
    min-width: 0;
    align-self: center;
}

.home-featured-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-featured-mini-thumb.fn-cat-activities {
    background: linear-gradient(145deg, #0a2e26 0%, #0d4a3e 40%, #14b8a6 100%);
}

.home-featured-mini-thumb.fn-cat-industry {
    background: linear-gradient(145deg, #2a1f0a 0%, #5c3d10 40%, #fdb52a 100%);
}

.home-featured-mini-thumb.fn-cat-technical {
    background: linear-gradient(145deg, #2a1509 0%, #6b3410 40%, #f97316 100%);
}

.home-featured-mini-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.home-featured-mini-cat-activities { color: var(--color-teal); }
.home-featured-mini-cat-industry   { color: var(--color-yellow); }
.home-featured-mini-cat-technical  { color: var(--color-orange); }

.home-featured-mini-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-dark-blue);
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.home-featured-mini-date {
    font-size: 11px;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Latest grid + category row grid (shared) */
.home-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.home-latest-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.home-latest-card .fn-card-img {
    width: 100%;
    max-width: 380px;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.home-latest-card .fn-card-img:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 22, 105, 0.12);
}

.home-latest-card .fn-card-desc {
    max-width: 380px;
}

/* Category row spacing */
.home-cat-row + .home-cat-row {
    margin-top: 4rem;
}

/* ==========================================================================
   SINGLE POST DETAIL
   ========================================================================== */

/* Hero — left-aligned for single posts */
.single .page-hero {
    padding-bottom: 60px;
}

.single .page-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.fn-read-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.75rem;
}

.post-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.75rem;
}

/* Category badge in hero */
.fn-badge-wrap a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-bottom: 1rem;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* Two-column layout */
.bp-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3.5rem;
    align-items: start;
}

.bp-article {
    max-width: 100%;
    min-width: 0;
}

.bp-article--full {
    max-width: 860px;
    margin: 0 auto;
}

/* Featured image */
.bp-hero-image {
    width: 100%;
    height: 480px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.bp-hero-image figure,
.wp-block-post-featured-image.bp-hero-image {
    height: 480px;
    margin: 0 0 2.5rem;
}

.bp-hero-image img,
.bp-hero-image figure img,
.wp-block-post-featured-image.bp-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-card);
    display: block;
}

/* Category-tinted image fallback */
.bp-hero-image.fn-cat-activities { background: linear-gradient(135deg, rgba(20,184,166,0.10), var(--color-light-gray)); }
.bp-hero-image.fn-cat-industry   { background: linear-gradient(135deg, rgba(253,181,42,0.10), var(--color-light-gray)); }
.bp-hero-image.fn-cat-technical  { background: linear-gradient(135deg, rgba(249,115,22,0.10), var(--color-light-gray)); }

/* Body prose */
.bp-body p {
    font-size: 17px;
    color: var(--color-gray-text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.bp-body h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.35;
}

.bp-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.bp-body ul, .bp-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.8;
    font-size: 17px;
}

.bp-body li {
    margin-bottom: 0.5rem;
    color: var(--color-gray-text);
}

.bp-body a {
    color: var(--color-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bp-body img {
    width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
}

/* YouTube / oEmbed iframes — full width, 16:9, centered */
.bp-body iframe,
.bp-body .wp-block-embed__wrapper iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
    margin: 2rem auto;
}

.bp-body .wp-block-embed,
.bp-body .wp-embedded-content {
    margin: 2rem 0;
}

/* ── ZTO Video Player (wp-block-video) ─────────────────────────────────────── */

/* Base figure styles — JS adds .zto-player to activate */
.bp-body .wp-block-video {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin: 2rem 0;
    line-height: 0; /* collapse whitespace gaps around <video> */
    aspect-ratio: 16 / 9; /* reserve space before metadata loads; letterbox non-16:9 video */
}

.bp-body .wp-block-video video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* letterbox — shows full frame without cropping */
    cursor: pointer;
}

.bp-body .wp-block-video figcaption {
    line-height: 1.5;
    font-size: 13px;
    color: var(--color-muted);
    padding: 0.6rem 0 0;
    text-align: center;
    background: transparent;
}

/* Positioning root — added by JS */
.zto-player { position: relative; }

/* ── Center play overlay ── */
.zto-player__center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.zto-player__center-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(0, 22, 105, 0.82);
    border: 2px solid rgba(1, 182, 139, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: transform 0.2s, background 0.2s, opacity 0.25s;
}

.zto-player__center-btn svg { width: 30px; height: 30px; display: block; }
.zto-player__center-btn .icon-play { margin-left: 3px; } /* optical centre */
.zto-player__center-btn:hover { background: #01B68B; transform: scale(1.1); }

/* Hide center button while playing */
.zto-player--playing .zto-player__center-btn {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85);
}

/* ── Buffering spinner ── */
.zto-player__spinner {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}
.zto-player__spinner.is-active { display: flex; }
.zto-player__spinner::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #01B68B;
    border-radius: 50%;
    animation: zto-player-spin 0.7s linear infinite;
}
@keyframes zto-player-spin {
    to { transform: rotate(360deg); }
}

/* ── Controls bar ── */
.zto-player__bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 14px;
    background: linear-gradient(to top, rgba(0, 5, 30, 0.92) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
    z-index: 2;
}

/* Visible when paused or mouse active */
.zto-player--show-controls .zto-player__bar,
.zto-player:not(.zto-player--playing) .zto-player__bar {
    opacity: 1;
    transform: translateY(0);
}

/* ── Control buttons ── */
.zto-player__btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    transition: color 0.15s;
}
.zto-player__btn:hover { color: #01B68B; }
.zto-player__btn svg { width: 20px; height: 20px; display: block; }

/* ── Progress bar ── */
.zto-player__prog {
    flex: 1;
    height: 20px; /* generous hit area */
    display: flex;
    align-items: center;
    cursor: pointer;
}

.zto-player__prog-track {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 3px;
    transition: height 0.15s;
    overflow: visible;
}
.zto-player__prog:hover .zto-player__prog-track { height: 5px; }

.zto-player__prog-buf {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    width: 0;
    transition: width 0.4s;
}

.zto-player__prog-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: #01B68B;
    border-radius: 3px;
    width: 0;
    transition: width 0.08s linear;
}

/* Thumb dot — appears on hover */
.zto-player__prog-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #01B68B;
    box-shadow: 0 0 0 3px rgba(1, 182, 139, 0.28);
    transform: translateY(-50%) scale(0);
    transition: transform 0.15s;
}
.zto-player__prog:hover .zto-player__prog-fill::after {
    transform: translateY(-50%) scale(1);
}

/* ── Time display ── */
.zto-player__time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

/* ── Volume ── */
.zto-player__vol {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.zto-player__vol-range {
    width: 0;
    opacity: 0;
    cursor: pointer;
    accent-color: #01B68B;
    transition: width 0.2s, opacity 0.2s;
    vertical-align: middle;
}
.zto-player__vol:hover .zto-player__vol-range {
    width: 64px;
    opacity: 1;
}

/* ── ZTO watermark logo — always visible, pinned above controls bar ── */
.zto-player__logo {
    position: absolute;
    bottom: 56px;
    right: 12px;
    height: 26px;
    width: auto;
    max-width: 120px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 3;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

/* Custom image logo */
.zto-player__logo img {
    display: block;
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* ── Speed control ── */
.zto-player__speed {
    position: relative;
    display: flex;
    align-items: center;
}

.zto-player__speed-btn {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    min-width: 36px;
}

.zto-player__speed-menu[hidden] {
    display: none;
}

.zto-player__speed-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    min-width: 90px;
    background: rgba(15, 20, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.zto-player__speed-opt {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    text-align: left;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.zto-player__speed-opt:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.zto-player__speed-opt.is-active {
    color: #00FFB3;
    font-weight: 700;
}

/* ── PiP active state ── */
.zto-player__pip-btn.is-active svg {
    color: #00FFB3;
}

/* ── Fullscreen adjustments ── */
.zto-player:fullscreen,
.zto-player:-webkit-full-screen {
    border-radius: 0;
}
.zto-player:fullscreen video,
.zto-player:-webkit-full-screen video {
    height: 100vh;
    object-fit: contain;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .zto-player__vol-range { display: none; }
    .zto-player__speed { display: none; }
    .zto-player__time { font-size: 11px; }
    .zto-player__center-btn { width: 56px; height: 56px; }
    .zto-player__center-btn svg { width: 24px; height: 24px; }
}

/* Blockquote / pull quote */
.bp-body blockquote,
.bp-quote {
    background: var(--color-light-gray);
    border-left: 3px solid var(--color-green);
    border-radius: 0 14px 14px 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.bp-body blockquote p,
.bp-quote p {
    font-size: 18px;
    font-style: italic;
    color: var(--color-dark-blue);
    line-height: 1.65;
    margin-bottom: 0.5rem;
}

.bp-body blockquote cite,
.bp-quote cite {
    font-size: 12px;
    color: var(--color-muted);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inline image grid */
.bp-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.bp-image-grid img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 12px;
}

/* Sidebar */
.bp-sidebar {
    position: sticky;
    top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bp-sidebar-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.5rem;
}

/* Widget content inside sidebar cards */
.bp-sidebar-widget p,
.bp-sidebar-widget ul,
.bp-sidebar-widget ol {
    font-size: 0.875rem;
    color: var(--color-gray-text);
    line-height: 1.6;
    margin: 0;
}

.bp-sidebar-widget ul,
.bp-sidebar-widget ol {
    padding-left: 1.25rem;
}

.bp-sidebar-widget a {
    color: var(--color-green);
}

.bp-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.bp-detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.75rem;
    align-items: start;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-border);
}

.bp-detail-row:last-child {
    border-bottom: none;
}

.bp-detail-key {
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.5;
}

.bp-detail-val {
    font-size: 14px;
    color: var(--color-gray-text);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* Sidebar navigation links */
.bp-nav-link {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.bp-nav-link:hover {
    border-color: var(--color-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.bp-nav-label {
    font-size: 11px;
    color: var(--color-green);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 4px;
}

.bp-nav-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-dark-blue);
}

.bp-nav-arrow {
    font-size: 16px;
    color: var(--color-green);
    flex-shrink: 0;
}

/* Category / tag terms below article */
.single-post-categories a,
.single-post-tags a {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-green);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 4px 14px;
    margin: 0 4px 8px 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.single-post-categories a:hover,
.single-post-tags a:hover {
    border-color: var(--color-green);
    background: rgba(1, 182, 139, 0.06);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   ARCHIVE — Category / Tag / Author listing
   ========================================================================== */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2rem;
    margin-bottom: 3rem;
}

.archive-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   SEARCH RESULTS
   ========================================================================== */

/* Badges inside light-background contexts use the active-filter palette
   (same tint colours as .fn-filter.active[data-cat="…"]) */
.search-result-item .fn-badge {
    color: var(--color-muted);
    background: var(--color-light-gray);
    border-color: var(--color-border);
}

.search-result-item .fn-badge-activities {
    background: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.4);
    color: var(--color-teal);
}

.search-result-item .fn-badge-industry {
    background: rgba(253, 181, 42, 0.08);
    border-color: rgba(253, 181, 42, 0.4);
    color: var(--color-yellow);
}

.search-result-item .fn-badge-technical {
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.35);
    color: var(--color-orange);
}

.search-form-wrap {
    max-width: 560px;
    margin: 0 auto 3rem;
}

/* WP native search form styling */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form label {
    flex: 1;
}

.search-form .search-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--color-gray-text);
    outline: none;
    transition: border-color 0.2s;
}

.search-form .search-field:focus {
    border-color: var(--color-dark-blue);
}

.search-form .search-submit {
    padding: 0.75rem 1.5rem;
    background: var(--color-dark-blue);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-form .search-submit:hover {
    background: var(--color-green);
}

/* wp:search block */
.wp-block-search__inside-wrapper {
    display: flex;
    gap: 0.5rem;
}

.wp-block-search__input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--color-gray-text);
    outline: none;
    transition: border-color 0.2s;
}

.wp-block-search__input:focus {
    border-color: var(--color-dark-blue);
}

.wp-block-search__button {
    padding: 0.75rem 1.5rem;
    background: var(--color-dark-blue);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.wp-block-search__button:hover {
    background: var(--color-green);
}

.search-results-list {
    max-width: 860px;
    margin: 0 auto;
}

.search-result-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-dark-blue);
    line-height: 1.3;
    margin: 0.5rem 0 0.25rem;
    letter-spacing: -0.3px;
}

.search-result-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.search-result-title a:hover {
    color: var(--color-green);
}

.search-result-meta {
    font-size: 12px;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.search-result-excerpt {
    font-size: 15px;
    color: var(--color-gray-text);
    line-height: 1.65;
}

/* ==========================================================================
   SITE EDITOR — PHP pattern placeholders
   ========================================================================== */
.zto-editor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem 2rem;
    background: var(--color-light-gray);
    border: 2px dashed var(--color-border);
    border-radius: 12px;
    text-align: center;
    color: var(--color-muted);
    font-size: 14px;
    min-height: 160px;
}

.zto-editor-placeholder__icon {
    color: var(--color-green);
    opacity: 0.7;
}

.zto-editor-placeholder strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-dark-blue);
}

.zto-editor-placeholder p {
    margin: 0;
    max-width: 320px;
    line-height: 1.5;
}

/* ==========================================================================
   STATIC PAGE
   ========================================================================== */
.page-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.page .wp-block-post-title {
    text-align: center;
}

.page-content {
    max-width: 860px;
    margin: 0 auto;
}

/* ==========================================================================
   404
   ========================================================================== */
.hero-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-green);
    margin-bottom: 1rem;
}

.container--narrow {
    max-width: 560px;
    text-align: center;
}

.fn-back-link {
    display: inline-block;
    margin-top: 2rem;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.fn-back-link:hover {
    color: var(--color-green);
}

/* ==========================================================================
   PAGINATION — shared by archive and search
   ========================================================================== */
.fn-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.fn-pagination ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.fn-pagination ul li a,
.fn-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--color-border);
    color: var(--color-dark-blue);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.fn-pagination ul li a:hover {
    background: var(--color-dark-blue);
    color: var(--color-white);
    border-color: var(--color-dark-blue);
}

.fn-pagination ul li span.current {
    background: var(--color-dark-blue);
    color: var(--color-white);
    border-color: var(--color-dark-blue);
}

.fn-no-results {
    text-align: center;
    color: var(--color-muted);
    font-size: 16px;
    padding: 3rem 0;
}

/* ==========================================================================
   FIELD NOTES — Listing toolbar (Vercel/Stripe-inspired)
   Pattern: text tab category nav + clean search + minimal sort dropdown.
   ========================================================================== */
.fn-toolbar {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--color-border);
}

/* ── Category tabs (Stripe blog style — text with underline) ── */
.fn-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.75rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.fn-tabs::-webkit-scrollbar {
    display: none;
}

.fn-tab {
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.fn-tab::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: transparent;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.fn-tab:hover {
    color: var(--color-dark-blue);
}

.fn-tab.is-active {
    color: var(--color-dark-blue);
    font-weight: 600;
}

.fn-tab.is-active::after {
    background: var(--color-dark-blue);
}

/* Per-category accent on active underline (matches brand palette) */
.fn-tab.fn-tab--activities.is-active { color: var(--color-teal); }
.fn-tab.fn-tab--activities.is-active::after { background: var(--color-teal); }

.fn-tab.fn-tab--industry.is-active { color: var(--color-yellow); }
.fn-tab.fn-tab--industry.is-active::after { background: var(--color-yellow); }

.fn-tab.fn-tab--technical.is-active { color: var(--color-orange); }
.fn-tab.fn-tab--technical.is-active::after { background: var(--color-orange); }

/* ── Controls row (search + sort + reset) ── */
.fn-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
}

.fn-controls-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
}

/* ── Search field (Vercel-style: rounded-lg, soft, leading icon, trailing submit) ── */
.fn-search {
    position: relative;
    flex: 1 1 auto;
    max-width: 480px;
    display: flex;
    align-items: center;
}

.fn-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    pointer-events: none;
}

.fn-search input[type="search"] {
    width: 100%;
    padding: 0.6rem 2.5rem 0.6rem 2.4rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-gray-text);
    background: var(--color-white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.fn-search input[type="search"]::placeholder {
    color: var(--color-muted);
}

.fn-search input[type="search"]:focus {
    border-color: var(--color-dark-blue);
    box-shadow: 0 0 0 3px rgba(0, 22, 105, 0.08);
}

/* Hide native clear button to keep the trailing submit alone */
.fn-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.fn-search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: var(--color-dark-blue);
    color: var(--color-white);
    cursor: pointer;
    transition: background 0.2s;
}

.fn-search-submit:hover {
    background: var(--color-green);
}

/* ── Sort dropdown (Linear-style: discreet text trigger, no pill) ── */
.fn-orderby {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.fn-orderby-label {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--color-muted);
    white-space: nowrap;
}

.fn-orderby select {
    padding: 0.35rem 1.4rem 0.35rem 0.5rem;
    border: none;
    background: transparent;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark-blue);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    border-radius: 6px;
    transition: background 0.15s;
}

.fn-orderby select:hover,
.fn-orderby select:focus {
    background: var(--color-light-gray);
}

.fn-orderby-caret {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    pointer-events: none;
}

/* ── Reset link (icon + text, subtle) ── */
.fn-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-muted);
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.fn-reset:hover {
    color: var(--color-red);
    background: var(--color-light-gray);
}

.fn-results-meta {
    color: var(--color-muted);
    font-size: 14px;
    margin-bottom: 2rem;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* ── 1024px: tablet landscape ── */
@media (max-width: 1024px) {
    h1 {
        font-size: 48px;
        line-height: 1.15;
    }

    h2 {
        font-size: 36px;
        line-height: 1.2;
    }

    .page-hero h1 {
        font-size: clamp(28px, 4vw, 42px);
    }

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

    .fn-col--offset-down {
        padding-top: 3rem;
    }

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

    .bp-layout {
        grid-template-columns: 1fr 260px;
        gap: 2rem;
    }

    /* Home: featured collapses, latest goes 2-col */
    .home-featured {
        grid-template-columns: 1fr;
    }

    .home-featured-main {
        aspect-ratio: 5 / 3;
    }

    /* Side stack becomes a row of equally-sized cards. auto-fit + minmax
       avoids the awkward 2+1 wrap that flex-wrap + min-width caused. */
    .home-featured-side {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
    }

    .home-featured-mini {
        flex: none;
        min-width: 0;
    }

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

/* ── 900px: tablet portrait (iPad) — collapse single post to one column ── */
@media (max-width: 900px) {
    .bp-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bp-sidebar {
        position: static;
    }

    .bp-hero-image,
    .bp-hero-image figure,
    .wp-block-post-featured-image.bp-hero-image {
        height: 320px;
    }
}

/* ── 768px: tablet portrait / large mobile ── */
@media (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    h2 {
        font-size: 26px;
        line-height: 1.25;
    }

    h3 {
        font-size: 22px;
        line-height: 1.3;
    }

    /* Sections */
    .section {
        padding-block: 3rem 0;
    }

    /* Page hero */
    .page-hero {
        padding-top: 90px;
        padding-bottom: 28px;
    }

    /* Archive grid */
    .archive-grid {
        grid-template-columns: 1fr;
    }

    /* Search results */
    .search-form {
        flex-direction: column;
    }

    .page-hero h1 {
        font-size: clamp(26px, 6vw, 38px);
    }

    .hero-subtitle-center {
        font-size: 16px;
    }

    /* Navbar */
    .navbar {
        padding: 10px 16px 0;
    }

    .nav-container {
        gap: 6px;
    }

    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .lang-switch {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Field Notes listing toolbar */
    .fn-filter-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .fn-filter {
        font-size: 13px;
        padding: 0.4rem 1rem;
    }

    .fn-tabs {
        flex-wrap: nowrap;
        gap: 1.25rem;
        padding-bottom: 0.25rem;
    }

    .fn-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .fn-search {
        max-width: none;
    }

    .fn-controls-right {
        margin-left: 0;
        justify-content: space-between;
    }

    .fn-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .fn-col::before {
        display: none;
    }

    .fn-col--offset-down {
        padding-top: 0;
    }

    .fn-card {
        max-width: 100%;
    }

    /* Home: collapse to single column */
    .home-featured-main-overlay {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .home-featured-side {
        grid-template-columns: 1fr;
    }

    .home-latest-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .home-latest-card .fn-card-img,
    .home-latest-card .fn-card-desc {
        max-width: 100%;
    }

    .home-section-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .bp-hero-image,
    .bp-hero-image figure,
    .wp-block-post-featured-image.bp-hero-image {
        height: 260px;
    }

    .bp-image-grid {
        grid-template-columns: 1fr;
    }

    .bp-image-grid img {
        height: 220px;
    }

    .bp-body p,
    .bp-body ul,
    .bp-body ol {
        font-size: 16px;
    }

    /* Footer */
    .footer {
        padding: 16px;
    }

    .footer-inner {
        padding: 40px 24px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 20px 24px;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-hover-text {
        height: 140px;
        margin-top: -110px;
        margin-bottom: -16px;
    }

    .footer-hover-text .text-stroke,
    .footer-hover-text .text-gradient,
    .footer-hover-text .text-outline {
        font-size: 56px;
        stroke-width: 0.08;
    }
}

/* ── 480px: small mobile ── */
@media (max-width: 480px) {
    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 22px;
    }

    .page-hero {
        padding-top: 100px;
        padding-bottom: 40px;
    }

    .page-hero h1 {
        font-size: clamp(22px, 7vw, 32px);
    }

    .fn-filter {
        font-size: 12px;
        padding: 0.35rem 0.85rem;
    }

    .fn-card-title {
        font-size: 16px;
    }

    .bp-hero-image,
    .bp-hero-image figure,
    .wp-block-post-featured-image.bp-hero-image {
        height: 200px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-hover-text {
        display: none;
    }
}
