/* ═══════════════════════════════════════════════
   Four Flags — Global Styles (all pages)
   Loaded site-wide for brand consistency
   ═══════════════════════════════════════════════ */

:root {
    --ff-red: #D13830;
    --ff-red-dark: #b82e27;
    --ff-black: #0a0a0a;
    --ff-dark: #111111;
    --ff-gray: #f7f7f8;
    --ff-gray-mid: #6b7280;
    --ff-white: #ffffff;
    --ff-shadow: 0 10px 40px rgba(0,0,0,0.06);
    --ff-shadow-hover: 0 20px 60px rgba(0,0,0,0.12);
    --ff-radius: 16px;
    --ff-radius-sm: 10px;
    --ff-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Text Selection ── */
::selection {
    background: var(--ff-red);
    color: var(--ff-white);
}
::-moz-selection {
    background: var(--ff-red);
    color: var(--ff-white);
}

/* ── Disable heavy smooth scroll override ── */
html {
    scroll-behavior: auto !important;
}

/* ═══ GLOBAL SPACING NORMALIZATION ═══ */
/* Remove .site-content default 66px padding — VC rows handle their own */
body:not(.home) .site-content {
    padding: 0 !important;
}

/* Compact page title bar */
#pagetitle {
    padding: 60px 0 20px !important;
}

/* ── Section Spacing (standard: 60px top/bottom) ── */
.ff-section {
    padding: 60px 0;
}
.ff-section-sm {
    padding: 40px 0;
}

/* ── WPBakery row backgrounds (VC ignores custom class names) ── */
.vc_custom_a2, .vc_custom_a6, .vc_custom_s2 {
    background-color: var(--ff-gray) !important;
}
.vc_custom_a4 {
    background-color: var(--ff-black) !important;
}
.vc_custom_c1 {
    background-color: var(--ff-black) !important;
}
.vc_custom_c3 {
    background-color: var(--ff-gray) !important;
}
/* Standardized section spacing: 60px top/bottom for all pages */
.vc_custom_a1, .vc_custom_a2, .vc_custom_a3, .vc_custom_a4, .vc_custom_a5, .vc_custom_a6, .vc_custom_a7,
.vc_custom_s1, .vc_custom_s2,
.vc_custom_p1,
.vc_custom_c1, .vc_custom_c2, .vc_custom_c3 {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}

/* Universal VC row spacing override — works on any DB content */
body:not(.home) .site-content .vc_row[data-vc-full-width="true"],
body:not(.home) .site-content .content-row .vc_row {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}
/* Hero rows with background images keep more breathing room */
body:not(.home) .site-content .vc_row.vc_row-has-fill[data-vc-full-width="true"] {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
}

/* ── Subtle reveal animation ── */
.ff-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.ff-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   ABOUT US PAGE
   ═══════════════════════════════════════════════ */

/* ── Story Section with Image ── */
.ff-story-section {
    display: flex;
    gap: 60px;
    align-items: center;
}
.ff-story-text {
    flex: 1;
}
.ff-story-text h2 {
    font-size: 40px;
    font-weight: 800;
    color: var(--ff-black);
    margin: 0 0 8px;
    line-height: 1.15;
}
.ff-story-text .ff-subtitle {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ff-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}
.ff-story-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 16px;
}
.ff-story-text blockquote {
    border-left: 3px solid var(--ff-red);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--ff-black);
    font-weight: 600;
}
.ff-story-image {
    flex: 0 0 420px;
    position: relative;
}
.ff-story-image img {
    width: 100%;
    border-radius: var(--ff-radius);
    box-shadow: var(--ff-shadow-hover);
}
.ff-story-image::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--ff-red);
    border-radius: var(--ff-radius);
    z-index: -1;
    opacity: 0.3;
}
.ff-story-stats {
    display: flex;
    gap: 32px;
    margin-top: 36px;
}
.ff-story-stat {
    text-align: center;
    padding: 20px 28px;
    background: var(--ff-gray);
    border-radius: var(--ff-radius-sm);
}
.ff-story-stat .ff-stat-num {
    font-size: 36px;
    font-weight: 800;
    color: var(--ff-red);
    line-height: 1;
}
.ff-story-stat .ff-stat-label {
    font-size: 13px;
    color: var(--ff-gray-mid);
    margin-top: 4px;
}

