/* ═══════════════════════════════════════════════
   Four Flags Services — Custom Styles
   Brand: Black #0a0a0a · Red #D13830 · White #fff
   ═══════════════════════════════════════════════ */

: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-radius: 8px;
    --ff-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    --ff-shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.12);
    --ff-transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset for front page ── */
.home .page-title-wrap,
.home .content-container,
.page-template-front-page .page-title-wrap,
.page-template-page-service-detail #pagetitle {
    display: none !important;
}

.home .site-content .content-inner {
    padding: 0;
    margin: 0;
}

.home .site-content {
    padding: 0;
}

/* NOTE: Global spacing rules moved to fourflags-global.css */

/* ── Slider Wrapper ── */
.ff-slider-wrap {
    position: relative;
    z-index: 1;
}

/* ── CSS Hero Fallback ── */
.ff-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ff-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ff-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: ffHeroZoom 20s ease-in-out infinite alternate;
}

@keyframes ffHeroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.ff-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,10,10,0.5) 0%, rgba(10,10,10,0.3) 100%);
    z-index: 1;
}

.ff-hero__content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    animation: ffFadeUp 1s ease-out;
}

@keyframes ffFadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.ff-hero__badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ff-red);
    border: 1px solid rgba(209, 56, 48, 0.4);
    padding: 8px 20px;
    border-radius: 30px;
    margin-bottom: 28px;
    animation: ffFadeUp 1s ease-out 0.2s both;
}

.ff-hero__title {
    font-size: 56px;
    font-weight: 700;
    color: var(--ff-white);
    line-height: 1.15;
    margin-bottom: 20px;
    animation: ffFadeUp 1s ease-out 0.4s both;
}

.ff-hero__title span {
    color: var(--ff-red);
}

.ff-hero__slogan {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    margin-bottom: 36px;
    font-style: italic;
    animation: ffFadeUp 1s ease-out 0.6s both;
}

.ff-hero__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: ffFadeUp 1s ease-out 0.8s both;
}

.ff-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--ff-transition);
    cursor: pointer;
}

.ff-btn--primary {
    background: var(--ff-red);
    color: var(--ff-white);
    border: 2px solid var(--ff-red);
}

.ff-btn--primary:hover {
    background: var(--ff-red-dark);
    border-color: var(--ff-red-dark);
    color: var(--ff-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(209, 56, 48, 0.3);
}

.ff-btn--outline {
    background: transparent;
    color: var(--ff-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.ff-btn--outline:hover {
    border-color: var(--ff-white);
    color: var(--ff-white);
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .ff-hero__title {
        font-size: 40px;
    }
    .ff-hero__content {
        max-width: 560px;
    }
}

@media (max-width: 767px) {
    .ff-hero {
        min-height: 90vh;
        align-items: flex-end;
        padding-bottom: 60px;
    }
    .ff-hero__content {
        max-width: 100%;
    }
    .ff-hero__badge {
        font-size: 10px;
        letter-spacing: 2px;
        padding: 6px 14px;
        margin-bottom: 20px;
    }
    .ff-hero__title {
        font-size: 32px;
        margin-bottom: 14px;
    }
    .ff-hero__slogan {
        font-size: 15px;
        margin-bottom: 28px;
    }
    .ff-hero__buttons {
        flex-direction: column;
        gap: 12px;
    }
    .ff-hero__buttons .ff-btn {
        text-align: center;
        padding: 14px 28px;
        font-size: 13px;
        width: 100%;
        max-width: 260px;
    }
}

@media (max-width: 480px) {
    .ff-hero__title {
        font-size: 26px;
    }
    .ff-hero__slogan {
        font-size: 14px;
    }
    .ff-hero__badge {
        font-size: 9px;
        padding: 5px 12px;
    }
}

/* ── Section Base ── */
.ff-section {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.ff-section--dark {
    background: var(--ff-black);
    color: var(--ff-white);
}

.ff-section--light {
    background: var(--ff-gray);
}

/* ── Labels & Titles ── */
.ff-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ff-red);
    margin-bottom: 12px;
    position: relative;
    padding-left: 48px;
}

.ff-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 36px;
    height: 2px;
    background: var(--ff-red);
    transform: translateY(-50%);
}

.text-center .ff-label {
    padding-left: 0;
    padding-top: 0;
}

.text-center .ff-label::before {
    display: none;
}

.ff-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--ff-black);
    line-height: 1.2;
    margin-bottom: 20px;
}

