/*
Theme Name: RLM_design Theme
Theme URI: https://www.financial-power.co.uk
Author: RLM_design
Author URI: https://www.financial-power.co.uk
Description: Official WordPress theme for Financial Power Ltd
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: financial-power
*/

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    --fp-navy: #0a192f;
    --fp-navy-light: #172a45;
    --fp-teal: #2d7a3a;
    --fp-teal-light: #64ffda;
    --fp-gray: #8892b0;
    --fp-gray-light: #ccd6f6;
    --fp-white: #e6f1ff;
    --fp-transition: all 0.3s ease;
}

/* ===================================
   RESET & BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

#page,
.site {
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--fp-navy);
    background: #fff;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

a {
    color: var(--fp-teal);
    text-decoration: none;
    transition: var(--fp-transition);
}

a:hover {
    color: var(--fp-teal-light);
}

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

/* ===================================
   LAYOUT
   =================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4%;
}

.container--narrow {
    max-width: 800px;
}

.section {
    padding: 80px 0;
}

.section--sm {
    padding: 40px 0;
}

.section--gray {
    background: #f8f9fa;
}

.section--navy {
    background: var(--fp-navy);
    color: var(--fp-white);
}

.section--gradient {
    background: linear-gradient(135deg, var(--fp-navy) 0%, var(--fp-navy-light) 100%);
    color: var(--fp-white);
}

/* ===================================
   HEADER
   =================================== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    left: 0;
}

.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 4%;
    max-width: 100%;
    margin: 0 auto;
}

/* ── Logo container ─────────────────────────────── */
.site-branding {
    flex-shrink: 0;
    /* non si comprime nel flex row dell'header */
}

.site-logo {
    display: inline-flex;
    /* contenitore indeformabile */
    align-items: center;
    height: 56px;
    /* altezza fissa: cambia il valore a piacere */
    background: transparent;
}

/* Il link generato da the_custom_logo() – trasparente e cliccabile */
.site-logo .custom-logo-link,
a.custom-logo-link {
    display: inline-flex;
    align-items: center;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    cursor: pointer;
    /* nessun colore di sfondo: rimane completamente trasparente */
    text-decoration: none;
}

.site-logo .custom-logo-link:focus-visible,
a.custom-logo-link:focus-visible {
    outline: 2px solid var(--fp-teal-light);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Il tag <img> del logo – mantiene proporzioni senza deformarsi */
.site-logo .custom-logo-link img,
a.custom-logo-link img.custom-logo {
    display: block;
    height: 100%;
    /* si adatta all'altezza del contenitore */
    width: auto;
    /* larghezza automatica → nessuna deformazione */
    max-width: none;
    /* rimuove il max-width: 100% globale sull'img */
    object-fit: contain;
    /* failsafe anti-deformazione */
}

.site-logo__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fp-navy);
}

.site-logo__name .accent {
    color: var(--fp-teal);
}