/* ── Vision / Mission Cards ── */
.ff-vm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.ff-vm-card {
    background: var(--ff-white);
    border-radius: var(--ff-radius);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--ff-shadow);
    transition: var(--ff-transition);
    border: 1px solid #eee;
}
.ff-vm-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ff-shadow-hover);
    border-color: var(--ff-red);
}
.ff-vm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--ff-red);
}
.ff-vm-card .ff-vm-icon {
    width: 64px;
    height: 64px;
    background: rgba(209,56,48,0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 28px;
    color: var(--ff-red);
}
.ff-vm-card h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 16px;
}
.ff-vm-card p {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
    margin: 0;
}

/* ── Goal Cards ── */
.ff-goals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.ff-goal-card {
    background: var(--ff-white);
    border-radius: var(--ff-radius);
    padding: 36px 32px;
    box-shadow: var(--ff-shadow);
    transition: var(--ff-transition);
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}
.ff-goal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ff-shadow-hover);
    border-color: rgba(209,56,48,0.2);
}
.ff-goal-card .ff-goal-num {
    font-size: 52px;
    font-weight: 900;
    color: rgba(209,56,48,0.08);
    line-height: 1;
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}
.ff-goal-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 12px;
}
.ff-goal-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ff-gray-mid);
    margin: 0;
}

/* ── Value Cards (dark bg) ── */
.ff-values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.ff-value-card {
    text-align: center;
    padding: 44px 28px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--ff-radius);
    transition: var(--ff-transition);
    backdrop-filter: blur(10px);
}
.ff-value-card:hover {
    background: rgba(209,56,48,0.1);
    border-color: rgba(209,56,48,0.3);
    transform: translateY(-5px);
}
.ff-value-card .ff-value-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: rgba(209,56,48,0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--ff-red);
}
.ff-value-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}
.ff-value-card p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

/* ── Org Chart (improved) ── */
.ff-org-chart {
    text-align: center;
    padding: 20px 0;
}
.ff-org-chart .ff-org-level {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 0;
    position: relative;
}
.ff-org-chart .ff-org-level::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, var(--ff-red), #ddd);
}
.ff-org-chart .ff-org-level:first-child::before {
    display: none;
}
.ff-org-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--ff-radius-sm);
    padding: 28px 32px;
    min-width: 230px;
    transition: var(--ff-transition);
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.ff-org-card:hover {
    border-color: var(--ff-red);
    box-shadow: var(--ff-shadow-hover);
    transform: translateY(-4px);
}
.ff-org-card.ff-org-ceo {
    background: var(--ff-black);
    color: #fff;
    border-color: var(--ff-black);
    padding: 32px 40px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.ff-org-card.ff-org-ceo h4 { color: #fff; font-size: 18px; }
.ff-org-card.ff-org-ceo p { color: rgba(255,255,255,0.5); }
.ff-org-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 4px;
}
.ff-org-card p {
    font-size: 13px;
    color: var(--ff-gray-mid);
    margin: 0;
}
.ff-org-connector {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}
.ff-org-connector .ff-line {
    width: 2px;
    height: 36px;
    background: linear-gradient(to bottom, #ddd, var(--ff-red));
    border-radius: 2px;
}
.ff-org-branches {
    display: flex;
    justify-content: center;
    gap: 30px;
    position: relative;
    padding-top: 24px;
}
.ff-org-branches::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--ff-red), var(--ff-red), transparent);
}
.ff-org-branches .ff-org-card { position: relative; }
.ff-org-branches .ff-org-card::before {
    content: '';
    position: absolute;
    top: -24px;
    left: 50%;
    width: 2px;
    height: 24px;
    background: var(--ff-red);
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════
   MARQUEE SLIDER (Partners / Customers)
   ═══════════════════════════════════════════════ */
.ff-marquee-wrapper {
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    cursor: grab;
}
.ff-marquee-wrapper.ff-dragging {
    cursor: grabbing;
}
.ff-marquee-wrapper.ff-dragging .ff-marquee-item {
    pointer-events: none;
}
.ff-marquee-track {
    display: flex;
    gap: 32px;
    width: max-content;
    animation: ff-marquee 30s linear infinite;
    will-change: transform;
}
.ff-marquee-wrapper:hover .ff-marquee-track {
    animation-play-state: paused;
}
.ff-marquee-wrapper.ff-dragging .ff-marquee-track {
    animation: none !important;
}
.ff-marquee-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 32px;
    background: var(--ff-white);
    border: 1px solid #eee;
    border-radius: var(--ff-radius);
    transition: border-color .3s, box-shadow .3s;
    min-width: 280px;
    text-decoration: none !important;
    user-select: none;
    -webkit-user-select: none;
}
.ff-marquee-item:hover {
    border-color: var(--ff-red);
    box-shadow: var(--ff-shadow);
}
.ff-marquee-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--ff-radius-sm);
    background: #fff;
    padding: 6px;
    pointer-events: none;
}
.ff-marquee-item .ff-mq-info h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 2px;
    line-height: 1.3;
}
.ff-marquee-item .ff-mq-info p {
    font-size: 12px;
    color: var(--ff-gray-mid);
    margin: 0;
}
@keyframes ff-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
/* Reverse direction for customers */
.ff-marquee-reverse .ff-marquee-track {
    animation-direction: reverse;
}