.ff-section--dark .ff-title {
    color: var(--ff-white);
}

.ff-title span {
    color: var(--ff-red);
}

.ff-subtitle {
    font-size: 17px;
    color: var(--ff-gray-mid);
    margin-bottom: 50px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.ff-section--dark .ff-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.ff-lead {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 16px;
}

/* ── Stats Row ── */
.ff-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.ff-stat {
    text-align: center;
}

.ff-stat strong {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--ff-red);
    line-height: 1;
}

.ff-stat span {
    font-size: 13px;
    color: var(--ff-gray-mid);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
    display: block;
}

/* ── Image Block ── */
.ff-image-block {
    position: relative;
    border-radius: var(--ff-radius);
    overflow: hidden;
}

.ff-image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--ff-radius);
    transition: transform 0.6s ease;
}

.ff-image-block:hover img {
    transform: scale(1.03);
}

.ff-image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: var(--ff-red);
    opacity: 0.1;
    border-radius: var(--ff-radius);
    z-index: -1;
}

/* ── Cards (Vision/Mission, Quality) ── */
.ff-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--ff-radius);
    padding: 40px 36px;
    height: 100%;
    transition: var(--ff-transition);
}

.ff-card:hover {
    border-color: var(--ff-red);
    transform: translateY(-4px);
}

.ff-card--bordered {
    background: var(--ff-white);
    border: 1px solid #e5e7eb;
}

.ff-card--bordered:hover {
    border-color: var(--ff-red);
    box-shadow: var(--ff-shadow-hover);
}

.ff-card__icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(209, 56, 48, 0.08);
    border-radius: 50%;
    margin-bottom: 24px;
    transition: var(--ff-transition);
}

.ff-card:hover .ff-card__icon {
    background: var(--ff-red);
}

.ff-card__icon svg {
    color: var(--ff-red);
    transition: var(--ff-transition);
}

.ff-card:hover .ff-card__icon svg {
    color: var(--ff-white);
}

.ff-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--ff-white);
}

.ff-card--bordered h3 {
    color: var(--ff-black);
}

.ff-card p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.ff-card--bordered p {
    color: var(--ff-gray-mid);
}

/* ── Services ── */
.ff-services-grid {
    margin-top: 20px;
}

.ff-service {
    position: relative;
    background: var(--ff-white);
    border: 1px solid #eee;
    border-radius: var(--ff-radius);
    padding: 36px 30px;
    margin-bottom: 30px;
    transition: var(--ff-transition);
    overflow: hidden;
}

.ff-service:hover {
    border-color: var(--ff-red);
    box-shadow: var(--ff-shadow-hover);
    transform: translateY(-6px);
}

.ff-service__num {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 48px;
    font-weight: 800;
    color: rgba(209, 56, 48, 0.06);
    line-height: 1;
    pointer-events: none;
    transition: var(--ff-transition);
}

.ff-service:hover .ff-service__num {
    color: rgba(209, 56, 48, 0.12);
}

.ff-service__icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(209, 56, 48, 0.06);
    border-radius: 12px;
    margin-bottom: 20px;
    transition: var(--ff-transition);
}

.ff-service:hover .ff-service__icon {
    background: var(--ff-red);
}

.ff-service__icon svg {
    color: var(--ff-red);
    transition: var(--ff-transition);
}

.ff-service:hover .ff-service__icon svg {
    color: var(--ff-white);
}

.ff-service h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ff-black);
    margin-bottom: 12px;
}

.ff-service p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ff-gray-mid);
    margin: 0;
}