.site-logo__tagline {
    font-size: 0.75rem;
    color: var(--fp-gray);
    display: block;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-list a {
    color: var(--fp-navy);
    font-weight: 500;
    padding: 8px 0;
}

.nav-list a:hover {
    color: var(--fp-teal);
}

/* ===================================
   HERO
   =================================== */
.page-hero {
    background: var(--fp-navy);
    color: var(--fp-white);
    padding: 80px 0;
    text-align: center;
}

.page-hero__title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.page-hero__subtitle {
    color: var(--fp-gray-light);
    font-size: 1.1rem;
}

/* ===================================
   CARDS
   =================================== */
.card {
    background: #fff;
    border: 1px solid #e1e7ec;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card--ornate {
    border-left: 4px solid var(--fp-teal);
}

.post-card {
    background: #fff;
    border: 1px solid #e1e7ec;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--fp-transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.post-card__image {
    height: 200px;
    overflow: hidden;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__body {
    padding: 24px;
}

.post-card__category {
    font-size: 0.75rem;
    color: var(--fp-teal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.post-card__title {
    font-size: 1.25rem;
    margin: 12px 0;
}

.post-card__title a {
    color: var(--fp-navy);
}

.post-card__excerpt {
    color: var(--fp-gray);
    margin-bottom: 16px;
}

.post-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--fp-gray);
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: var(--fp-transition);
    cursor: pointer;
}

.btn--navy {
    background: var(--fp-navy);
    color: #fff;
}

.btn--navy:hover {
    background: var(--fp-navy-light);
    color: #fff;
}

.btn--primary {
    background: var(--fp-teal);
    color: #fff;
}

.btn--primary:hover {
    background: var(--fp-teal-light);
    color: var(--fp-navy);
}

.btn--secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn--secondary:hover {
    background: #fff;
    color: var(--fp-navy);
}

.btn--outline {
    background: transparent;
    color: var(--fp-teal);
    border: 1px solid var(--fp-teal);
}

.btn--outline:hover {
    background: var(--fp-teal);
    color: #fff;
}

.btn--sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn--lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* ===================================
   GRID SYSTEM
   =================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

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

/* ===================================
   STATS
   =================================== */
.stat-card {
    text-align: center;
    padding: 24px;
}

.stat-card__number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--fp-white);
}

.stat-card__number .accent {
    color: var(--fp-teal-light);
}

.stat-card__label {
    color: var(--fp-gray-light);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* ===================================
   SECTOR CARDS
   =================================== */
.sector-card {
    background: #fff;
    border: 1px solid #e1e7ec;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--fp-transition);
}

.sector-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.sector-card__header {
    background: var(--fp-navy);
    color: #fff;
    padding: 24px;
    text-align: center;
}

.sector-card__header--green {
    background: var(--fp-teal);
}

.sector-card__icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.sector-card__title {
    font-size: 1.25rem;
}

.sector-card__body {
    padding: 24px;
}

.sector-card__list {
    list-style: none;
}

.sector-card__list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: var(--fp-gray);
    font-size: 0.9rem;
}

.sector-card__list li:last-child {
    border-bottom: none;
}

/* ===================================
   SIDEBAR
   =================================== */
.content-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* ── STRATEGY SECTION (MANIFESTO) EXTENDED LAYOUTS ── */
.mf-content-sidebar {
    display: grid;
    gap: 40px;
}

/* Solo colonna centrale */
.mf-layout-100 {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

/* 50/50 */
.mf-layout-50-50 {
    grid-template-columns: 1fr 1fr;
}

/* 60/40 */
.mf-layout-60-40 {
    grid-template-columns: 3fr 2fr;
}

/* 70/30 (Default) */
.mf-layout-70-30 {
    grid-template-columns: 7fr 3fr;
}

/* Sidebar interna (Widget e Media) */
.fp-manifesto-sidebar .widget {
    background: #fff;
    border: 1px solid #e1e7ec;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar .widget {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--fp-navy);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #e1e7ec;
}

.widget ul li:last-child {
    border-bottom: none;
}

/* ===================================
   FOOTER
   =================================== */
.site-footer {
    background: var(--fp-navy);
    color: var(--fp-white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand__tagline {
    color: var(--fp-gray-light);
    font-size: 0.9rem;
    margin: 16px 0;
}

.footer-badge {
    display: inline-block;
    background: var(--fp-teal);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.footer-brand__social {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.footer-brand__social a {
    color: var(--fp-white);
    font-size: 1.2rem;
}

.footer-widget__title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--fp-white);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget ul li a {
    color: var(--fp-gray-light);
}

.footer-widget ul li a:hover {
    color: var(--fp-teal-light);
}

.footer-contact__item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--fp-gray-light);
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--fp-gray-light);
}

.legal-links {
    display: flex;
    gap: 24px;
}

.legal-links a {
    color: var(--fp-gray-light);
}

.legal-links a:hover {
    color: var(--fp-teal-light);
}

/* ===================================
   BADGES
   =================================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--navy {
    background: var(--fp-navy);
    color: #fff;
}

.badge--teal {
    background: var(--fp-teal);
    color: #fff;
}

/* ===================================
   UTILITIES
   =================================== */
.text-center {
    text-align: center;
}

.text-white {
    color: #fff;
}

.text-white-alpha {
    color: rgba(255, 255, 255, 0.8);
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: var(--fp-navy);
    overflow: hidden;
    padding: 120px 0 80px;
    width: 100%;
}

.hero__bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 1;
}