/* Ensure marquee images aren't constrained by theme defaults */
.ff-marquee-item img {
    max-width: none !important;
}

/* ═══════════════════════════════════════════════
   SERVICES PAGE
   ═══════════════════════════════════════════════ */
.ff-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.ff-svc-card {
    border-radius: var(--ff-radius);
    overflow: hidden;
    background: var(--ff-white);
    box-shadow: var(--ff-shadow);
    transition: var(--ff-transition);
    border: 1px solid #eee;
}
.ff-svc-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ff-shadow-hover);
}
.ff-svc-card .ff-svc-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}
.ff-svc-card .ff-svc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.ff-svc-card:hover .ff-svc-img img {
    transform: scale(1.08);
}
.ff-svc-card .ff-svc-img .ff-svc-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--ff-red);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 1;
}
.ff-svc-card .ff-svc-body {
    padding: 28px 24px;
}
.ff-svc-card .ff-svc-body h4 {
    font-size: 19px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 12px;
    line-height: 1.3;
}
.ff-svc-card .ff-svc-body p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--ff-gray-mid);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Quality / Safety Policy Cards ── */
.ff-policy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.ff-policy-card {
    border-radius: var(--ff-radius);
    overflow: hidden;
    background: var(--ff-white);
    box-shadow: var(--ff-shadow);
    transition: var(--ff-transition);
    border: 1px solid #eee;
}
.ff-policy-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ff-shadow-hover);
}
.ff-policy-card .ff-policy-img {
    height: 240px;
    overflow: hidden;
}
.ff-policy-card .ff-policy-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.ff-policy-card:hover .ff-policy-img img {
    transform: scale(1.05);
}
.ff-policy-card .ff-policy-body {
    padding: 36px 32px;
}
.ff-policy-card .ff-policy-body h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.ff-policy-card .ff-policy-body h3 i {
    color: var(--ff-red);
    font-size: 20px;
}
.ff-policy-card .ff-policy-body p {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    margin: 0;
}

/* ═══════════════════════════════════════════════
   PROJECTS PAGE
   ═══════════════════════════════════════════════ */
.ff-project-card {
    border-radius: var(--ff-radius);
    overflow: hidden;
    background: var(--ff-white);
    box-shadow: var(--ff-shadow-hover);
    margin-bottom: 40px;
}
.ff-project-hero {
    position: relative;
    height: 380px;
    overflow: hidden;
}
.ff-project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.ff-project-card:hover .ff-project-hero img {
    transform: scale(1.03);
}
.ff-project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 36px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: #fff;
}
.ff-project-overlay .ff-project-tag {
    display: inline-block;
    background: var(--ff-red);
    color: #fff;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}
.ff-project-overlay h2 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #fff;
    line-height: 1.2;
}
.ff-project-overlay p {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin: 0;
    max-width: 600px;
}

/* ── Project Card Link Wrapper ── */
.ff-project-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
}
.ff-project-link:hover,
.ff-project-link:focus {
    text-decoration: none !important;
    color: inherit;
}