/* ── Projects ── */
.ff-project {
    border-radius: var(--ff-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 30px;
    transition: var(--ff-transition);
}

.ff-project:hover {
    border-color: var(--ff-red);
    transform: translateY(-6px);
}

.ff-project__img {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.ff-project__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.ff-project:hover .ff-project__img img {
    transform: scale(1.05);
}

.ff-project__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 10, 0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.ff-project__tag {
    display: inline-block;
    background: var(--ff-red);
    color: var(--ff-white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 4px;
}

.ff-project__body {
    padding: 28px;
}

.ff-project__body h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ff-white);
    margin-bottom: 8px;
}

.ff-project__body p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ── Values ── */
.ff-value {
    text-align: center;
    padding: 36px 24px;
    border-radius: var(--ff-radius);
    margin-bottom: 30px;
    transition: var(--ff-transition);
    background: var(--ff-white);
    border: 1px solid transparent;
}

.ff-value:hover {
    border-color: #eee;
    box-shadow: var(--ff-shadow);
    transform: translateY(-4px);
}

.ff-value__icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(209, 56, 48, 0.06);
    border-radius: 50%;
    margin: 0 auto 18px;
    transition: var(--ff-transition);
}

.ff-value:hover .ff-value__icon {
    background: var(--ff-red);
}

.ff-value__icon svg {
    color: var(--ff-red);
    transition: var(--ff-transition);
}

.ff-value:hover .ff-value__icon svg {
    color: var(--ff-white);
}

.ff-value h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ff-black);
    margin-bottom: 8px;
}

.ff-value p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ff-gray-mid);
    margin: 0;
}

/* ── Timeline / Goals ── */
.ff-timeline {
    position: relative;
    max-width: 680px;
    margin: 40px auto 0;
    padding-left: 40px;
}

.ff-timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.ff-timeline__item {
    position: relative;
    margin-bottom: 36px;
}

.ff-timeline__item:last-child {
    margin-bottom: 0;
}

.ff-timeline__marker {
    position: absolute;
    left: -40px;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--ff-white);
    border: 3px solid var(--ff-red);
    z-index: 1;
    transition: var(--ff-transition);
}

.ff-timeline__item:hover .ff-timeline__marker {
    background: var(--ff-red);
    box-shadow: 0 0 0 6px rgba(209, 56, 48, 0.15);
}

.ff-timeline__content {
    background: var(--ff-white);
    border: 1px solid #e5e7eb;
    border-radius: var(--ff-radius);
    padding: 24px 28px;
    transition: var(--ff-transition);
}

.ff-timeline__item:hover .ff-timeline__content {
    border-color: var(--ff-red);
    box-shadow: var(--ff-shadow);
}

.ff-timeline__content h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ff-black);
    margin-bottom: 6px;
}

.ff-timeline__content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ff-gray-mid);
    margin: 0;
}

/* ── Contact Cards ── */
#ff-contact .row { display: flex; flex-wrap: wrap; }
#ff-contact .row > [class*="col-"] { display: flex; }

.ff-contact-card {
    text-align: center;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--ff-radius);
    margin-bottom: 30px;
    transition: var(--ff-transition);
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ff-contact-card:hover {
    border-color: var(--ff-red);
    transform: translateY(-4px);
}

.ff-contact-card__icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(209, 56, 48, 0.1);
    border-radius: 50%;
    margin: 0 auto 18px;
}

.ff-contact-card__icon svg {
    color: var(--ff-red);
}

.ff-contact-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ff-white);
    margin-bottom: 10px;
}

.ff-contact-card a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.ff-contact-card a:hover {
    color: var(--ff-red);
}

.ff-contact-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* ═══ SCROLL REVEAL ANIMATIONS ═══ */
.ff-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.ff-reveal--delay {
    transition-delay: 0.15s;
}

.ff-reveal--delay-2 {
    transition-delay: 0.3s;
}

.ff-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══ PAGE HERO (inner pages) ═══ */
.ff-page-hero {
    position: relative;
    background: var(--ff-black);
    padding: 100px 0 60px;
    overflow: hidden;
}

