/* ═══════════════════════════════════════════════════
   TURISME L'HOSPITALET — CSS GLOBAL
   Disseny: editorial mediterrani modern
   Fonts: Playfair Display + DM Sans
   ═══════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────── */
:root {
    --orange:        #FF6B1A;
    --orange-dark:   #E55A0D;
    --orange-soft:   #FF8C47;
    --orange-pale:   #FFF0E8;
    --amber:         #FFB347;
    --white:         #FFFFFF;
    --cream:         #FAF7F4;
    --cream-dark:    #F2ECE5;
    --ink:           #1C1612;
    --ink-mid:       #4A3F35;
    --ink-soft:      #9B8E84;
    --border:        #E5DDD5;
    --shadow-sm:     0 1px 4px rgba(28,22,18,0.06);
    --shadow-md:     0 4px 20px rgba(28,22,18,0.10);
    --shadow-lg:     0 12px 40px rgba(28,22,18,0.14);
    --r-sm:          10px;
    --r-md:          16px;
    --r-lg:          24px;
    --r-xl:          32px;
    --r-full:        9999px;
    --font-display:  'Playfair Display', Georgia, serif;
    --font-body:     'DM Sans', system-ui, sans-serif;
    --wrap:          1160px;
    --pad:           clamp(16px, 4vw, 40px);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); }

/* ── Utilitats ──────────────────────────────────────── */
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }
.mb-6 { margin-bottom: 2.5rem; }

/* ══════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: 66px;
    background: rgba(250,247,244,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--pad);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.nav-logo {
    width: 36px; height: 36px;
    background: var(--orange);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(255,107,26,0.40);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.nav-brand:hover .nav-logo { transform: rotate(-8deg) scale(1.05); }
.nav-brand-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--ink-mid);
    letter-spacing: 0;
}
.nav-brand-text strong {
    font-weight: 700;
    color: var(--ink);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--r-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-mid);
    transition: background 0.18s, color 0.18s;
}
.nav-btn-ghost:hover {
    background: var(--orange-pale);
    color: var(--orange);
}
.nav-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--orange);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(255,107,26,0.35);
    cursor: pointer;
    margin-left: 4px;
}
.nav-btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border-radius: var(--r-full);
    background: var(--orange);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 4px;
    box-shadow: 0 4px 14px rgba(255,107,26,0.30);
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.nav-btn-primary:hover {
    background: var(--orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255,107,26,0.38);
}

/* ══════════════════════════════════════════════════════
   MAIN
══════════════════════════════════════════════════════ */
.site-main { min-height: calc(100vh - 66px); }

/* ── Section wrapper comú ───────────────────────────── */
.section-wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 48px var(--pad) 0;
}
.section-last { padding-bottom: 72px; }

/* ── Label petit ────────────────────────────────────── */
.section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--orange);
    margin-bottom: 10px;
}
.label-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--orange);
    flex-shrink: 0;
}

/* ── Section head (title + link) ────────────────────── */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    letter-spacing: -0.4px;
}
.link-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--orange);
    white-space: nowrap;
    padding-bottom: 4px;
    border-bottom: 1.5px solid transparent;
    transition: border-color 0.18s;
    flex-shrink: 0;
}
.link-more:hover { border-color: var(--orange); }

/* ══════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════ */
.hero {
    background: linear-gradient(160deg, var(--cream) 0%, var(--cream-dark) 100%);
    border-bottom: 1px solid var(--border);
    padding: 60px var(--pad) 50px;
}
.hero-inner {
    max-width: var(--wrap);
    margin: 0 auto;
}
.hero-eyebrow {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1.5px;
    color: var(--ink);
    margin-bottom: 18px;
}
.hero-title em {
    font-style: italic;
    color: var(--orange);
}
.hero-subtitle {
    max-width: 520px;
    font-size: 1.05rem;
    color: var(--ink-mid);
    line-height: 1.65;
    margin-bottom: 36px;
}

/* ── Search ─────────────────────────────────────────── */
.hero-search { margin-bottom: 20px; max-width: 600px; }
.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 18px;
    width: 18px; height: 18px;
    color: var(--ink-soft);
    pointer-events: none;
    flex-shrink: 0;
}
.search-input {
    width: 100%;
    height: 54px;
    padding: 0 20px 0 50px;
    border-radius: var(--r-full);
    border: 1.5px solid var(--border);
    background: var(--white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    outline: none;
    box-shadow: var(--shadow-md);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(255,107,26,0.10), var(--shadow-md);
}
.search-input::placeholder { color: var(--ink-soft); }

/* ── Chip filters ───────────────────────────────────── */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 700px;
}
.chip {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--r-full);
    border: 1.5px solid var(--border);
    background: var(--white);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-mid);
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: all 0.18s ease;
    line-height: 1;
}
.chip:hover:not(.active) {
    border-color: var(--orange);
    color: var(--orange);
    background: var(--orange-pale);
}
.chip.active {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
    box-shadow: 0 4px 16px rgba(255,107,26,0.32);
}

