/* ============================================================
   GLOBALA REGLER
   ============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, 'Helvetica Neue', sans-serif;
    background: url('https://i.ibb.co/HDtjcTkw/bakgrundbild-hemsidan.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* ============================================================
   HUVUDCONTAINER
   ============================================================ */
.app-container {
    max-width: 1200px;
    width: 100%;
    height: 100vh;
    background-color: rgba(254, 249, 232, 0.4);
    display: flex;
    flex-direction: column;
}

/* ============================================================
   HEADER
   ============================================================ */
.main-header {
    background: #2c5e2e;
    color: #f9f1cf;
    padding: 20px 28px;
    border-bottom: 4px solid #a6c89b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.main-header h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 2.6rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.header-logo {
    height: 4rem;
    width: auto;
    vertical-align: middle;
}

.visitor-counter {
    font-size: 0.8rem;
    color: #eaf4dc;
    margin-left: 16px;
    white-space: nowrap;
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ============================================================
   SPRÅKKNAPPAR
   ============================================================ */
.lang-bar {
    display: flex;
    gap: 6px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid #e2f0d5;
    color: #fff;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.15s;
    backdrop-filter: blur(4px);
    line-height: 1.2;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.lang-btn.active {
    background: #f9f1cf;
    color: #1e4a1e;
    border-color: #f9f1cf;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ============================================================
   FLIKMENY – 50% mindre
   ============================================================ */
.tabs-nav {
    background: rgba(212, 201, 168, 0.8);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 0 6px;
    border-bottom: 3px solid #5f7a4c;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.tab {
    background: rgba(200, 184, 146, 0.2);
    border: 2px solid #5f7a4c;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 5px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e2b;
    cursor: pointer;
    transition: 0.2s;
    margin-right: 2px;
    position: relative;
    top: 3px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05) inset;
}

.tab:hover {
    background: rgba(217, 207, 160, 0.7);
}

.tab.active {
    background: rgba(254, 249, 232, 0.85);
    border-bottom: 2px solid rgba(254, 249, 232, 0.85);
    margin-bottom: -3px;
    padding-bottom: 8px;
    z-index: 3;
    top: 0;
    box-shadow: none;
    color: #1e3a1e;
}

/* ============================================================
   INNEHÅLLSOMRÅDE
   ============================================================ */
.tab-content-wrapper {
    background: #fef9e8 (217, 207, 160, 0.8);
    padding: 24px 20px 30px;
    overflow-y: auto;
    flex: 1 1 0;
    border-top: 2px solid transparent;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ============================================================
   VÄLKOMMENMEDDELANDE – ÄNDRAT: bredare, vänsterställt
   ============================================================ */
.welcome-message {
    background: #ffffffdd;
    backdrop-filter: blur(2px);
    border: 1px solid #cfe2b0;
    box-shadow: 0 8px 16px rgba(0, 20, 0, 0.2);
    border-radius: 24px;
    padding: 24px 28px;
    color: #2c3e2b;
    text-align: left;
    max-width: 100%;
    margin: 0 0 24px 0;
    font-size: 1rem;
    line-height: 1.7;
}

/* ============================================================
   START-SIDANS INFORUTOR – nu 2 per rad
   ============================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 0 auto;
    max-width: 100%;
}

.info-card {
    background: #ffffffdd;
    backdrop-filter: blur(2px);
    border: 1px solid #cfe2b0;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 120px;
}

.info-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e4a1e;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #3a4d38;
    flex: 1;
}

/* ============================================================
   PRIMÄRKNAPP (centrerad via flex)
   ============================================================ */
.test-btn-wrapper,
.dictionary-button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 20px;
}

.dictionary-button-wrapper p {
    font-size: 0.9rem;
    color: #3a4d38;
    margin-bottom: 16px;
    max-width: 500px;
}

.primary-btn {
    background: #2e6730;
    border: none;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 60px;
    color: white;
    cursor: pointer;
    transition: 0.15s;
    box-shadow: 0 5px 0 #1a3f1c;
    border: 1px solid #7aac6e;
    display: inline-block;
}

.primary-btn:hover {
    background: #1e5120;
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #1a3f1c;
}

.primary-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #1a3f1c;
}

/* ============================================================
   NYHETS- & JOBBKORT (3 kolumner)
   ============================================================ */
.news-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.news-item {
    background: #ffffffdd;
    backdrop-filter: blur(2px);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #cfe2b0;
    box-shadow: 0 6px 14px rgba(0, 20, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.news-item h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.news-item h3 a {
    color: #1e4a1e;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid #7aac6e;
}

.news-item h3 a:hover {
    color: #2e6730;
    border-bottom-color: #2e6730;
}

.news-item p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #3a4d38;
    margin: 0;
    flex: 1;
}

.news-item .lang-note {
    font-size: 0.7rem;
    font-style: italic;
    color: #6b7a5c;
    margin-top: 6px;
}

/* ---- All mäss-styling borttagen ---- */

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    text-align: center;
    padding: 12px;
    background: #e0d5bc;
    color: #4f5a3c;
    font-size: 0.8rem;
    border-top: 2px solid #b1c99e;
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVITET
   ============================================================ */
@media (max-width: 850px) {
    .news-container,
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .main-header h1 {
        font-size: 1.8rem;
    }
    .tab {
        padding: 4px 8px;
        font-size: 0.5rem;
    }
    .tab-content-wrapper {
        padding: 16px 8px;
    }
    .news-container,
    .info-grid {
        grid-template-columns: 1fr;
    }
}