/* Club websites (basic version). Built on the clubmon.com design system
   (DESIGN_SYSTEM.md); --primary is the club's colour, set per page. */
:root {
    --primary: #2351DC;
    --dark: #0c1a3d;
    --text: #1a2035;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg-light: #f8fafc;
    --white: #ffffff;
}

* { box-sizing: border-box; }

/* Short pages keep the footer at the bottom (Figma "Cijene"). */
main { flex: 1; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin-top: 0; color: var(--dark); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 2rem; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--text-muted); }

.preview-bar {
    background: #ffd400;
    color: rgba(0, 0, 0, 0.87);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    padding: 8px 24px;
}

/* Navigation (Figma header: 80px, 56px on phones) */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 80px;
    padding: 0 24px;
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: rgba(0, 0, 0, 0.87); font-size: 20px; font-weight: 500; line-height: 24px; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand:hover { text-decoration: none; }
.brand img { width: auto; height: 40px; object-fit: contain; border-radius: 8px; }
.nav-links { display: flex; flex: 1; justify-content: flex-end; }
.nav-links a { padding: 8px 16px; color: rgba(0, 0, 0, 0.6); font-size: 16px; font-weight: 500; line-height: 24px; white-space: nowrap; }
.nav-links a.active, .nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-toggle, .nav-burger { display: none; }

@media (max-width: 820px) {
    .site-nav { height: 56px; padding: 0 16px; justify-content: space-between; }
    /* With a logo, the phone header shows the logo alone. */
    .brand.has-logo span { display: none; }
    .nav-burger { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; cursor: pointer; }
    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
        padding: 8px 0;
    }
    .nav-links a { padding: 12px 16px; }
    .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* Buttons */
