/* =========================================================================
   Serinyayla Köyü — app.css  (Modern Blue, responsive design system)
   ========================================================================= */

/* Die FARB-Variablen (--blue-*, --ink, --bg, --ok, ...) kommen aus dem aktiven
   Theme in assets/css/themes/ (blue | warm | neutral) und werden NACH dieser
   Datei geladen. Hier stehen nur struktur-/layoutbezogene Design-Tokens.
   Fallback-Farben, falls kein Theme geladen wurde: */
:root {
    --blue-900: #0a2540;
    --blue-800: #103a63;
    --blue-700: #155286;
    --blue-600: #1d63b5;
    --blue-500: #2a7ade;
    --blue-400: #4f97ec;
    --blue-200: #bcd8f7;
    --blue-100: #e4f0fb;
    --blue-050: #f2f8fd;
    --teal-500: #14b8c4;
    --ink: #10263b;
    --muted: #5b7185;
    --line: #d9e6f2;
    --bg: #eef4fb;
    --surface: #ffffff;
    --ok: #1e9e5a;
    --warn: #d98324;
    --err: #c0392b;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(16, 38, 59, .08), 0 1px 2px rgba(16, 38, 59, .06);
    --shadow: 0 6px 20px rgba(16, 38, 59, .12);
    --maxw: 1120px;
    --header-h: 68px;

    --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;

    /*ismail*/
    --bg-2: #9c9da4;
    --surface-2: #cbccc7;
    --link-2: #cbccc7;
    --table-data: #a0a686;

}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: clamp(15px, 1vw + 13px, 17px);
    line-height: 1.6;
    color: var(--ink);
    /* background: var(--bg); */
    background: var(--bg-2);

}

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

a {
    color: var(--blue-600);
    text-decoration: none;
}

a:hover {
    color: var(--blue-800);
    text-decoration: underline;
}

h1,
h2,
h3 {
    line-height: 1.25;
    color: var(--blue-900);
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: clamp(14px, 3vw, 28px);
}

/* "Boxed"-Layout: Kopfleiste, Menue, Bilderleiste und Footer schliessen buendig
   mit dem Inhaltsbereich ab (gleiche Breite, zentriert) statt ueber die volle
   Bildschirmbreite zu laufen. */
/*
.site-header,
.site-nav,
.thumbstrip,
.site-footer {
    max-width: var(--maxw);
    margin-inline: auto;
}
*/

.muted {
    color: var(--muted);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 1000;
    background: var(--blue-700);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 3px solid var(--blue-400);
    outline-offset: 2px;
    border-radius: 4px;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(120deg, var(--blue-800), var(--blue-600));
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.site-header__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: var(--header-h);
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    margin-right: auto;
}

.site-header__brand:hover {
    text-decoration: none;
}

.site-header__logo {
    /*     width: 40px; */
    width: auto;
    /*     height: 40px; */
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.site-header__titles {
    display: flex;
    flex-direction: column;
}

.site-header__title {
    font-weight: 700;
    /* font-size: 1.1rem; */
    font-size: 2.0rem;
    letter-spacing: .02em;
    color: white;
}

.site-header__subtitle {
    /*font-size: .72rem;*/
    font-size: 1.6rem;
    opacity: .85;
    color: white;
}

.site-header__date {
    font-size: .82rem;
    opacity: .9;
    white-space: nowrap;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 9px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: .25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */
.site-nav {
    background: var(--blue-900);
}

.site-nav__list {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: 0 clamp(6px, 2vw, 18px);
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.site-nav__list a {
    display: block;
    padding: 12px 14px;
    color: #dceaf8;
    font-size: .92rem;
    font-weight: 600;
    border-radius: 8px;
}

.site-nav__list a:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-decoration: none;
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 18, 32, .5);
    z-index: 40;
}

/* -------------------------------------------------------------------------
   Thumbnail-Leiste (letzte 50 Bilder)
   ------------------------------------------------------------------------- */
.thumbstrip {
    background: var(--blue-050);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    padding: 8px 0;
}

.thumbstrip__track {
    display: flex;
    gap: 8px;
    width: max-content;
    animation: thumbscroll 90s linear infinite;
}

.thumbstrip:hover .thumbstrip__track,
.thumbstrip:focus-within .thumbstrip__track {
    animation-play-state: paused;
}

.thumbstrip__item {
    flex: 0 0 auto;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: #fff;
}

/*** menu fit to contnets **/
.thumbstrip__item img {
    width: auto;
    height: 128px;
    object-fit: contain;
    display: block;
    transition: transform .25s;
}

.thumbstrip__item:hover img {
    transform: scale(1.06);
}

@keyframes thumbscroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .thumbstrip__track {
        animation: none;
        overflow-x: auto;
    }
}

/* ---------- Main / cards ---------- */
.main {
    padding-block: clamp(20px, 4vw, 40px);
    min-height: 50vh;
}

