* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #130c07;
    font-family: Arial, Helvetica, sans-serif;
    background: #120d08 url("images/back.jpg") top center repeat-y;
}

a {
    color: #8b390d;
}

.site-header {
    background: #5a210f;
}

.banner {
    width: min(1073px, 100%);
    margin: 0 auto;
    display: block;
}

.banner img {
    display: block;
    width: 100%;
    height: auto;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 3vw, 38px);
    padding: 16px 18px 12px;
    background: rgba(57, 33, 18, .88) url("images/icerik.jpg") center;
    border-top: 4px solid rgba(211, 176, 106, .55);
    border-bottom: 4px solid rgba(25, 15, 9, .9);
    overflow-x: auto;
}

.main-nav a {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 112px;
    color: #f1d78d;
    text-decoration: none;
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 700;
}

.main-nav img {
    width: auto;
    max-width: 112px;
    height: 74px;
    object-fit: contain;
}

.main-nav a.active,
.main-nav a:hover {
    color: #fff4c5;
}

.shell {
    width: min(1061px, calc(100% - 32px));
    min-height: 520px;
    margin: 38px auto 24px;
    padding: 42px 36px;
    background: #4c2e1d url("images/icerik.jpg") center repeat;
}

.content-page,
.detail {
    max-width: 760px;
    color: #e9c479;
    font: 20px/1.55 "Trebuchet MS", Arial, sans-serif;
}

.detail {
    max-width: 920px;
}

.content-page h1,
.detail h1 {
    margin-top: 0;
    color: #f6db99;
    font-family: Georgia, serif;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.home-welcome {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
    gap: 44px;
    align-items: start;
    color: #d3b06a;
}

.home-copy h1 {
    margin: 0 0 16px;
    color: #d3b06a;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 700;
    letter-spacing: 0;
}

.home-copy p {
    margin: 0;
    color: #d3b06a;
    font: 700 22px/1.42 "Trebuchet MS", Arial, sans-serif;
    text-transform: uppercase;
}

.home-actions {
    display: grid;
    gap: 14px;
}

.home-actions a {
    display: grid;
    grid-template-columns: 82px 1fr;
    align-items: center;
    min-height: 78px;
    padding: 8px 22px 8px 14px;
    border: 2px solid rgba(68, 40, 14, .55);
    border-radius: 20px;
    color: #4b3014;
    background: linear-gradient(#c9b05d, #9f8237);
    box-shadow: inset 0 2px 6px rgba(255, 244, 198, .35), 0 3px 8px rgba(0, 0, 0, .45);
    font: 700 28px/1.1 "Trebuchet MS", Arial, sans-serif;
    text-decoration: none;
}

.home-actions a:hover {
    color: #2e1a09;
    background: linear-gradient(#dac46d, #ad8d3c);
}

.home-action-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 54px;
    color: #3f2b16;
    font: 700 38px/1 Georgia, serif;
}

.quick-links a,
.detail-button,
button,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 4px;
    background: #ef8f2d;
    color: #1b0f07;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.list-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
}

.filter fieldset,
.admin-card {
    border: 2px solid rgba(255, 255, 255, .65);
    padding: 14px;
    background: rgba(37, 21, 12, .28);
}

.filter legend {
    padding: 0 8px;
    color: #f6db99;
    font-size: 18px;
    font-weight: 700;
}

.filter label {
    color: #f6db99;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .75);
}

.filter input,
.filter select {
    color: #130c07;
    text-shadow: none;
}

label {
    display: grid;
    gap: 5px;
    margin-bottom: 10px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 32px;
    border: 1px solid #c9b087;
    border-radius: 3px;
    padding: 6px 8px;
    font: inherit;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffe9bb;
}

th {
    background: #f3922e;
    border: 1px solid #85add6;
    padding: 10px 8px;
    text-align: center;
}

td {
    border-bottom: 1px solid #c8b894;
    padding: 10px 8px;
    text-align: center;
    font-family: Georgia, serif;
    font-size: 18px;
}

tr:hover td {
    background: #f5ce7c;
}

.count {
    color: #f6db99;
    font-weight: 700;
    text-align: right;
}

.detail dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.detail dl div {
    padding: 10px;
    background: rgba(255, 233, 187, .12);
}

.detail dt {
    font-weight: 700;
}

.detail dd {
    margin: 3px 0 0;
}

.detail-section {
    margin-top: 28px;
}

.detail-section h2 {
    margin: 0 0 12px;
    color: #f6db99;
    font-family: Georgia, serif;
    font-size: 26px;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.photo-gallery a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 2px solid rgba(246, 219, 153, .75);
    background: rgba(0, 0, 0, .22);
}

.photo-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.video-gallery iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 2px solid rgba(246, 219, 153, .75);
    background: #000;
}

