﻿/* ═══════════════════════════════════════════════════
   home.css — Stili specifici homepage (index.php)
   Prefisso hp- (homepage). Non caricare su altre pagine.
   ═══════════════════════════════════════════════════ */

/* ── Hero ── */
.hp-hero {
    background: linear-gradient(135deg, var(--cp-hero-start) 0%, var(--cp-hero-mid) 50%, var(--cp-hero-end) 100%);
    color: #fff;
    padding: 48px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hp-hero > * { position: relative; z-index: 1; }
/* Sfondo hero come <img> reale (.hp-hero-bgimg) anziché background-image CSS: Chrome lo
   prioritizza come candidato LCP. Posizionato dietro al contenuto (z-index 0). Vedi
   hero-v2.php — l'<img> passa da image.php (AVIF/WebP + resize + cache). */
.hp-hero-bgimg {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: var(--hp-hero-opacity, 0.12);
    z-index: 0;
    pointer-events: none;
}
.hp-hero h1 {
    font-size: 32px; font-weight: 800; margin: 0 0 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.hp-hero h1 span { color: var(--cp-star); }
.hp-hero .hp-sub {
    font-size: 16px; opacity: .9; margin-bottom: 24px; font-weight: 300;
}
.hp-hero-stats {
    display: flex; align-items: center; justify-content: center;
    gap: 0; flex-wrap: wrap;
    background: rgba(255,255,255,.1); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 14px; padding: 14px 24px;
    margin: 0 auto 24px; max-width: 680px;
}
.hp-hero-stat {
    display: flex; flex-direction: column; align-items: center;
    padding: 0 20px; text-align: center;
}
.hp-hero-stat strong {
    font-size: 24px; font-weight: 800; color: var(--cp-star); line-height: 1.1;
}
.hp-hero-stat span {
    font-size: 11px; color: rgba(255,255,255,.8); font-weight: 500;
    white-space: nowrap; margin-top: 2px;
}
.hp-hero-stat-sep {
    width: 1px; height: 32px; background: rgba(255,255,255,.25); flex-shrink: 0;
}
.hp-hero .hp-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hp-hero .hp-cta a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: 30px; font-weight: 700;
    font-size: 15px; text-decoration: none; transition: all .25s;
}
.hp-cta-primary {
    background: #fff; color: var(--cp-navy-2);
    position: relative; overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    transition: background .25s, color .25s,
                transform .2s cubic-bezier(.4,0,.2,1),
                box-shadow .25s cubic-bezier(.4,0,.2,1);
}
.hp-cta-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,215,0,.35) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.hp-cta-primary i { transition: transform .2s cubic-bezier(.4,0,.2,1); }
.hp-cta-primary:hover {
    background: var(--cp-star); color: var(--cp-navy-2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    text-decoration: none;
}
.hp-cta-primary:hover::after { transform: translateX(100%); }
.hp-cta-primary:hover i { transform: translateX(3px); }
.hp-cta-secondary {
    background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,.55);
    position: relative; overflow: hidden;
    transition: border-color .2s, background .2s,
                transform .2s cubic-bezier(.4,0,.2,1),
                box-shadow .2s cubic-bezier(.4,0,.2,1);
}
.hp-cta-secondary i { transition: transform .2s cubic-bezier(.4,0,.2,1); }
.hp-cta-secondary:hover {
    border-color: #fff; background: rgba(255,255,255,.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    text-decoration: none; color: #fff;
}
.hp-cta-secondary:hover i { transform: translateX(3px); }

/* ── Sezioni homepage generiche ── */
.hp-section { padding: 16px 0 30px; }
.hp-section:first-child { padding-top: 0; }
.hp-section-title {
    font-size: 22px; font-weight: 700; color: var(--cp-navy-2);
    margin-bottom: 20px; padding-bottom: 10px;
    border-bottom: 3px solid var(--cp-blue);
    display: inline-block;
}
.hp-section-title i { color: var(--cp-blue); margin-right: 8px; }

