:root {
    --primary: #0f4c81;
    --primary-dark: #0c3c66;
    --accent: #ffb347;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2d3d;
    --muted: #5c6b7a;
    --shadow: 0 14px 40px rgba(16, 70, 129, 0.12);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 10% 20%, #e7f0ff 0%, #f5f7fb 35%, #f5f7fb 100%);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   SITE HEADER
   ======================================== */
.site-header {
    background: linear-gradient(135deg, #0066FF 0%, #1a7aff 50%, #3d8bff 100%);
    color: #fff;
    position: relative;
    box-shadow: 0 4px 24px rgba(0, 102, 255, 0.3);
}

.header-inner {
    padding: 12px 0;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s ease;
}

.header-brand:hover {
    opacity: 0.9;
    color: #fff;
}

.brand-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo img {
    width: 48px;
    height: 48px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.1;
}

.brand-tagline {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    text-decoration: none;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
}

/* Hero section (inside header, for page-specific content) */
.site-header .hero-content {
    padding: 0 0 16px;
}

.hero-title {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    margin: 8px 0 6px;
    letter-spacing: -0.3px;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    max-width: 840px;
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
}

.hero-content .stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.hero-content .stat-pill {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ========================================
   MAIN CONTENT - Flex grow for sticky footer
   ======================================== */
.site-main {
    flex: 1;
}

.page-wrap {
    margin-top: 16px;
    padding: 32px 16px 56px;
}

/* ========================================
   SITE FOOTER - Sticky at bottom
   ======================================== */
.site-footer {
    background: linear-gradient(135deg, #0066FF 0%, #1a7aff 50%, #3d8bff 100%);
    color: #fff;
    padding: 32px 0 24px;
    margin-top: auto;
    text-align: center;
    box-shadow: 0 -4px 24px rgba(0, 102, 255, 0.3);
}

.site-footer a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-footer a:hover {
    opacity: 0.8;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.footer-brand {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
}

.footer-links a {
    font-size: 14px;
    padding: 4px 0;
}

.footer-copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

/* ========================================
   UI COMPONENTS
   ======================================== */
.badge-pill {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-right: 10px;
}

.filters {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.filters .form-control,
.filters .form-select {
    border: 1px solid #d8e3f5;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
}

.filters .form-range {
    accent-color: var(--primary);
}

.filters .btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    padding: 11px 14px;
    box-shadow: 0 14px 30px rgba(15, 76, 129, 0.25);
}

.filter-input label {
    font-weight: 700;
}

.filter-actions {
    display: flex;
    align-items: end;
}

.sticky-filters {
    position: sticky;
    top: 12px;
    z-index: 5;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 6px;
}

.chip {
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chip-ghost {
    border: 1px solid #d6e3f7;
    color: var(--primary-dark);
    background: #fff;
    transition: all 0.15s ease;
}

.chip-ghost:hover {
    background: rgba(15, 76, 129, 0.08);
    border-color: var(--primary);
}

.chip-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(15, 76, 129, 0.25);
}

.stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.stat-pill {
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: var(--shadow);
    font-weight: 600;
    color: var(--primary-dark);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.card-drink {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
}

.card-drink:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(16, 70, 129, 0.18);
}

.card-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #d3e5ff, #f3f7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.card-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.placeholder-media {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
}

.placeholder-letter {
    font-size: 48px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-title {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--text);
}

.pill {
    display: inline-block;
    background: rgba(15, 76, 129, 0.08);
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.score-chip {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: #2a1b00;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.meta-item {
    background: rgba(15, 76, 129, 0.04);
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 13px;
}

.meta-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 24px;
    color: #d9e8ff;
}

.offcanvas-backdrop.show {
    opacity: 0.6;
}

.modal-header {
    border: none;
}

.modal-content {
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.comment-placeholder {
    background: rgba(15, 76, 129, 0.03);
    border: 1px dashed rgba(15, 76, 129, 0.35);
    border-radius: 12px;
    padding: 12px;
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

.sentinel {
    height: 1px;
}

/* ========================================
   LEGAL/ABOUT PAGE STYLES
   ======================================== */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
}

.legal-page h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 24px;
}

.legal-page h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(15, 76, 129, 0.1);
}

.legal-page h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-top: 24px;
    margin-bottom: 12px;
}

.legal-page p {
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--text);
}

.legal-page ul, .legal-page ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-page li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.legal-page .last-updated {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
}

.legal-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 24px;
}

.legal-nav {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 24px;
}

.legal-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legal-nav a {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(15, 76, 129, 0.06);
    border-radius: 8px;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.legal-nav a:hover {
    background: var(--primary);
    color: #fff;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .header-inner {
        padding: 12px 0;
    }
    .header-brand {
        gap: 10px;
    }
    .brand-logo {
        width: 40px;
        height: 40px;
    }
    .brand-logo img {
        width: 36px;
        height: 36px;
    }
    .brand-name {
        font-size: 18px;
    }
    .brand-tagline {
        font-size: 11px;
    }
    .site-header .hero-content {
        padding: 16px 0 24px;
    }
    .page-wrap {
        margin-top: 8px;
        padding: 24px 12px 48px;
    }
    .filters {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    .card-media {
        height: 150px;
    }
    .legal-card {
        padding: 24px;
    }
    .legal-page h1 {
        font-size: 26px;
    }
    .legal-page h2 {
        font-size: 20px;
    }
    .footer-links {
        gap: 8px 16px;
    }
}