/* ── View Details Button (hover reveal) ── */
.ff-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 28px;
    border: 2px solid #fff;
    border-radius: 30px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: transparent;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}
.ff-project-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}
.ff-project-card:hover .ff-project-btn {
    opacity: 1;
    transform: translateY(0);
}
.ff-project-card:hover .ff-project-btn:hover {
    background: #fff;
    color: var(--ff-red);
    border-color: #fff;
}
.ff-project-card:hover .ff-project-btn:hover i {
    transform: translateX(4px);
}
/* Darken overlay more on hover for better button contrast */
.ff-project-card:hover .ff-project-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 65%, rgba(0,0,0,0.1) 100%);
}
/* ═══════════════════════════════════════════════
   SINGLE PROJECT DETAIL PAGE (page-project-detail.php)
   ═══════════════════════════════════════════════ */

/* ── Hero ── */
.ffpd-hero {
    position: relative;
    height: 420px;
    overflow: hidden;
}
.ffpd-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ffpd-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.15) 100%);
}
.ffpd-hero .container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
}
.ffpd-hero__content {
    padding: 0 0 48px;
}
.ffpd-hero__tag {
    display: inline-block;
    background: var(--ff-red);
    color: #fff;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}
.ffpd-hero__title {
    font-size: 44px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.15;
}
.ffpd-hero__subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

/* ── Content + Sidebar Layout ── */
.ffpd-content {
    padding: 56px 0;
    border-bottom: 1px solid #eee;
}
.ffpd-layout {
    display: flex;
    gap: 56px;
    align-items: flex-start;
}
.ffpd-main {
    flex: 1 1 58%;
}
.ffpd-main__heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 24px;
    line-height: 1.3;
    position: relative;
    padding-bottom: 20px;
}
.ffpd-main__heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--ff-red);
    border-radius: 3px;
}
.ffpd-main__text p {
    font-size: 15px;
    line-height: 1.85;
    color: #555;
    margin-bottom: 16px;
}
.ffpd-main__text p:last-child {
    margin-bottom: 0;
}
.ffpd-main__text strong {
    color: var(--ff-black);
}

/* ── Sidebar ── */
.ffpd-sidebar {
    flex: 0 0 320px;
}
.ffpd-info {
    margin-bottom: 28px;
}
.ffpd-info__item {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}
.ffpd-info__item:first-child {
    padding-top: 0;
}
.ffpd-info__item:last-child {
    border-bottom: none;
}
.ffpd-info__label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ff-gray-mid);
    margin-bottom: 4px;
    font-weight: 600;
}
.ffpd-info__value {
    font-size: 15px;
    color: var(--ff-black);
    font-weight: 600;
}

/* ── Highlights ── */
.ffpd-highlights {
    background: var(--ff-gray);
    border-radius: var(--ff-radius-sm);
    padding: 24px;
}
.ffpd-highlights__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ff-black);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 16px;
}
.ffpd-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ffpd-highlights ul li {
    position: relative;
    padding: 6px 0 6px 22px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}
.ffpd-highlights ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 8px;
    height: 8px;
    background: var(--ff-red);
    border-radius: 50%;
}

/* ── Gallery ── */
.ffpd-gallery {
    padding: 48px 0;
    background: var(--ff-white);
}
.ffpd-gallery__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ff-black);
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #eee;
}
.ffpd-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.ffpd-gallery__item {
    border-radius: var(--ff-radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
    display: block;
    cursor: pointer;
}
.ffpd-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.ffpd-gallery__item:hover img {
    transform: scale(1.06);
}
.ffpd-gallery__zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ffpd-gallery__zoom i {
    color: #fff;
    font-size: 24px;
}
.ffpd-gallery__item:hover .ffpd-gallery__zoom {
    opacity: 1;
}

/* ── Back Link ── */
.ffpd-back {
    padding: 40px 0 60px;
}
.ffpd-back a:hover {
    background: var(--ff-red) !important;
    color: #fff !important;
    border-color: var(--ff-red) !important;
}

/* ── Hide page title bar on project pages ── */
.page-template-page-project-detail #pagetitle,
.page-template-page-projects #pagetitle {
    display: none !important;
}
.page-template-page-project-detail .site-content,
.page-template-page-projects .site-content {
    padding-top: 0 !important;
}