.hero__bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.95) 0%, rgba(23, 42, 69, 0.85) 100%);
    z-index: 2;
}

.hero__content {
    position: relative;
    z-index: 3;
    /* max-width and text-align are now handled dynamically by customizer inline css */
}

.hero__eyebrow {
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding: 8px 16px;
    /* color, background, border-radius now controlled by Customizer */
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--fp-white);
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero__brand {
    display: block;
}

.hero__brand .accent {
    color: var(--fp-teal-light);
}

.hero__tagline {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--fp-gray-light);
    margin-top: 12px;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--fp-gray-light);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero__cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero__trust {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--fp-gray-light);
}

.hero__trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--fp-teal);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
}

.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--fp-gray-light);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
}

.hero__scroll-arrow {
    font-size: 1.2rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===================================
   HERO RESPONSIVE
   =================================== */
@media (max-width: 992px) {
    .hero__title {
        font-size: 2.8rem;
    }

    .hero__tagline {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding: 100px 0 60px;
    }

    .hero__title {
        font-size: 2.2rem;
    }

    .hero__tagline {
        font-size: 1rem;
    }

    .hero__subtitle {
        font-size: 1.1rem;
    }

    .hero__cta {
        flex-direction: column;
        align-items: center;
    }

    .hero__cta .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero__trust {
        flex-direction: column;
        gap: 12px;
    }

    .hero__scroll {
        display: none;
    }
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 992px) {

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

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

    .content-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

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

    .nav-list {
        display: none;
    }

    .page-hero__title {
        font-size: 2rem;
    }

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

    .legal-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

:focus {
    outline: 2px solid var(--fp-teal);
    outline-offset: 2px;
}

/* ===================================
   PRINT
   =================================== */
@media print {

    .site-header,
    .site-footer,
    .sidebar {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}

/* ===================================
   MOBILE MENU TOGGLE
   =================================== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 1.5rem;
    color: var(--fp-navy);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation.active .nav-list {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px 24px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        z-index: 999;
        gap: 8px;
    }
}

/* ===================================
   SECTION TITLE
   =================================== */
.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title--left {
    text-align: left;
}

.section-title__eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--fp-teal);
    margin-bottom: 12px;
}

.section-title__line {
    margin-bottom: 16px;
}

.section-title__lead {
    color: var(--fp-gray);
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--fp-navy);
}

/* ===================================
   HEADER SCROLLED STATE
   =================================== */
.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ===================================
   SITE LOGO CUSTOM
   =================================== */
.site-logo img {
    max-height: 60px;
    width: auto;
}

/* ===================================
   HERO VIDEO BACKGROUND
   =================================== */
.hero__video-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero__video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    opacity: 0.4;
}

@media (max-width: 768px) {
    .hero__video-wrap {
        display: none;
    }

    /* su mobile usa il poster come background */
}

/* ===================================
   LANGUAGE SWITCHER
   =================================== */

/* Wrapper nel header */
.header-lang {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

/* Nasconde il <li> aggiunto al menu se usiamo il wrapper standalone */
.menu-item--lang {
    list-style: none;
}

/* ── Dropdown container ── */
.lang-switcher__dropdown {
    position: relative;
}

/* ── Toggle button ── */
.lang-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid rgba(10, 25, 47, 0.2);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fp-navy);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lang-switcher__toggle:hover {
    background: var(--fp-navy);
    color: #fff;
    border-color: var(--fp-navy);
}

/* Quando header è scrolled (sfondo scuro) */
.site-header.scrolled .lang-switcher__toggle {
    color: var(--fp-gray-light);
    border-color: rgba(255, 255, 255, 0.3);
}

