/*
 * Fishingmania Experiences - stili frontend.
 *
 * I colori ereditano dai Global Colors di GeneratePress quando il tema li
 * espone (--accent, --contrast, --base-*). I valori dopo la virgola sono il
 * fallback e corrispondono alla palette ufficiale Fishingmania
 * (vedi _BRAND.md nella root dei plugin).
 *
 * Navy    #021D3C  testo e superfici scure
 * Accento #0692E8  badge, bordi, superfici tenui
 * Azione  #0B6F9E  bottoni e testo bianco (contrasto AA)
 *
 * Per forzare un colore diverso senza toccare il plugin, ridefinire le
 * variabili --fmexp-* in Aspetto > Personalizza > CSS aggiuntivo.
 */

:root {
    --fmexp-text: var(--contrast, #021D3C);
    --fmexp-muted: var(--contrast-2, #4A5A6E);
    --fmexp-border: var(--contrast-3, #D7DCE2);
    --fmexp-accent: var(--accent, #0692E8);
    --fmexp-action: var(--accent-2, #0B6F9E);
    --fmexp-surface: var(--base-3, #fff);
    --fmexp-soft: var(--base-2, #F7FBFC);
    --fmexp-on-accent: #fff;

    /* Sfondo tenue derivato dall'accento; la seconda regola vince dove color-mix e supportato. */
    --fmexp-accent-soft: #E8F5FE;
    --fmexp-accent-soft: color-mix(in srgb, var(--fmexp-accent) 14%, var(--fmexp-surface));

    --fmexp-info: #155a8a;
    --fmexp-info-soft: #eef6ff;
    --fmexp-danger: #9b1c1c;
    --fmexp-danger-soft: #fff0f0;
    --fmexp-success: #1a6b46;
    --fmexp-success-soft: #edf7f1;

    /* Spigoli vivi: il monogramma FM e spigoloso, la grafica del sito non arrotonda mai. */
    --fmexp-radius: 0;
    --fmexp-radius-sm: 0;
    --fmexp-sky: #edf2f9;
    --fmexp-shadow: 0 10px 26px rgba(2, 29, 60, .08);
    --fmexp-shadow-hover: 0 18px 38px rgba(2, 29, 60, .15);
    --fmexp-transition: 180ms ease;
}

.fmexp-archive,
.fmexp-data,
.fmexp-hero,
.fmexp-lead-form-wrap {
    color: var(--fmexp-text);
}

/* ---------------------------------------------------------------------------
 * Icone
 * ------------------------------------------------------------------------ */

.fmexp-icon {
    flex: 0 0 auto;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -.2em;
}

/* ---------------------------------------------------------------------------
 * Griglia e card
 * ------------------------------------------------------------------------ */

.fmexp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
}

.fmexp-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--fmexp-border);
    border-radius: var(--fmexp-radius);
    overflow: hidden;
    background: var(--fmexp-surface);
    box-shadow: var(--fmexp-shadow);
    transition: transform var(--fmexp-transition), box-shadow var(--fmexp-transition), border-color var(--fmexp-transition);
}

.fmexp-card:hover,
.fmexp-card:focus-within {
    transform: translateY(-3px);
    border-color: var(--fmexp-accent);
    box-shadow: var(--fmexp-shadow-hover);
}

.fmexp-card__media {
    position: relative;
    background: var(--fmexp-soft);
}

.fmexp-card__image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.fmexp-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 400ms ease;
}

.fmexp-card:hover .fmexp-card__image img {
    transform: scale(1.04);
}

.fmexp-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--fmexp-accent);
    opacity: .35;
}

.fmexp-card__placeholder .fmexp-icon {
    width: 56px;
    height: 56px;
}

/* Etichetta tipologia sopra l'immagine. */
.fmexp-card__type {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 5px 11px;
    background: var(--fmexp-text);
    color: var(--fmexp-on-accent);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fmexp-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 20px;
}

.fmexp-data,
.fmexp-lead-form {
    padding: 22px;
}

.fmexp-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.fmexp-card__badges:empty {
    display: none;
}

.fmexp-card__title {
    margin: 0 0 6px;
    font-size: 1.28rem;
    line-height: 1.25;
}

.fmexp-card__title a {
    color: inherit;
    text-decoration: none;
}

.fmexp-card__title a:hover,
.fmexp-card__title a:focus {
    color: var(--fmexp-action);
}

.fmexp-card__subtitle,
.fmexp-data__subtitle,
.fmexp-lead-form__context {
    color: var(--fmexp-muted);
    margin: 0 0 12px;
}

/* Meta della card: elenco con icona, non pillole. */
.fmexp-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 4px 0 12px;
    padding: 0;
    list-style: none;
    color: var(--fmexp-muted);
    font-size: .92rem;
}

