/* --- ALLMÄNNA INSTÄLLNINGAR OCH VARIABLER --- */
* {
    box-sizing: border-box;
}

:root {
    --unesco-blue: #0077d4;
    --unesco-dark: #004a85;
    --news-red: #cc0000;
    --bg-light: #f4f7f9;
    --bankid-blue: #003087;
    --text-main: #1a1a1a;
    --text-muted: #454545;
}

body {
    font-family: "Georgia", serif;
    margin: 0;
    padding: 0;
    background-color: #eee;
    color: var(--text-main);
    overflow-x: hidden;
}

.top-accent {
    height: 4px;
    background: var(--news-red);
}

/* --- TIDNINGS-LAYOUT --- */
.news-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

.news-header {
    padding: 20px 40px;
    border-bottom: 1px solid #eaeaea;
}

.logo {
    font-family: "Arial Black", sans-serif;
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: -2px;
}

.logo span {
    color: var(--news-red);
}

.main-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    margin-top: 15px;
}

.main-nav a {
    color: var(--text-main);
    text-decoration: none;
}

.news-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    padding: 40px;
}

.article-title {
    font-size: 3rem;
    line-height: 1.1;
    margin: 20px 0;
    word-wrap: break-word;
}

.lead-text {
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: bold;
}

/* --- SIDOMENY / TOPLISTA --- */
.top-list {
    list-style: none;
    padding: 0;
}
.top-list li {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.rank {
    font-size: 2rem;
    font-weight: 900;
    color: #ddd;
    line-height: 1;
}

/* --- ANNONS-BANNER --- */
.ad-container {
    margin: 40px 0;
    width: 100%;
}
.ad-hint {
    font-size: 10px;
    color: #aaa;
    text-align: center;
    font-weight: bold;
    margin-bottom: 5px;
}

.unesco-banner {
    width: 100%;
    border: none;
    text-align: left;
    background: linear-gradient(135deg, var(--unesco-blue), var(--unesco-dark));
    color: white;
    padding: 25px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.unesco-banner:hover {
    transform: scale(1.01);
}

.unesco-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.fake-logo {
    min-width: 60px;
    height: 60px;
    background: white;
    color: var(--unesco-blue);
    font-weight: 900;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.unesco-text h3 {
    margin: 5px 0;
    font-size: 1.4rem;
}

.unesco-tag {
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-family: Arial, sans-serif;
    opacity: 0.9;
}

/* --- MODALER --- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.modal-window {
    background: white;
    width: 100%;
    max-width: 550px;
    border-radius: 12px;
    position: relative;
    overflow-y: auto;
    max-height: 95vh;
    font-family: Arial, sans-serif;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--unesco-blue);
    color: white;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.fake-logo-small {
    min-width: 45px;
    height: 45px;
    background: white;
    color: var(--unesco-blue);
    font-weight: 900;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 25px;
}

.close-modal {
    background: transparent;
    border: none;
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 10;
}

/* --- KART-SKAL & PLATSINFO --- */
.info-card {
    border-left: 6px solid var(--unesco-dark);
    padding: 15px 20px;
    background: var(--bg-light);
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.info-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--unesco-dark);
}

.map-placeholder {
    background: #e9ecef;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.map-header {
    background: #f8f9fa;
    padding: 10px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    color: var(--unesco-dark);
}

.map-view {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #d0d7de;
    position: relative;
}

.map-view::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #fff 10%, transparent 10%), 
                      linear-gradient(to right, #ccc 1px, transparent 1px),
                      linear-gradient(to bottom, #ccc 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    opacity: 0.2;
}

.map-hint {
    font-style: italic;
    font-size: 0.8rem;
    color: #555;
    z-index: 1;
}

.map-loaded {
    display: block;
}

.map-loaded::after {
    display: none;
}

.site-list {
    display: grid;
    gap: 10px;
    margin: 0 0 20px;
}

.site-card {
    width: 100%;
    text-align: left;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
}

.site-card:hover,
.site-card.is-active {
    border-color: var(--unesco-blue);
    background: #f6fbff;
}

.site-card strong {
    display: block;
    color: var(--unesco-dark);
    margin-bottom: 4px;
}

.site-meta,
.form-status {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-status.is-error {
    color: #a40000;
}

.site-detail {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

.btn-primary {
    width: 100%;
    background: var(--unesco-blue);
    color: white;
    border: none;
    padding: 13px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.btn-primary:hover {
    background: var(--unesco-dark);
}

.login-form {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

/* --- FORMULÄR & CHATT --- */
.subscription-box h4 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.btn-bankid {
    background: white;
    color: var(--bankid-blue);
    border: 2px solid var(--bankid-blue);
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}

.btn-bankid img {
    height: 20px;
    width: auto;
}

.btn-bankid:hover {
    background: #f0f4ff;
}

.chatbot-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
}

.chat-box {
    background: var(--bg-light);
    padding: 15px;
    height: 140px;
    overflow-y: auto;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.chat-input-area button {
    background: var(--unesco-blue);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-cancel {
    background: transparent;
    color: #cc0000;
    border: 1px solid #cc0000;
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    border-radius: 6px;
    cursor: pointer;
}

.footer-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
}

/* --- HJÄLPKLASSER & RESPONSIVITET --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 850px) {
    .news-main {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .logo {
        font-size: 1.8rem;
    }
    .article-title {
        font-size: 2rem;
    }
    .unesco-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .fake-logo {
        display: none;
    }
}