.btn-primary, .btn-outline {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { filter: brightness(0.92); text-decoration: none; }
.btn-outline { border: 1.5px solid var(--primary); color: var(--primary); background: var(--white); }
.btn-outline:hover { text-decoration: none; background: var(--bg-light); }

/* Hero (Figma: 640px, 560px on phones; the photo under a 40% dark layer) */
.hero { display: flex; min-height: 640px; background: var(--primary); background-size: cover; background-position: center; }
.hero-overlay {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 0 24px;
    text-align: center;
    color: var(--white);
}
.hero.has-image .hero-overlay { background: rgba(0, 0, 0, 0.4); }
.hero-text { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.hero h1 { margin: 0; color: var(--white); font-size: 48px; font-weight: 700; line-height: 56px; }
.hero p { margin: 0; font-size: 16px; font-weight: 500; line-height: 24px; }
.hero-button {
    padding: 16px 32px;
    border-radius: 8px;
    background: var(--white);
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-transform: uppercase;
}
.hero-button:hover { text-decoration: none; filter: brightness(0.95); }

/* Home sections (Figma: 720px column, 80px apart; 40px on phones) */
.home-section { display: flex; justify-content: center; padding: 80px 24px; }
.home-section-grey { background: rgba(0, 0, 0, 0.05); }
.home-inner { flex: 1; display: flex; flex-direction: column; gap: 40px; max-width: 720px; min-width: 0; }
.home-title { margin: 0; color: rgba(0, 0, 0, 0.87); font-size: 40px; font-weight: 700; line-height: 56px; text-align: center; }
.home-prose { color: rgba(0, 0, 0, 0.87); font-size: 16px; line-height: 24px; }
.home-prose p { margin: 0 0 8px; }
.home-prose > :last-child { margin-bottom: 0; }

.home-stats { display: flex; gap: 24px; }
.home-stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; border-radius: 24px; background: var(--white); text-align: center; min-width: 0; }
.home-stat-label { color: rgba(0, 0, 0, 0.87); font-size: 16px; line-height: 24px; }
.home-stat-value { color: var(--primary); font-size: 48px; font-weight: 700; line-height: 56px; }

.home-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.home-news-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 24px; background: var(--white); color: rgba(0, 0, 0, 0.87); }
.home-news-card:hover { text-decoration: none; border-color: var(--primary); }
.home-news-date { color: rgba(0, 0, 0, 0.6); font-size: 14px; line-height: 20px; }
.home-news-text { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.home-news-text h3 { margin: 0; color: rgba(0, 0, 0, 0.87); font-size: 20px; font-weight: 500; line-height: 24px; }
.home-news-text p {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-link { align-self: flex-end; padding: 8px; border-radius: 8px; color: var(--primary); font-size: 14px; font-weight: 500; line-height: 20px; }
.home-all-news { margin-top: -24px; }

@media (max-width: 820px) {
    .hero { min-height: 560px; }
    .hero-overlay { padding: 0 16px; }
    .hero h1 { font-size: 40px; line-height: 48px; }
    .hero-button { font-size: 14px; line-height: 20px; }
    .home-section { padding: 40px 16px; }
    .home-inner { gap: 24px; }
    .home-title { font-size: 24px; line-height: 32px; }
    .home-stats { gap: 16px; }
    .home-stat { padding: 16px; border-radius: 16px; }
    .home-stat-value { font-size: 40px; line-height: 48px; }
    .home-news { grid-template-columns: 1fr; gap: 16px; }
    .home-news-card { padding: 16px; border-radius: 16px; }
    .home-all-news { margin-top: -8px; }
}

/* Page head (Figma: grey band, title and intro in the 720px column) */
.page-head { display: flex; justify-content: center; padding: 80px 24px; background: rgba(0, 0, 0, 0.04); }
.page-head-inner { flex: 1; display: flex; flex-direction: column; gap: 8px; max-width: 720px; min-width: 0; color: rgba(0, 0, 0, 0.87); }
.page-head h1 { margin: 0; color: rgba(0, 0, 0, 0.87); font-size: 40px; font-weight: 700; line-height: 56px; }
.page-head p { margin: 0; font-size: 16px; line-height: 24px; }

/* A column of cards under the page head (trainings) */
.cards-section { display: flex; justify-content: center; padding: 80px 24px; }
.cards-list { flex: 1; display: flex; flex-direction: column; gap: 24px; max-width: 720px; min-width: 0; }

.group-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 24px; background: var(--white); color: rgba(0, 0, 0, 0.87); }
.group-card-head h2 { margin: 0; color: rgba(0, 0, 0, 0.87); font-size: 24px; font-weight: 500; line-height: 32px; }
.group-card-head p { margin: 0; color: rgba(0, 0, 0, 0.6); font-size: 14px; line-height: 20px; }
.group-card-bar { height: 4px; }
.group-card-line { height: 1px; background: rgba(0, 0, 0, 0.2); }
.group-card-day { display: flex; gap: 16px; align-items: flex-start; font-size: 16px; font-weight: 500; line-height: 24px; }
.group-card-day > span { flex: 1; min-width: 0; }
.group-card-times { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; white-space: nowrap; }
.group-card-time { display: flex; flex-direction: column; align-items: flex-end; }
/* Not in Figma: where the training is, small and grey under its time. */
.group-card-place { color: rgba(0, 0, 0, 0.6); font-size: 14px; font-weight: 400; line-height: 20px; white-space: normal; text-align: right; }
.group-card-empty { margin: 0; color: rgba(0, 0, 0, 0.6); }

/* Prices (Figma: name left, price right; one under the other on phones) */
.price-card { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 24px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 24px; background: var(--white); }
.price-card h2 { margin: 0; min-width: 0; color: rgba(0, 0, 0, 0.87); font-size: 24px; font-weight: 500; line-height: 32px; }
.price-card-price { margin: 0; color: var(--primary); font-weight: 700; line-height: 48px; white-space: nowrap; }
.price-card-amount { font-size: 40px; }
.price-card-currency { font-size: 24px; }
.price-card-period { color: rgba(0, 0, 0, 0.6); font-size: 24px; font-weight: 400; }

/* Coaches (Figma: two cards per row, square photo, name under it) */
.coach-grid { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 720px; min-width: 0; }
.coach-card { overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 16px; background: var(--white); }
.coach-card img, .coach-initials { width: 100%; aspect-ratio: 1; object-fit: cover; }
.coach-initials { display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.04); color: var(--primary); font-size: 64px; font-weight: 700; }
.coach-card p { margin: 0; padding: 24px 16px; color: rgba(0, 0, 0, 0.87); font-size: 16px; font-weight: 500; line-height: 24px; text-align: center; overflow-wrap: anywhere; }

/* Contact (Figma: one card, a label and a link per line) */
.contact-card { flex: 1; display: flex; flex-direction: column; gap: 16px; max-width: 720px; min-width: 0; padding: 24px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 16px; background: var(--white); color: rgba(0, 0, 0, 0.87); font-size: 16px; line-height: 24px; }
.contact-card div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.contact-card a { color: var(--primary); font-weight: 500; text-decoration: underline; overflow-wrap: anywhere; }

/* News, every item in full */
.news-list-section { display: flex; justify-content: center; padding: 80px 24px; }
.news-list { flex: 1; display: flex; flex-direction: column; gap: 24px; max-width: 720px; min-width: 0; }
.news-article { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 16px; background: var(--white); }
.news-article-date { color: rgba(0, 0, 0, 0.6); font-size: 14px; line-height: 20px; }
.news-article-body { display: flex; flex-direction: column; gap: 24px; }
.news-article-body h2 { margin: 0; color: rgba(0, 0, 0, 0.87); font-size: 24px; font-weight: 500; line-height: 32px; }
.news-article-cover { display: block; width: 100%; height: auto; border: 1px solid rgba(0, 0, 0, 0.2); }
.news-article-content { display: flex; flex-direction: column; gap: 16px; }
.news-article-text { color: rgba(0, 0, 0, 0.87); font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
.news-article-text p { margin: 0; }
.news-article-text p:empty::before { content: '\200b'; }
.news-article-signature { padding: 16px 0; border-top: 1px solid rgba(0, 0, 0, 0.2); color: rgba(0, 0, 0, 0.87); font-size: 16px; line-height: 24px; }
.news-list .pager { margin-top: 16px; }
/* The list cuts the text at three lines (Figma); Read more opens the item. */
.news-article-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-height: 72px; }