.ff-page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(209,56,48,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ff-page-hero__overlay {
    display: none;
}

.ff-page-hero__content {
    position: relative;
    z-index: 2;
}

.ff-page-hero .ff-label {
    color: var(--ff-red);
}

.ff-page-hero .ff-label::before {
    display: none;
}

.ff-page-hero__title {
    font-size: 48px;
    font-weight: 700;
    color: var(--ff-white);
    line-height: 1.15;
    margin-bottom: 14px;
}

.ff-page-hero__title span {
    color: var(--ff-red);
}

.ff-page-hero__sub {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    margin: 0;
    max-width: 520px;
}

/* ═══ CONTACT PAGE STYLES ═══ */
.ff-contact-info-card {
    text-align: center;
    padding: 44px 30px;
    background: var(--ff-white);
    border: 1px solid #eee;
    border-radius: var(--ff-radius);
    margin-bottom: 30px;
    transition: var(--ff-transition);
}

.ff-contact-info-card:hover {
    border-color: var(--ff-red);
    box-shadow: var(--ff-shadow-hover);
    transform: translateY(-6px);
}

.ff-contact-info-card__icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(209, 56, 48, 0.06);
    border-radius: 50%;
    margin: 0 auto 20px;
    transition: var(--ff-transition);
}

.ff-contact-info-card:hover .ff-contact-info-card__icon {
    background: var(--ff-red);
}

.ff-contact-info-card__icon svg {
    color: var(--ff-red);
    transition: var(--ff-transition);
}

.ff-contact-info-card:hover .ff-contact-info-card__icon svg {
    color: var(--ff-white);
}

.ff-contact-info-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ff-black);
    margin-bottom: 12px;
}

.ff-contact-info-card a {
    color: var(--ff-gray-mid);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    line-height: 1.8;
}

.ff-contact-info-card a:hover {
    color: var(--ff-red);
}

.ff-contact-info-card p {
    color: var(--ff-gray-mid);
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

/* ── Contact Form ── */
.ff-contact-form-wrap {
    padding-right: 30px;
}

.ff-form__row {
    display: flex;
    gap: 16px;
}

.ff-form__field {
    margin-bottom: 18px;
    flex: 1;
}

.ff-form__field input,
.ff-form__field textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #ddd;
    border-radius: var(--ff-radius);
    background: var(--ff-white);
    color: var(--ff-black);
    transition: border-color 0.3s;
    outline: none;
}

.ff-form__field input:focus,
.ff-form__field textarea:focus {
    border-color: var(--ff-red);
}

.ff-form__field textarea {
    resize: vertical;
}

/* Style CF7 forms */
.ff-contact-form-wrap .wpcf7 input[type="text"],
.ff-contact-form-wrap .wpcf7 input[type="email"],
.ff-contact-form-wrap .wpcf7 input[type="tel"],
.ff-contact-form-wrap .wpcf7 textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: var(--ff-radius);
    background: var(--ff-white);
    color: var(--ff-black);
    transition: border-color 0.3s;
    outline: none;
    margin-bottom: 12px;
}

.ff-contact-form-wrap .wpcf7 input:focus,
.ff-contact-form-wrap .wpcf7 textarea:focus {
    border-color: var(--ff-red);
}

.ff-contact-form-wrap .wpcf7 input[type="submit"] {
    background: var(--ff-red);
    color: var(--ff-white);
    border: 2px solid var(--ff-red);
    padding: 14px 36px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--ff-transition);
}

.ff-contact-form-wrap .wpcf7 input[type="submit"]:hover {
    background: var(--ff-red-dark);
    border-color: var(--ff-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(209, 56, 48, 0.3);
}

/* ── Map ── */
.ff-map-wrap {
    border-radius: var(--ff-radius);
    overflow: hidden;
    height: 100%;
    min-height: 480px;
    box-shadow: var(--ff-shadow);
}

.ff-map-wrap iframe {
    display: block;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 991px) {
    .ff-section {
        padding: 50px 0;
    }

    .ff-title {
        font-size: 32px;
    }

    .ff-stats {
        gap: 24px;
    }

    .ff-stat strong {
        font-size: 28px;
    }

    .ff-image-block {
        margin-top: 40px;
    }

    .ff-timeline {
        padding-left: 32px;
    }
}

@media (max-width: 575px) {
    .ff-section {
        padding: 40px 0;
    }

    .ff-title {
        font-size: 26px;
    }

    .ff-stats {
        flex-direction: column;
        gap: 16px;
    }

    .ff-label {
        font-size: 12px;
        letter-spacing: 2px;
        padding-left: 32px;
    }

    .ff-label::before {
        width: 22px;
    }
}
