/* FONTS */
@font-face {
    font-family: 'Comfortaa';
    src: url('../fonts/Comfortaa-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Comfortaa';
    src: url('../fonts/Comfortaa-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Comfortaa';
    src: url('../fonts/Comfortaa-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'Comfortaa';
    src: url('../fonts/Comfortaa-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

/* DESIGN TOKENS */
:root {
    --bg:           #f3f4f8;
    --surface:      #ffffff;
    --text-1:       #111827;
    --text-2:       #64748b;
    --text-3:       #94a3b8;
    --accent:       #3b82f6;
    --accent-bg:    #eff6ff;
    --danger:       #ef4444;
    --danger-bg:    #fef2f2;
    --danger-text:  #b91c1c;
    --success:      #22c55e;
    --success-text: #15803d;
    --border:       #e5e7eb;
    --radius:       12px;
    --radius-sm:    10px;
    --nav-h:        64px;
    --top-h:        56px;
    --safe-b:       env(safe-area-inset-bottom, 0px);
}

/* RESET & BASE */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comfortaa', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-1);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

img { display: block; }
a   { color: inherit; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* TOP BAR */
.top-bar {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--top-h);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo img { height: 30px; }

.top-actions { position: relative; }

.lang-btn {
    font-family: 'Comfortaa', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-2);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
}

.lang-btn:active {
    border-color: var(--accent);
    color: var(--accent);
}

/* Language dropdown */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 16px;
    min-width: 156px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    overflow: hidden;
    z-index: 100;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
}

.lang-option {
    display: block;
    padding: 11px 16px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-1);
}

.lang-option:active { background: var(--bg); }

.lang-option.active {
    color: var(--accent);
    font-weight: 700;
}

/* MAIN CONTENT (home) */
.main-content {
    padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 28px);
    max-width: 540px;
    margin: 0 auto;
}

/* Hero */
.hero { padding: 24px 0 4px; }

.hero h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-sub {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-2);
}

/* Status */
.status-card {
    margin-top: 18px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px 18px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-2);
}

.status-card[data-state="open"] .status-text { color: var(--success-text); }

.status-hours {
    font-size: 0.78rem;
    color: var(--text-2);
    font-weight: 500;
    text-align: right;
}

/* Quick info */
.quick-info {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-tile {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 14px 18px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-tile-label {
    font-size: 0.74rem;
    color: var(--text-2);
}

.info-tile-value {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-1);
    overflow-wrap: anywhere;
}

/* Emergency banner */
.emergency-banner { margin-top: 16px; }

.emergency-link {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--danger-bg);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius);
    padding: 14px 18px;
    text-decoration: none;
}

.emergency-link:active { background: #fee2e2; }

.emergency-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.emergency-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--danger-text);
}

.emergency-desc {
    font-size: 0.76rem;
    color: var(--text-2);
}

.emergency-arrow {
    font-size: 1.3rem;
    color: var(--danger-text);
    opacity: 0.6;
    flex-shrink: 0;
}

/* News preview */
.news-preview { margin-top: 28px; }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.section-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
}

.see-all {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.news-card-preview {
    display: flex;
    gap: 14px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 10px;
    border: 1px solid var(--border);
    text-decoration: none;
}

.news-card-preview:active { background: var(--bg); }

.news-card-img {
    width: 76px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}

.news-card-title {
    font-size: 0.86rem;
    font-weight: 700;
}

.news-card-excerpt {
    font-size: 0.76rem;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* "Coming soon" notice (home preview + news page) - TO BE REMOVED */
.notice-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}

.notice-title {
    font-size: 0.9rem;
    font-weight: 700;
}

.notice-text {
    font-size: 0.8rem;
    color: var(--text-2);
}

/* BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    z-index: 999;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-3);
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Comfortaa', sans-serif;
}

.nav-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.45;
}

.nav-label {
    font-size: 0.58rem;
    font-weight: 500;
}

.nav-item.active { color: var(--text-1); }
.nav-item.active .nav-icon { opacity: 1; }
.nav-item.active .nav-label {
    font-weight: 700;
    color: var(--text-1);
}

/* MORE MENU (bottom sheet) */
.more-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.more-overlay.open {
    pointer-events: auto;
    opacity: 1;
}

.more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
}

.more-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    padding: 0 0 calc(12px + var(--safe-b));
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.more-sheet.visible { transform: translateY(0); }

.more-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 10px auto 8px;
}

.more-sheet-content {
    display: flex;
    flex-direction: column;
}

.more-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-1);
    font-size: 0.88rem;
    font-weight: 500;
}

.more-item + .more-item { border-top: 1px solid var(--border); }

.more-item:active { background: var(--bg); }

.more-arrow {
    margin-left: auto;
    font-size: 1.15rem;
    color: var(--text-3);
}

/* SUBPAGES */
.page-content {
    padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 24px);
    max-width: 540px;
    margin: 0 auto;
}

.page-header { padding: 24px 0 4px; }

.page-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-intro {
    margin-top: 6px;
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.55;
}

/* News */
.posts-container { margin-top: 14px; }

.post-card {
    background: var(--surface);
    margin-bottom: 12px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.post-card img {
    width: 100%;
    height: auto;
}

.post-content { padding: 16px; }

.post-text {
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Opening hours */
.opening-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opening-day-container {
    background: var(--surface);
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.day-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.day-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-3);
    flex-shrink: 0;
}

.day-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.today-tag {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
}

.day-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 52px;
}

.hours-title {
    font-size: 0.88rem;
    font-weight: 500;
}

.age-title {
    font-size: 0.78rem;
    color: var(--text-2);
}

.info-title {
    display: inline-block;
    margin-top: 10px;
    margin-left: 52px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 6px 12px;
    border-radius: 8px;
}

.opening-day-container.today { border-color: var(--accent); }

.opening-day-container.today .day-badge {
    background: var(--accent);
    color: #fff;
}

/* Contact / About */
.list-card {
    margin-top: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.list-row {
    padding: 16px 18px;
    font-size: 0.88rem;
    line-height: 1.55;
}

.list-row + .list-row { border-top: 1px solid var(--border); }

.list-row a {
    color: var(--accent);
    font-weight: 700;
}

.list-row.warning { color: var(--danger-text); }

.list-row.credit {
    display: flex;
    align-items: center;
    gap: 14px;
}

.list-row.credit img {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

/* Emergency */
.info-container {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-card {
    background: var(--surface);
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.info-card.urgent {
    background: var(--danger-bg);
    border-color: rgba(239,68,68,0.2);
}

.info-card h2 {
    font-size: 1.02rem;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 0.84rem;
    color: var(--text-2);
    margin-bottom: 8px;
}

.contact { margin: 8px 0; }

.contact a {
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--accent);
    overflow-wrap: anywhere;
}

.description {
    margin-top: 10px;
    font-size: 0.88rem;
    line-height: 1.55;
}

.availability {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--text-2);
}

/* RESPONSIVE (pls work pls work pls work */
@media (min-width: 768px) {
    .hero h1,
    .page-header h1 { font-size: 1.9rem; }
    .main-content { padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1024px) {
    .bottom-nav {
        max-width: 460px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }

    .more-sheet {
        max-width: 460px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
    }

    .more-sheet.visible {
        transform: translateX(-50%) translateY(0);
    }
}