/* One news item (Figma "Vijest"): a white head band with the category,
   title and date, then the item in the 720px column. */
.article-head { display: flex; justify-content: center; padding: 40px 24px; border-bottom: 1px solid rgba(0, 0, 0, 0.2); background: var(--white); }
.article-head-inner { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 720px; min-width: 0; }
.article-category { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border: 1px solid var(--primary); border-radius: 32px; color: var(--primary); font-size: 14px; font-weight: 500; line-height: 20px; }
.article-head h1 { margin: 0; color: rgba(0, 0, 0, 0.87); font-size: 40px; font-weight: 700; line-height: 48px; overflow-wrap: anywhere; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: rgba(0, 0, 0, 0.87); font-size: 14px; line-height: 20px; }
.article-author-photo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: rgba(0, 0, 0, 0.04); color: var(--primary); font-size: 16px; font-weight: 700; }
.article-section { display: flex; justify-content: center; padding: 40px 24px; }
.article-inner { flex: 1; display: flex; flex-direction: column; gap: 24px; max-width: 720px; min-width: 0; }
.article-cover { display: block; width: 100%; height: auto; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 16px; }
.article-content { display: flex; flex-direction: column; gap: 16px; }
.article-content .gallery { margin-top: 0; }

/* Picture viewer for the news gallery: the app's Lightbox.svelte. */
.lightbox { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.9); }
.lightbox[hidden], .lightbox [hidden] { display: none; }
.lightbox-image { display: block; max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox-close, .lightbox-nav { position: fixed; display: flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: #fff; cursor: pointer; z-index: 1; }
.lightbox-close { top: 1rem; right: 1rem; width: 40px; height: 40px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; }
.lightbox-nav-prev { left: 1rem; }
.lightbox-nav-next { right: 1rem; }
.lightbox-counter { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); padding: 0.25rem 0.75rem; border-radius: 1rem; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 0.875rem; }
.gallery a { cursor: zoom-in; }
.news-article .gallery { margin-top: 0; }

@media (max-width: 820px) {
    .page-head { padding: 40px 16px; }
    .page-head h1 { font-size: 24px; line-height: 32px; }
    .news-list-section, .cards-section { padding: 40px 16px; }
    .cards-list, .coach-grid { gap: 16px; }
    .group-card { padding: 16px; border-radius: 16px; }
    .price-card { flex-direction: column; align-items: flex-start; padding: 16px; border-radius: 16px; }
    .news-list { gap: 16px; }
    .news-article { padding: 16px; }
    .article-head, .article-section { padding: 24px 16px; }
    .article-head h1 { font-size: 32px; line-height: 40px; }
}

.page-hero { background: var(--bg-light); padding: 3.5rem 0 3rem; }
.page-hero h1 { font-size: 2.75rem; margin-bottom: 0.5rem; }
.page-hero p { margin: 0; color: var(--text-muted); font-size: 1.125rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-light { background: var(--bg-light); }
.section-heading { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.prose { font-size: 1.0625rem; line-height: 1.8; color: #374151; }
.prose p { margin: 0 0 1rem; }
.cta-line { margin-top: 2.5rem; }

/* Cards and grids */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; color: inherit; }
.card-body { padding: 1.5rem; }
.card h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.5rem; }

.news-card { display: block; transition: box-shadow 0.15s; }
.news-card:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(12, 26, 61, 0.08); }
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.news-card p { color: var(--text-muted); font-size: 0.9375rem; margin: 0; }
.meta { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.5rem; }

.stats { display: flex; justify-content: center; gap: 1.5rem 4rem; flex-wrap: wrap; text-align: center; }
.stat { min-width: 120px; }
.stat-value { font-size: 2.75rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--text-muted); font-weight: 500; }





/* Article */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; margin-top: 2rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.pager { display: flex; justify-content: space-between; margin-top: 2.5rem; font-weight: 500; }

@media (max-width: 640px) {
    .container { padding: 0 1rem; }
    .page-hero h1 { font-size: 2rem; }
    .section { padding: 3rem 0; }
    .section-heading { font-size: 1.5rem; }
    .stat-value { font-size: 2rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats { gap: 1.5rem 2rem; }
}

/* Footer (Figma: one line on the club's colour) */
.site-footer { display: flex; justify-content: center; padding: 16px 24px; background: var(--primary); border-top: 1px solid rgba(0, 0, 0, 0.2); }
.site-footer p { margin: 0; max-width: 720px; color: rgba(255, 255, 255, 0.75); font-size: 14px; line-height: 20px; text-align: center; }
.site-footer a { color: var(--white); text-decoration: underline; }

@media (max-width: 820px) {
    .site-footer { padding: 16px; }
}