.site-header.scrolled .lang-switcher__toggle:hover {
    background: var(--fp-teal);
    border-color: var(--fp-teal);
    color: #fff;
}

.lang-switcher__flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-switcher__name {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.lang-switcher__arrow {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.lang-switcher__dropdown.open .lang-switcher__arrow {
    transform: rotate(180deg);
}

/* ── Dropdown list ── */
.lang-switcher__list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e1e7ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(10, 25, 47, 0.12);
    list-style: none;
    min-width: 150px;
    z-index: 9999;
    overflow: hidden;
    padding: 4px 0;
}

.lang-switcher__dropdown.open .lang-switcher__list {
    display: block;
    animation: langDropDown 0.15s ease;
}

@keyframes langDropDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-switcher__item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--fp-navy);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s ease;
    text-decoration: none;
}

.lang-switcher__item a:hover {
    background: #f8f9fa;
    color: var(--fp-teal);
}

.lang-switcher__item--active a {
    background: rgba(45, 122, 58, 0.06);
    color: var(--fp-teal);
    font-weight: 700;
}

.lang-switcher__item--active a::after {
    content: '✓';
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--fp-teal);
}

/* ── Inline mode (flags affiancate) ── */
.lang-switcher__inline {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.lang-switcher__inline .lang-switcher__item a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--fp-navy);
}

.lang-switcher__inline .lang-switcher__item--active a {
    color: var(--fp-teal);
    font-weight: 700;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .header-lang {
        margin-left: 0;
        margin-right: 8px;
    }

    .lang-switcher__name {
        display: none;
        /* solo bandiera su mobile */
    }

    .lang-switcher__toggle {
        padding: 6px 8px;
        border-radius: 50%;
        border: none;
    }

    .lang-switcher__list {
        right: auto;
        left: 0;
    }
}

/* ── Nel footer ── */
.site-footer .lang-switcher__toggle {
    color: var(--fp-gray-light);
    border-color: rgba(255, 255, 255, 0.2);
}

.site-footer .lang-switcher__toggle:hover {
    background: var(--fp-teal);
    border-color: var(--fp-teal);
    color: #fff;
}

/* ===================================
   SECTOR CARD – COLORI EXTRA
   =================================== */
.sector-card__header--teal {
    background: #1a6b8a;
}

.sector-card__header--dark {
    background: #2c3e50;
}

/* ===================================
   STATS BAR – colori dinamici
   =================================== */
.fp-stats-bar .stat-card__number .accent {
    color: var(--fp-teal-light);
}

/* ===================================
   NUOVI STILI BOTTONI (ghost, link)
   =================================== */
.btn--ghost {
    background: transparent;
    color: var(--fp-navy);
    border: 2px solid var(--fp-navy);
}

.btn--ghost:hover {
    background: var(--fp-navy);
    color: #fff;
}

.btn--link {
    background: transparent;
    border: none;
    color: var(--fp-teal);
    padding-left: 0;
    padding-right: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn--link:hover {
    color: var(--fp-teal-light);
}

/* ===================================
   BOTTONI SEZIONE – layout flex
   =================================== */
.fp-section-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
}

/* ===================================
   ICONE INLINE SVG
   =================================== */
.fp-icon,
.btn-icon,
.eyebrow-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.btn-icon {
    margin-top: -2px;
}

.eyebrow-icon {
    margin-right: 4px;
    opacity: .85;
}

/* ===================================
   TEXT-ALIGN JUSTIFY – fix browser
   Funziona su blocchi di testo con
   class fp-manifesto-body, fp-settori-lead
   fp-cta-subtitle ecc.
   =================================== */
.fp-manifesto-body p,
.fp-manifesto-body li,
.fp-settori-lead,
.fp-cta-subtitle,
.fp-news-eyebrow,
.fp-settori-eyebrow,
.fp-manifesto-eyebrow {
    /* text-align viene sovrascritto dal CSS dinamico del Customizer */
    -webkit-hyphens: auto;
    hyphens: auto;
    word-break: break-word;
}

