/* =========================
   Base
   ========================= */

body {
    margin: 0;
    font-family:
        "Source Sans 3",
        "IBM Plex Sans",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    background-color: #f7f8f6;
    color: #222;
    line-height: 1.7;
}

/* =========================
   Layout helpers
   ========================= */

header,
main,
footer {
    max-width: 42rem;
    margin: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* =========================
   Header
   ========================= */

header {
    position: relative;
}

header h1 {
    margin-top: 2rem;
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

header p {
    margin-top: 0.5rem;
    color: #555;
    max-width: 34rem;
    font-size: 1rem;
    font-weight: 400;
}

/* =========================
   Navigation
   ========================= */

nav {
    margin-top: 2rem;
}

nav a {
    margin-right: 1.25rem;
    text-decoration: none;
    color: #2f6f6a;
    font-weight: 500;
    font-size: 0.95rem;
}

nav a:hover {
    text-decoration: underline;
}

/* =========================
   Main content
   ========================= */

main {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

section {
    margin-bottom: 3.5rem;
}

h1, h2 {
    position: relative;
}

h1 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

h1::after {
    content: "";
    position: absolute;
    left: -0.3rem;
    bottom: -0.6em;
    width: 1.5rem;
    height: 4.5em;
    border-radius: 14px;
    z-index: -27;
}

/* rotating warm colors */
h1:nth-of-type(6n+1)::after { background: rgba(126,177,155,0.55); }
h1:nth-of-type(6n+2)::after { background: rgba(246,180,166,0.65); }
h1:nth-of-type(6n+3)::after { background: rgba(156,135,178,0.55); }
h1:nth-of-type(6n+4)::after { background: rgba(232,192,124,0.6); }
h1:nth-of-type(6n+5)::after { background: rgba(140,176,210,0.55); }
h1:nth-of-type(6n+6)::after { background: rgba(210,140,108,0.6); }

section:nth-of-type(odd) h1::after { transform: rotate(-1.3deg); }
section:nth-of-type(even) h1::after { transform: rotate(1.1deg); }

h2 {
    font-size: 1.25rem;
    margin-top: 2.8rem;
    margin-bottom: 2.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h2::after {
    content: "";
    position: absolute;
    left: -0.3rem;
    bottom: -1.1em;
    width: 3.5rem;
    height: 0.6em;
    border-radius: 14px;
    z-index: -1;
}

/* rotating warm colors */
h2:nth-of-type(6n+1)::after { background: rgba(134, 126, 177, 0.55); }
h2:nth-of-type(6n+2)::after { background: rgba(246,180,166,0.65); }
h2:nth-of-type(6n+3)::after { background: rgba(135, 178, 143, 0.55); }
h2:nth-of-type(6n+4)::after { background: rgba(232,192,124,0.6); }
h2:nth-of-type(6n+5)::after { background: rgba(140,176,210,0.55); }
h2:nth-of-type(6n+6)::after { background: rgba(210,140,108,0.6); }

section:nth-of-type(odd) h2::after { transform: rotate(-1.3deg); }
section:nth-of-type(even) h2::after { transform: rotate(1.1deg); }

/* =========================
   Links (global)
   ========================= */

a {
    color: #2f6f6a;
}

a:hover {
    color: #be551c;
}

/* =========================
   Bilingual styling (tighter)
   ========================= */

p.de {
    margin-bottom: 0.2rem;
}

p.en {
    position: relative;
    margin-top: 0.5rem;
    margin-bottom: 0.9rem;
    margin-left: 3.5rem;
    font-style: italic;
    color: #765987;
    font-size: 0.95em;
}

/* Different colored dotted lines */
p.en::before {
    content: "";
    position: absolute;
    top: -0.6em;
    left: -3.2rem;
    width: 8rem;
    height: 14px;
}

p.en:nth-of-type(6n+1)::before {
    background: radial-gradient(circle, rgba(129, 126, 177, 0.55) 42%, transparent 44%) 0 50% / 14px 10px repeat-x;
}
p.en:nth-of-type(6n+2)::before {
    background: radial-gradient(circle, rgba(246, 226, 166, 0.65) 42%, transparent 44%) 0 50% / 14px 10px repeat-x;
}
p.en:nth-of-type(6n+3)::before {
    background: radial-gradient(circle, rgba(135, 178, 135, 0.55) 42%, transparent 44%) 0 50% / 14px 10px repeat-x;
}
p.en:nth-of-type(6n+4)::before {
    background: radial-gradient(circle, rgba(232, 165, 124, 0.6) 42%, transparent 44%) 0 50% / 14px 10px repeat-x;
}
p.en:nth-of-type(6n+5)::before {
    background: radial-gradient(circle, rgba(187, 140, 210, 0.55) 42%, transparent 44%) 0 50% / 14px 10px repeat-x;
}
p.en:nth-of-type(6n+6)::before {
    background: radial-gradient(circle, rgba(210, 108, 108, 0.6) 42%, transparent 44%) 0 50% / 14px 10px repeat-x;
}

/* English subtitles / titles */
.en-title {
    display: block;
    font-size: 0.9em;
    font-weight: normal;
    font-style: italic;
    color: #765987;
    margin-top: 0.2rem;
    margin-left: 3.5rem;
}

/* =========================
   Episodes (if used)
   ========================= */

.episode {
    margin-top: 2rem;
}

.episode h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.episode time {
    font-size: 0.85rem;
    color: #666;
}

/* =========================
   Footer
   ========================= */

footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    background: transparent;
}

/* =========================
   Sinus wave dividers
   ========================= */

.wave-divider {
    width: 100%;
    height: 48px;
    margin: 4.5rem 0;
}

.wave-divider svg {
    width: 100%;
    height: 100%;
}

.wave-divider path {
    fill: none;
    stroke-width: 2.4;
}

.deep-1 path { stroke: #9c87b2; }
.deep-2 path { stroke: #7eb19b; }
.deep-3 path { stroke: #e8c07c; }
.deep-4 path { stroke: #d28c6c; }

/* =========================
   Contact cards
   ========================= */

.contact-cards {
    display: grid;
    gap: 1rem;
    max-width: 420px;
}

.contact-card {
    display: block;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    border: 2px solid rgba(156,135,178,0.65);
    background: #f4f4f4;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.contact-card .label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
}

.contact-card .value {
    font-weight: bold;
}

/* =========================
   Show More Button
   ========================= */

#show-more {
    display: none;
    margin: 3rem auto 2rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    border: 2px solid rgba(156,135,178,0.65);
    background: #f4f4f4;
    color: #222;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    text-align: center;
    max-width: 200px;
}

#show-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: rgba(156,135,178,0.85);
    background: #f0f0f0;
}

#show-more:active {
    transform: translateY(-1px);
}

#show-more.show {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

/* =========================
   Logo (top right)
   ========================= */

#site-logo {
    position: absolute;
    top: 2.5rem;
    right: 1rem;
    height: 96px;
    width: auto;
    opacity: 1;
}

/* Center logo on wide screens */
@media (min-width: 1200px) {
    #site-logo {
        right: calc(50% - 21rem);
    }
}

/* =========================
   Responsive (phones)
   ========================= */

@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.15rem;
    }
    
    #site-logo {
        height: 36px;
        top: 2rem;
    }
}

/* =========================
   Print styles
   ========================= */

@media print {
    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }

    header,
    nav,
    footer {
        display: none;
    }

    main {
        max-width: none;
        padding: 1cm;
        margin: 0;
    }

    h1, h2, h3, p {
        page-break-inside: avoid;
    }

    h2 {
        border: none;
        page-break-after: avoid;
    }

    p.en {
        font-style: italic;
        color: #000;
    }

    section {
        page-break-inside: avoid;
    }
    
    #site-logo {
        display: none;
    }
}