/* Soartex main website — framework-free stylesheet */
:root {
    color-scheme: light;
    --soartex-dark: #222;
    --soartex-light: #c8c8c8;
    --soartex-blue: #23659a;
    --content-width: 1140px;
}

* { box-sizing: border-box; }
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; background: var(--soartex-light);}
body.site-body {
    min-height: 100vh;
    margin: 0;

    display: flex;
    flex-direction: column;

    background: var(--soartex-light);
    color: #292929;
    font-family: Lato, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}
a { color: var(--soartex-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; }
.site-container { width: min(100% - 30px, var(--content-width)); margin-inline: auto; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header image and wordmark */
.hero-header {
    position: relative;
    min-height: clamp(170px, 18vw, 367px);
    overflow: hidden;
    background: linear-gradient(135deg, #656565, #a1a1a1 48%, #4b4b4b);
    isolation: isolate;
}
.hero-header::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,.25));
}
.hero-image {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-inner { position: relative; min-height: clamp(170px, 18vw, 250px); display: flex; justify-content: flex-end; align-items: flex-start; padding-top: 16px; }
.site-logo { display: inline-flex; align-items: center; min-height: 52px; }
.site-logo img { display: block; max-width: min(100%, 360px); max-height: 64px; width: auto; object-fit: contain; }
.site-logo-text {
    color: #eee;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 39px;
    font-weight: 400;
    letter-spacing: .28em;
    line-height: 1;
    padding: 0 5px;
    text-shadow: 0 2px 3px #333, 0 0 2px #111;
}


/* =========================================
   HEADER VARIATIONS
   ========================================= */

/* Homepage */
.site-header--home .hero-header {
    display: block;
}

.site-header--home .hero-inner {
    justify-content: flex-end;
}

/* All inner pages */
.site-header--inner .hero-header {
    display: none;
}

.site-header--inner .site-nav,
.site-header--inner #soartex-home-nav {
    height: 128px;
    min-height: 128px;

    background-image: url("img/nav.png");
    background-repeat: repeat-x;
    background-size: auto 100%;
}

.site-header--inner .nav-inner {
    height: 128px;
    min-height: 128px;

    justify-content: flex-start;
    align-items: center;
}

/* Logo on the left */
.site-header--inner .site-logo {
    order: 0;
    flex-shrink: 0;
    margin-right: 30px;
}

/* Navigation links beside logo */
.site-header--inner .nav-primary {
    order: 1;
    flex: 1;
}

.site-header--inner .nav-secondary {
    order: 2;
    margin-left: auto;
}

@media (max-width: 760px) {
    .site-header--inner .site-nav,
    .site-header--inner #soartex-home-nav,
    .site-header--inner .nav-inner {
        height: auto;
        min-height: 128px;
    }

    .site-header--inner .nav-inner {
        flex-wrap: wrap;
        flex-direction: row;
        padding-block: 12px;
    }

    .site-header--inner .site-logo {
        margin-right: 15px;
    }
}

.site-header {
    flex-shrink: 0;
}


