/* ==========================================================
   BLUEST PUBLIC SITE — stylesheet
   v1.2.0
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a2332;
    background: #fafbfc;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

:root {
    --navy: #0c2541;
    --navy-2: #163759;
    --accent: #2e7dd1;
    --accent-soft: #e6f0fa;
    --bg: #fafbfc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1a2332;
    --text-muted: #64748b;
    --radius: 12px;
    --radius-lg: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ----- Top bar (richiesta utente: admin a SX, logo a DX) ----- */
.site-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
    position: sticky; top: 0; z-index: 50;
}
.site-topbar .topbar-inner {
    max-width: 1400px; margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
}
.site-nav {
    display: flex; align-items: center; gap: 16px;
}
.nav-admin {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.nav-admin:hover { background: var(--bg); color: var(--navy); text-decoration: none; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--navy);
}
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.brand-text {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
}
.brand-text em {
    font-style: normal;
    font-weight: 400;
    color: var(--text-muted);
}

/* ----- Main ----- */
.site-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* ----- Hero ----- */
.hero {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 56px 48px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}
.hero.hero-narrow {
    text-align: center;
    background: linear-gradient(135deg, #f0f6fc 0%, #ffffff 100%);
}
.hero h1 {
    margin: 0 0 12px;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--navy);
}
.hero p {
    margin: 0 0 8px;
    font-size: 17px;
    color: var(--text-muted);
}
.hero-contact { font-size: 18px; line-height: 1.8; margin-top: 24px; }
.hero-desc {
    font-size: 16px;
    color: var(--text);
    max-width: 720px;
}
.hero-desc p { margin: 8px 0; }
.hero-desc strong { font-weight: 600; }
.hero-img {
    background-size: cover;
    background-position: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    border: none;
}
.hero-img::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(12,37,65,0.2) 0%, rgba(12,37,65,0.85) 100%);
}
.hero-img .hero-inner { position: relative; z-index: 1; }
.hero-img h1, .hero-img p, .hero-img .hero-desc { color: #fff; }
.hero-img .hero-desc { color: rgba(255,255,255,0.92); }

/* ----- Sezioni categoria nella homepage ----- */
.cat-section {
    margin-top: 48px;
}
.cat-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.cat-section-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: -0.3px;
}
.cat-link {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* ----- Grid escursioni (max 5 per riga, full page come da spec) ----- */
.grid-wrap { padding: 0; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
@media (max-width: 1200px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 960px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .card-grid { grid-template-columns: 1fr; }
}

.exc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    display: flex;
    flex-direction: column;
}
.exc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15,23,42,0.1);
    border-color: #cbd5e1;
    text-decoration: none;
}
.exc-card-img {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #e0eaf5 0%, #c8d8eb 100%);
    background-size: cover;
    background-position: center;
}
.exc-card-body {
    padding: 14px 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}
.exc-card-body h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.3;
}
.exc-card-body .price {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

/* ----- Empty ----- */
.empty-public {
    padding: 48px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
}
.empty-public p { margin: 8px 0; }
.muted { color: var(--text-muted); font-size: 15px; }

/* ----- Bottoni ----- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.btn-primary:hover { background: var(--navy-2); color: #fff; text-decoration: none; }

/* ----- Footer ----- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Mobile */
@media (max-width: 600px) {
    .site-topbar .topbar-inner { padding: 0 16px; height: 60px; }
    .brand-text { font-size: 17px; }
    .brand-mark { width: 34px; height: 34px; font-size: 17px; }
    .site-main { padding: 20px 16px 48px; }
    .hero { padding: 32px 24px; }
    .hero h1 { font-size: 28px; }
    .cat-section-head h2 { font-size: 20px; }
}

/* ===== AGGIUNTE v1.3.0 ===== */
.exc-card-img {
    background-size: cover;
    background-position: center;
    background-color: #c8d8eb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-placeholder {
    color: var(--navy);
    font-size: 56px;

/* ==========================================================
   PATCH v1.4.2 — Logo immagine (regole aggressive con !important
   per sovrascrivere eventuale CSS in cache)
   ========================================================== */

.site-topbar .brand {
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
}
.site-topbar .brand-logo,
.brand .brand-logo,
img.brand-logo {
    height: 44px !important;
    width: auto !important;
    max-width: 200px !important;
    max-height: 50px !important;
    display: block !important;
    object-fit: contain !important;
}

/* Topbar pubblica con solo logo (no admin link) */
.site-topbar .topbar-inner {
    justify-content: flex-start !important;
}

@media (max-width: 480px) {
    .site-topbar .brand-logo,
    img.brand-logo {
        height: 36px !important;
        max-height: 40px !important;
    }
}
