/* ==========================================================================
   Bulgarian School Website — Canvas-inspired theme
   Matches the original WP Canvas theme from bgculturalcenter.org
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  --color-bg: #dbdbdb;
  --color-surface: #ffffff;
  --color-text: #555555;
  --color-text-dark: #222222;
  --color-text-entry: #303030;
  --color-text-meta: #999999;
  --color-border: #e6e6e6;
  --color-border-outer: #dbdbdb;
  --color-nav-bg: #4a7c2f;
  --color-nav-hover: #3a6224;
  --color-nav-text: #ffffff;
  --color-nav-dropdown-hover: #4a7c2f;
  --color-link: #4a7c2f;
  --color-link-hover: #3a6224;

  --font-body: "Helvetica Neue", Helvetica, sans-serif;
  --font-nav: Tahoma, Geneva, Verdana, sans-serif;

  --wrapper-max: 1100px;
  --sidebar-width: 24.385%;
  --main-width: 72.385%;
}

/* --- Base --- */
body {
  background: var(--color-bg);
  font: 300 14px/1.5em var(--font-body);
  color: var(--color-text);
}

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

h1 { font: bold 28px/1.2em var(--font-body); color: var(--color-text-dark); }
h2 { font: bold 24px/1.2em var(--font-body); color: var(--color-text-dark); }
h3 { font: bold 20px/1.2em var(--font-body); color: var(--color-text-dark); }
h4 { font: bold 16px/1.2em var(--font-body); color: var(--color-text-dark); }

/* --- Layout --- */
.col-full {
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding: 0 1em;
}

#wrapper {
  max-width: var(--wrapper-max);
  margin: 0 auto;
}

/* --- Header --- */
#header {
  background: var(--color-surface) url('/assets/images/header-bg.png') no-repeat calc(100% - 30px) center;
  background-size: auto 75px;
  margin-top: 20px;
  margin-bottom: 1px;
  padding: 10px 0;
  height: 100px;
  box-sizing: border-box;
}

#header .col-full {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#logo a {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

#logo img {
  height: 80px;
  width: auto;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-text-main {
  font: bold 24px/1.2em var(--font-body);
  color: var(--color-text-dark);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.logo-text-sub {
  font: italic 600 20px/1.2em 'Playfair Display', Georgia, serif;
  color: var(--color-nav-bg);
  letter-spacing: 0.3px;
}

@media (max-width: 600px) {
  #logo img { height: 36px; }
  .logo-text-main { font-size: 13px; }
  .logo-text-sub { font-size: 11px; }
}

/* --- Navigation --- */
#navigation {
  background: var(--color-nav-bg);
  border-left: 1px solid var(--color-border-outer);
  border-right: 1px solid var(--color-border-outer);
  border-radius: 1px;
}

#navigation .col-full {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#navigation .nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

#navigation .nav > li > a {
  display: block;
  padding: 12px 14px;
  font: bold 14px/1em var(--font-nav);
  color: var(--color-nav-text);
  white-space: nowrap;
}

#navigation .nav > li > a:hover,
#navigation .nav > li:hover > a {
  background: var(--color-surface);
  color: var(--color-nav-dropdown-hover);
}

/* Dropdown */
.has-dropdown { position: relative; }

.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-surface);
  border: 1px solid #b3afb3;
  min-width: 220px;
  z-index: 100;
  list-style: none;
  padding: 0;
  margin: 0;
}

.has-dropdown:hover .sub-menu {
  display: block;
}

.sub-menu li a {
  display: block;
  padding: 8px 14px;
  font: bold 13px/1.4em var(--font-nav);
  color: var(--color-text-dark);
}

.sub-menu li a:hover {
  background: #f5f5f5;
  color: var(--color-nav-dropdown-hover);
}

/* Language switcher in nav */
.lang-switcher {
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 6px 0;
  border-left: 1px solid rgba(255,255,255,0.3);
  padding-left: 10px;
}

.lang-switcher a {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  font: bold 11px/1em var(--font-nav);
  color: var(--color-nav-text);
  border-radius: 3px;
  text-decoration: none;
}

.lang-switcher a:hover {
  background: rgba(255,255,255,0.2);
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-nav-text);
  border-radius: 2px;
}

/* --- Hero video --- */
.hero-video-wrap {
  position: relative;
  width: 100%;
  max-height: 340px;
  overflow: hidden;
  background: #000;
  margin: 0 0 24px;
  border-radius: 2px;
}

.hero-video {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 700px) {
  .hero-video,
  .hero-video-wrap { max-height: 200px; height: 200px; }
}

.home-content {
  padding-top: 8px;
}

/* --- Content area --- */
#content {
  background: var(--color-surface);
  border: 1px solid var(--color-border-outer);
  border-radius: 1px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
  padding: 30px;
  display: flex;
  gap: 3%;
  min-height: 400px;
}

#main {
  width: var(--main-width);
  min-width: 0;
}

#sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

