/*
Theme Name: Merike Classic Polished
Theme URI: https://merike.ee/
Author: Codex
Description: Classic warm redesign for merike.ee inspired by the older WordPress site, with member login and registration screens.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: merike-classic-polished
*/

:root {
  --page: #fbf4ea;
  --paper: #fffaf3;
  --panel: #fff6ec;
  --blush: #f9ecdf;
  --wine: #8f070e;
  --wine-dark: #760006;
  --clay: #b64c37;
  --ink: #1f1b18;
  --muted: #61564d;
  --blue: #003c75;
  --line: #e6cdb8;
  --shadow: 0 18px 42px rgba(78, 35, 12, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(143, 7, 14, 0.035), transparent 14%, transparent 86%, rgba(143, 7, 14, 0.035)),
    var(--page);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

a:hover,
a:focus {
  color: var(--wine);
  text-decoration: underline;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.site-title {
  font-family: Georgia, "Times New Roman", serif;
}

.site-shell {
  width: min(1230px, calc(100% - 28px));
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  border-right: 1px solid rgba(230, 205, 184, 0.75);
  border-left: 1px solid rgba(230, 205, 184, 0.75);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.utility {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  min-height: 34px;
  padding: 7px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--wine-dark);
  font-size: 15px;
}

.utility .is-active {
  color: var(--wine-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.masthead {
  padding: 18px 30px 4px;
}

.site-title {
  display: block;
  color: var(--wine-dark);
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 700;
  line-height: 0.92;
  text-decoration: none;
}

.site-title:hover,
.site-title:focus {
  text-decoration: none;
}

.site-description {
  margin-top: 2px;
  color: #8f2f25;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.4vw, 28px);
}

.panorama {
  display: block;
  width: 100%;
  height: clamp(116px, 15vw, 185px);
  object-fit: cover;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.main-navigation {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  overflow: visible;
  min-height: 42px;
  background: var(--wine);
}

.main-navigation a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 10px 15px;
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown__toggle {
  min-height: 42px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  padding: 10px 28px 10px 20px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}

.nav-dropdown__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 0;
  height: 0;
  margin-top: -1px;
  border-top: 5px solid #fff;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.nav-dropdown__menu {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  display: none;
  min-width: 178px;
  border: 1px solid var(--wine-dark);
  background: var(--wine);
  box-shadow: 0 12px 22px rgba(55, 8, 4, 0.18);
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  display: grid;
}

.nav-dropdown__menu a {
  width: 100%;
  border-right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation a:focus,
.nav-dropdown__toggle:hover,
.nav-dropdown__toggle:focus {
  background: var(--wine-dark);
  color: #fff;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
  gap: 24px;
  padding: 22px 22px 0;
  overflow: hidden;
}

.content {
  min-width: 0;
}

.entry-block {
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--line);
}

.entry-block:last-child {
  border-bottom: 0;
}

.entry-block h1,
.entry-block h2 {
  margin-bottom: 7px;
  color: var(--wine-dark);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.12;
}

.entry-block h3 {
  color: var(--wine-dark);
  font-size: 22px;
}

.lead {
  color: #29231f;
  font-size: 17px;
}

.course-list {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.75);
}

.course-list__header,
.video-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 150px;
}

.course-list__header {
  color: var(--wine-dark);
  background: var(--blush);
  font-weight: 700;
}

.course-list__header span,
.video-row span,
.video-row a {
  padding: 8px 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.course-list__header span:last-child,
.video-row span:last-child {
  border-right: 0;
}

.reviews-list {
  display: grid;
  gap: 13px;
  margin-top: 14px;
}

.legacy-reviews {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

.legacy-reviews p {
  margin: 0;
  border: 1px solid var(--line);
  padding: 15px 17px;
  background: rgba(255, 246, 236, 0.82);
  color: #2f2723;
  line-height: 1.6;
}

.legacy-reviews p:empty {
  display: none;
}

.review {
  border: 1px solid var(--line);
  background: rgba(255, 246, 236, 0.82);
  padding: 15px 17px;
}

.review blockquote {
  margin: 0;
  color: #2f2723;
  font-size: 15px;
  line-height: 1.58;
}

.review p {
  margin: 10px 0 0;
  color: var(--wine-dark);
  font-weight: 700;
}

.status-label {
  color: var(--wine-dark);
  font-weight: 700;
}

.summary-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.78);
}

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

.summary-table th {
  width: 92px;
  color: var(--wine-dark);
  background: var(--blush);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.compact-list {
  margin: 10px 0 0;
  padding-left: 20px;
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin: 12px 0 18px;
}

.info-table {
  width: 100%;
  min-width: 760px;
  margin: 0;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.78);
}

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

.info-table th {
  color: var(--wine-dark);
  background: var(--blush);
}

.compliance-note {
  border: 1px solid var(--line);
  padding: 13px 15px;
  background: rgba(255, 246, 236, 0.82);
}

.partner-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0 0;
}

.level-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.level-tile {
  display: block;
  min-height: 92px;
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fffaf3, #fff3e8);
  text-align: center;
  text-decoration: none;
}

.level-tile:hover,
.level-tile:focus {
  background: #fff0df;
  text-decoration: none;
}

.level-tile:last-child {
  border-right: 0;
}

.level-tile strong {
  display: block;
  color: var(--wine-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

.level-tile span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.widget {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 16px 17px;
}

.widget h2,
.widget h3 {
  margin-bottom: 9px;
  color: var(--wine-dark);
  font-size: 24px;
  line-height: 1.15;
}

.widget p,
.widget ul {
  margin-bottom: 0;
}

.button,
.auth-form button,
.nav-dropdown__toggle {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wine);
  border-radius: 3px;
  padding: 9px 18px;
  color: #fff;
  background: var(--wine);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus,
.auth-form button:hover,
.auth-form button:focus {
  color: #fff;
  background: var(--wine-dark);
  text-decoration: none;
}

.button-secondary {
  color: var(--wine-dark);
  background: transparent;
}

.button-secondary:hover,
.button-secondary:focus {
  color: #fff;
}

.main-navigation .nav-dropdown__toggle {
  min-height: 42px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: transparent;
  padding: 10px 28px 10px 15px;
}

.auth-form {
  display: grid;
  gap: 11px;
}

.auth-form label {
  display: grid;
  gap: 5px;
  color: #332822;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 8px 10px;
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
}

.notice {
  margin: 12px 0;
  border: 1px solid #d9b15f;
  padding: 10px 12px;
  background: #fff7dc;
}

.notice-error {
  border-color: #d79898;
  background: #fff1ef;
  color: #741517;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-top: 22px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.single-content {
  padding: 30px;
}

.single-content h1 {
  color: var(--wine-dark);
  font-size: clamp(32px, 4vw, 44px);
}

@media (max-width: 1080px) {
  .main-navigation {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .site-shell {
    width: 100%;
    border: 0;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .utility {
    justify-content: center;
  }

  .masthead {
    padding-right: 18px;
    padding-left: 18px;
  }

  .main-navigation a {
    flex: 1 1 50%;
    justify-content: center;
    padding-right: 10px;
    padding-left: 10px;
  }

  .nav-dropdown {
    flex: 1 1 50%;
  }

  .nav-dropdown__toggle {
    width: 100%;
    justify-content: center;
    padding-right: 28px;
    padding-left: 10px;
  }

  .nav-dropdown__menu {
    right: 0;
    min-width: 100%;
  }

  .layout {
    padding-right: 16px;
    padding-left: 16px;
  }

  .course-list__header {
    display: none;
  }

  .video-row {
    grid-template-columns: 1fr;
  }

  .video-row span,
  .video-row a {
    border-right: 0;
  }

  .level-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .level-tile:nth-child(2) {
    border-right: 0;
  }
}