/* Giustificazione esplicita (applicata dal customizer via CSS dinamico)
   Assicuriamo che text-align justify si erediti ai figli */
.fp-manifesto-body[style*="text-align:justify"] p,
.fp-manifesto-body[style*="text-align: justify"] p {
    text-align: inherit;
}

/* ===================================
   EYEBROW CON ICONA
   =================================== */
.fp-manifesto-eyebrow,
.fp-settori-eyebrow,
.fp-news-eyebrow,
.fp-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ═══════════════════════════════════════════════════════
   FP-CARD – Sistema card universale (v3)
   Sostituisce sector-card per contenuto editabile al 100%
   ═══════════════════════════════════════════════════════ */
.fp-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    color: inherit;
}

.fp-card:hover {
    transform: translateY(-4px);
}

a.fp-card:hover {
    text-decoration: none;
    color: inherit;
}

.fp-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-align: center;
    position: relative;
}

.fp-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fp-card-svg {
    display: block;
}

.fp-li-icon {
    margin-top: 2px;
    flex-shrink: 0;
}

.fp-card-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

/* Grid span override */
.grid-4 .fp-card[style*="span 2"] {
    grid-column: span 2;
}

.grid-4 .fp-card[style*="span 3"] {
    grid-column: span 3;
}

.grid-4 .fp-card[style*="span 4"] {
    grid-column: span 4;
}

.grid-3 .fp-card[style*="span 2"] {
    grid-column: span 2;
}

.grid-3 .fp-card[style*="span 3"] {
    grid-column: span 3;
}

/* Responsive */
@media (max-width: 640px) {
    .fp-card[style*="span"] {
        grid-column: 1 / -1 !important;
    }
}

/* Sfondo sezione navy */
.section--navy {
    background: #0a192f;
    color: #e6f1ff;
}

.section--navy .section-title__eyebrow {
    color: #64ffda;
}

.section--navy .fp-settori-title,
.section--navy .fp-settori-lead {
    color: #ccd6f6;
}

/* Placeholder admin griglia */
.fp-placeholder-grid {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dcdcde;
}

/* ══════════════════════════════════════════════════════════════
   CARD BUILDER v2 – Header + Body
   ══════════════════════════════════════════════════════════════ */
.fp-cb-section {
    width: 100%;
}

.fp-cb-grid {
    align-items: stretch;
}

