/* ==========================================================================
   Bulgarian School Website — Warm & Playful theme
   Redesign: Nunito font, warm colors, playful but professional
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  --color-bg: #f5f0e8;
  --color-surface: #ffffff;
  --color-text: #4a4543;
  --color-text-dark: #2c2826;
  --color-text-entry: #3a3533;
  --color-text-meta: #9a918a;
  --color-border: #e8e0d4;
  --color-border-outer: #e0d8cc;
  --color-nav-bg: #4a7c2f;
  --color-nav-hover: #3a6224;
  --color-nav-text: #ffffff;
  --color-nav-dropdown-hover: #4a7c2f;
  --color-link: #4a7c2f;
  --color-link-hover: #3a6224;
  --color-accent: #f5a623;
  --color-accent-hover: #e09010;
  --color-accent-soft: #fef3e0;

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

  --wrapper-max: 1200px;
  --main-width: 100%;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

/* --- View Transitions (cross-fade between pages) --- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: fadeOut 0.2s ease both;
}

::view-transition-new(root) {
  animation: fadeIn 0.3s ease both;
}

@keyframes fadeOut {
  to { opacity: 0; }
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  font: 400 16px/1.6em var(--font-body);
  color: var(--color-text);
}

/* --- Page fade-in --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#content {
  animation: fadeIn 0.4s ease both;
}

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

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

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

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

/* --- Accent strip at top of page --- */
body::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--color-nav-bg) 0%, var(--color-accent) 50%, var(--color-nav-bg) 100%);
}

/* --- Header --- */
#header {
  background: var(--color-surface);
  padding: 20px 0;
  position: relative;
  border-bottom: 1px solid var(--color-border);
}

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

#logo a {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

#logo a:hover {
  opacity: 0.88;
}

#logo img {
  height: 80px;
  width: auto;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 5px;
  background: radial-gradient(circle, rgba(74,124,47,0.07) 55%, transparent 100%);
  box-shadow: 0 0 0 2px rgba(74,124,47,0.1);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

#logo a:hover img {
  box-shadow: 0 0 0 3px rgba(74,124,47,0.2);
  transform: scale(1.03);
}

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

.logo-text-main {
  font: 700 18px/1.2em var(--font-body);
  color: var(--color-text-meta);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

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

/* --- Language switcher — segmented pill control --- */
.lang-switcher {
  display: flex;
  gap: 0;
  background: var(--color-border);
  border-radius: 20px;
  padding: 3px;
}

.lang-switcher a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font: 700 11px/1em var(--font-nav);
  color: var(--color-text-meta);
  text-decoration: none;
  border-radius: 18px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.lang-switcher a:hover {
  background: var(--color-surface);
  color: var(--color-text-dark);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.lang-switcher .flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
}

/* --- Navigation --- */
#navigation {
  background: var(--color-nav-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 3px 12px rgba(74,124,47,0.18);
  margin-top: 4px;
  z-index: 200;
  transition: box-shadow 0.3s ease;
}

#navigation.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  border-radius: 0;
  margin-top: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

/* Spacer to prevent content jump when nav becomes fixed */
#navigation.sticky + #content {
  margin-top: 52px;
}

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

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

#navigation .nav > li {
  position: relative;
}

/* Subtle vertical separators between nav items */
#navigation .nav > li + li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 30%;
  height: 40%;
  width: 1px;
  background: rgba(255,255,255,0.15);
}

#navigation .nav > li > a {
  display: block;
  padding: 14px 18px;
  font: 600 15px/1em var(--font-nav);
  color: var(--color-nav-text);
  white-space: nowrap;
  position: relative;
  transition: background 0.25s ease;
}

#navigation .nav > li > a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.25,0.1,0.25,1);
}

#navigation .nav > li > a:hover::after,
#navigation .nav > li:hover > a::after {
  transform: scaleX(1);
}

#navigation .nav > li > a:hover,
#navigation .nav > li:hover > a {
  background: rgba(255,255,255,0.1);
}

/* Dropdown — animated fade + slide */
.has-dropdown { position: relative; }

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  min-width: 240px;
  z-index: 100;
  list-style: none;
  padding: 6px 0;
  margin: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.has-dropdown:hover .sub-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sub-menu li a {
  display: block;
  padding: 10px 18px;
  font: 600 14px/1.4em var(--font-nav);
  color: var(--color-text-dark);
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.sub-menu li a:hover {
  background: var(--color-accent-soft);
  color: var(--color-nav-dropdown-hover);
  padding-left: 22px;
}

/* 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;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

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

.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; }

}

/* --- Back to top --- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--color-nav-bg);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 300;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--color-nav-hover);
}

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

/* --- Content area --- */
#content {
  background: var(--color-surface);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: none;
  padding: 36px;
  min-height: 400px;
  margin-top: 4px;
}

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

/* --- Page & Entry content --- */
.page-title {
  font: 700 26px/1.3em var(--font-body);
  color: var(--color-text-dark);
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 4px solid var(--color-nav-bg);
}