/* Main wooden navigation */
.site-nav {
    position: sticky;
    z-index: 50;
    top: 0;
    color: #fff;
    background-color: #24160f;
    background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0, rgba(0,0,0,.18) 1px, transparent 1px, transparent 6px), repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0, rgba(255,255,255,.035) 1px, transparent 1px, transparent 58px), linear-gradient(#3a2418, #1c110c 55%, #29180f);
    background-repeat: repeat-x;
    background-size: auto 100%;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 5px 16px rgba(0,0,0,.5);
}
.site-nav.has-nav-texture { background-image: url("img/nav.png"); background-repeat: repeat-x; background-size: auto 100%; }
.nav-inner { min-height: 53px; display: flex; justify-content: space-between; align-items: center; gap: 22px; }
.nav-primary { display: flex; align-items: center; gap: 27px; min-width: 0; }
.nav-home { color: #fff; font-size: 18px; font-weight: 700; white-space: nowrap; }
.nav-list { display: flex; align-items: center; gap: 24px; padding: 0; margin: 0; list-style: none; }
.nav-list > li { position: relative; }
.nav-list a, .nav-list summary { color: #fff; font-size: 14px; white-space: nowrap; }
.nav-list a:hover, .nav-list summary:hover { color: #ddd; text-decoration: none; }
.nav-dropdown details { position: relative; }
.nav-dropdown summary { cursor: pointer; list-style: none; user-select: none; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary span { margin-left: 3px; }
.dropdown-menu {
    position: absolute;
    z-index: 60;
    top: calc(100% + 12px);
    left: -12px;
    width: 192px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,.22);
}
.dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.dropdown-menu a { display: block; padding: 7px 14px; color: #333; white-space: normal; }
.dropdown-menu a:hover { color: #111; background: #f0f0f0; }
.dropdown-menu .dropdown-separator { height: 1px; margin: 5px 0; background: #e5e5e5; }
.dropdown-menu-right { right: -8px; left: auto; }
.dropdown-menu .admin-link { font-weight: 700; }

/* Main content */
.site-main {
    flex: 1 0 auto;
    margin-top: 32px;
    margin-bottom: 0;
    padding-bottom: 64px;
}
.content-card {
    padding: 30px 32px;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 7px;
    box-shadow: 0 2px 7px rgba(0,0,0,.10);
}
.content-heading { padding-bottom: 15px; margin-bottom: 16px; border-bottom: 1px solid #e1e1e1; }
.content-heading h1 { margin: 0; color: #242424; font-size: 31px; line-height: 1.25; font-weight: 700; }
.content-heading h1 span { color: #777; font-size: 21px; font-weight: 400; }
.intro-copy { margin: 0 0 14px; line-height: 1.75; }
.intro-links { margin: 12px 0 0; color: #888; font-size: 14px; }
.intro-links span { padding-inline: 8px; }
.home-news { margin-top: 28px; }
.news-card h2 { margin: 0; color: #252525; font-size: 26px; line-height: 1.3; }
.news-title-link { display: block; color: inherit; }
.news-title-link:hover { color: #23659a; text-decoration: none; }
.news-card h2 small { color: #888; font-size: 15px; font-weight: 400; }
.news-card hr { height: 1px; margin: 17px 0; border: 0; background: #e1e1e1; }
.news-excerpt { margin: 0 0 20px; line-height: 1.75; overflow-wrap: anywhere; }
.read-more {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    background: #f3f3f3;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}
.read-more:hover { background: #e7e7e7; color: #111; text-decoration: none; }
.license-card { margin-top: 28px; padding-block: 20px; }
.license-card h2 { margin: 0 0 6px; font-size: 20px; }
.license-card p { margin: 0; }
.page-title { margin: 0 0 24px; color: #252525; font-size: 32px; line-height: 1.25; }
.news-list { display: grid; gap: 24px; }
.empty-state { margin: 0; color: #777; }
.back-link { display: inline-block; margin: 0 0 17px; }
.single-post h1 { margin: 0 0 9px; color: #252525; font-size: 32px; line-height: 1.25; }
.post-date { margin: 0 0 24px; padding-bottom: 16px; border-bottom: 1px solid #e1e1e1; color: #888; font-size: 14px; }
.post-content { line-height: 1.8; white-space: normal; overflow-wrap: anywhere; }

/* News administration */
.admin-main { max-width: 900px; }
.admin-card { margin-bottom: 24px; }
.admin-card h2, .admin-post-list h2 { margin: 0 0 16px; font-size: 22px; }
.admin-login-card { max-width: 560px; }
.admin-message { margin: 0 0 18px; padding: 11px 14px; border: 1px solid; border-radius: 4px; }
.admin-message-error { color: #802a2a; background: #fff0f0; border-color: #e3b4b4; }
.admin-message-success { color: #285f35; background: #eff9f0; border-color: #b7d7bd; }
.site-form { display: grid; gap: 9px; }
.site-form label { margin-top: 7px; color: #444; font-size: 14px; font-weight: 700; }
.site-form input, .site-form textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    background: #fff;
    color: #222;
}
.site-form input:focus, .site-form textarea:focus { outline: 2px solid #b5d1e7; border-color: #6c9fc5; }
.site-form textarea { resize: vertical; min-height: 180px; }
.site-form .read-more { justify-self: start; margin-top: 8px; }
.form-hint { margin: 0; color: #888; font-size: 13px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 18px; }
.admin-toolbar p { margin: 0; }
.button-muted, .delete-button { padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; background: #f4f4f4; color: #444; cursor: pointer; font-size: 13px; }
.delete-button { border-color: #e0bcbc; color: #9a3030; background: #fff5f5; }
.admin-post-list { margin-top: 28px; }
.admin-post-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 13px 15px; margin-bottom: 9px; background: rgba(255,255,255,.85); border: 1px solid #ddd; border-radius: 4px; }
.admin-post-row > div { min-width: 0; }
.admin-post-row a { display: block; font-weight: 700; overflow-wrap: anywhere; }
.admin-post-row time { display: block; color: #888; font-size: 12px; }

/* Footer and ticker */
.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 13px 0;
    color: #aaa;
    background: #292929;
}

.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 13px; }
.news-ticker { position: relative; width: 50%; height: 20px; overflow: hidden; }
.news-ticker ul { position: absolute; top: 0; left: 0; width: 100%; padding: 0; margin: 0; list-style: none; animation: ticker-cycle 8s infinite; }
.news-ticker li { height: 20px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-ticker a, .footer-legal a { color: #bbb; text-decoration: underline; }
.news-ticker a:hover, .footer-legal a:hover { color: #fff; }
.footer-legal { white-space: nowrap; }
.footer-legal span { padding-inline: 5px; }
@keyframes ticker-cycle {
    0%, 42% { transform: translateY(0); }
    50%, 92% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

@media (max-width: 760px) {
    .hero-header, .hero-inner { min-height: 150px; }
    .site-logo img { max-width: 220px; max-height: 46px; }
    .site-logo-text { font-size: 30px; }
    .nav-inner { align-items: flex-start; flex-direction: column; gap: 8px; padding-block: 10px; }
    .nav-primary { width: 100%; align-items: flex-start; flex-direction: column; gap: 7px; }
    .nav-home { font-size: 16px; }
    .nav-list { width: 100%; flex-wrap: wrap; gap: 9px 19px; }
    .nav-secondary { position: absolute; top: 10px; right: 15px; width: auto; }
    .dropdown-menu { top: calc(100% + 8px); }
    .dropdown-menu-right { right: 0; }
    .site-main { margin-top: 22px; margin-bottom: 42px; }
    .content-card { padding: 22px 20px; }
    .content-heading h1 { font-size: 27px; }
    .news-card h2 { font-size: 22px; }
    .news-card h2 small { display: block; margin-top: 4px; }
    .page-title, .single-post h1 { font-size: 27px; }
    .footer-inner { align-items: flex-start; flex-direction: column; gap: 6px; }
    .news-ticker { width: 100%; }
}

@media (max-width: 430px) {
    .site-container { width: min(100% - 22px, var(--content-width)); }
    .hero-header, .hero-inner { min-height: 125px; }
    .nav-list { gap: 8px 14px; }
    .nav-list a, .nav-list summary { font-size: 13px; }
    .content-card { padding: 19px 16px; }
    .admin-post-row { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .news-ticker ul { animation: none; }
}


/* =========================================
   LICENSE PAGE
   ========================================= */

.license-main {
    max-width: 646px;
}

.license-panel {
    margin-bottom: 16px;
    padding: 36px 33px 39px;
    border-radius: 0;
    background: #eee;
    box-shadow: none;
}

.license-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 30px;
    padding-bottom: 7px;
    color: #333;
    border-bottom: 1px solid #d8d8d8;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -1.2px;
}

.license-heading > span {
    color: #444;
}

.license-heading small {
    color: #777;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0;
}

.license-cookie-notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 16px;
    padding: 7px 10px;
    border-radius: 0;
    box-shadow: none;
    font-size: 12px;
}

.license-cookie-close {
    color: #999;
    font-size: 17px;
    font-weight: 700;
}

.license-cookie-close:hover {
    color: #333;
    text-decoration: none;
}

.license-rules {
    padding: 0;
    margin: 0;
    list-style: none;
    border: 1px solid #e0e0e0;
}

.license-rules li {
    display: grid;
    grid-template-columns: 29px minmax(0, 1fr);
    min-height: 29px;
    color: #444;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    line-height: 1.45;
}

.license-rules li:last-child {
    border-bottom: 0;
}

.license-rules li > span:last-child {
    padding: 6px 9px;
    overflow-wrap: anywhere;
}

.license-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #e0e0e0;
    color: #444;
    font-size: 14px;
    font-weight: 900;
}

.license-rules--prohibited li > span:last-child {
    color: #b94a48;
}

.license-rules--allowed li > span:last-child {
    color: #468847;
}

.license-rules--information li > span:last-child {
    color: #444;
}

.license-rules--information .license-icon {
    font-size: 10px;
}

.license-callout {
    margin: 11px 0;
    padding: 10px;
    border: 1px solid #bce8f1;
    font-size: 12px;
    line-height: 1.45;
}

.license-callout--note,
.license-callout--quote {
    color: #31708f;
    background: #d9edf7;
}

.license-rules--allowed,
.license-rules--information {
    margin-top: 11px;
}

.license-rules--separated {
    margin-top: 16px;
}

.license-contact {
    margin-top: 11px;
    padding: 12px 11px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #444;
    font-size: 12px;
    line-height: 1.5;
}

.license-contact p {
    margin: 0;
}

.license-contact small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
}

.license-panel a {
    color: var(--soartex-blue);
}

@media (max-width: 760px) {
    .license-main {
        max-width: 646px;
    }

    .license-panel {
        padding: 26px 20px 29px;
    }

    .license-heading {
        font-size: 29px;
        margin-bottom: 22px;
    }

    .license-heading small {
        font-size: 19px;
    }
}

@media (max-width: 430px) {
    .license-panel {
        padding: 21px 14px 23px;
    }

    .license-heading {
        font-size: 25px;
    }

    .license-heading small {
        font-size: 17px;
    }

    .license-rules li {
        grid-template-columns: 25px minmax(0, 1fr);
    }
}