.fmexp-card__meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.fmexp-card__meta .fmexp-icon {
    color: var(--fmexp-accent);
}

.fmexp-card__text {
    margin: 0 0 16px;
    color: var(--fmexp-muted);
}

.fmexp-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--fmexp-border);
}

.fmexp-card__price {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1.1;
}

.fmexp-card__price-label {
    color: var(--fmexp-muted);
    font-size: .82rem;
}

.fmexp-card__price-value {
    color: var(--fmexp-text);
    font-size: 1.16rem;
    font-weight: 800;
}

/* ---------------------------------------------------------------------------
 * Badge
 * ------------------------------------------------------------------------ */

.fmexp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 0;
    background: var(--fmexp-accent-soft);
    color: var(--fmexp-action);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 7px 13px;
    transform: skewX(-8deg);
}

/* il contenuto torna dritto: si inclina solo la forma */
.fmexp-badge > * {
    transform: skewX(8deg);
}

.fmexp-badge .fmexp-icon {
    width: 1em;
    height: 1em;
}

.fmexp-badge--verified {
    background: var(--fmexp-info-soft);
    color: var(--fmexp-info);
}

.fmexp-badge--soft {
    background: var(--fmexp-soft);
    color: var(--fmexp-muted);
}

.fmexp-badge--type {
    background: var(--fmexp-text);
    color: var(--fmexp-on-accent);
}

/* ---------------------------------------------------------------------------
 * Bottoni
 * ------------------------------------------------------------------------ */

.fmexp-card__cta,
.fmexp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: var(--fmexp-radius-sm);
    background: var(--fmexp-action);
    color: var(--fmexp-on-accent);
    padding: 11px 16px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: filter var(--fmexp-transition), transform var(--fmexp-transition);
}

.fmexp-card__cta:hover,
.fmexp-card__cta:focus,
.fmexp-button:hover,
.fmexp-button:focus {
    color: var(--fmexp-on-accent);
    filter: brightness(1.08);
}

.fmexp-card__cta .fmexp-icon,
.fmexp-button .fmexp-icon {
    transition: transform var(--fmexp-transition);
}

.fmexp-card__cta:hover .fmexp-icon {
    transform: translateX(3px);
}

/* ---------------------------------------------------------------------------
 * Hero della scheda
 * ------------------------------------------------------------------------ */

.fmexp-hero {
    position: relative;
    border-radius: var(--fmexp-radius);
    overflow: hidden;
    background: var(--fmexp-soft);
    border: 1px solid var(--fmexp-border);
}

.fmexp-hero__media {
    position: absolute;
    inset: 0;
}

.fmexp-hero__media img,
.fmexp-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fmexp-hero__inner {
    position: relative;
    padding: 30px;
}

/* Con immagine: velatura navy dal basso, testo bianco. */
.fmexp-hero--media {
    border-color: transparent;
}

.fmexp-hero--media .fmexp-hero__inner {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 38px 32px 32px;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 29, 60, 0) 0%, rgba(2, 29, 60, .55) 45%, rgba(2, 29, 60, .92) 100%);
}