/* ── Projects Listing Page Grid ── */
.ff-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
.ff-projects-grid .ff-project-card {
    margin-bottom: 0;
}
.ff-projects-grid .ff-project-hero {
    height: 320px;
}
.ff-projects-grid .ff-project-overlay h2 {
    font-size: 28px;
}

@media (max-width: 991px) {
    .ff-projects-grid { grid-template-columns: 1fr; }
    .ff-projects-grid .ff-project-hero { height: 300px; }
    .ffpd-hero { height: 340px; }
    .ffpd-hero__title { font-size: 34px; }
    .ffpd-layout { flex-direction: column; gap: 40px; }
    .ffpd-sidebar { flex: 0 0 auto; }
    .ffpd-gallery__grid { grid-template-columns: repeat(3, 1fr); }
    .ff-story-section { flex-direction: column; gap: 36px; }
    .ff-story-image { flex: 0 0 auto; width: 100%; }
    .ff-svc-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .ff-section-header h2 { font-size: 32px; }
}
@media (max-width: 767px) {
    .ff-svc-grid { grid-template-columns: 1fr; gap: 20px; }
    .ff-svc-card .ff-svc-img { height: 180px; }
    .ff-section-header h2 { font-size: 28px; }
    .ff-section-header p { font-size: 15px; }
    .ff-story-text h2 { font-size: 28px !important; }
    .ff-story-image::after { display: none; }
    .ff-project-hero { height: 240px !important; }
    .ff-marquee-item { min-width: 180px; padding: 16px 18px; }
    .ff-contact-cards { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
    .ff-gallery-item { flex: 0 0 85%; min-width: 0; }
    .ff-svc-card .ff-svc-body { padding: 20px 18px; }
    .ff-svc-card .ff-svc-body h4 { font-size: 17px; }
    .ff-project-hero { height: 200px !important; }
}

/* ── Section headings ── */
.ff-section-header {
    text-align: center;
    margin-bottom: 40px;
}
.ff-section-header .ff-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ff-red);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 12px;
}
.ff-section-header h2 {
    font-size: 40px;
    font-weight: 800;
    color: var(--ff-black);
    margin: 0 0 16px;
    line-height: 1.15;
}
.ff-section-header.ff-light h2 { color: #fff; }
.ff-section-header p {
    font-size: 17px;
    color: var(--ff-gray-mid);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}
.ff-section-header.ff-light p { color: rgba(255,255,255,0.6); }

/* ── CTA / Divider Line ── */
.ff-divider {
    width: 48px;
    height: 3px;
    background: var(--ff-red);
    margin: 0 auto 24px;
    border-radius: 3px;
}

/* ═══════════════════════════════════════════════
   CONTACT PAGE — CF7 Form Styling
   ═══════════════════════════════════════════════ */
.vc_custom_c1 {
    background-color: var(--ff-white) !important;
}
.vc_custom_c2 {
    background-color: var(--ff-gray) !important;
}

/* ── Contact Info Cards ── */
.ff-contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
}
.ff-ct-card {
    text-align: center;
    padding: 44px 28px;
    background: var(--ff-white);
    border: 1px solid #eee;
    border-radius: var(--ff-radius);
    transition: var(--ff-transition);
    box-shadow: var(--ff-shadow);
}
.ff-ct-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ff-shadow-hover);
    border-color: var(--ff-red);
}
.ff-ct-icon {
    width: 68px;
    height: 68px;
    background: rgba(209,56,48,0.08);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--ff-transition);
}
.ff-ct-card:hover .ff-ct-icon {
    background: var(--ff-red);
}
.ff-ct-icon i {
    font-size: 26px;
    color: var(--ff-red);
    transition: var(--ff-transition);
}
.ff-ct-card:hover .ff-ct-icon i {
    color: #fff;
}
.ff-ct-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 12px;
}
.ff-ct-card p {
    font-size: 15px;
    color: var(--ff-gray-mid);
    margin: 0;
    line-height: 1.7;
}
.ff-ct-card a {
    color: var(--ff-gray-mid);
    text-decoration: none;
    transition: color 0.3s;
}
.ff-ct-card a:hover {
    color: var(--ff-red);
}

@media (max-width: 767px) {
    .ff-contact-cards { grid-template-columns: 1fr; }
}