/* ══════════════════════════════════════════════════════
   MAPA
══════════════════════════════════════════════════════ */
.map-frame {
    width: 100%;
    height: 460px;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-lg);
    position: relative;
}
.map-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(200,225,200,0.6) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 65%, rgba(225,210,190,0.5) 0%, transparent 50%),
        linear-gradient(150deg, #deeada 0%, #e8e0d4 50%, #d8e4ea 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
/* Grid de línies de carrer decoratives */
.map-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.map-center-marker {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.marker-pulse {
    position: absolute;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,107,26,0.15);
    animation: pulse-ring 2s ease-out infinite;
}
.marker-dot {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: var(--orange);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 24px rgba(255,107,26,0.50), 0 0 0 5px rgba(255,107,26,0.15);
    position: relative;
    z-index: 1;
}
@keyframes pulse-ring {
    0%   { transform: scale(0.7); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}
.map-label-main {
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}
.map-label-sub {
    position: relative;
    z-index: 2;
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-top: -8px;
}

/* ══════════════════════════════════════════════════════
   CARDS GRID
══════════════════════════════════════════════════════ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
}

.place-card {
    background: var(--white);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    cursor: pointer;
}
.place-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-media {
    height: 168px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.28) 100%);
}
.btn-fav {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 12px; right: 12px;
    z-index: 2;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--orange);
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
    transition: transform 0.2s, background 0.2s;
}
.btn-fav:hover { transform: scale(1.18); background: white; }

.card-badge {
    position: absolute;
    bottom: 12px; left: 12px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: var(--r-full);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.card-body {
    padding: 16px 18px 18px;
}
.card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
    line-height: 1.3;
}
.card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--ink-soft);
}

/* ── Skeletons ──────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -300% 0; }
    100% { background-position: 300% 0; }
}
.skeleton-card {
    pointer-events: none;
    cursor: default;
}
.skel-media {
    height: 168px;
    background: linear-gradient(90deg, var(--cream-dark) 25%, #ede5db 50%, var(--cream-dark) 75%);
    background-size: 300% 100%;
    animation: shimmer 1.8s infinite;
}
.skel-line {
    border-radius: 6px;
    display: block;
    background: linear-gradient(90deg, var(--cream-dark) 25%, #ede5db 50%, var(--cream-dark) 75%);
    background-size: 300% 100%;
    animation: shimmer 1.8s infinite;
}

/* ══════════════════════════════════════════════════════
   GIMCANA BANNER
══════════════════════════════════════════════════════ */
.gimcana-card {
    background: linear-gradient(130deg, var(--orange) 0%, var(--amber) 100%);
    border-radius: var(--r-xl);
    padding: 40px 40px 36px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(255,107,26,0.35);
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.gimcana-deco {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}
.gimcana-deco-1 { width: 260px; height: 260px; top: -80px; right: -60px; }
.gimcana-deco-2 { width: 140px; height: 140px; bottom: -50px; right: 120px; }

.gimcana-content {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    position: relative;
    z-index: 1;
}
.gimcana-icon-wrap {
    width: 54px; height: 54px;
    border-radius: 16px;
    background: rgba(255,255,255,0.20);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.gimcana-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    opacity: 0.75;
    margin-bottom: 6px;
}
.gimcana-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 10px;
}
.gimcana-desc {
    font-size: 0.9rem;
    opacity: 0.88;
    line-height: 1.6;
    max-width: 480px;
}
.gimcana-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 14px 28px;
    border-radius: var(--r-md);
    background: white;
    color: var(--orange);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    transition: transform 0.2s, box-shadow 0.2s;
}
.gimcana-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 28px 0;
    margin-top: 64px;
}
.footer-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--pad);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 28px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}
.footer-copy {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-left: auto;
}
.footer-links {
    display: flex;
    gap: 18px;
}
.footer-links a {
    font-size: 0.8rem;
    color: var(--ink-soft);
    transition: color 0.18s;
}
.footer-links a:hover { color: var(--orange); }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .gimcana-card { flex-direction: row; align-items: center; }
    .gimcana-btn  { margin-left: auto; align-self: center; }
}

@media (max-width: 767px) {
    .hero { padding: 40px var(--pad) 36px; }
    .hero-title { letter-spacing: -0.8px; }
    .search-input { height: 50px; font-size: 0.9rem; }
    .map-frame { height: 280px; border-radius: var(--r-lg); }
    .cards-grid {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 14px;
        padding-bottom: 6px;
    }
    .cards-grid::-webkit-scrollbar { display: none; }
    .place-card { min-width: 210px; flex-shrink: 0; }
    .gimcana-card { padding: 28px 24px; }
    .gimcana-title { font-size: 1.3rem; }
    .section-head { align-items: flex-start; flex-direction: column; gap: 4px; }
    .nav-btn-ghost span, .nav-btn-ghost { display: none; }
    .nav-btn-ghost:last-of-type { display: inline-flex; }
    .footer-copy { margin-left: 0; }
}

@media (max-width: 480px) {
    .gimcana-content { flex-direction: column; gap: 14px; }
    .nav-brand-text { display: none; }
}