.video-link {
    display: block;
    padding: 12px;
    background: #ffe9bb;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 56px 72px;
    background: rgba(0, 0, 0, .88);
}

.lightbox.is-open {
    display: flex;
}

.lightbox-open {
    overflow: hidden;
}

.lightbox figure {
    margin: 0;
    max-width: min(100%, 1120px);
    max-height: 100%;
    text-align: center;
}

.lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    margin: 0 auto;
    border: 3px solid #f6db99;
    background: #111;
    object-fit: contain;
}

.lightbox figcaption {
    margin-top: 10px;
    color: #f6db99;
    font-weight: 700;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border-radius: 50%;
    background: #ef8f2d;
    color: #1b0f07;
    font-size: 34px;
    line-height: 1;
}

.lightbox-close {
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    padding: 0;
}

.lightbox-nav {
    top: 50%;
    width: 52px;
    height: 52px;
    padding: 0 0 4px;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 18px;
}

.lightbox-next {
    right: 18px;
}

footer {
    min-height: 76px;
    padding: 28px 16px;
    color: #d3b06a;
    text-align: center;
    background: #2c1d13 url("images/foot.jpg") center;
}

.admin-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 24px auto;
    color: #1b0f07;
}

.admin-shell h1,
.admin-shell h2 {
    color: #f6db99;
}

.admin-card {
    margin: 18px 0;
    color: #160d08;
    background: #ffe9bb;
}

.datagrid-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 12px;
}

.datagrid-toolbar label {
    margin-bottom: 0;
}

.datagrid-count {
    padding: 8px 10px;
    border-radius: 4px;
    background: rgba(239, 143, 45, .22);
    font-weight: 700;
    text-align: center;
}

.datagrid th button {
    width: 100%;
    min-height: auto;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.datagrid th button::after {
    content: " ↕";
    font-size: 12px;
}

.datagrid th button[aria-sort="ascending"]::after {
    content: " ↑";
}

.datagrid th button[aria-sort="descending"]::after {
    content: " ↓";
}

.editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.editor h2,
.editor label:has(textarea),
.editor button {
    grid-column: 1 / -1;
}

.pages-editor textarea {
    min-height: 110px;
}

@media (max-width: 820px) {
    .list-layout,
    .editor,
    .home-welcome {
        grid-template-columns: 1fr;
    }

    .shell {
        padding: 24px 14px;
    }

    .records {
        overflow-x: auto;
    }

    td,
    th {
        font-size: 15px;
    }

    .lightbox {
        padding: 56px 14px;
    }

    .lightbox-nav {
        top: auto;
        bottom: 14px;
        transform: none;
    }

    .datagrid-toolbar {
        grid-template-columns: 1fr;
    }

    .home-actions a {
        grid-template-columns: 58px 1fr;
        min-height: 64px;
        border-radius: 14px;
        font-size: 21px;
    }

    .home-action-icon {
        width: 46px;
        height: 42px;
        font-size: 28px;
    }

    .home-copy p {
        font-size: 17px;
    }
}