.page-description {
  font: 400 17px/1.6em var(--font-body);
  color: var(--color-text-meta);
  margin-bottom: 24px;
  max-width: 740px;
}

.page-content .entry-content {
  max-width: 740px;
}

.post-title {
  font: 700 28px/1.25em var(--font-body);
  color: var(--color-text-dark);
  letter-spacing: -0.3px;
  margin: 0;
}

/* --- Post detail page --- */
.post-back {
  margin-bottom: 20px;
}

.post-back a {
  font: 600 14px/1em var(--font-body);
  color: var(--color-text-meta);
  text-decoration: none;
  transition: color var(--transition);
}

.post-back a:hover {
  color: var(--color-link);
}

.post-header {
  margin-bottom: 24px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font: 400 14px/1.5em var(--font-body);
  color: var(--color-text-meta);
}

.post-meta time {
  font-weight: 700;
}

.post-meta-sep {
  color: var(--color-border);
}

.post-hero {
  margin-bottom: 1.5em;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.post-hero img {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
  display: block;
}

.post.entry .entry-content {
  max-width: 680px;
}

.post-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.post-footer-back {
  font: 600 14px/1em var(--font-body);
  color: var(--color-text-meta);
  text-decoration: none;
  transition: color var(--transition);
}

.post-footer-back:hover {
  color: var(--color-link);
}

.entry-content {
  font: 400 16px/1.7em var(--font-body);
  color: var(--color-text-entry);
}

.entry-content h2 {
  font: 700 21px/1.3em var(--font-body);
  color: var(--color-text-dark);
  margin: 1.5em 0 0.5em;
  background: rgba(74, 124, 47, 0.08);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-nav-bg);
}

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

.entry-content h3 {
  font: 700 18px/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: var(--radius-md);
  margin: 1em 0;
}

.entry-content a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(74, 124, 47, 0.3);
  transition: text-decoration-color var(--transition);
}

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

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 8px 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entry-content img:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.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 strong {
  font-weight: 700;
  color: var(--color-text-dark);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 15px;
}

.entry-content th {
  text-align: left;
  font-weight: 700;
  color: var(--color-text-dark);
  background: var(--color-accent-soft);
  padding: 10px 14px;
  border-bottom: 2px solid var(--color-accent);
}

.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}

.entry-content tr:last-child td {
  border-bottom: none;
}

.entry-content tr:hover td {
  background: rgba(245, 166, 35, 0.05);
}

/* --- Sidebar widgets --- */
/* (Sidebar widgets removed — content moved to footer) */

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

.post-grid .post-card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.04);
  transition: transform 0.35s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.35s ease;
  border-top: 3px solid var(--color-accent);
}

.post-grid .post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 28px rgba(74,124,47,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

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

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

.post-grid .post-card-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(44,40,38,0.12));
  pointer-events: none;
}

.post-grid .post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25,0.1,0.25,1);
}

.post-grid .post-card:hover .post-card-thumb img {
  transform: scale(1.06);
}

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

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

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

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

.post-grid-sm .post-card-body {
  padding: 14px 16px 16px;
}

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

.post-grid-sm .post-card-excerpt {
  font-size: 14px;
  line-height: 1.5em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Post card base styles --- */
.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 {
  display: inline-block;
  font: 700 11px/1em var(--font-body);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 5px 11px;
  border-radius: 20px;
  width: fit-content;
}

.post-card-title {
  font: 700 18px/1.35em var(--font-body);
  color: var(--color-text-dark);
  margin: 10px 0 8px;
  transition: color 0.25s ease;
}

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

.post-card-excerpt {
  font: 400 14px/1.65em var(--font-body);
  color: var(--color-text);
  margin-bottom: 10px;
}

.read-more {
  font: 700 13px/1em var(--font-body);
  color: var(--color-link);
  margin-top: auto;
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
}

.post-card-link:hover .read-more {
  transform: translateX(3px);
}

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

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.25,0.1,0.25,1);
}

.post-card-link:hover .post-card-thumb img {
  transform: scale(1.05);
}

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

.btn {
  display: inline-block;
  padding: 10px 24px;
  font: 700 15px/1em var(--font-body);
  color: var(--color-nav-text);
  background: var(--color-nav-bg);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--color-nav-hover);
  color: var(--color-nav-text);
  transform: translateY(-1px);
}

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

.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-entry);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.pagination a:hover {
  border-color: var(--color-link);
  color: var(--color-link);
  background: rgba(74, 124, 47, 0.05);
}

.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-bg);
  color: var(--color-text);
  padding: 36px 0 0;
  margin-top: 32px;
  border-top: 3px solid var(--color-nav-bg);
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
}