.wpcf7 .input-filled {
    margin-bottom: 16px;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #e0e0e0;
    border-radius: var(--ff-radius-sm);
    background: var(--ff-white);
    color: var(--ff-black);
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 textarea:focus {
    border-color: var(--ff-red);
    box-shadow: 0 0 0 3px rgba(209,56,48,0.08);
}
.wpcf7 textarea {
    min-height: 140px;
    resize: vertical;
}
.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit,
.wpcf7 button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: var(--ff-red) !important;
    color: var(--ff-white) !important;
    border: 2px solid var(--ff-red) !important;
    border-radius: var(--ff-radius-sm) !important;
    cursor: pointer;
    transition: var(--ff-transition);
    width: auto;
    min-height: auto;
    line-height: 1.4;
}
.wpcf7 input[type="submit"]:hover,
.wpcf7 .wpcf7-submit:hover,
.wpcf7 button[type="submit"]:hover {
    background: var(--ff-red-dark) !important;
    border-color: var(--ff-red-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(209,56,48,0.3);
}
/* Hide theme's default arrow icon on submit */
.wpcf7 .btn-arrow-icon,
.wpcf7 .slider-arrow-white {
    display: none !important;
}
.wpcf7-response-output {
    border-radius: var(--ff-radius-sm) !important;
    margin-top: 16px !important;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 991px) {
    .ff-story-section { flex-direction: column; gap: 40px; }
    .ff-story-image { flex: 0 0 auto; max-width: 100%; }
    .ff-vm-grid { grid-template-columns: 1fr; }
    .ff-goals-grid { grid-template-columns: repeat(2, 1fr); }
    .ff-values-grid { grid-template-columns: repeat(2, 1fr); }
    .ff-svc-grid { grid-template-columns: repeat(2, 1fr); }
    .ff-policy-grid { grid-template-columns: 1fr; }
    .ff-project-body { flex-direction: column; gap: 24px; padding: 24px; }
    .ff-project-hero { height: 280px; }
    .ff-project-overlay h2 { font-size: 28px; }
    .ff-section-header h2 { font-size: 32px; }
    .ff-org-branches { flex-direction: column; align-items: center; gap: 16px; }
    .ff-org-branches::before { display: none; }
    .ff-org-branches .ff-org-card::before { display: none; }
}
@media (max-width: 767px) {
    .ff-section { padding: 40px 0; }
    .ff-goals-grid { grid-template-columns: 1fr; }
    .ff-values-grid { grid-template-columns: 1fr; }
    .ff-svc-grid { grid-template-columns: 1fr; }
    .ff-story-stats { flex-direction: column; gap: 16px; }
    .ff-project-hero { height: 220px; }
    .ff-project-body { padding: 20px; }
    .ff-project-overlay { padding: 20px; }
    .ff-project-overlay h2 { font-size: 22px; }
    .ff-project-btn { opacity: 1; transform: translateY(0); padding: 10px 22px; font-size: 12px; }
    .ff-projects-grid .ff-project-hero { height: 240px; }
    .ffpd-hero { height: 280px; }
    .ffpd-hero__title { font-size: 28px; }
    .ffpd-hero__content { padding: 0 0 32px; }
    .ffpd-content { padding: 40px 0; }
    .ffpd-gallery__grid { grid-template-columns: repeat(2, 1fr); }
    .ffpd-back { padding: 32px 0 48px; }
    .ff-vm-card { padding: 32px 24px; }
    .ff-story-text h2 { font-size: 28px; }
    .ffsd-layout { grid-template-columns: 1fr; }
    .ffsd-hero { height: 280px; }
    .ffsd-hero__title { font-size: 28px; }
    .ffsd-features__grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   Service Card Link
   ═══════════════════════════════════════════════ */
.ff-svc-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.ff-svc-link:hover { color: inherit; }

/* ═══════════════════════════════════════════════
   Video Gallery Items & Lightbox (Project Detail)
   ═══════════════════════════════════════════════ */
.ffpd-gallery__video {
    position: relative;
    cursor: pointer;
    border-radius: var(--ff-radius-sm);
    overflow: hidden;
}
.ffpd-gallery__video img,
.ffpd-gallery__video video,
.ffpd-video-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ffpd-video-thumb {
    pointer-events: none;
}
.ffpd-video-placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ffpd-video-placeholder i {
    font-size: 48px;
    color: rgba(255,255,255,.2);
}
.ffpd-gallery__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    transition: background .3s;
}
.ffpd-gallery__video:hover .ffpd-gallery__play {
    background: rgba(209,56,48,0.6);
}
.ffpd-gallery__play i {
    font-size: 40px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* Media tabs */
.ffpd-media-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.ffpd-media-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ff-gray-mid);
    transition: color .3s, border-color .3s;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.ffpd-media-tab:hover {
    color: var(--ff-red);
}
.ffpd-media-tab--active {
    color: var(--ff-red);
    border-bottom-color: var(--ff-red);
}
.ffpd-media-tab i { margin-right: 5px; }

/* Video modal — hidden by default, fully off-screen */
.ffpd-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity .3s, visibility .3s;
    pointer-events: none;
}
.ffpd-video-modal--open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}
.ffpd-video-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
}
.ffpd-video-modal__content {
    position: relative;
    width: 90%;
    max-width: 900px;
    z-index: 1;
}
.ffpd-video-modal__close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .2s;
}
.ffpd-video-modal__close:hover {
    background: rgba(255,255,255,.15);
}
.ffpd-video-modal__frame {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}
.ffpd-video-modal__frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ═══════════════════════════════════════════════
   Service Detail Page
   ═══════════════════════════════════════════════ */

