/* Shared Mat i Skolan visual language for public pages. */
:root {
    --brand-primary: #08752d;
    --brand-primary-dark: #123d2b;
    --brand-accent: #e4ad31;
    --brand-muted: #566258;
    --surface-color: #ffffff;
    --surface-muted: #fbf8f0;
    --border-soft: #e2e7de;
    --shadow-soft: 0 8px 24px rgba(18, 61, 43, .07);
}

html { scroll-behavior: smooth; }
body { color: #202820; background: #fffefa; }

/* Shared compact header and navigation */
.navbar {
    min-height: 88px;
    padding-block: 8px;
    background: #fffefa !important;
    border-bottom: 2px solid var(--brand-primary);
    box-shadow: none;
    backdrop-filter: none;
}
.navbar .container { min-height: 70px; }
.navbar-brand { margin-right: 24px; }
.navbar-brand .brand-title { color: var(--brand-primary-dark); }
.navbar-brand p { margin: 0; }
.navbar-nav .nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    color: #263d2c;
    font-weight: 650;
    transition: background-color .18s ease, color .18s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus-visible,
.navbar-nav .nav-link.active { color: var(--brand-primary-dark) !important; background: #edf4e9; }
.navbar-nav .nav-link:hover { transform: none; }

/* Page introductions use the same calm, editorial treatment as the homepage. */
.page-hero {
    margin: 0;
    padding: 42px max(24px, calc((100vw - 1120px) / 2)) 34px;
    text-align: left;
    background: #f8f6ee;
    border-bottom: 1px solid #ebe8df;
}
.page-hero .hero-icon { display: none; }
.page-hero h1 {
    max-width: 820px;
    margin: 0 0 10px;
    color: var(--brand-primary-dark);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
}
.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #4b584e;
    font-size: 1.08rem;
    line-height: 1.6;
}

/* Shared content width, cards, typography and forms */
.content-wrapper { max-width: 1168px; padding: 32px 24px 56px; }
.content-stack { gap: 22px; }
.content-card,
.content-card.highlight-card,
.card,
.form-card,
.table-card,
.form-box,
.no-result-box,
.tipsruta {
    border: 1px solid var(--border-soft) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 4px 16px rgba(18, 61, 43, .045) !important;
}
.content-card { padding: clamp(22px, 3.5vw, 36px); }
.content-card.highlight-card { background: #f3f7ed !important; border-color: #e0e9d7 !important; }
.section-title,
.content-card h2,
.content-card h3 { color: var(--brand-primary-dark); }
.section-title { margin-bottom: 12px; font-size: clamp(1.35rem, 2.5vw, 1.8rem); font-weight: 750; }
.section-lead { margin-bottom: 18px; color: #536056; line-height: 1.6; }
.content-card p { line-height: 1.7; }
.content-card a,
.content-wrapper a:not(.btn),
.icon-list a { color: var(--brand-primary); text-underline-offset: 3px; }
.content-card a:hover,
.content-wrapper a:not(.btn):hover,
.icon-list a:hover { color: var(--brand-primary-dark); }

.form-control,
.form-select,
.input-group-text,
.form-card textarea,
.form-card form .form-control,
.form-card form .form-select,
.form-card input,
.form-card select {
    min-height: 44px;
    border-color: #cbd4c8;
    border-radius: 5px;
    color: #202820;
}
.form-control:focus,
.form-select:focus,
.form-card textarea:focus,
.form-card form .form-control:focus,
.form-card form .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 .2rem rgba(8, 117, 45, .14);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible { outline-color: var(--brand-accent); }
.btn,
.pagination .page-link { min-height: 42px; border-radius: 5px; font-weight: 650; }
.btn-primary,
.btn-search,
.btn-search-success,
.btn-success {
    border-color: var(--brand-primary) !important;
    background: var(--brand-primary) !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-search:hover,
.btn-search-success:hover,
.btn-success:hover { border-color: var(--brand-primary-dark) !important; background: var(--brand-primary-dark) !important; }
.content-card .btn-search,
.form-card form .btn-primary { border-radius: 5px !important; box-shadow: none !important; }
.btn-outline-secondary,
.btn-soft { color: #39473d; border-color: #cbd4c8; background: #fff; }
.btn-outline-secondary:hover,
.btn-soft:hover { color: var(--brand-primary-dark); border-color: #a6b7a2; background: #f3f7ed; }

/* Lists and results */
.table-card { overflow: hidden; }
.table-card thead,
.responsive-table thead { background: #f3f7ed; }
.table-card th { color: var(--brand-primary-dark); }
.table-card td { border-color: #e6ebe3; }
.clickable-row:hover td { background: #f4f7f1; }
.list-group-item { min-height: 48px; border-color: #e6ebe3; color: #263d2c; }
.list-group-item-action:hover { background: #f4f7f1; color: var(--brand-primary-dark); }
.pagination .page-link { display: inline-flex; align-items: center; justify-content: center; color: var(--brand-primary); border-color: #dce4da; }
.pagination .active .page-link { color: #fff; border-color: var(--brand-primary); background: var(--brand-primary); }
.back-link { color: var(--brand-primary); }
.info-box { border: 1px solid #e2e7de; border-radius: 8px; background: #f8f6ee; }
.empty-state { border-color: #e0e9d7; background: #f3f7ed; }
.empty-state h3 { color: var(--brand-primary-dark); }
.empty-state .tip { border-color: #e2e7de; background: #fffefa; }
.inactive-alert { border-left-color: #d8a12b; }
.favorite-school-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 18px; }
.favorite-school-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border: 1px solid #9aaf98;
    border-radius: 5px;
    background: #fff;
    color: var(--brand-primary-dark);
    font-weight: 700;
}
.favorite-school-button:hover,
.favorite-school-button.is-favorite { border-color: var(--brand-primary); background: #f1f6ed; }
.favorite-school-star { color: var(--brand-primary); font-size: 1.3rem; line-height: 1; }
.favorite-school-status { color: #4b584e; font-size: .9rem; }
.favorite-school-home { padding: 16px 24px; background: #fffefa; }
.favorite-school-home[hidden] { display: none !important; }
.favorite-school-home-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    border: 1px solid #dfe8d9;
    border-left: 4px solid var(--brand-primary);
    border-radius: 7px;
    background: #f3f7ed;
}
.favorite-school-home .home-eyebrow { margin-bottom: 4px; }
.favorite-school-home h2 { margin: 0; color: var(--brand-primary-dark); font-size: 1.15rem; font-weight: 750; }
.favorite-school-home-link { color: var(--brand-primary); font-weight: 750; text-underline-offset: 3px; }
.favorite-school-remove { min-height: 40px; padding: 7px 10px; border: 0; background: transparent; color: #536056; text-decoration: underline; text-underline-offset: 3px; }
.footer {
    padding: 24px 16px;
    border: 0;
    background: var(--brand-primary-dark);
    box-shadow: none;
}
.footer p { color: #f5f7f2; }
.footer a { color: #fff; text-underline-offset: 3px; }

@media (max-width: 768px) {
    .navbar { min-height: 76px; }
    .navbar .container { min-height: 60px; }
    .navbar-nav .nav-link { width: 100%; justify-content: flex-start; border-bottom: 1px solid #e6ebe3; }
    .content-wrapper { padding: 24px 16px 40px; }
    .content-card { padding: 22px 18px; }
    .filter-form { align-items: stretch; }
    .filter-form .input-group { max-width: none !important; width: 100%; }
    .filter-form > .btn { width: 100%; }
    .favorite-school-home { padding: 12px 16px; }
    .favorite-school-home-inner { align-items: flex-start; flex-direction: column; padding: 16px; }
}

@media (max-width: 576px) {
    .page-hero { padding: 30px 18px 24px; }
    .page-hero h1 { font-size: 2rem; }
    .page-hero p { font-size: 1rem; }
    .scroll-content { padding-top: 100px; }
    .table-card .table-inner { padding: 14px; }
}