.fp-cb-card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fp-cb-card--linked {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.fp-cb-card--linked:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.fp-cb-card__header {
    flex-shrink: 0;
}

.fp-cb-card__title {
    display: block;
}

.fp-cb-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fp-cb-card__image img {
    border-radius: 4px;
    display: block;
}

.fp-cb-card__text {
    line-height: 1.6;
}

.fp-cb-icon {
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 900px) {

    .fp-cb-grid[style*="repeat(4"],
    .fp-cb-grid[style*="repeat(5"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .fp-cb-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════════════════════
   MIDDLE CONTENT BUILDER – RESPONSIVE GRID
   ══════════════════════════════════════════════════════════════ */
.fp-mc-wrapper {
    margin-bottom: 0;
}

.fp-mc-header {
    margin-bottom: 20px;
}

.fp-mc-area {
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.fp-mc-grid {
    width: 100%;
}

.fp-mc-block {
    box-sizing: border-box;
    min-width: 0;
    /* prevent grid blowout */
}

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

.fp-mc-video {
    max-width: 100%;
    display: block;
}

.fp-mc-audio {
    width: 100%;
}

.fp-mc-embed {
    overflow: hidden;
}

.fp-mc-embed iframe {
    border: none;
}

/* Responsive: tablet (max-width: 992px) */
@media (max-width: 992px) {
    .fp-mc-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Responsive: mobile (max-width: 768px) */
@media (max-width: 768px) {
    .fp-mc-grid {
        grid-template-columns: 1fr !important;
    }

    .fp-mc-area {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* Assicura che tutti i media non eccedano il contenitore */
.fp-mc-block img,
.fp-mc-block video,
.fp-mc-block iframe {
    max-width: 100%;
    height: auto;
}

/* Forza il ritorno a capo per testi lunghi */
.hero__title,
.hero__tagline,
.hero__subtitle,
.hero__eyebrow,
.hero__trust-item,
.fp-manifesto-body p,
.fp-settori-lead,
.fp-cta-subtitle {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* Assicura spazio tra i badge */
.hero__trust {
    gap: 24px;
    /* già presente, ma controlla che non venga sovrascritto */
}

/* Impedisce alla HERO di uscire dai bordi */
.hero,
.hero * {
    max-width: 100%;
}

/* Corregge background e video che causano overflow */
.hero__bg-image,
.hero__video-wrap,
.hero__video {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Blocca lo scroll orizzontale globale */
html,
body {
    overflow-x: hidden;
}

/* -- Strategy Media Paragraphs -- */
.p-media {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px -15px rgba(10, 25, 47, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.p-media:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -20px rgba(10, 25, 47, 0.3);
}

.p-media img,
.p-media video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.p-media audio {
    width: 100%;
    padding: 10px;
    background: #f1f3f4;
}

/* --------------------------------------------------------------
   MIDDLE 2 � CUSTOM CARDS BUILDER
   -------------------------------------------------------------- */
.fp-custom-cards-grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.fp-custom-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.fp-custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.fp-card-banner h3 {
    font-family: inherit;
    letter-spacing: 1px;
}

.fp-card-media-wrap {
    transition: transform 0.3s ease;
}

.fp-custom-card:hover .fp-card-media-wrap {
    transform: scale(1.05);
}

.fp-card-text {
    word-break: break-word;
    width: 100%;
}

@media (max-width: 992px) {
    .fp-custom-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .fp-custom-cards-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --------------------------------------------------------------
   MIDDLE 2 � CUSTOM CARDS BUILDER
   -------------------------------------------------------------- */
.fp-custom-cards-grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.fp-custom-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.fp-custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.fp-card-banner h3 {
    font-family: inherit;
    letter-spacing: 1px;
}

.fp-card-media-wrap {
    transition: transform 0.3s ease;
}

.fp-custom-card:hover .fp-card-media-wrap {
    transform: scale(1.05);
}

.fp-card-text {
    word-break: break-word;
    width: 100%;
}

@media (max-width: 992px) {
    .fp-custom-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .fp-custom-cards-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════════════════════
   MIDDLE 2 – CUSTOM CARDS BUILDER
   ══════════════════════════════════════════════════════════════ */
.fp-custom-cards-grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.fp-custom-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.fp-custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.fp-card-banner h3 {
    font-family: inherit;
    letter-spacing: 1px;
}

.fp-card-media-wrap {
    transition: transform 0.3s ease;
}

.fp-custom-card:hover .fp-card-media-wrap {
    transform: scale(1.05);
}

.fp-card-text {
    word-break: break-word;
    width: 100%;
}

@media (max-width: 992px) {
    .fp-custom-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .fp-custom-cards-grid {
    }
}

/* ── FLEXIBLE BLOCKS (MIDDLE 1/2) ── */
.fp-mc-block-low, .fp-settori-block {
    transition: var(--fp-transition);
}

.fp-block-link.fp-hover-animate:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.fp-mc-media-box {
    position: relative;
}

.fp-block-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    transition: var(--fp-transition);
}

.fp-block-link {
 display: block;
 text-decoration: none;
 color: inherit;
}

.fp-block-link:hover {
 color: inherit;
}

/* ===================================
   STANDARD PAGES (PAGE.PHP)
   =================================== */

.page-hero {
    padding: 80px 0 60px;
    color: #ffffff;
    text-align: center;
}

.page-hero__title {
    margin: 0;
    line-height: 1.2;
}

.page-hero__subtitle {
    margin: 15px 0 0;
    line-height: 1.5;
    opacity: 0.8;
}

.page-section {
    padding: 60px 0 100px;
}

/* Due Colonne Layout */
.content-sidebar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.content-sidebar--left {
    grid-template-columns: 1fr 2fr;
}
.content-sidebar--left .page-content-wrapper {
    grid-column: 2;
    grid-row: 1;
}
.content-sidebar--left .sidebar {
    grid-column: 1;
    grid-row: 1;
}

.content-sidebar--wide {
    grid-template-columns: 1fr;
    max-width: 1000px;
    margin: 0 auto;
}

/* Card Contenuto Principale */
.page-card {
    padding: 40px;
}

.page-content {
    line-height: 1.7;
}

/* ===================================
   GUTENBERG UTILITY CLASSES
   =================================== */
/* Colori Testo */
.has-fp-navy-color { color: var(--fp-navy) !important; }
.has-fp-teal-color { color: var(--fp-teal) !important; }
.has-fp-teal-light-color { color: var(--fp-teal-light) !important; }
.has-fp-light-gray-color { color: var(--fp-light-gray) !important; }
.has-fp-dark-text-color { color: #334155 !important; }
.has-fp-white-color { color: #ffffff !important; }
.has-fp-brand-blue-color { color: #0c0f60 !important; }

/* Colori Sfondo */
.has-fp-navy-background-color { background-color: var(--fp-navy) !important; }
.has-fp-teal-background-color { background-color: var(--fp-teal) !important; }
.has-fp-teal-light-background-color { background-color: var(--fp-teal-light) !important; }
.has-fp-light-gray-background-color { background-color: #f8fafc !important; }
.has-fp-dark-text-background-color { background-color: #334155 !important; }
.has-fp-white-background-color { background-color: #ffffff !important; }
.has-fp-brand-blue-background-color { background-color: #0c0f60 !important; }

/* Dimensioni Font */
.has-small-font-size { font-size: 0.875rem !important; }
.has-normal-font-size { font-size: 1rem !important; }
.has-large-font-size { font-size: 1.5rem !important; }
.has-huge-font-size { font-size: 2.25rem !important; }

/* Allineamento Giustificato */
.has-text-align-justify {
    text-align: justify;
}

/* Stili Gutenberg Base interni al body pagina */
.page-content p {
    margin-bottom: 24px;
}
.page-content h2,
.page-content h3,
.page-content h4 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--fp-navy);
    line-height: 1.3;
}
.page-content h2 { font-size: 1.75rem; font-weight: 700; }
.page-content h3 { font-size: 1.4rem; font-weight: 600; }
.page-content h4 { font-size: 1.2rem; font-weight: 600; }
.page-content img {
    border-radius: 8px;
    height: auto;
    max-width: 100%;
}
.page-content ul,
.page-content ol {
    margin-bottom: 24px;
    padding-left: 20px;
}
.page-content li {
    margin-bottom: 8px;
}
.page-content blockquote {
    border-left: 4px solid var(--fp-teal);
    padding: 10px 0 10px 20px;
    margin: 24px 0;
    font-style: italic;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #e1e8ed;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fp-navy);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fp-teal);
    display: inline-block;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f4f8;
}

.widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget ul li a {
    color: var(--fp-navy);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--fp-transition);
}

/* Frecce menu laterale */
.widget ul li a::before {
    content: "→";
    margin-right: 8px;
    color: var(--fp-teal);
    transition: var(--fp-transition);
}

.widget ul li a:hover {
    color: var(--fp-teal);
}
.widget ul li a:hover::before {
    transform: translateX(4px);
}

/* Info Box (seconda area widget) */
.widget--info {
    background: #f8fafc;
    border-color: #dce5ee;
}

.widget-title--info {
    border-bottom-color: var(--fp-navy);
}

/* Responsive */
@media screen and (max-width: 900px) {
    .content-sidebar,
    .content-sidebar--left {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar--left .page-content-wrapper { grid-row: auto; grid-column: auto; }
    .content-sidebar--left .sidebar { grid-row: auto; grid-column: auto; }
    
    .page-card {
        padding: 30px 20px;
    }
}

/* Gutenberg Block Styles */
.is-style-justify {
    text-align: justify;
}