.footer-col h3 {
  font: 700 12px/1.3em var(--font-body);
  color: var(--color-text-meta);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

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

.footer-col ul li {
  padding: 4px 0;
}

.footer-col ul li a {
  color: var(--color-text);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-contact li {
  font-size: 14px;
  line-height: 1.6em;
}

.footer-contact-link {
  display: inline-block;
  margin-top: 12px;
  font: 600 13px/1em var(--font-body);
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-contact-link:hover {
  color: var(--color-link-hover);
}

.footer-col-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-col-logo img {
  max-width: 70px;
  height: auto;
  opacity: 0.9;
  margin-bottom: 10px;
}

.footer-col-logo p {
  font-size: 13px;
  color: var(--color-text-meta);
  line-height: 1.5em;
  margin: 0;
  max-width: 220px;
}

.footer-bottom {
  margin-top: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-bottom p {
  font: 400 13px/1.5em var(--font-body);
  color: var(--color-text-meta);
  margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 900px) {
  .logo-text-main { font-size: 12px; }
  .logo-text-sub { font-size: 20px; }
  #logo img { height: 70px; }
}

@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;
  }

  #navigation .nav > li > a::after {
    display: none;
  }

  /* Remove separators on mobile */
  #navigation .nav > li + li::before {
    display: none;
  }

  /* Sub-menu: static, no animation */
  .sub-menu {
    position: static;
    border: none;
    box-shadow: none;
    background: rgba(255,255,255,0.08);
    border-radius: 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 0;
    display: none;
  }

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

  .sub-menu li a {
    padding-left: 32px;
    color: var(--color-nav-text);
  }

  .sub-menu li a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--color-nav-text);
    padding-left: 32px;
  }

  /* Lang switcher: flatten for mobile */
  .lang-switcher {
    background: transparent;
    padding: 4px 0;
  }

  .lang-switcher a:hover {
    background: var(--color-surface);
  }

  #content {
    padding: 24px;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .footer-col-logo {
    align-items: center;
  }

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

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

@media (max-width: 600px) {
  #logo img { height: 48px; padding: 3px; }
  .logo-text-main { font-size: 10px; letter-spacing: 1px; }
  .logo-text-sub { font-size: 16px; }

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

  #content {
    padding: 20px;
    border-radius: var(--radius-sm);
  }

  .page-title {
    font-size: 21px;
    padding-left: 12px;
  }

  .post-title {
    font-size: 22px;
  }
}

/* --- Contact page --- */
.contact-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.contact-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  border-left: 3px solid var(--color-nav-bg);
}

.contact-card h3 {
  font: 700 12px/1.3em var(--font-body);
  color: var(--color-text-meta);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}

.contact-card p {
  font: 400 15px/1.5em var(--font-body);
  color: var(--color-text-dark);
  margin: 0;
}

.contact-card a {
  color: var(--color-link);
  text-decoration: none;
}

.contact-card a:hover {
  color: var(--color-link-hover);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* --- Contact form --- */
.contact-form {
  margin: 0;
  padding: 0;
  border: none;
}

.contact-form h3 {
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
  flex: 1;
}

.form-group label {
  display: block;
  font: 600 14px/1.4em var(--font-body);
  color: var(--color-text-dark);
  margin-bottom: 6px;
}

.form-group label .optional {
  font-weight: 400;
  color: var(--color-text-meta);
  font-size: 13px;
}

.form-group input,
.form-group textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font: 400 15px/1.5em var(--font-body);
  color: var(--color-text-entry);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  box-sizing: border-box;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
  outline: none;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-optional-label {
  font: 400 14px/1.4em var(--font-body);
  color: var(--color-text-meta);
  margin: 20px 0 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
}

.btn-submit {
  display: inline-block;
  padding: 12px 36px;
  font: 700 15px/1em var(--font-nav);
  color: #fff;
  background: var(--color-nav-bg);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-submit:hover {
  background: var(--color-nav-hover);
  transform: translateY(-1px);
}

.form-success {
  display: none;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font: 400 15px/1.5em var(--font-body);
}

/* --- Contact map --- */
.contact-map h3 {
  font: 700 16px/1.3em var(--font-body);
  color: var(--color-text-dark);
  margin: 0 0 12px;
}

.contact-map iframe {
  width: 100%;
  min-height: 400px;
  border: none;
  border-radius: var(--radius-md);
}

@media (max-width: 768px) {
  .contact-info {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* --- 404 page --- */
.not-found {
  text-align: center;
  padding: 40px 0 20px;
}

.not-found-code {
  font: 800 96px/1em var(--font-body);
  color: var(--color-border);
  letter-spacing: -2px;
}

.not-found-title {
  font: 700 24px/1.3em var(--font-body);
  color: var(--color-text-dark);
  margin: 8px 0 20px;
}

.not-found-body p {
  font: 400 16px/1.6em var(--font-body);
  color: var(--color-text);
  margin-bottom: 0.8em;
}

.not-found-alt {
  color: var(--color-text-meta) !important;
  font-style: italic;
}

.not-found-body .btn {
  margin-top: 16px;
}
