/*
Theme Name: Vratovrazka
Description: The Vratovrazka magazine's theme, in its 2011 "Dark Dawn" look (the owner's darkdawn template, live on vratovrazka.bg from 2008 into 2013): the 990 px dark page with the masthead, the left section menu, a featured strip, the news grid, the section blocks and the right column, stacking into one column on phones. No scripts, plugins, remote fonts or remote images.
Author: ByeVas
Version: 2.0.0
Requires at least: 6.6
Requires PHP: 8.2
Text Domain: vratovrazka
*/

/* The 2011 rules are re-expressed for this theme's markup; the comments name their 2011 origin. */

:root {
  --text: #f4f4f4;
  --body-text: #aeaeae;
  --link: #d2daff;
  --accent: #ff6600;
  --panel: #363a40;
  --rule: #999;
  --block: #444d5e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* body: Verdana, light text, black with the 1680 px bigbg9.png column strip */
body { margin: 0; background: #000 url(images/bigbg9.png) repeat-y; color: var(--text); font: 16px Verdana, Arial, Helvetica, sans-serif; text-align: left; }
a { color: var(--link); text-decoration: underline; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { border: 0; max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; border: 2px solid var(--accent); background: #000; color: #fff; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* #subbody: the fixed 990 px page with its outset grey edge */
.site-shell { box-sizing: content-box; width: 990px; border-right: 8px outset #666; font-size: 11px; }

/* #masthead and .topmenu */
.masthead { padding-top: 5px; border-bottom: 1px solid var(--text); background: #000; }
.site-logo, .site-logo img { display: block; }
.site-logo img { width: 990px; height: auto; }
.topmenu { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 16px; padding: 0 4px 0 0; background: #000; }
.topmenu__search { min-width: 0; }
.topmenu .search-form { display: flex; align-items: center; gap: 6px; }
.topmenu .search-label { margin: 0 0 0 4px; color: #b7b7b7; font-size: 9px; font-weight: bold; }
.topmenu .search-controls { display: flex; gap: 3px; }
.topmenu .search-field { width: 150px; height: 14px; padding: 0 3px; border: 1px solid #ccc; background: #fff; color: #000; font: 10px Verdana, Arial, sans-serif; }
.topmenu .search-submit { height: 14px; padding: 0 6px; border: 0; border-left: 1px solid #eaeaea; background: #000; color: #b7b7b7; font: bold 9px Verdana, Arial, sans-serif; cursor: pointer; }
.topmenu .search-submit:hover { background: #b7b7b7; color: #2d2d2d; }
.topmenu .archive-notice { margin: 0 0 0 4px; padding: 0; border: 0; background: none; color: #b7b7b7; font: 9px Verdana, Arial, sans-serif; }
.topmenu__feed { display: block; flex: none; line-height: 0; }
.topmenu__feed img { width: 14px; height: 14px; }

/* The three 2011 columns: #navbar 155 px, #content 525 px, #headlines 305 px */
.site-columns { display: grid; grid-template-columns: 155px 525px 305px; align-items: start; }
.menu-toggle, .site-nav .menu-close { display: none; }

/* .moduletablemenu: section headers on bckg1mnu.jpg, children on bckg3mnu.jpg, bckg2mnu.jpg on hover */
.site-nav { font-size: 11.22px; line-height: 15.4px; }
.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; color: #eee; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none; }
.site-nav .menu > li > a { background: url(images/bckg1mnu.jpg) repeat-x; font-weight: bold; text-align: center; }
.site-nav .sub-menu a { padding-left: 10px; background: url(images/bckg3mnu.jpg) no-repeat; line-height: 18px; }
.site-nav a:hover { background-image: url(images/bckg2mnu.jpg); background-repeat: no-repeat; color: var(--accent); }

/* #content */
.site-content { min-width: 0; color: var(--body-text); font-size: 12px; line-height: 1.48; }

/* The featured strip, after the 2011 slideshow: a 515 x 255 picture with its caption and keys */
.strip__slide { display: none; padding: 4px; border: 1px solid #ccc; border-bottom-width: 2px; }
.strip__slide:first-child, .strip__slide:target { display: block; }
.strip:has(.strip__slide:target) .strip__slide:first-child:not(:target) { display: none; }
.strip__slide { scroll-margin-top: 100vh; }
.strip__frame { position: relative; height: 255px; overflow: hidden; background: #3a3a3a; }
.strip__image, .strip__image img { display: block; width: 100%; height: 255px; }
.strip__image img { object-fit: cover; }
.strip__caption { position: absolute; right: 0; bottom: 0; left: 0; padding: 4px 8px 2px; background: rgba(0, 0, 0, .7); color: #fff; }
.strip__title { margin: 0; font: bold 26px/26px "Trebuchet MS", Trebuchet, Arial, Verdana, sans-serif; }
.strip__title a { color: #fafafa; }
.strip__title a:hover { color: #f00; }
.strip__text { margin: 4px 0; color: #fff; font-size: 12px; line-height: 1.48; }
.strip__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 2px solid #404040; }
.strip__date { margin: 0; padding: 2px 4px; color: #b7b7b7; font: 10px/14px Tahoma, Arial, sans-serif; }
.strip__nav { display: flex; flex-wrap: wrap; justify-content: flex-end; margin-right: 16px; padding: 2px 0; background: #222; }
.strip__nav a { margin: 0 3px; padding: 0; border: 1px solid transparent; color: #fff; font: 10px/12px Tahoma, Arial, sans-serif; text-decoration: none; }
.strip__nav a:hover, .strip__nav a[aria-current="true"] { border-color: #505050; color: #f00; }

/* "vratovrazka.bg написа за теб:" on module_news_head_bg.gif */
.news__head { height: 28px; margin: 0; padding: 7px 0 0 14px; background: url(images/module_news_head_bg.gif) repeat-x; color: #0e0e0e; font-size: 12px; font-weight: bold; line-height: 1.48; text-align: left; }

/* The 2011 news grid: 262 x 207 cards framed by articleback.png */
.news__list { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.news-card { display: flex; flex-direction: column; align-items: center; width: 262px; height: 207px; margin: 1px 0; padding: 6px; overflow: hidden; background: url(images/articleback.png); color: #eee; text-align: center; }
.news-card__title { flex: none; display: -webkit-box; width: 245px; max-height: 40px; margin: 0; padding: 2px; overflow: hidden; font-size: 16px; font-weight: normal; line-height: 18px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.news-card__image, .news-card__image img { display: block; }
.news-card__image { flex: none; align-self: flex-start; }
.news-card__image img { width: 240px; height: 104px; object-fit: cover; }
.news-card__intro { flex: 0 1 auto; min-height: 0; display: -webkit-box; width: 244px; max-height: 28px; margin: 0; overflow: hidden; color: #ddd; font-size: 11.2px; line-height: 14px; text-align: left; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.news-card--text .news-card__intro { max-height: 126px; -webkit-line-clamp: 9; line-clamp: 9; }
.news-card__date time { color: #b7b7b7; }
.news-card__more { flex: none; display: block; font-size: 16px; line-height: 20px; }

/* #articlebysectons: the eight section blocks (2011's GN1 to GN8) */
.sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 98%; margin-top: 2px; }
.section-block { min-width: 0; background: var(--block) url(images/gnbackstrasti.png) repeat-x; }
.section-block--gn2 { background-image: url(images/gnbackwwt.png); }
.section-block--gn3 { background-image: url(images/gnbackvrtalk.png); }
.section-block--gn4 { background-image: url(images/gnback1.png); }
.section-block--gn5 { background-image: url(images/gnbacktech.png); }
.section-block--gn6 { background-image: url(images/gnbacskuka.png); }
.section-block--gn7 { background-image: url(images/gnbacactualno.png); }
.section-block--gn8 { background-image: url(images/gnbacredakcia.png); }
.section-block__title { margin: 0; border: 1px solid #3c4677; border-bottom: 0; font-size: 10px; font-weight: bold; line-height: 17.76px; text-transform: uppercase; }
.section-block__title a { display: flow-root; min-height: 38px; color: #fff; font-family: Verdana, Arial, Helvetica, sans-serif; }
.section-block__title img { float: right; width: 95px; height: 38px; margin-left: 1px; object-fit: cover; }
.section-block__list { min-height: 150px; margin: 2px 0 0; padding: 0; list-style: none; }
.section-block__list li { border-bottom: 1px solid #fff; }
.section-block__list a { display: block; text-decoration: none; }

/* #headlines and .moduletableright: rightback.jpg boxes with small-caps titles */
.site-aside { min-width: 0; color: #d2eeff; }
.box { width: 302px; margin: 0 0 5px auto; padding: 0 10px 15px; overflow: hidden; border: 1px solid var(--rule); background: url(images/rightback.jpg); color: #fff; font-size: 11px; text-align: left; }
.box__title { margin: 0 0 10px; padding: 10px 40px; border-bottom: 1px solid #ddd; color: #fff; font-size: 14.85px; font-variant: small-caps; letter-spacing: 1px; text-align: center; }
.recommended__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.recommended__item { min-width: 0; padding: 4px; overflow: hidden; border-bottom: 1px dotted #fff; }
.recommended__item:nth-child(odd) { border-right: 1px solid #fff; }
.recommended__title { margin: 0 0 8px; font-size: 11px; text-align: left; }
.recommended__image, .recommended__image img { display: block; }
.recommended__image img { width: 110px; height: 50px; margin: 3px; object-fit: cover; }
.recommended__text { margin: 0; text-align: center; }
.box__list { margin: 0; padding: 0; list-style: none; }
.box__list li { padding: 3px 0; border-bottom: 1px solid var(--rule); }
.box__list a { font-size: 12px; line-height: 15px; text-decoration: none; }
.daily__text { padding: 4px; overflow: hidden; border-bottom: 1px dotted #fff; overflow-wrap: anywhere; }
.daily__text p { margin: 0 0 1em; }
.daily__text > span:first-child, .daily__text > p:first-child > span:first-child { font-size: 18pt; }
.daily__more { margin: 11px 0 0; }

/* #siteInfo / #ja-botsl: the striped footer with dashed rules */
.site-footer { display: flex; border-top: 5px solid #ccc; background: #666 url(images/botsl-bg.gif); color: #ccc; font-size: 11px; }
.footer-box { min-width: 0; padding: 15px; }
.footer-box--about, .footer-box--links { width: 20%; }
.site-footer h2 { margin: 0 0 5px; padding: 0 0 5px; border-bottom: 1px solid var(--rule); color: #fff; font-size: 12.65px; line-height: 14px; text-transform: uppercase; }
.siteinfo { margin: 0; padding: 0; list-style: none; }
.siteinfo li { padding: 4px 4px 6px; border-bottom: 1px dashed #33ffcc; }
.site-footer a { color: #ccc; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 4px; line-height: 1.5; }

/* Inner pages: .componentheading title bar, small grey date line, readable article text */
.page-header, .entry-header { margin: 0 0 12px; }
/* div.moduletable h3: the 2011 module heading on horiz.png */
.page-kicker, .entry-section { margin: 0 0 2px; padding: 0 4px; background: url(images/horiz.png) repeat-x; color: #ccc; font-size: 10px; font-weight: bold; line-height: 20px; text-transform: uppercase; }
.page-title, .entry-title { margin: 0; padding: 8px 12px; border: 1px solid #555; background: #2f2f2f url(images/component_heading_bg_repeat.gif) repeat-x; background-size: 3px 100%; color: #e0e0e0; font-size: 18px; font-weight: bold; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.archive-description { margin: 8px 0 0; color: #ccc; font-size: 12px; }
.entry-meta { margin: 6px 0 0; color: #999; font-size: 12px; text-align: center; }
.entry-content { padding: 0 6px; color: #ddd; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.entry-content > * { max-width: 100%; }
.entry-content a { color: var(--link); }
.entry-content a:hover { color: var(--accent); }
.entry-content h2, .entry-content h3, .entry-content h4 { color: #fff; line-height: 1.3; text-align: left; }
.entry-content .introword, .entry-content strong, .entry-content b { color: #fff; }
.entry-content img { display: inline-block; vertical-align: top; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.entry-content figure { margin: 16px 0; }
.entry-content figcaption { margin-top: 6px; color: #b7b7b7; font-size: 12px; line-height: 1.5; text-align: center; }
.entry-content .wp-block-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.entry-content .wp-block-gallery figure { width: auto !important; margin: 0; }
.entry-content .wp-block-gallery img { width: 100%; border: 2px solid #eeeccc; }
.entry-content .legacy-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.entry-content .legacy-gallery__item { min-width: 0; margin: 0; }
.entry-content .legacy-gallery__link, .entry-content .legacy-gallery__image { display: block; }
.entry-content .legacy-gallery__image { width: 100%; border: 2px solid #eeeccc; }
.entry-content .legacy-gallery__link:hover .legacy-gallery__image { border-color: #3e3e3e; }
.entry-content .legacy-gallery__caption { margin-top: 4px; color: #b7b7b7; font-size: 11px; line-height: 1.5; text-align: center; }
.entry-content .legacy-gallery__placeholder, .entry-content .archive-media-notice { padding: 12px 14px; border: 1px solid #555; border-left: 4px solid var(--accent); background: #1e2125; color: #ddd; font-size: 13px; line-height: 1.5; text-align: left; }
.archive-notice { margin: 12px 0; padding: 8px 10px; border: 1px solid #555; border-left: 4px solid var(--accent); background: #1e2125; color: #ccc; font-size: 11px; line-height: 1.5; text-align: left; }
.empty-state { padding: 12px 0 30px; color: #ddd; font-size: 13px; }

/* Listings: search rows like the 2011 right-column lists, pagination like the strip keys */
.archive-list { margin: 12px 0; border-top: 1px solid var(--rule); }
.archive-row { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.archive-row time { color: #b7b7b7; font-size: 11px; }
.archive-row a { font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.pagination { margin: 14px 0; padding: 6px 0; border-top: 1px solid #fff; border-bottom: 1px solid #fff; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.pagination a, .pagination .current, .pagination .dots { min-width: 26px; padding: 2px 6px; border: 1px solid #505050; background: #222; color: #fff; font: 11px/16px Tahoma, Arial, sans-serif; text-align: center; text-decoration: none; }
.pagination .current { color: #f00; }
.pagination a:hover { color: var(--accent); }

/* The site's own search form, inside the content */
.site-content .search-form { max-width: 420px; margin: 0 0 12px; }
.site-content .search-label { display: block; margin-bottom: 4px; color: #ddd; font-size: 12px; font-weight: bold; }
.search-controls { display: flex; gap: 6px; min-width: 0; }
.search-field { min-width: 0; flex: 1; padding: 4px 6px; border: 1px solid #ccc; background: #fff; color: #000; font: 13px Verdana, Arial, sans-serif; }
.search-submit { padding: 4px 12px; border: 3px double var(--link); background: #000022; color: var(--link); font: bold 11px Verdana, Arial, sans-serif; cursor: pointer; }

/* One column below the 990 px page: phones and tablets */
@media (max-width: 1019px) {
  body { background: #000; }
  .site-shell { width: auto; border-right: 0; background: var(--panel); }
  .site-logo img { width: 100%; }
  .topmenu { position: relative; flex-wrap: wrap; height: auto; padding: 4px 34px 4px 8px; }
  .topmenu__feed { position: absolute; top: 5px; right: 8px; }
  .topmenu__feed img { width: 18px; height: 18px; }
  .topmenu .search-field { width: 100%; height: 28px; font-size: 16px; }
  .topmenu .search-submit { height: 28px; font-size: 12px; }
  .topmenu .search-label, .topmenu .archive-notice { font-size: 11px; }
  .topmenu__search, .topmenu .search-form, .topmenu .search-controls { flex: 1 1 auto; }
  .menu-toggle { display: block; padding: 4px 0; background: url(images/bckg1mnu.jpg) repeat-x; background-size: 100% 100%; color: #eee; font-size: 13px; font-weight: bold; text-align: center; text-decoration: none; }
  .site-columns { display: block; }
  .site-nav { display: none; border-right: 0; font-size: 13px; line-height: 22px; }
  .site-nav:target { display: block; }
  .site-nav .menu > li > a { background-size: 100% 100%; }
  .site-nav .sub-menu { display: flex; flex-wrap: wrap; padding: 2px 0 4px; }
  .site-nav .sub-menu a { padding: 0 14px 0 12px; line-height: 24px; }
  .site-nav .menu-close { display: block; padding: 6px; color: var(--link); text-align: center; }
  .site-content { padding: 8px; }
  .strip__frame, .strip__image, .strip__image img { height: auto; }
  .strip__frame { aspect-ratio: 515 / 255; }
  .strip__image img { aspect-ratio: 515 / 255; }
  .strip__slide--text-only .strip__frame { aspect-ratio: auto; min-height: 160px; }
  .news__head { height: auto; padding-bottom: 6px; }
  .news__list { justify-content: center; gap: 0 10px; }
  .sections { width: 100%; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px; }
  .section-block__list { min-height: 0; }
  .site-aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px; padding: 0 8px 8px; }
  .box { width: auto; margin: 0; }
  .site-footer { flex-wrap: wrap; }
  .footer-box--about, .footer-box--links { width: 50%; }
}

/* Small phones */
@media (max-width: 620px) {
  .topmenu .search-label { flex-basis: 100%; }
  .topmenu .search-form { flex-wrap: wrap; }
  .strip__title { font-size: 20px; line-height: 22px; }
  .strip__text { display: none; }
  .strip__bar { flex-wrap: wrap; }
  .strip__nav { margin-right: 0; }
  .search-controls { flex-direction: column; }
  .search-field, .search-submit { width: 100%; }
  .topmenu .search-controls { flex-direction: row; }
  .topmenu .search-submit { width: auto; }
  .entry-content { font-size: 15px; }
  .entry-content .wp-block-gallery { grid-template-columns: 1fr; }
  .entry-content .legacy-gallery { grid-template-columns: 1fr; }
  .archive-row { grid-template-columns: 72px minmax(0, 1fr); }
  .footer-box--about, .footer-box--links { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
