/* Bilkent Video Library — keeps the look of the old site (dark, silver, white-framed pictures), made responsive. */

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #1d1e21;
    color: #fff;
    font: 13px/1.3 Arial, Verdana, Tahoma, sans-serif;
}

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

a:link, a:visited { color: #fff; }
a:hover { color: yellow; text-decoration: none; }

:focus-visible { outline: 2px solid yellow; outline-offset: 2px; }

.back img { display: block; }

/* ---- home: title image + five expanding panels -------------------------------------------------------- */

.home { padding: 1px 20px 20px; max-width: 720px; }
.home-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.home-top h1 { margin: 0; font-size: 0; }
.flag img { display: block; }

.kwicks {
    list-style: none;
    margin: 20px 0 12px;
    padding: 0;
    display: flex;
    gap: 12px;
    width: 673px;          /* 5 × 125 + 4 × 12, as on the old site */
    height: 362px;
}
/* Same behaviour as the old jQuery kwicks (max 240, spacing 12): the hovered panel grows to 240px,
   the other four share the rest (≈ 96px each), total width stays the same. */
.kwick {
    flex: 0 0 125px;
    min-width: 0;
    border: 1px solid #f8f8f8;
    background: #000 no-repeat left top;
    overflow: hidden;
    transition: flex-basis .5s ease-in-out;
}
.kwicks:hover .kwick, .kwicks:focus-within .kwick { flex-basis: 96.25px; }
.kwicks .kwick:hover, .kwicks .kwick:focus-within { flex-basis: 240px; }
.kwick a { display: block; height: 100%; }
.kwick img { display: block; max-width: none; }

.kwick-about       { background-image: url("legacy/bcc374x273.png"); }
.kwick-courses     { background-image: url("legacy/logo2.jpg"); }
.kwick-conferences { background-image: url("legacy/3dtv.png"); }
.kwick-erzurum     { background-image: url("legacy/erzurum_menu.png"); }
.kwick-concerts    { background-image: url("legacy/konser.png"); }

.home-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.home-bottom img { display: block; }

.search input {
    width: 240px;
    max-width: 100%;
    padding: 4px 8px;
    background: #222;
    color: #fff;
    border: 1px solid #666;
    font: inherit;
}
.search input:focus { border-color: #fff; outline: none; }

/* ---- category / courses: sliding menu + photos -------------------------------------------------------- */

.dark-page { background: #222; }

.menu-page { max-width: 820px; padding: 5px 5px 40px; }

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0 5px 5px;
    background: url("legacy/content_bg.jpg") no-repeat;
    font-family: "Lucida Grande", "Lucida Sans", "Trebuchet MS", Verdana, sans-serif;
}
.menu-header h1 { margin: 0; font-size: 24px; font-weight: normal; color: silver; }

.menu-body { display: flex; gap: 60px; flex-wrap: wrap; align-items: flex-start; padding-left: 20px; }

.sliding-nav {
    list-style: none;
    margin: 30px 0;
    padding: 0;
    width: 240px;
    font: .75em/1.5 "Lucida Grande", "Lucida Sans", "Trebuchet MS", Verdana, sans-serif;
}
.sliding-nav li { animation: slide-in .5s ease-out both; }
.sliding-nav h2, .sliding-nav a {
    display: block;
    margin: 0 0 5px;
    padding: 5px 15px;
    font: inherit;
}
.sliding-nav h2 { color: #fff; border: 1px solid #fff; }
.sliding-nav a { color: #999; border: 1px solid #666; text-decoration: none; transition: padding-left .15s; }
.sliding-nav a:hover, .sliding-nav a:focus-visible { color: #ff6; padding-left: 25px; }
.sliding-nav li + li:has(h2) { margin-top: 12px; }

@keyframes slide-in {
    0%   { transform: translateX(-200px); opacity: 0; }
    70%  { transform: translateX(15px); opacity: 1; }
    100% { transform: none; }
}

.photos { display: grid; grid-template-columns: repeat(2, 190px); gap: 20px 20px; margin-top: 50px; }
.photos img { display: block; border: 5px solid silver; width: 190px; height: 190px; object-fit: cover; }

/* ---- 650px content column (department, course, series, video, search) ---------------------------------
   Measurements taken from the old pages (page.css + table cellpadding). */

.wrap-page { background: #000; color: #ccc; }

.page-wrap {
    max-width: 652px;
    margin: 0 auto;
    background: #222;
    border-inline: 1px solid #444;
    min-height: 100vh;
    color: #fff;
    font: 13px/1.3 Arial, Verdana, Tahoma, sans-serif;
}

.wrap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    background: #444;
    padding: 10px 6px 10px 22px;
}
.wrap-title { font-size: 18px; line-height: 1; color: #fff; text-decoration: none; }
a.wrap-title:link, a.wrap-title:visited { color: #fff; text-decoration: none; }
a.wrap-title:hover { color: yellow; }

.content { padding: 10px 0 25px; background: url("legacy/content_bg.jpg") no-repeat; }
.content h1 { margin: 20px 25px 10px; font-size: 20px; line-height: 1; }
.content h1 a:link, .content h1 a:visited { text-decoration: none; color: #fff; }
.text { margin: 0 25px; max-width: 470px; }
.text > p, .para { margin: 13px 0 25px; }
.para p:first-child { margin-top: 0; }
.text h1 { margin: 10px 0; }
mark { background: none; color: yellow; }

/* Series intro: 120×90 picture with a 2px frame next to the description (table, cellpadding 6). */
.series-intro { display: flex; gap: 12px; align-items: flex-start; margin: 25px 25px 35px 33px; max-width: 458px; padding-top: 8px; }
.series-intro p { margin: 0; }

.thumb { border: 1px solid #fff; display: block; width: 98px; height: 74px; object-fit: cover; flex: none; }
.series-intro .thumb { width: 124px; height: 94px; border-width: 2px; }

/* Department page: course table (cellpadding 4; 106px picture column). */
.course-rows { list-style: none; margin: 25px 0 0 26px; padding: 0; max-width: 615px; }
.course-rows li { display: flex; align-items: flex-start; }
.course-rows li > a { flex: none; width: 106px; padding: 4px 0 4px 6px; }
.course-rows li > div { padding: 4px; min-width: 0; }
.course-rows .code { font-size: 14px; }
.course-rows .desc {
    margin: 17px 0 25px 25px;
    max-width: 470px;
    font: 11.83px/1.2 Arial, Helvetica, sans-serif;
}
.course-rows .desc p { margin: 0; }

/* Video tables: picture | play button | text. Course pages use cellpadding 6 and stripe the 2nd row,
   series pages cellpadding 4 and stripe the 1st row — kept as on the old site. */
.video-rows { list-style: none; margin: 0 0 0 26px; padding: 0; max-width: 620px; }
.video-rows li { display: flex; align-items: flex-start; }
.video-rows li > * { padding: 4px; }
.video-rows .cell-thumb { width: 106px; flex: none; }
.video-rows .cell-play { width: 112px; flex: none; padding-left: 8px; }
.video-rows .cell-text { min-width: 0; flex: 1; }
.video-rows.series li:nth-child(odd) { background: #181818; }
.video-rows.course li > * { padding: 6px; }
.video-rows.course .cell-thumb { width: 110px; }
.video-rows.course .cell-play { width: 61px; padding-left: 10px; }
.video-rows.course li:nth-child(even) { background: #181818; }

/* Looks like the browser's default button the old site used. */
.play {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 22px;
    background: #f0f0f0;
    border: 1px solid #767676;
    border-radius: 3px;
}
.play:hover { background: #e5e5e5; border-color: #4f4f4f; }
.play img { display: block; }

.date img, img.date { vertical-align: middle; }
.file img { vertical-align: bottom; }
.file { margin-right: 4px; }
.attachments-line { margin: 4px 0 0; }

.player { display: block; width: calc(100% - 50px); margin: 20px 25px 15px; background: #000; aspect-ratio: 4 / 3; }
.player-error { margin: 10px 25px; padding: 60px 10px; background: #000; color: #ccc; text-align: center; }
.pager { display: flex; justify-content: space-between; }

.plain { padding-left: 18px; }
.debug { white-space: pre-wrap; font-size: 11px; background: #111; padding: 10px; overflow-x: auto; }

/* Overlay player (old jQuery Tools overlay). */
.overlay {
    padding: 4px;
    width: min(600px, 95vw);
    background: #000;
    border: 3px solid #ccc;
    color: #ccc;
}
.overlay::backdrop { background: rgb(0 0 0 / .85); }
.overlay video { display: block; width: 100%; aspect-ratio: 4 / 3; background: #000; }
.overlay .close {
    position: absolute; top: 2px; right: 6px; z-index: 1;
    background: none; border: 0; color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}
.overlay .player-error { margin: 0; }

/* ---- small screens ------------------------------------------------------------------------------------ */

@media (max-width: 640px) {
    .home { padding: 1px 10px 20px; }
    .kwicks { display: grid; grid-template-columns: repeat(2, 1fr); width: auto; height: auto; }
    .kwick { height: 300px; background-size: cover; }
    .menu-body { padding-left: 0; gap: 0; }
    .sliding-nav { width: 100%; }
    .photos { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
    .photos img { width: 100%; height: auto; aspect-ratio: 1; }
    .text, .content h1 { margin-inline: 12px; }
    .series-intro { margin-inline: 12px; }
    .course-rows, .video-rows { margin-left: 0; }
    .video-rows .cell-play, .video-rows.course .cell-play { width: 48px; padding-left: 4px; }
    .course-rows .desc { margin-left: 0; }
    .player { width: calc(100% - 24px); margin-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .sliding-nav li { animation: none; }
    .kwick { transition: none; }
}