.fmexp-hero--media .fmexp-hero__subtitle,
.fmexp-hero--media .fmexp-hero__fact-label {
    color: rgba(255, 255, 255, .82);
}

.fmexp-hero--media .fmexp-hero__fact-icon .fmexp-icon {
    color: #fff;
}

.fmexp-hero--media .fmexp-badge {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.fmexp-hero--media .fmexp-badge--type {
    background: var(--fmexp-accent);
    color: #fff;
}

.fmexp-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.fmexp-hero__badges:empty {
    display: none;
}

.fmexp-hero__title {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.7rem);
    line-height: 1.12;
    color: inherit;
}

.fmexp-hero__subtitle {
    margin: 0 0 20px;
    max-width: 60ch;
    font-size: 1.06rem;
    color: var(--fmexp-muted);
}

.fmexp-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 32px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.fmexp-hero__fact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.fmexp-hero__fact-icon .fmexp-icon {
    width: 22px;
    height: 22px;
    color: var(--fmexp-accent);
}

.fmexp-hero__fact-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.fmexp-hero__fact-label {
    font-size: .76rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--fmexp-muted);
}

.fmexp-hero__fact-value {
    font-weight: 700;
}

.fmexp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.fmexp-hero__guide {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .95rem;
    opacity: .9;
}

/* ---------------------------------------------------------------------------
 * Scheda dati
 * ------------------------------------------------------------------------ */

.fmexp-data,
.fmexp-lead-form {
    position: relative;
    border: 1px solid var(--fmexp-border);
    border-radius: 0;
    background: var(--fmexp-surface);
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}

.fmexp-data::before,
.fmexp-lead-form::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--fmexp-accent);
}

.fmexp-data__intro {
    margin: 0 0 18px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.fmexp-data__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1px;
    margin: 20px 0 4px;
    border: 1px solid var(--fmexp-border);
    border-radius: 0;
    overflow: hidden;
    background: var(--fmexp-border);
}

.fmexp-fact {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 16px;
    background: var(--fmexp-sky);
}

.fmexp-fact__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    background: var(--fmexp-text);
    color: #fff;
}

.fmexp-fact__icon .fmexp-icon {
    width: 18px;
    height: 18px;
    color: inherit;
}

.fmexp-fact__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fmexp-fact__label {
    color: var(--fmexp-muted);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.fmexp-fact__value {
    margin-top: 4px;
    color: var(--fmexp-text);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: break-word;
}

.fmexp-data__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0 28px;
}

.fmexp-data__section {
    border-top: 1px solid var(--fmexp-border);
    margin-top: 22px;
    padding-top: 18px;
}

.fmexp-data__section h3,
.fmexp-lead-form h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.fmexp-data__section h3 .fmexp-icon {
    width: 22px;
    height: 22px;
    color: var(--fmexp-accent);
}

.fmexp-data__section--included h3 .fmexp-icon {
    color: var(--fmexp-success);
}

.fmexp-data__section--excluded h3 .fmexp-icon {
    color: var(--fmexp-danger);
}

/* Elenchi incluso / escluso. */
.fmexp-checklist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fmexp-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 9px;
    line-height: 1.5;
}

.fmexp-checklist .fmexp-icon {
    margin-top: .15em;
    color: var(--fmexp-accent);
}

.fmexp-checklist--yes .fmexp-icon {
    color: var(--fmexp-success);
}

.fmexp-checklist--no .fmexp-icon {
    color: var(--fmexp-danger);
}

.fmexp-checklist--no li {
    color: var(--fmexp-muted);
}

/* Programma a tappe. */
.fmexp-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fmexp-timeline__step {
    position: relative;
    display: flex;
    gap: 14px;
    padding-bottom: 16px;
}

.fmexp-timeline__step:last-child {
    padding-bottom: 0;
}

/* Filo verticale tra una tappa e la successiva. */
.fmexp-timeline__step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 30px;
    left: 14px;
    bottom: 4px;
    width: 2px;
    background: var(--fmexp-border);
}