/* ── Card tematiche (hp-themes / partner block) ── */
.hp-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.hp-theme {
    background: #fff; border: 1px solid #e8eef5; border-radius: 12px;
    padding: 24px 16px; text-align: center; text-decoration: none;
    transition: all .25s; color: #343a40;
}
.hp-theme:hover {
    transform: translateY(-4px); box-shadow: 0 8px 25px var(--cp-navy-2-a10);
    border-color: var(--cp-blue); text-decoration: none; color: var(--cp-navy-2);
}
.hp-theme-icon {
    width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
}
/* supporta sia h3 (ottimizzato) che h4 (legacy) */
.hp-theme h3,
.hp-theme h4 { font-size: 14px; font-weight: 700; margin: 0 0 6px; color: var(--cp-navy-2); }
.hp-theme p { font-size: 12px; color: #6c757d; margin: 0; line-height: 1.4; }

/* ── Griglia offerte card (layout legacy) ── */
.hp-offers-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.hp-offer-card {
    background: #fff; border: 1px solid #e8eef5; border-radius: 10px;
    overflow: hidden; transition: all .25s; height: 100%;
    display: flex; flex-direction: column;
}
.hp-offer-card:hover { box-shadow: 0 4px 16px var(--cp-navy-2-a10); }
.hp-offer-card a { text-decoration: none; color: inherit; }
.hp-offer-card .hp-oc-body {
    padding: 12px 14px; flex: 1; display: flex; flex-direction: column; justify-content: space-between;
}
.hp-offer-card .hp-oc-hotel { font-size: 11px; color: var(--cp-blue); font-weight: 600; text-transform: uppercase; }
.hp-offer-card .hp-oc-title { font-size: 14px; font-weight: 700; color: var(--cp-navy-2); margin: 4px 0; line-height: 1.3; }
.hp-offer-card .hp-oc-meta { font-size: 12px; color: #5f6b78; }

/* ── Sidebar: eventi ── */
.hp-event {
    display: flex; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid #f1f3f5; align-items: center;
}
.hp-event:last-child { border-bottom: none; }
.hp-event-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.hp-event-info { flex: 1; min-width: 0; }
.hp-event-title { font-size: 13px; font-weight: 700; color: var(--cp-navy-2); margin: 0; line-height: 1.3; }
.hp-event-title a { color: inherit; text-decoration: none; }
.hp-event-title a:hover { color: var(--cp-blue); }
.hp-event-date { font-size: 11px; color: #e67e22; font-weight: 600; }
.hp-event-desc { font-size: 11px; color: #6c757d; margin: 2px 0 0; line-height: 1.3; }

/* ── Sidebar box ── */
.hp-sidebar-box {
    background: #fff; border: 1px solid #e8eef5; border-radius: 10px;
    padding: 18px; margin-bottom: 16px;
}
.hp-sidebar-title {
    font-size: 16px; font-weight: 700; color: var(--cp-navy-2); margin: 0 0 14px;
    padding-bottom: 8px; border-bottom: 2px solid #e8eef5;
}
.hp-sidebar-title span { color: #c0392b; }

/* ── Link list ── */
.hp-link-list { list-style: none; padding: 0; margin: 0; }
.hp-link-list li { padding: 5px 0; border-bottom: 1px solid #f8f9fa; }
.hp-link-list li:last-child { border: none; }
.hp-link-list a {
    color: var(--cp-blue); text-decoration: none; font-size: 13px;
    display: flex; align-items: center; gap: 6px;
}
.hp-link-list a:hover { color: var(--cp-navy-2); }
.hp-link-list a i { font-size: 10px; color: #adb5bd; width: 14px; }

/* ── Indici offerte pill ── */
.hp-oi-section { margin-bottom: 28px; }
.hp-oi-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hp-oi-header h3 { font-size: 16px; font-weight: 700; color: var(--cp-navy-2); margin: 0; }
.hp-oi-header a { font-size: 12px; font-weight: 600; color: var(--cp-blue); text-decoration: none; }
.hp-oi-header a:hover { color: var(--cp-navy-2); }
.hp-oi-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-oi-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 15px; border-radius: 22px;
    background: #f0f7fb; color: var(--cp-navy-2);
    font-size: 13px; font-weight: 600;
    border: 1px solid #d0e3f0; text-decoration: none;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
    white-space: nowrap;
}
.hp-oi-pill:hover {
    background: var(--cp-navy-2); color: #fff; border-color: var(--cp-navy-2);
    box-shadow: 0 3px 10px rgba(26,53,96,.18); text-decoration: none;
}
.hp-oi-pill i { font-size: 12px; opacity: .8; }
.hp-oi-pill.hp-oi-hot { background: #fff5f0; color: #c0392b; border-color: #f5c6bb; }
.hp-oi-pill.hp-oi-hot:hover { background: #c0392b; color: #fff; border-color: #c0392b; }
.hp-oi-pill.hp-oi-estate { background: #fff8e1; color: #e65100; border-color: #ffe082; }
.hp-oi-pill.hp-oi-estate:hover { background: #e65100; color: #fff; border-color: #e65100; }

/* ── Cerca per esigenza — sezione card full-width ── */
.hp-esi-section { background: #fff; padding: 24px 0 28px; }
.hp-esi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hp-esi-card {
    display: grid; grid-template-rows: 1fr auto auto;
    background: #fff; border-radius: 16px; overflow: hidden;
    text-decoration: none; color: var(--cp-navy-2);
    box-shadow: 0 2px 12px rgba(26,53,96,.07);
    border: 1px solid #e4edf5;
    transition: box-shadow .2s, transform .2s;
}
.hp-esi-card:hover {
    box-shadow: 0 8px 32px var(--cp-navy-2-a15);
    transform: translateY(-4px);
    text-decoration: none; color: var(--cp-navy-2);
}
.hp-esi-head { padding: 28px 24px 18px; display: flex; align-items: flex-start; gap: 16px; }
.hp-esi-icon {
    width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.hp-esi-title { font-size: 17px; font-weight: 800; color: var(--cp-navy-2); line-height: 1.25; margin: 6px 0 6px; }
.hp-esi-desc { font-size: 13px; color: #6c757d; line-height: 1.55; margin: 0; }
.hp-esi-body { display: contents; }
.hp-esi-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 24px 14px; align-content: flex-start; }
.hp-esi-tag {
    font-size: 11px; font-weight: 600; padding: 3px 9px;
    border-radius: 20px; border: 1.5px solid currentColor; opacity: 1; /* 17/09/2026 contrasto: a .8 cinque colori su otto scendevano sotto 4,5:1 */
}
.hp-esi-cta {
    display: inline-flex; align-items: center; gap: 7px;
    align-self: start; justify-self: start; margin: 0 24px 22px;
    font-size: 13px; font-weight: 700; padding: 9px 20px;
    border-radius: 8px; color: #fff; border: none;
    position: relative; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
    transition: box-shadow .25s cubic-bezier(.4,0,.2,1),
                transform .2s cubic-bezier(.4,0,.2,1);
}
.hp-esi-cta::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.hp-esi-cta i { transition: transform .2s cubic-bezier(.4,0,.2,1); }
.hp-esi-card:hover .hp-esi-cta { box-shadow: 0 5px 18px rgba(0,0,0,.22); transform: translateY(-1px); }
.hp-esi-card:hover .hp-esi-cta::after { transform: translateX(100%); }
.hp-esi-card:hover .hp-esi-cta i { transform: translateX(4px); }
/* varianti colore per ogni categoria */
.hp-esi--orange .hp-esi-icon { background: #fff3e0; color: #e65100; }
.hp-esi--orange .hp-esi-tag  { color: #ce4800; } /* 17/09/2026 contrasto: #e65100 = 3,79:1 */
.hp-esi--orange .hp-esi-cta  { background: linear-gradient(135deg, #e65100, #ff8f00); }
.hp-esi--red    .hp-esi-icon { background: #fce4ec; color: #c62828; }
.hp-esi--red    .hp-esi-tag  { color: #c62828; }
.hp-esi--red    .hp-esi-cta  { background: linear-gradient(135deg, #c62828, #e53935); }
.hp-esi--green  .hp-esi-icon { background: #e8f5e9; color: #2e7d32; }
.hp-esi--green  .hp-esi-tag  { color: #2e7d32; }
.hp-esi--green  .hp-esi-cta  { background: linear-gradient(135deg, #2e7d32, #43a047); }
.hp-esi--blue   .hp-esi-icon { background: #e3f2fd; color: #1565c0; }
.hp-esi--blue   .hp-esi-tag  { color: #1565c0; }
.hp-esi--blue   .hp-esi-cta  { background: linear-gradient(135deg, #1565c0, #1e88e5); }
.hp-esi--purple .hp-esi-icon { background: #f3e5f5; color: #6a1b9a; }
.hp-esi--purple .hp-esi-tag  { color: #6a1b9a; }
.hp-esi--purple .hp-esi-cta  { background: linear-gradient(135deg, #6a1b9a, #8e24aa); }
.hp-esi--teal   .hp-esi-icon { background: #e0f7fa; color: #00838f; }
.hp-esi--teal   .hp-esi-tag  { color: #00838f; }
.hp-esi--teal   .hp-esi-cta  { background: linear-gradient(135deg, #00838f, #00acc1); }

/* ── Motore ricerca mini ── */
.hp-search-mini {
    background: linear-gradient(135deg, #eef5ff, #f5faff);
    border: 1px solid #d0e3f0; border-radius: 12px;
    padding: 18px; text-align: center;
}
.hp-search-mini h4 { font-size: 15px; font-weight: 700; color: var(--cp-navy-2); margin: 0 0 6px; }
.hp-search-mini p { font-size: 12px; color: #6c757d; margin: 0 0 12px; }
.hp-search-mini a {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--cp-navy-2); color: #fff; padding: 10px 24px;
    border-radius: 25px; font-weight: 700; font-size: 13px;
    text-decoration: none; transition: all .2s;
}
.hp-search-mini a:hover { background: var(--cp-blue); transform: translateY(-1px); }

/* ── Heading sezione esperienze (hero h2 + sub) ── */
.hp-esi-heading     { font-size: 22px; font-weight: 700; color: var(--cp-navy-2); margin: 0 0 8px; }
.hp-esi-heading-sub { font-size: 14px; color: #6c757d; margin: 0 0 24px; line-height: 1.5; }

/* ── Hero badge (evento/fiera stagionale) ── */
.hp-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35);
    border-radius: 20px; padding: 6px 16px; font-size: 13px; font-weight: 600;
    color: rgba(255,255,255,.9); margin-bottom: 16px; backdrop-filter: blur(4px);
}
.hp-hero-badge i { color: var(--cp-star); font-size: 12px; flex-shrink: 0; }
.hp-hero-badge a { color: var(--cp-star); text-decoration: none; }
.hp-hero-badge a:hover { text-decoration: underline; }

/* ── Grid 4 colonne (esperienze-v2, 8 categorie) ── */
.hp-esi-grid--4col { grid-template-columns: repeat(4, 1fr); }

/* ── Varianti colore aggiuntive ── */
.hp-esi--navy  .hp-esi-icon { background: #e8ecf8; color: var(--cp-navy-2); }
.hp-esi--navy  .hp-esi-tag  { color: var(--cp-navy-2); }
.hp-esi--navy  .hp-esi-cta  { background: linear-gradient(135deg, var(--cp-navy-2), #2d5ba6); }
.hp-esi--coral .hp-esi-icon { background: #fff0ec; color: #bf360c; }
.hp-esi--coral .hp-esi-tag  { color: #bf360c; }
.hp-esi--coral .hp-esi-cta  { background: linear-gradient(135deg, #bf360c, #e64a19); }

/* ── Zone geografiche ── */
.hp-zone-section { padding: 16px 0 22px; background: var(--cp-bg-light); }
.hp-zone-title   { font-size: 17px; font-weight: 700; color: var(--cp-navy-2); margin: 0 0 4px; }
.hp-zone-sub     { font-size: 13px; color: #6c757d; margin: 0 0 14px; }
.hp-zone-pills   { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-zone-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 24px;
    background: #fff; border: 1.5px solid #d0e3f0;
    color: var(--cp-navy-2); font-size: 13px; font-weight: 600;
    text-decoration: none; transition: all .2s; white-space: nowrap;
}
.hp-zone-pill i { font-size: 11px; color: var(--cp-blue); transition: color .2s; }
.hp-zone-pill:hover {
    background: var(--cp-navy-2); color: #fff; border-color: var(--cp-navy-2);
    box-shadow: 0 3px 10px rgba(26,53,96,.18); text-decoration: none;
}
.hp-zone-pill:hover i { color: var(--cp-star); }
.hp-zone-pill--cta { border-color: var(--cp-navy-2); font-weight: 700; }
.hp-zone-pill--cta i { color: var(--cp-navy-2); }

/* ── Scopri la Riviera ── */
.hp-riviera-section { padding: 28px 0 36px; }
.hp-riviera-hd {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.hp-riviera-hd-left h2 { font-size: 22px; font-weight: 700; color: var(--cp-navy-2); margin: 0 0 4px; }
.hp-riviera-hd-left h2 span { color: var(--cp-blue); }
.hp-riviera-hd-left p   { font-size: 13px; color: #6c757d; margin: 0; }
.hp-riviera-hd-cta {
    font-size: 13px; font-weight: 600; color: var(--cp-blue); text-decoration: none;
    white-space: nowrap; display: inline-flex; align-items: center; gap: 5px;
}
.hp-riviera-hd-cta:hover { color: var(--cp-navy-2); }
.hp-riviera-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hp-riviera-card {
    border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--cp-navy-2);
    box-shadow: 0 2px 10px rgba(26,53,96,.07); border: 1px solid #e4edf5;
    transition: box-shadow .2s, transform .2s;
    display: flex; flex-direction: column; background: #fff;
}
.hp-riviera-card:hover {
    box-shadow: 0 6px 24px rgba(26,53,96,.14); transform: translateY(-3px);
    text-decoration: none; color: var(--cp-navy-2);
}
.hp-riviera-card-img { width: 100%; height: 140px; object-fit: cover; display: block; }
.hp-riviera-card-nophoto {
    width: 100%; height: 140px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: #1565c0;
}
.hp-riviera-card-nophoto--park { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #2e7d32; }
.hp-riviera-card-body  { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.hp-riviera-card-type  { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--cp-blue); letter-spacing: .5px; margin: 0 0 5px; }
.hp-riviera-card-type--park { color: #2e7d32; }
.hp-riviera-card-title { font-size: 14px; font-weight: 700; color: var(--cp-navy-2); line-height: 1.3; margin: 0 0 6px; }
.hp-riviera-card-desc  {
    font-size: 12px; color: #6c757d; line-height: 1.4; margin: 0; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Responsive — DOPO le regole base (cascade corretto) ── */
@media (max-width: 1100px) {
    .hp-esi-grid--4col { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .hp-offers-grid  { grid-template-columns: repeat(2, 1fr); }
    .hp-esi-grid     { grid-template-columns: repeat(2, 1fr); }
    .hp-riviera-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .hp-hero         { padding: 32px 15px 28px; }
    .hp-hero h1      { font-size: 24px; }
    .hp-hero .hp-sub { font-size: 14px; }
    .hp-themes       { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hp-hero-stats   { padding: 10px 12px; gap: 0; }
    .hp-hero-stat    { padding: 0 10px; }
    .hp-hero-stat strong { font-size: 18px; }
    .hp-hero-stat-sep   { height: 24px; }
    .hp-esi-grid--4col  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .hp-offers-grid  { grid-template-columns: 1fr; }
    .hp-esi-grid     { grid-template-columns: 1fr; }
    .hp-esi-section  { padding: 16px 0 20px; }
    .hp-riviera-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .hp-themes         { grid-template-columns: 1fr 1fr; }
    .hp-theme          { padding: 16px 10px; }
    .hp-theme-icon     { width: 44px; height: 44px; font-size: 20px; }
    .hp-esi-grid--4col { grid-template-columns: 1fr; }
    .hp-riviera-grid   { grid-template-columns: 1fr; }
}

/* 17/09/2026 accessibilita' — «link lungo» (inc/home-blocks/esperienze-v2.php, scopri-riviera.php): il link e' il titolo,
   il suo ::after stende l'area cliccabile su tutta la card. Aspetto, hover e click identici a prima. */
.hp-esi-card { position: relative; }
.hp-esi-link, .hp-esi-link:hover, .hp-esi-link:focus { color: inherit; text-decoration: none; }
.hp-esi-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.hp-esi-link:focus { outline: none; }
.hp-esi-card:focus-within { outline: 3px solid var(--cp-blue, #267a90); outline-offset: 3px; }
