/* Page styles moved out of the inline <style> block in v8.0 (unchanged rules).
   Loaded before css/site.css, exactly where the inline block used to be. */

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--lu-dark-grey);
    background-color: var(--lu-white);
    line-height: 1.6;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: var(--lu-bronze);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--lu-link-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   HEADER – Main Navigation
   ============================================ */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background-color: var(--lu-white);
    border-bottom: 2px solid var(--lu-grey);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 64px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    color: var(--lu-dark-grey);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.main-nav a:hover {
    color: var(--lu-dark-blue);
    border-bottom-color: var(--lu-dark-blue);
    text-decoration: none;
}

.main-nav a.active {
    color: var(--lu-dark-blue);
    border-bottom-color: var(--lu-dark-blue);
}

.search-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--lu-dark-grey);
    cursor: pointer;
    transition: color 0.2s;
}

.search-btn:hover {
    color: var(--lu-dark-blue);
}

/* ============================================
   MAIN CONTENT AREA (Flexible Middle)
   ============================================ */
.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 40px;
    min-height: 60vh;
}

/* Example section styles for middle content */
.content-area h1 {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    color: var(--lu-dark-blue);
    margin-bottom: 16px;
    font-weight: 400;
}

.content-area h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--lu-dark-blue);
    margin-bottom: 12px;
    margin-top: 32px;
    font-weight: 400;
}

.news-section {
    margin-top: 24px;
}

.news-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 8px;
}

.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1 1 auto;
}

.news-search {
    display: flex;
    align-items: stretch;
    flex: 1 1 240px;
    max-width: 340px;
    min-width: 200px;
}

.news-search-input {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--lu-dark-grey);
    border: 1px solid var(--lu-field-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 10px 14px;
    min-width: 0;
}

.news-search-input:focus {
    outline: none;
    border-color: var(--lu-dark-blue);
}

.news-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    background: var(--lu-dark-blue);
    color: var(--lu-white);
    border: 1px solid var(--lu-dark-blue);
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.news-search-btn:hover {
    background: var(--lu-bronze);
    border-color: var(--lu-bronze);
}

.news-search-status {
    font-size: 14px;
    color: var(--lu-dark-grey);
    margin: 0 0 12px;
}

.news-no-results {
    font-size: 15px;
    color: var(--lu-dark-grey);
    font-style: italic;
    margin: 16px 0 0;
}

.news-filters.is-disabled .news-filter {
    opacity: 0.55;
    pointer-events: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.news-filter {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    color: var(--lu-text);
    background: var(--lu-white);
    border: 1px solid var(--lu-gray-900);
    border-radius: 4px;
    padding: 10px 16px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    line-height: 1.3;
}

.news-filter:hover {
    color: var(--lu-white);
    border-color: var(--lu-gray-900);
    background: var(--lu-gray-900);
}

.news-filter.is-active {
    color: var(--lu-white);
    background: var(--lu-gray-900);
    border-color: var(--lu-gray-900);
}

.news-filter-tag {
    font-weight: 400;
    color: inherit;
}

.news-filter.is-active .news-filter-tag {
    color: var(--lu-light-blue);
}

.news-section-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--lu-dark-blue);
    margin-bottom: 16px;
    font-weight: 400;
}

.news-section-tag {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lu-text-muted);
}

.news-section-empty {
    font-size: 15px;
    color: var(--lu-dark-grey);
    font-style: italic;
    margin: 0;
}

.news-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 0;
}

.news-item {
    background: var(--lu-bg-light);
    border-left: 4px solid var(--lu-bronze);
    border-radius: 4px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    box-shadow: 0 4px 12px rgba(33, 37, 41, 0.15);
    transform: translateX(4px);
}

.news-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-item h3 {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: var(--lu-dark-blue);
    margin-bottom: 8px;
    font-weight: 600;
}

.news-item a:hover h3 {
    color: var(--lu-bronze);
}

.news-preview {
    font-size: var(--fs-small);
    color: var(--lu-dark-grey);
    line-height: 1.6;
    margin-top: 12px;
}

/* ============================================
   FOOTER – Lund University Style
   ============================================ */
.site-footer {
    border-top: 3px solid var(--lu-bronze);
    background-color: var(--lu-white);
    padding: 32px 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background-color: var(--lu-bronze);
    color: var(--lu-white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
    z-index: 999;
}

.back-to-top:hover {
    background-color: var(--lu-link-hover);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {

    .main-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .content-area {
        padding: 32px 16px;
    }

    .news-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .news-search {
        max-width: none;
        width: 100%;
    }

    .site-footer {
        padding: 24px 16px;
    }

    .footer-inner {
        flex-direction: column;
    }

}