/* --- Page & Entry content --- */
.page-title,
.post-title {
  font: bold 18px/1.1em var(--font-body);
  color: var(--color-text-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.entry-content {
  font: normal 15px/1.5em var(--font-body);
  color: var(--color-text-entry);
}

.entry-content h2 {
  font: bold 20px/1.3em var(--font-body);
  color: var(--color-text-dark);
  margin: 1.5em 0 0.5em;
}

.entry-content h2:first-child {
  margin-top: 0;
}

.entry-content h3 {
  font: bold 16px/1.3em var(--font-body);
  color: var(--color-text-dark);
  margin: 1.2em 0 0.4em;
}

.entry-content p {
  margin-bottom: 1em;
}

.entry-content iframe {
  max-width: 100%;
  border-radius: 4px;
}

.entry-content a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  color: var(--color-link-hover);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  margin: 8px 0;
}

.entry-content ul {
  list-style: disc;
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.entry-content ol {
  list-style: decimal;
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.entry-content li {
  margin-bottom: 0.4em;
}

.entry-content h2 {
  font-size: 20px;
  margin: 1.5em 0 0.5em;
}

.entry-content h3 {
  font-size: 17px;
  margin: 1.2em 0 0.5em;
}

.entry-content strong {
  font-weight: bold;
  color: var(--color-text-dark);
}

.entry-content iframe {
  max-width: 100%;
  margin: 1em 0;
}

.post-meta {
  font: normal 13px/1.5em var(--font-body);
  color: var(--color-text-meta);
  margin-bottom: 1em;
}

/* --- Sidebar widgets --- */
.widget {
  margin-bottom: 20px;
  font: normal 14px/1.5em var(--font-body);
  color: var(--color-text);
}

.widget h3 {
  font: bold 15px/1.2em var(--font-body);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget ul li {
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
}

.widget ul li a {
  color: var(--color-text);
  font-size: 14px;
}

.widget ul li a:hover {
  color: var(--color-link);
}

.widget p {
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 4px;
}

.widget p a {
  color: var(--color-link);
}

/* --- Post grid (news listing + homepage) --- */
/* Homepage: 2-column card grid */
.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.post-grid .post-card {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-surface);
}

.post-grid .post-card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.post-grid .post-card-thumb {
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.post-grid .post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-grid .post-card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* News listing: smaller card variant */
.post-grid-sm {
  gap: 16px;
}

.post-grid-sm .post-card-thumb {
  height: 140px;
}

.post-grid-sm .post-card-body {
  padding: 10px 12px;
}

.post-grid-sm .post-card-title {
  font-size: 15px;
  margin: 2px 0 6px;
}

.post-grid-sm .post-card-excerpt {
  font-size: 13px;
  line-height: 1.4em;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
}

.post-card-link {
  display: flex;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.post-card-body {
  flex: 1;
}

.post-card-date {
  font: normal 12px/1.5em var(--font-body);
  color: var(--color-text-meta);
}

.post-card-title {
  font: bold 18px/1.2em var(--font-body);
  color: var(--color-text-dark);
  margin: 4px 0 8px;
}

.post-card-link:hover .post-card-title {
  color: var(--color-link);
}

.post-card-excerpt {
  font: 300 14px/1.5em var(--font-body);
  color: var(--color-text);
  margin-bottom: 8px;
}

.read-more {
  font: bold 13px/1em var(--font-body);
  color: var(--color-link);
}

/* --- Post card thumbnail (list view) --- */
.post-card-thumb {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: 2px;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Post hero image --- */
.post-hero {
  margin-bottom: 1.5em;
}

.post-hero img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 2px;
}

/* --- Language flags --- */
.lang-switcher .flag {
  font-size: 15px;
  line-height: 1;
}

/* --- Section CTA --- */
.section-cta {
  text-align: center;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 8px 20px;
  font: bold 14px/1em var(--font-body);
  color: var(--color-nav-text);
  background: var(--color-nav-bg);
  border-radius: 3px;
  text-decoration: none;
}

.btn:hover {
  background: var(--color-nav-hover);
  color: var(--color-nav-text);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
  font: 300 15px/1em var(--font-body);
}

.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: var(--color-text-entry);
  text-decoration: none;
}

.pagination a:hover {
  border-color: var(--color-link);
  color: var(--color-link);
}

.pagination-active {
  background: var(--color-nav-bg) !important;
  color: var(--color-nav-text) !important;
  border-color: var(--color-nav-bg) !important;
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: var(--color-text-meta);
}

/* --- Footer --- */
#footer {
  background: var(--color-surface);
  border: 1px solid var(--color-border-outer);
  border-top: none;
  padding: 16px 0;
  text-align: center;
  border-radius: 0 0 1px 1px;
}

#footer p {
  font: 300 12px/1.5em var(--font-body);
  color: var(--color-text-meta);
  margin: 0;
}

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

  #navigation .nav {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  #navigation .nav.open {
    display: flex;
  }

  #navigation .col-full {
    flex-wrap: wrap;
  }

  .sub-menu {
    position: static;
    border: none;
    box-shadow: none;
    background: #f9f9f9;
    display: none;
  }

  .has-dropdown:hover .sub-menu {
    display: block;
  }

  .sub-menu li a {
    padding-left: 28px;
  }

  .lang-switcher {
    width: 100%;
    justify-content: center;
    padding: 8px 0;
  }

  #content {
    flex-direction: column;
    padding: 20px;
  }

  #main {
    width: 100%;
  }

  #sidebar {
    width: 100%;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
  }

  #header .col-full {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  #logo img {
    max-height: 80px;
  }
}