/* Hero */
.ffsd-hero {
    position: relative;
    height: 380px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.ffsd-hero__bg {
    position: absolute;
    inset: 0;
}
.ffsd-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ffsd-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%);
}
.ffsd-hero__content {
    position: relative;
    z-index: 2;
    padding: 0 0 48px;
    max-width: 700px;
}
.ffsd-hero__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ff-red);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.ffsd-hero__icon i {
    font-size: 24px;
    color: #fff;
}
.ffsd-hero__title {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.15;
}
.ffsd-hero__sub {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin: 0;
    line-height: 1.6;
}

/* Layout */
.ffsd-content {
    padding: 64px 0;
}
.ffsd-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

/* Main */
.ffsd-main__text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}
.ffsd-main__text p { margin: 0 0 16px; }

/* Features */
.ffsd-features {
    margin-top: 40px;
}
.ffsd-features__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 20px;
}
.ffsd-features__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.ffsd-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--ff-gray);
    border-radius: var(--ff-radius-sm);
    transition: var(--ff-transition);
}
.ffsd-feature:hover {
    background: #fff;
    box-shadow: var(--ff-shadow);
}
.ffsd-feature__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ff-red);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ffsd-feature__icon i {
    font-size: 12px;
    color: #fff;
}
.ffsd-feature__text {
    font-size: 14px;
    font-weight: 600;
    color: var(--ff-black);
    line-height: 1.5;
}

/* Sidebar */
.ffsd-sidebar {
    position: sticky;
    top: 100px;
}
.ffsd-sidebar__box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--ff-radius-sm);
    padding: 24px;
    margin-bottom: 20px;
}
.ffsd-sidebar__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ff-black);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ff-red);
}
.ffsd-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ffsd-sidebar__list li {
    margin-bottom: 4px;
}
.ffsd-sidebar__list li a,
.ffsd-sidebar__list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    transition: var(--ff-transition);
}
.ffsd-sidebar__list li a:hover {
    background: var(--ff-gray);
    color: var(--ff-red);
}
.ffsd-sidebar__list li a i,
.ffsd-sidebar__list li i {
    font-size: 14px;
    width: 20px;
    text-align: center;
    color: var(--ff-gray-mid);
}
.ffsd-sidebar__active {
    background: var(--ff-red) !important;
    color: #fff !important;
    font-weight: 700 !important;
    border-radius: 6px;
}
.ffsd-sidebar__active i {
    color: #fff !important;
}
.ffsd-sidebar__cta {
    background: var(--ff-black);
    color: #fff;
    border-radius: var(--ff-radius-sm);
    padding: 28px 24px;
    text-align: center;
}
.ffsd-sidebar__cta h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
}
.ffsd-sidebar__cta p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Back link */
.ffsd-back {
    padding: 40px 0 64px;
}
