/*
Theme Name: MultiJournal
Theme URI: https://multijournal.ch
Author: Local Theme
Description: A modern multilingual blog-style theme for MultiJournal.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swisslife
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Manrope:wght@400;500;600&display=swap');

:root {
    --ink: #1f2a44;
    --muted: #5a6b8a;
    --accent: #6495ed;
    --accent-dark: #4f7fdc;
    --card: #f5f9ff;
    --paper: #eef4ff;
    --wave: #d9e7ff;
    --shadow: 0 20px 50px rgba(47, 78, 133, 0.12);
    --border: #c9d7f2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top left, #f6f9ff 0%, #eef4ff 45%, #e6efff 100%);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: min(1200px, 88vw);
    margin: 0 auto;
}

.page-wrap {
    min-height: 100vh;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

[hidden] {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(238, 244, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(47, 78, 133, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
}

.site-logo {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: 1.6rem;
    font-weight: 600;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 500;
    color: var(--muted);
}

.primary-nav a {
    padding: 6px 4px;
    transition: color 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a:focus {
    color: var(--accent-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switcher {
    position: relative;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    background: #e6efff;
    color: #32558f;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(47, 78, 133, 0.08);
}

.lang-toggle::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 2px solid #32558f;
    border-bottom: 2px solid #32558f;
    transform: rotate(45deg);
    margin-top: -2px;
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: linear-gradient(160deg, #f5f9ff 0%, #f3f7ff 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 22px 50px rgba(47, 78, 133, 0.16);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    backdrop-filter: blur(14px);
}

.lang-menu.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-option {
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 500;
    color: #2f4e85;
    transition: background 0.2s ease;
}

.lang-option:hover,
.lang-option:focus {
    background: #e3edff;
}

.burger {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f5f9ff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(47, 78, 133, 0.08);
}

.burger-lines {
    width: 18px;
    height: 2px;
    background: #2f4e85;
    display: block;
    position: relative;
}

.burger-lines::before,
.burger-lines::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #2f4e85;
}

.burger-lines::before {
    top: -6px;
}

.burger-lines::after {
    top: 6px;
}

.mobile-menu {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    background: rgba(245, 249, 255, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(47, 78, 133, 0.12);
    z-index: 150;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 6vw 30px;
}

.mobile-menu a {
    font-weight: 600;
    color: #2b4a80;
}

.mobile-lang {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-lang-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.mobile-lang-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.site-main {
    padding: 48px 0 80px;
}

.hero {
    background: linear-gradient(120deg, #f4f8ff 0%, #f5f9ff 55%, #e4efff 100%);
    border-radius: 30px;
    padding: 48px 48px 40px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -20% -35% -20%;
    height: 220px;
    background: radial-gradient(circle at center, var(--wave) 0%, rgba(217, 231, 255, 0) 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.site-title {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}

.site-desc {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 680px;
}

.country-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.country-btn {
    padding: 12px 22px;
    border-radius: 999px;
    background: #e9f1ff;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(47, 78, 133, 0.08);
    font-weight: 500;
    color: #2f4e85;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.country-btn:hover,
.country-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(47, 78, 133, 0.12);
    background: #e3edff;
}

.country-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.country-btn.is-active {
    background: var(--accent);
    color: #f2f6ff;
    border-color: transparent;
    box-shadow: 0 18px 40px rgba(47, 78, 133, 0.2);
}

.intro-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 36px;
}

.intro-card {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(245, 249, 255, 0.9);
    border: 1px solid rgba(201, 215, 242, 0.7);
    box-shadow: 0 16px 36px rgba(47, 78, 133, 0.08);
}

.intro-card h4 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.intro-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.about-card {
    margin-top: 28px;
    background: #f5f9ff;
    border-radius: 24px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(201, 215, 242, 0.75);
    box-shadow: 0 18px 40px rgba(47, 78, 133, 0.08);
}

.about-avatar {
    width: 64px;
    height: 64px;
    margin-top: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e3edff;
    flex: 0 0 auto;
}

.about-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 60%;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-line {
    margin: 0;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.98rem;
}

.about-btn {
    align-self: flex-start;
    padding: 8px 16px;
    border-radius: 999px;
    background: #e6efff;
    border: 1px solid #c9d7f2;
    color: #32558f;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(47, 78, 133, 0.08);
}

.country-section {
    margin-top: 60px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.section-title-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.view-all {
    padding: 10px 18px;
    border-radius: 999px;
    background: #e6efff;
    border: 1px solid #c9d7f2;
    color: #32558f;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(47, 78, 133, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.view-all:hover,
.view-all:focus {
    background: #d9e7ff;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(47, 78, 133, 0.12);
}

.missing-category {
    color: var(--muted);
    font-size: 0.9rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    justify-items: center;
}

.post-card {
    width: min(100%, 360px);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(47, 78, 133, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card--image {
    position: relative;
}

.post-card__link {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e6efff;
    transition: background-size 0.35s ease;
}

.post-card--fallback .post-card__link {
    background-image: linear-gradient(160deg, #e9f1ff 0%, #d9e7ff 100%);
}

.post-card__link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18, 32, 64, 0.08) 0%, rgba(18, 32, 64, 0.45) 55%, rgba(18, 32, 64, 0.72) 100%);
    z-index: 1;
}

.post-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    color: #f2f6ff;
    z-index: 2;
}

.post-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(242, 246, 255, 0.85);
}

.post-card__title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.35;
    color: #f5f9ff;
}

.post-card__excerpt {
    margin: 0;
    color: rgba(242, 246, 255, 0.85);
}

.post-card .pill {
    background: #e6efff;
    color: #32558f;
    border: 1px solid #c9d7f2;
    padding: 6px 12px;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 999px;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 60px rgba(47, 78, 133, 0.18);
}

.post-card:active {
    transform: translateY(-2px);
}

.post-card:hover .post-card__link {
    background-size: 108%;
}

.read-more {
    margin-top: auto;
    font-weight: 600;
    color: #f5f9ff;
}

.empty-state {
    padding: 28px;
    border-radius: 18px;
    background: rgba(245, 249, 255, 0.75);
    border: 1px dashed rgba(201, 215, 242, 0.85);
    color: var(--muted);
}

.site-footer {
    margin-top: 70px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    padding: 0 6vw 40px;
}

.site-footer p {
    margin: 0;
}

.footer-links {
    display: inline-flex;
    gap: 14px;
    margin-top: 8px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-links a {
    color: inherit;
}

.footer-links a:hover,
.footer-links a:focus {
    opacity: 1;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(100, 149, 237, 0.2);
    z-index: 300;
}

.reading-progress__bar {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.1s linear;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f5f9ff;
    color: #32558f;
    font-size: 1rem;
    box-shadow: 0 12px 26px rgba(47, 78, 133, 0.16);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.is-hidden {
    display: none !important;
}

.post-layout {
    padding: 40px 0 80px;
}

.post-shell {
    background: #f5f9ff;
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(201, 215, 242, 0.8);
}

.post-header h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}

.post-meta a {
    color: var(--accent-dark);
    font-weight: 500;
}

.post-featured {
    margin: 28px 0;
    border-radius: 22px;
    overflow: hidden;
}

.post-content {
    font-size: 1.05rem;
    color: #23385f;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    font-weight: 600;
    color: var(--accent-dark);
}

.related-wrap {
    margin-top: 48px;
}

.archive-header {
    margin-bottom: 24px;
}

.archive-title {
    margin: 0 0 8px;
    font-size: clamp(2rem, 4vw, 2.6rem);
}

.archive-description {
    color: var(--muted);
    margin: 0;
}

.simple-page {
    background: #f5f9ff;
    border-radius: 26px;
    padding: 36px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(201, 215, 242, 0.8);
}

.contact-wrap {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.contact-card {
    width: min(720px, 100%);
    background: #f5f9ff;
    border-radius: 28px;
    padding: 32px;
    border: 1px solid rgba(201, 215, 242, 0.75);
    box-shadow: 0 18px 40px rgba(47, 78, 133, 0.08);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.contact-intro {
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
}

.contact-list {
    display: grid;
    gap: 12px;
}

.contact-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(201, 215, 242, 0.8);
    background: #f7faff;
    box-shadow: 0 8px 20px rgba(47, 78, 133, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-item:hover,
.contact-item:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(47, 78, 133, 0.1);
}

.contact-item:active {
    transform: translateY(-1px) scale(0.98);
}

.contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #e6efff;
    color: #32558f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 18px;
    height: 18px;
}

.contact-label {
    font-weight: 600;
    color: var(--ink);
}

.contact-detail {
    display: block;
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 2px;
}

.about-modern {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    background: #f5f9ff;
    border-radius: 28px;
    padding: 28px;
    border: 1px solid rgba(201, 215, 242, 0.75);
    box-shadow: 0 22px 46px rgba(47, 78, 133, 0.12);
}

.about-modern__media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-modern__photo {
    width: min(260px, 70vw);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background-size: cover;
    background-position: 0% 0%;
    margin-top: 10px;
    border: 6px solid #e3edff;
    box-shadow: 0 18px 40px rgba(47, 78, 133, 0.14);
}

.about-modern__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-card__title {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.about-card__text {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

.about-card__text p {
    margin: 0 0 16px;
}

.about-card__text p:last-child {
    margin-bottom: 0;
}

.about-body {
    margin-top: 28px;
}

.about-body__card {
    background: #f5f9ff;
    border-radius: 26px;
    padding: 32px;
    border: 1px solid rgba(201, 215, 242, 0.75);
    box-shadow: var(--shadow);
}

.reveal {
    opacity: 1;
    transform: none;
}

.js .reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}


@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .post-card__link {
        background-size: cover;
    }
}

@media (max-width: 980px) {
    .post-card__link {
        aspect-ratio: 4 / 5;
    }
}

@media (max-width: 900px) {
    .hero {
        padding: 36px 28px;
    }

    .post-shell,
    .simple-page {
        padding: 28px;
    }

    .about-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .primary-nav {
        display: none;
    }

    .lang-switcher {
        display: none;
    }

    .burger {
        display: inline-flex;
    }

    .about-modern {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

@media (max-width: 720px) {
    .about-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .country-btn {
        width: 100%;
        text-align: center;
    }

    .post-card__link {
        aspect-ratio: 1 / 1;
    }
}