/* ═══════════════════════════════════════════════════════════
   restaurang.css  –  clean, no duplicates
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Inter", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(96,165,250,0.10), transparent 24%),
        linear-gradient(180deg, #f8faff 0%, #eef3ff 100%);
    min-height: 100vh;
}

/* ── Hero ─────────────────────────────────────────────────── */
.restaurants-hero {
    position: relative;
    background:
        radial-gradient(circle at 18% 24%, rgba(125,211,252,0.16), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(96,165,250,0.18), transparent 34%),
        linear-gradient(135deg, #0a0f38 0%, #171d67 58%, #3556de 100%);
    color: #fff;
    padding: 102px 24px 74px;
    text-align: center;
    overflow: hidden;
}
.restaurants-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.10) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.55;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    color: #dbeafe;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 8px 18px;
    border-radius: 999px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}
.hero-label::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #7dd3fc;
}

.restaurants-hero h1 {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    line-height: 1.06;
    max-width: 700px;
    margin: 0 auto 16px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}
.restaurants-hero h1 em { font-style: italic; color: #a9c8ff; }

.restaurants-hero p {
    font-size: 1.03rem;
    color: #d5def1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ── Body ─────────────────────────────────────────────────── */
.restaurants-body {
    max-width: 1160px;
    margin: 0 auto;
    padding: 64px 24px 88px;
}

.section-label {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #3b82f6;
    margin-bottom: 10px;
}

.section-heading {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp(1.8rem, 3.7vw, 2.8rem);
    line-height: 1.14;
    color: #0f172a;
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

/* ── Filter bar ───────────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(132,149,255,0.22);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,248,255,0.96));
    color: #475569;
    font-size: .82rem;
    font-weight: 700;
    font-family: "Inter", sans-serif;
    cursor: pointer;
    transition: all .18s ease;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06);
}
.filter-btn:hover {
    border-color: rgba(59,130,246,0.3);
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37,99,235,0.10);
}
.filter-btn.active {
    background: linear-gradient(135deg, #0a0f38, #1b2b7a);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(10,15,56,0.22);
}
.filter-btn.nearby-active {
    background: linear-gradient(135deg, #0f766e, #0d9488);
    color: #fff;
    border-color: transparent;
}
.filter-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Letter dropdown ──────────────────────────────────────── */
.letter-filter { position: relative; }

.letter-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(132,149,255,0.22);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,248,255,0.96));
    color: #475569;
    font-size: .82rem;
    font-weight: 700;
    font-family: "Inter", sans-serif;
    cursor: pointer;
    transition: all .18s ease;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06);
    white-space: nowrap;
}
.letter-dropdown-trigger:hover {
    border-color: rgba(59,130,246,0.3);
    color: #1d4ed8;
    transform: translateY(-1px);
}
.letter-dropdown-trigger.active {
    background: linear-gradient(135deg, #0a0f38, #1b2b7a);
    color: #fff;
    border-color: transparent;
}
.letter-dropdown-trigger .chevron { transition: transform .2s ease; font-style: normal; font-size: .7rem; }
.letter-dropdown-trigger.open .chevron { transform: rotate(180deg); }

.letter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 16px;
    padding: 8px;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(15,23,42,0.14);
    z-index: 200;
    min-width: 120px;
    border: 1px solid rgba(132,149,255,0.16);
}
.letter-dropdown.open { display: block; animation: fadeDown .18s ease; }

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.letter-dropdown button {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    text-align: left;
    font-size: .84rem;
    color: #374151;
    font-family: "Inter", sans-serif;
    transition: background .12s;
}
.letter-dropdown button:hover { background: #eef3ff; color: #1d4ed8; }
.letter-dropdown button.active { background: #0a0f38; color: #fff; }

/* ── Nearby info ──────────────────────────────────────────── */
.restaurant-search {
    width: min(520px, 100%);
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    margin: 0 0 16px;
    padding: 4px 5px 4px 16px;
    border: 1px solid rgba(132,149,255,0.22);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,249,255,0.96));
    box-shadow: 0 10px 24px rgba(79,110,247,0.08);
}

.restaurant-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: .92rem;
    outline: none;
}

.restaurant-search-clear {
    border: none;
    background: transparent;
    color: #4f6ef7;
    cursor: pointer;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.restaurant-search-clear:hover {
    background: rgba(79,110,247,0.10);
}

.restaurant-search-clear[hidden] {
    display: none;
}

.restaurant-search-button {
    width: 42px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0a0f38, #1b2b7a);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(10,15,56,0.18);
}

.restaurant-search-button-icon {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
}

.restaurant-search-button-icon::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 2.5px;
    border-radius: 999px;
    background: #ffffff;
    right: -6px;
    bottom: -3px;
    transform: rotate(45deg);
}
.nearby-info {
    font-size: .82rem;
    color: #0f766e;
    font-weight: 500;
    margin-bottom: 14px;
    padding: 8px 14px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    display: none;
}
.nearby-info.visible { display: block; }