.card {
    /*     background: var(--surface);  */
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: clamp(18px, 3vw, 30px);
    margin-bottom: 22px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.card--link {
    display: block;
    transition: transform .2s, box-shadow .2s;
}

.card--link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.card--link h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.card--link p {
    margin: 0;
    color: var(--muted);
}

.welcome__title {
    margin-top: 0;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.welcome__sign {
    margin-top: 18px;
}

.welcome__hits {
    margin-top: 14px;
    color: var(--muted);
    font-size: .9rem;
}

.page-title {
    margin: 0 0 18px;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    padding-bottom: 10px;
    border-bottom: 3px solid var(--blue-200);
}

/* ---------- Forms ---------- */
.form {
    display: grid;
    gap: 14px;
    max-width: 640px;
}

.form--wide {
    max-width: 900px;
}

.form__row {
    display: grid;
    gap: 6px;
}

.form label {
    font-weight: 600;
    font-size: .92rem;
    color: var(--blue-800);
}

.input,
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.input:focus,
textarea:focus,
select:focus {
    border-color: var(--blue-400);
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 10px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--blue-600);
    color: #fff;
    transition: background .2s;
}

.btn:hover {
    background: var(--blue-800);
    text-decoration: none;
    color: #fff;
}

.btn--ghost {
    background: transparent;
    color: var(--blue-700);
    border: 1px solid var(--blue-200);
}

.btn--ghost:hover {
    background: var(--blue-100);
    color: var(--blue-800);
}

.btn--danger {
    background: var(--err);
}

.btn--danger:hover {
    background: #97271c;
}

.btn--sm {
    padding: 6px 12px;
    font-size: .85rem;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Captcha */
.captcha {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.captcha__code {
    font-size: 1.1rem;
    letter-spacing: .25em;
    background: var(--blue-100);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--blue-400);
}

.captcha__input {
    width: 120px;
}

.captcha__hint {
    color: var(--muted);
    font-size: .85rem;
}

/* Messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert--ok {
    background: #e6f6ec;
    border-color: #b6e0c4;
    color: #14663a;
}

.alert--err {
    background: #fbeae8;
    border-color: #f0c2bc;
    color: #8f261c;
}

.alert--info {
    background: var(--blue-100);
    border-color: var(--blue-200);
    color: var(--blue-800);
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    /* ismail*/
    /*   min-width: fit-content; */
}

table.data {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    background: var(--table-data);
}

table.data th,
table.data td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

table.data thead th {
    background: var(--blue-100);
    color: var(--blue-900);
    position: sticky;
    top: 0;
}

table.data tbody tr:nth-child(even) {
    background: var(--blue-050);
}

table.data tbody tr:hover {
    background: var(--blue-100);
}

/* ---------- Pagination ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 20px 0;
}

.pager a,
.pager span {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--blue-700);
    font-weight: 600;
}

.pager a:hover {
    background: var(--blue-100);
    text-decoration: none;
}

.pager .is-active {
    background: var(--blue-600);
    color: #fff;
    border-color: var(--blue-600);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--blue-900);
    color: #cfe0f2;
    margin-top: 40px;
    padding: 22px 0;
    text-align: center;
}

.site-footer a {
    color: #fff;
}

/* Theme-Umschalter (zum Vergleichen der 3 Designs) */
.theme-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.theme-switch__label {
    color: #cfe0f2;
    font-size: .85rem;
    opacity: .85;
}

.theme-switch a {
    font-size: .82rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
}

.theme-switch a:hover {
    background: rgba(255, 255, 255, .25);
    text-decoration: none;
}

.theme-switch a.is-active {
    background: #fff;
    color: var(--blue-900);
    border-color: #fff;
}

/* ---------- Content prose (static pages) ---------- */
.prose h2 {
    margin-top: 1.6em;
}

.prose img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin: 14px 0;
}

.prose ul {
    padding-left: 1.2em;
}

.link-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 8px;
}

.link-list a {
    display: block;
    padding: 12px 16px;
    /* background: #fff;  */
    background: var(--link-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.link-list a:hover {
    background: var(--blue-050);
    text-decoration: none;
}

/* ---------- Responsive nav ---------- */
@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }

    .site-header__subtitle {
        display: none;
    }

    .site-header__date {
        display: none;
    }

    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 320px);
        transform: translateX(-100%);
        transition: transform .28s ease;
        z-index: 45;
        overflow-y: auto;
        padding-top: calc(var(--header-h) + 10px);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        transform: translateX(0);
    }

    .site-nav__list {
        flex-direction: column;
        gap: 2px;
        padding: 10px;
    }

    .site-nav__list a {
        font-size: 1rem;
    }
}

@media (min-width: 861px) {
    .nav-backdrop {
        display: none !important;
    }
}