/* ============================================================
   FPP Custom CSS — Elementor Overrides & Cookie Banner
   ============================================================ */

/* ── Elementor Global Overrides ────────────────────────── */
.elementor-page body,
body.elementor-page {
    font-family: var(--fpp-font-body);
}

.elementor h1, .elementor h2, .elementor h3,
.elementor h4, .elementor h5, .elementor h6 {
    font-family: var(--fpp-font-heading);
    letter-spacing: -0.02em;
}

/* Elementor button overrides */
.elementor-button {
    font-family: var(--fpp-font-body) !important;
    font-weight: 600 !important;
    border-radius: var(--fpp-radius-sm) !important;
    transition: var(--fpp-transition) !important;
}

/* Elementor section padding */
.elementor-section.fpp-section {
    padding: var(--fpp-section-padding) 0;
}

/* ── FPP HTML Widget — Full-Width Fix ──────────────────── */
/*
 * Quando usiamo il widget HTML di Elementor con stretch_section,
 * dobbiamo rimuovere tutti i padding/margin dei wrapper di Elementor
 * così le sezioni FPP (fpp-hero, fpp-section, ecc.) possono
 * espandersi a piena larghezza come previsto dal design.
 */

/* Rimuove il padding dal wrapper diretto del widget HTML */
.elementor-widget-html .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* Sezione stretched: forza posizione corretta */
.elementor-section.elementor-section-stretched {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
}

/* Rimuove gap verticale tra sezioni Elementor consecutive */
.elementor-section + .elementor-section {
    margin-top: 0 !important;
}

/* Il widget HTML occupa tutta la colonna */
.elementor-widget-html {
    width: 100%;
}

/* Colonna interna alla sezione: nessun padding extra — Elementor 2.x e 3.x */
.elementor-column > .elementor-column-wrap > .elementor-widget-wrap,
.elementor-column > .elementor-widget-wrap {
    padding: 0 !important;
}

/* Elementor 3.x: rimuove il gap interno tra widget nella colonna */
.elementor-widget-wrap.elementor-element-populated {
    padding: 0 !important;
}

/* Assicura che tutte le sezioni FPP dentro Elementor siano full-width */
.elementor-widget-html .fpp-hero,
.elementor-widget-html .fpp-section,
.elementor-widget-html .fpp-section--dark,
.elementor-widget-html .fpp-section--light,
.elementor-widget-html .fpp-header,
.elementor-widget-html section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Stats bar: mantiene il margine negativo per sovrapporsi all'hero */
.elementor-widget-html .fpp-stats {
    position: relative;
    z-index: 10;
}

/* ── Elementor Header Template ─────────────────────────── */
.elementor-location-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

body:not(.elementor-editor-active) .elementor-location-header {
    background: transparent;
    transition: var(--fpp-transition);
}

body:not(.elementor-editor-active) .elementor-location-header.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

/* ── Cookie Banner Styles ──────────────────────────────── */
.fpp-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--fpp-white);
    border-top: 1px solid var(--fpp-light-gray);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.fpp-cookie-banner__inner {
    max-width: var(--fpp-container-max);
    margin: 0 auto;
    padding: 1.5rem clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.fpp-cookie-banner__text p {
    font-size: 0.875rem;
    margin: 0 0 0.25rem;
    color: var(--fpp-slate);
    max-width: none;
}

.fpp-cookie-banner__text a {
    color: var(--fpp-teal);
    text-decoration: underline;
}

.fpp-cookie-banner__actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ── No scroll (mobile menu open) ──────────────────────── */
body.fpp-no-scroll {
    overflow: hidden;
}

/* ── Elementor-specific section helpers ────────────────── */
.elementor-section[data-settings*="fpp_dark"] {
    background: var(--fpp-gradient-dark);
}

/* Hero visual — SVG animated shield/network */
.fpp-hero-svg {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.fpp-hero-svg .node {
    fill: var(--fpp-electric-blue);
    opacity: 0.6;
}

.fpp-hero-svg .edge {
    stroke: var(--fpp-electric-blue);
    stroke-width: 0.5;
    opacity: 0.2;
}

.fpp-hero-svg .shield {
    fill: none;
    stroke: var(--fpp-electric-blue);
    stroke-width: 1;
    opacity: 0.3;
}

/* ── Responsive fine-tuning ────────────────────────────── */
@media (max-width: 480px) {
    .fpp-cookie-banner__inner {
        flex-direction: column;
        text-align: center;
    }
    .fpp-cookie-banner__actions {
        width: 100%;
        justify-content: center;
    }
}

/* ── Loading animation ─────────────────────────────────── */
@keyframes fpp-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fpp-skeleton {
    background: linear-gradient(90deg, var(--fpp-ghost-white) 25%, var(--fpp-light-gray) 50%, var(--fpp-ghost-white) 75%);
    background-size: 200% 100%;
    animation: fpp-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--fpp-radius-sm);
}