/* ── Grid ─────────────────────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* tillbaka till 3 kolumner */
    gap: 22px;
    align-items: stretch;
    
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    background:
        radial-gradient(circle at top right, rgba(79,110,247,0.07), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,249,255,0.96));
    border: 1px solid rgba(132,149,255,0.16);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15,23,42,0.07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    animation: fadeUp .5s ease both;
    height: 255px; /* ← justera kortstorlek här */
}
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #38bdf8, #22c55e);
    border-radius: 24px 24px 0 0;
}
.card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(59,130,246,0.24);
    box-shadow: 0 22px 44px rgba(37,99,235,0.13);
}

/* stagger */
.card:nth-child(1)  { animation-delay: .03s; }
.card:nth-child(2)  { animation-delay: .06s; }
.card:nth-child(3)  { animation-delay: .09s; }
.card:nth-child(4)  { animation-delay: .12s; }
.card:nth-child(5)  { animation-delay: .15s; }
.card:nth-child(6)  { animation-delay: .18s; }
.card:nth-child(7)  { animation-delay: .21s; }
.card:nth-child(8)  { animation-delay: .24s; }
.card:nth-child(9)  { animation-delay: .27s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Card top ─────────────────────────────────────────────── */
.card-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 55px 35px 10px; /* ← justera luft ovanför titeln här */
    min-height: 52px;
}

.card-avatar {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #eef4ff);
    border: 1px solid rgba(132,149,255,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.card-avatar img {
    max-width: 36px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.card-avatar span {
    font-size: 1.35rem;
    line-height: 1;
}

.card-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-name {
    font-size: .95rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -0.01em;
    white-space: normal;
    word-break: break-word;
}

.card-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.09);
    color: #1d4ed8;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.card-category span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    line-height: 1;
}

.card-category span img {
    max-width: 18px;
    max-height: 14px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.card-hours {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 700;
    color: #0f766e;
    background: #ddfbf2;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    align-self: flex-start;
}
.card-hours::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

/* ── Distance badge (nearby mode) ────────────────────────── */
.dist-badge {
    position: absolute;
    top: 14px; right: 14px;
    font-size: .72rem;
    font-weight: 600;
    background: #e0edff;
    color: #1d4ed8;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 10;
}

/* ── Divider ──────────────────────────────────────────────── */
.card-divider {
    height: 1px;
    margin: 10px 18px 0;
    background: linear-gradient(90deg,
        rgba(219,234,254,0),
        rgba(191,219,254,0.8),
        rgba(219,234,254,0));
}

/* ── Menu links row ───────────────────────────────────────── */
.menu-links {
    display: flex;
    gap: 10px;
    padding: 10px 14px 14px;
    margin-top: auto;
    margin-bottom: auto;
}

/* ── Buttons ──────────────────────────────────────────────── */
.menu-btn,
.card-map-btn {
    flex: 1;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    text-decoration: none;
    border: 1px solid rgba(59,130,246,0.16);
    background: linear-gradient(180deg, #f8fbff, #edf3ff);
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease;
    font-family: "Inter", sans-serif;
    cursor: pointer;
}
.menu-btn.filled {
    background: linear-gradient(135deg, #0a0f38, #1b2b7a);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(10,15,56,0.22);
}
.menu-btn:hover,
.card-map-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37,99,235,0.12);
}

/* card-bottom: only used when there's just a single map button */
.card-bottom {
    padding: 10px 14px 14px;
    margin-top: auto;
    margin-bottom: auto;
}
.card-bottom .card-map-btn { width: 100%; }

/* When card has both menu-links and card-bottom (e.g. 3-button cards),
   remove the auto-push from card-bottom so only menu-links pushes down */
.card .menu-links ~ .card-bottom {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
}

/* ── No-results placeholder ───────────────────────────────── */
.no-results {
    grid-column: 1/-1;
    text-align: center;
    padding: 56px 0;
    color: #94a3b8;
    font-size: 1rem;
}
.no-results span { display: block; font-size: 2rem; margin-bottom: 8px; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
    background: #0a0f38;
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 24px;
    font-size: .82rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1080px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .restaurants-hero { padding: 86px 18px 60px; }
    .restaurants-body { padding: 46px 16px 64px; }
    .grid { grid-template-columns: 1fr; }
    nav { gap: 14px; }
    nav a { font-size: .8rem; }
}