.fmexp-timeline__marker {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--fmexp-accent-soft);
    color: var(--fmexp-action);
    font-size: .86rem;
    font-weight: 800;
}

.fmexp-timeline__text {
    padding-top: 4px;
    line-height: 1.55;
}

/* ---------------------------------------------------------------------------
 * Form lead
 * ------------------------------------------------------------------------ */

.fmexp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.fmexp-lead-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
}

.fmexp-lead-form input[type="text"],
.fmexp-lead-form input[type="email"],
.fmexp-lead-form input[type="number"],
.fmexp-lead-form textarea {
    width: 100%;
    border: 1px solid var(--fmexp-border);
    border-radius: var(--fmexp-radius-sm);
    padding: 11px 12px;
    background: var(--fmexp-surface);
    color: var(--fmexp-text);
    transition: border-color var(--fmexp-transition), box-shadow var(--fmexp-transition);
}

.fmexp-lead-form input[type="text"]:focus,
.fmexp-lead-form input[type="email"]:focus,
.fmexp-lead-form input[type="number"]:focus,
.fmexp-lead-form textarea:focus {
    outline: none;
    border-color: var(--fmexp-accent);
    box-shadow: 0 0 0 3px var(--fmexp-accent-soft);
}

.fmexp-privacy label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-weight: 400;
}

.fmexp-notice {
    border-radius: var(--fmexp-radius-sm);
    margin: 0 0 14px;
    padding: 12px 14px;
}

.fmexp-notice--success {
    background: var(--fmexp-accent-soft);
    color: var(--fmexp-action);
}

.fmexp-notice--error {
    background: var(--fmexp-danger-soft);
    color: var(--fmexp-danger);
}

/* ---------------------------------------------------------------------------
 * Paginazione e stati vuoti
 * ------------------------------------------------------------------------ */

.fmexp-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.fmexp-pagination a,
.fmexp-pagination span {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--fmexp-border);
    border-radius: var(--fmexp-radius-sm);
    padding: 6px 10px;
    text-decoration: none;
}

.fmexp-pagination a:hover {
    border-color: var(--fmexp-accent);
    color: var(--fmexp-action);
}

.fmexp-pagination .current {
    background: var(--fmexp-action);
    border-color: var(--fmexp-action);
    color: var(--fmexp-on-accent);
}

.fmexp-empty {
    border: 1px dashed var(--fmexp-border);
    border-radius: var(--fmexp-radius);
    padding: 26px;
    text-align: center;
    color: var(--fmexp-muted);
}

/* Segnaposto mostrato solo dentro l'editor a blocchi. */
.fmexp-editor-placeholder {
    border: 1px dashed var(--fmexp-border);
    border-radius: var(--fmexp-radius-sm);
    padding: 18px;
    color: var(--fmexp-muted);
    background: var(--fmexp-soft);
}

/* ---------------------------------------------------------------------------
 * Adattamenti
 * ------------------------------------------------------------------------ */

@media (max-width: 600px) {
    .fmexp-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fmexp-hero--media .fmexp-hero__inner {
        min-height: 330px;
        padding: 26px 20px 22px;
    }

    .fmexp-hero__inner {
        padding: 22px 20px;
    }

    .fmexp-hero__facts {
        gap: 12px 20px;
    }

    .fmexp-data,
    .fmexp-lead-form {
        padding: 18px;
    }

    .fmexp-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .fmexp-card__cta {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fmexp-card,
    .fmexp-card__image img,
    .fmexp-card__cta,
    .fmexp-button,
    .fmexp-card__cta .fmexp-icon,
    .fmexp-lead-form input,
    .fmexp-lead-form textarea {
        transition: none;
    }

    .fmexp-card:hover {
        transform: none;
    }

    .fmexp-card:hover .fmexp-card__image img {
        transform: none;
    }
}
