/* =====================================================
   common.css — shared styles for all vyang.org sites
   Served from https://static.vyang.org/style/common.css
   ===================================================== */

/* --- Fonts --- */
@font-face {
    font-family: 'Georgia';
    src: url('https://static.vyang.org/fonts/georgia.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Georgia';
    src: url('https://static.vyang.org/fonts/georgiab.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Georgia';
    src: url('https://static.vyang.org/fonts/georgiai.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Georgia';
    src: url('https://static.vyang.org/fonts/georgiaz.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* --- Variables & reset --- */
:root {
    --main-font: Georgia, "Times New Roman", Times, serif;
    --secondary-font: monospace;
    --bg-color: #ffffff;
    --text-color: #111111;
    --surface-color: #ffffff;
    --surface-muted: #f4f4f4;
    --border-color: #dddddd;
}

html {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    position: relative;
    width: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
}

* { 
    box-sizing: border-box;
}

/* --- Navigation bar --- */
.language-chooser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 1% 0;
    background-color: rgb(0, 0, 233, 0.253);
    color: white;
    font-family: var(--main-font);
    font-size: 1rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.5%;
    z-index: 1100;
}

.nav-separator {
    color: white;
    font-size: 1rem;
}

.language-chooser a,
.language-chooser .dropdown-toggle,
.language-chooser .dropdown-item {
    font-size: 1rem !important;
    line-height: 1.2;
    font-family: var(--main-font);
}

.language-chooser a,
.language-chooser a:link,
.language-chooser a:visited {
    display: inline-block;
    color: white;
    text-decoration: none;
}

.language-chooser a:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

.language-chooser .dropdown-menu .dropdown-item {
    color: rgb(0, 0, 233, 0.253) !important;
    display: block;
}

a.nav-link {
    display: inline !important;
    font-size: 1rem !important;
    font-style: normal;
    font-family: var(--main-font);
    text-decoration: none;
    color: white;
    white-space: nowrap;
}

a.nav-link:link,
a.nav-link:visited { color: white; }

a.nav-link:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

/* --- Dropdown --- */
.dropdown {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
}

.dropdown-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: var(--main-font);
    font-size: 1rem;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
}

.dropdown-toggle:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

.dropdown-toggle:focus {
    outline: 1px dashed rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: none;
    border-radius: 0;
    padding: 4px 0;
    min-width: 8rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    z-index: 1110;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-item {
    display: block;
    padding: 6px 12px;
    font-family: var(--main-font);
    font-size: 1rem;
    color: black;
    text-decoration: none;
    white-space: nowrap;
    text-align: left;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
    text-decoration: underline;
}



/* --- Footer --- */
.end_section {
    background-color: rgb(0, 0, 233, 0.253);
    color: white;
    padding: 2%;
    border-radius: 0;
    font-family: var(--main-font);
    font-size: 170%;
    position: sticky;
    text-align: center;
    margin-top: 5%;
}

.copyright {
    display: block;
    font-size: 80%;
    font-style: normal;
    font-family: var(--main-font);
    margin-top: 2%;
    text-align: center;
}

.copyright a,
.copyright a:visited {
    color: white;
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

/* --- Typography --- */
h1 {
    max-width: 65%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 5%;
    margin-bottom: 1.5%;
    text-align: left;
    font-size: 900%;
    font-style: normal;
    font-family: var(--main-font);
    font-weight: 100;
}

p.click_for {
    font-size: 188%;
    font-style: italic;
    font-family: var(--main-font);
    margin-bottom: 0;
    text-align: center;
    color: rgb(0, 0, 0);
}

p.main-text {
    display: block;
    font-size: 238%;
    font-style: italic;
    font-family: var(--main-font);
    margin-top: 0;
    text-align: left;
    max-width: 65%;
    margin-left: auto;
    margin-right: auto;
    text-decoration: none;
}

.main-text-small {
    font-size: 144%;
    font-style: italic;
    max-width: 65%;
    margin-left: auto;
    margin-right: auto;
}

/* --- Responsive: tablet --- */
@media (max-width: 900px) {
    .language-chooser {
        position: static;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.45rem;
        padding: 0.75rem 0.5rem;
    }

    .nav-separator {
        display: none;
    }

    h1 {
        max-width: 92%;
        margin: 1.2rem auto 0.8rem;
        font-size: clamp(2.4rem, 10vw, 3.8rem);
        line-height: 1.1;
    }

    p.main-text,
    .main-text-small {
        max-width: 92%;
    }

    p.main-text {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    .main-text-small {
        font-size: clamp(1rem, 4.2vw, 1.2rem);
    }

    .end_section {
        font-size: clamp(1.25rem, 4.8vw, 1.6rem);
        padding: 1rem 0.75rem;
    }

    .copyright {
        font-size: 0.9rem;
    }
}

/* --- Responsive: mobile --- */
@media (max-width: 600px) {
    .language-chooser {
        font-size: 0.95rem;
        row-gap: 0.35rem;
    }

    .language-chooser a,
    .language-chooser .dropdown-toggle,
    .language-chooser .dropdown-item,
    a.nav-link {
        font-size: 0.88rem !important;
        white-space: normal;
    }

    .dropdown-menu {
        left: 50%;
        transform: translateX(-50%);
        min-width: 10rem;
    }

    .dropdown:hover .dropdown-menu,
    .dropdown:focus-within .dropdown-menu {
        transform: translateX(-50%);
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0f1218;
        --text-color: #eceff4;
        --surface-color: #151a23;
        --surface-muted: #1b2230;
        --border-color: #2a3242;
        color-scheme: dark;
    }

    .language-chooser {
        background-color: rgba(90, 120, 255, 0.32);
        color: #f4f6ff;
    }

    .language-chooser .dropdown-menu .dropdown-item {
        color: #aac2ff !important;
    }

    .dropdown-menu {
        background-color: var(--surface-color);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
    }

    .dropdown-item {
        color: #e6ebf7;
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .dropdown-toggle:focus {
        outline: 1px dashed rgba(255, 255, 255, 0.75);
    }

    .end_section {
        background-color: rgba(90, 120, 255, 0.32);
        color: #f4f6ff;
    }

    p.click_for {
        color: #eceff4;
    }
}
