/*
Theme Name: Nyrkiv Portal Theme
Theme URI: http://nyrkiv.te.ua/
Author: Local Community
Description: Premium informational portal theme for Nyrkiv and Chervonohrad Castle.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nyrkiv-theme
*/

:root {
  --bg-main: #FAFAFA;
  --bg-card: #FFFFFF;
  --bg-dark: #1C1C1C;
  --bg-alt: #F2F2F2;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --text-main: #1C1C1C;
  --text-muted: #5A5A5A;
  --text-light: #999999;
  --text-on-dark: #FAFAFA;
  --accent-pine: #1C1C1C;
  --accent-pine-h: #2E2E2E;
  --accent-clay: #1C1C1C;
  --accent-clay-h: #2E2E2E;
  --accent-gold: #0D5C46;
  --border: rgba(28, 28, 28, 0.08);
  --border-glow: rgba(13, 92, 70, 0.25);
  --border-dark: rgba(250, 250, 250, 0.12);
  --shadow-sm: 0 4px 16px rgba(28, 28, 28, 0.03);
  --shadow-md: 0 12px 36px rgba(28, 28, 28, 0.06);
  --shadow-lg: 0 24px 64px rgba(28, 28, 28, 0.12);
  --shadow-glow: 0 0 40px rgba(13, 92, 70, 0.15);
  --f-head: 'Lora', Georgia, serif;
  --f-body: 'Inter', -apple-system, sans-serif;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-pill: 100px;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1240px;
}

*,
::before,
::after {
  box-sizing: border-box;
  margin: 0px;
  padding: 0px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--f-body);
  background-color: var(--bg-main);
  background-image: radial-gradient(rgba(20, 23, 21, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

button {
  font-family: inherit;
  cursor: pointer;
  border-width: medium;
  border-style: none;
  border-color: currentcolor;
  border-image: initial;
  background: none;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

::selection {
  background: var(--accent-gold);
  color: rgb(255, 255, 255);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: rgb(212, 207, 197);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

.nav-wrapper {
  position: fixed;
  top: 28px;
  left: 0px;
  right: 0px;
  z-index: 990;
  padding: 0 var(--pad);
  pointer-events: none;
}

.nav {
  max-width: var(--max);
  margin: 0px auto;
  height: 68px;
  padding: 0px 10px 0px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-head);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.nav-logo em {
  font-style: italic;
  color: var(--accent-gold);
  font-weight: 400;
}

.nav-logo-badge {
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--accent-gold);
  color: rgb(255, 255, 255);
  padding: 4px 9px;
  border-radius: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: 0.25s;
}

.nav-links a:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.nav-links a.active {
  color: var(--text-main);
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-weather-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 8px;
}

.btn-nav {
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  background: rgb(28, 28, 28);
  color: rgb(255, 255, 255);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: 0.25s;
  border: 1.5px solid rgb(28, 28, 28);
}

.btn-nav:hover {
  background: transparent;
  color: rgb(28, 28, 28);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: 0.3s;
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.drawer {
  position: fixed;
  inset: 104px 16px 16px;
  z-index: 980;
  background: var(--bg-main);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-16px) scale(0.98);
  transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.drawer a {
  font-family: var(--f-head);
  font-size: 32px;
  font-weight: 600;
  color: var(--text-main);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.hero {
  position: relative;
  height: calc(-32px + 100vh);
  margin: 16px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: rgb(255, 255, 255);
  text-align: center;
  background: rgb(28, 28, 28);
}

.hero-bg {
  position: absolute;
  inset: 0px;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1);
  filter: brightness(0.72) contrast(1.08);
}

.hero.loaded .hero-bg img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0px;
  z-index: 2;
  background: radial-gradient(circle at 50% 30%, rgba(13, 92, 70, 0.15) 0%, transparent 65%), linear-gradient(rgba(28, 28, 28, 0.2) 0%, rgba(28, 28, 28, 0.4) 50%, rgba(28, 28, 28, 0.95) 100%);
}

.hero-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  padding: 40px var(--pad) 48px;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 64px;
  align-items: flex-end;
  text-align: left;
}

.hero-left-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-description {
  font-family: var(--f-head);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: rgb(255, 255, 255);
  margin-bottom: 36px;
  text-shadow: rgba(0, 0, 0, 0.4) 0px 2px 12px;
}

.hero-btns {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 0px;
}

.btn-hero-primary {
  padding: 18px 40px;
  border-radius: var(--radius-pill);
  background: var(--accent-gold);
  color: rgb(255, 255, 255);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: 0.25s;
  border: 1.5px solid var(--accent-gold);
}

.btn-hero-primary:hover {
  background: rgb(255, 255, 255);
  color: rgb(28, 28, 28);
  border-color: rgb(255, 255, 255);
}

.btn-hero-secondary {
  padding: 18px 40px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: rgb(255, 255, 255);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: 0.25s;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgb(255, 255, 255);
}

.hero-right-col {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-left: 48px;
}

.hero-right-col::before {
  content: "";
  position: absolute;
  left: 0px;
  top: 5%;
  bottom: 5%;
  width: 1px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.15) 20%, rgba(255, 255, 255, 0.15) 80%, transparent);
}

.h-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.h-stat-num {
  font-family: var(--f-head);
  font-size: 40px;
  font-weight: 500;
  color: rgb(52, 211, 153);
  line-height: 1.1;
  margin-bottom: 6px;
  text-shadow: rgba(52, 211, 153, 0.25) 0px 2px 10px;
}

.h-stat-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.section {
  padding: 108px var(--pad);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-alt {
  background: var(--bg-alt);
}

.inner {
  max-width: var(--max);
  margin: 0px auto;
}

.section-header {
  margin-bottom: 60px;
}

.section-header.center {
  text-align: center;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 14px;
}

.section-header.center .section-eyebrow {
  justify-content: center;
}

.section-title {
  font-family: var(--f-head);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-gold);
}

.section-dark .section-title em {
  color: rgb(244, 194, 178);
}

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 620px;
  margin-top: 14px;
  line-height: 1.65;
}

.section-header.center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.showcase-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgb(28, 28, 28);
  color: rgb(255, 255, 255);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 44px 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: border-color 0.3s;
  text-decoration: none;
}

.showcase-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.showcase-bg {
  position: absolute;
  inset: 0px;
  z-index: 1;
}

.showcase-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75) contrast(1.05);
}

.showcase-bg::after {
  content: "";
  position: absolute;
  inset: 0px;
  background: linear-gradient(rgba(28, 28, 28, 0.05) 0%, rgba(28, 28, 28, 0.5) 45%, rgba(28, 28, 28, 0.95) 100%);
}

.showcase-content {
  position: relative;
  z-index: 2;
  text-align: left;
}

.showcase-title {
  font-family: var(--f-head);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  color: rgb(255, 255, 255);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.showcase-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
  margin-bottom: 24px;
}

.showcase-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: rgb(255, 255, 255);
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: 0.3s;
}

.showcase-card:hover .showcase-link {
  color: rgb(52, 211, 153);
  border-color: rgb(52, 211, 153);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.bento-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 92, 70, 0.25);
}

.bento-tag-badge {
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(13, 92, 70, 0.12);
  padding: 5px 14px;
  border-radius: 14px;
  margin-bottom: 24px;
  width: fit-content;
}

.bento-card-title {
  font-family: var(--f-head);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.2;
}

.bento-card-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 28px;
}

.bento-link {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-clay);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bento-link span {
  transition: transform 0.25s;
}

.bento-link:hover span {
  transform: translateX(6px);
}

.landmarks-stack {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.landmark-item {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.landmark-item:nth-child(2n) {
  direction: rtl;
}

.landmark-item:nth-child(2n)>* {
  direction: ltr;
}

.landmark-item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(20, 23, 21, 0.15);
}

.lm-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 11;
}

.lm-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.landmark-item:hover .lm-media img {
  transform: scale(1.06);
}

.lm-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(14, 19, 16, 0.82);
  backdrop-filter: blur(10px);
  color: rgb(255, 255, 255);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lm-content {
  padding: 16px 20px;
}

.lm-title {
  font-family: var(--f-head);
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 16px;
}

.lm-title em {
  font-style: italic;
  color: var(--accent-clay);
}

.lm-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.lm-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.lm-stat-item {
  font-size: 14px;
  color: var(--text-muted);
}

.lm-stat-item strong {
  color: var(--text-main);
  font-weight: 800;
  display: block;
  font-size: 16px;
}

.tours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.tour-card-ui {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-card-ui:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(20, 23, 21, 0.16);
}

.tc-ui-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.tc-ui-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s;
}

.tour-card-ui:hover .tc-ui-img img {
  transform: scale(1.06);
}

.tc-ui-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--accent-clay);
  padding: 5px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tc-ui-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tc-ui-title {
  font-family: var(--f-head);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 12px;
}

.tc-ui-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
  flex-grow: 1;
}

.tc-ui-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.tc-ui-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tc-ui-meta strong {
  color: var(--text-main);
  font-weight: 700;
}

.tc-ui-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tc-ui-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.tc-ui-price small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.btn-sm-clay {
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: var(--accent-clay);
  color: rgb(255, 255, 255);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: 0.25s;
  border: 1.5px solid var(--accent-clay);
}

.btn-sm-clay:hover {
  background: transparent;
  color: var(--accent-clay);
}

.sinoptik-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.s-tab-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.s-tab-btn {
  padding: 22px 10px;
  text-align: center;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: 0.25s;
  background: transparent;
}

.s-tab-btn:last-child {
  border-right-width: medium;
  border-right-style: none;
  border-right-color: currentcolor;
}

.s-tab-btn:hover {
  background: rgba(255, 255, 255, 0.7);
}

.s-tab-btn.active {
  background: var(--bg-card);
  position: relative;
  box-shadow: 0 -3px 0 var(--accent-clay) inset;
}

.s-tab-day {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}

.s-tab-date {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.s-tab-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.s-tab-temp {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.s-tab-temp-min {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.s-panel {
  display: none;
  padding: 40px 36px;
}

.s-panel.active {
  display: block;
}

.s-table-wrapper {
  overflow-x: auto;
}

.s-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.s-table th {
  padding: 16px 18px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.s-table td {
  padding: 20px 18px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.s-table-temp-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-clay);
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

.catalog-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 104px;
}

.f-title-head {
  font-family: var(--f-head);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.f-group {
  margin-bottom: 32px;
}

.f-group-lbl {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.f-check-lbl {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 12px;
  cursor: pointer;
}

.f-check-lbl input {
  accent-color: var(--accent-clay);
  width: 18px;
  height: 18px;
}

.f-diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.f-diff-pill {
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  background: var(--bg-main);
  transition: 0.25s;
}

.f-diff-pill.on {
  background: var(--text-main);
  color: rgb(255, 255, 255);
  border-color: var(--text-main);
}

.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.cat-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: 0.35s;
}

.cat-card.hidden {
  display: none;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cat-card-img {
  position: relative;
  overflow: hidden;
}

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

.cat-card-body {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gallery-filter-tabs {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 56px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.g-tab-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  padding: 8px 4px;
  transition: color 0.25s;
}

.g-tab-btn::after {
  content: '';
  position: absolute;
  bottom: -17px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-pine);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.g-tab-btn.active {
  color: var(--text-main);
}

.g-tab-btn.active::after {
  transform: scaleX(1);
}

.g-tab-btn:hover {
  color: var(--text-main);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: transparent;
  border: none;
  box-shadow: none;
}

.gallery-item.hidden {
  display: none !important;
}

.gi-wide {
  grid-column: span 2;
}

.gi-tall {
  grid-column: span 1;
}

.gallery-media {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s;
}

.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item:hover .gallery-media {
  border-color: rgba(20, 23, 21, 0.15);
}

.gallery-caption {
  padding: 16px 4px 0 4px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.gallery-num {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-clay);
  letter-spacing: 0.05em;
}

.gallery-desc {
  font-family: var(--f-head);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .gi-wide,
  .gi-tall {
    grid-column: span 1;
  }

  .gallery-media {
    aspect-ratio: 16 / 10 !important;
  }
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  align-items: start;
}

.hist-article p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hist-article h2 {
  font-family: var(--f-head);
  font-size: 34px;
  font-weight: 600;
  margin: 44px 0px 20px;
  color: var(--text-main);
}

.hist-timeline-box {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.timeline-item {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  margin-bottom: 0px;
  padding-bottom: 0px;
  border: 0px;
}

.timeline-year {
  font-family: var(--f-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-clay);
  margin-bottom: 4px;
}

.timeline-text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
}

.footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 96px var(--pad) 36px;
  margin-top: 120px;
  border-radius: calc(var(--radius-xl) + 8px) calc(var(--radius-xl) + 8px) 0 0;
}

.f-container {
  max-width: var(--max);
  margin: 0px auto;
}

.f-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 36px;
}

.f-brand-logo {
  font-family: var(--f-head);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.f-brand-logo em {
  font-style: italic;
  color: var(--accent-clay);
}

.f-brand-desc {
  font-size: 14px;
  color: rgba(250, 249, 245, 0.65);
  max-width: 320px;
  line-height: 1.7;
}

.f-col-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 249, 245, 0.4);
  margin-bottom: 24px;
}

.f-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.f-links a {
  color: rgba(250, 249, 245, 0.72);
  font-size: 14px;
}

.f-links a:hover {
  color: rgb(255, 255, 255);
}

.f-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: rgba(250, 249, 245, 0.45);
}

.modal-bg {
  position: fixed;
  inset: 0px;
  z-index: 1000;
  background: rgba(14, 19, 16, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.modal-bg.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-main);
  border-radius: var(--radius-xl);
  padding: 48px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transform: translateY(24px) scale(0.97);
  transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-bg.open .modal-box {
  transform: none;
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.modal-title {
  font-family: var(--f-head);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

.modal-close {
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}

.modal-close:hover {
  opacity: 1;
  color: var(--accent-clay);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-main);
  transition: border-color 0.25s;
  border-radius: 0px;
}

.form-input:focus {
  outline: none;
  border-bottom-color: var(--accent-pine);
}

.modal-box .btn-hero-primary {
  border-radius: var(--radius-sm);
  background: var(--accent-pine);
  border-color: var(--accent-pine);
}

.modal-box .btn-hero-primary:hover {
  background: transparent;
  color: var(--accent-pine);
  border-color: var(--accent-pine);
}

.lb-wrap {
  position: fixed;
  inset: 0px;
  z-index: 2000;
  background: rgba(14, 19, 16, 0.96);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  cursor: pointer;
}

.lb-wrap.open {
  opacity: 1;
  pointer-events: auto;
}

.lb-wrap img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.toast-bar {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 3000;
  background: var(--text-main);
  color: var(--bg-main);
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(40px);
  opacity: 0;
  transition: 0.35s;
  box-shadow: var(--shadow-lg);
}

.toast-bar.show {
  transform: none;
  opacity: 1;
}

.reveal,
.rv {
  opacity: 1;
  transform: none;
  transition: none;
}

.reveal.vis,
.rv.vis {
  opacity: 1;
  transform: none;
}

.delay-1,
.d1 {
  transition-delay: 0.1s;
}

.delay-2,
.d2 {
  transition-delay: 0.2s;
}

.delay-3,
.d3 {
  transition-delay: 0.3s;
}

.delay-4,
.d4 {
  transition-delay: 0.4s;
}

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

  .bento-grid,
  .tours-grid {
    grid-template-columns: 1fr;
  }

  .landmark-item {
    grid-template-columns: 1fr;
  }

  .landmark-item:nth-child(2n) {
    direction: ltr;
  }

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

  .catalog-sidebar {
    position: static;
    margin-bottom: 32px;
  }

  .cat-card {
    grid-template-columns: 1fr;
  }

  .f-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {

  .nav-links,
  .nav-weather-badge,
  .btn-nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .s-tab-strip {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-left-col {
    align-items: center;
  }

  .hero-btns {
    justify-content: center;
  }

  .hero-right-col {
    flex-direction: row;
    justify-content: space-around;
    border-left-width: medium;
    border-left-style: none;
    border-left-color: currentcolor;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 0px;
    padding-top: 32px;
    width: 100%;
    gap: 16px;
  }

  .h-stat {
    align-items: center;
  }
}

/* ══ LANGUAGE SWITCHER ══ */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-alt);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.lang-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  background: transparent;
}

.lang-btn.active {
  background: var(--text-main);
  color: var(--bg-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover:not(.active) {
  color: var(--text-main);
}

/* ══ ARCHIVAL CRAFT & VINTAGE STYLES ══ */
.lettrine::first-letter {
  font-family: var(--f-head);
  font-size: 3.4em;
  float: left;
  line-height: 0.8;
  padding-right: 12px;
  padding-top: 4px;
  color: var(--accent-gold);
  font-weight: 700;
}

.archival-seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #FAF7F2;
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.book-card-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  margin-top: 36px;
}

.book-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 24px 8px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: all 0.25s ease;
}

.book-card::before {
  display: none;
}

.book-card:hover {
  background: rgba(28, 28, 28, 0.02);
  padding-left: 20px;
  padding-right: 12px;
}

.book-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.book-year-badge {
  font-family: var(--f-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(13, 92, 70, 0.06);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.book-title {
  font-family: var(--f-body);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin: 0 0 4px 0;
  transition: color 0.2s ease;
}

.book-card:hover .book-title {
  color: var(--accent-gold);
}

.book-author {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.book-snippet {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 800px;
}

.btn-book-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: var(--accent-gold);
  border: none;
  border-bottom: 1px dashed var(--accent-gold);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  width: fit-content;
  cursor: pointer;
}

.btn-book-open:hover {
  background: var(--accent-gold);
  color: #FFFFFF;
  border-bottom-color: transparent;
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .book-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 8px;
  }
  
  .btn-book-open {
    align-self: flex-start;
  }
}

/* ══ ARCHIVAL FOLIO READER MODAL ══ */
.folio-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(15, 18, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.folio-modal-bg.open {
  display: flex;
}

.folio-modal-box {
  background: #FAF8F5;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 1140px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: folioModalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes folioModalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.folio-header {
  padding: 18px 28px;
  background: #F2EFE9;
  border-bottom: 1px solid rgba(28, 28, 28, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.folio-info {
  display: flex;
  flex-direction: column;
}

.folio-book-name {
  font-family: var(--f-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.folio-page-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.folio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.folio-btn {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  border: 1px solid rgba(28, 28, 28, 0.15);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.folio-btn:hover {
  background: var(--text-main);
  color: #FFFFFF;
}

.folio-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid rgba(28, 28, 28, 0.15);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.folio-close-btn:hover {
  background: var(--accent-clay);
  color: #FFFFFF;
}

.folio-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: #FAF8F5;
}

.folio-body.single-mode {
  grid-template-columns: 1fr;
}

.folio-scan-panel {
  position: relative;
  background: #181918;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  border-right: 1px solid rgba(28, 28, 28, 0.12);
}

.folio-scan-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.folio-scan-img.zoomed {
  transform: scale(1.6);
  cursor: zoom-out;
}

.folio-text-panel {
  padding: 36px var(--pad);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #FAF8F5;
}

.folio-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.folio-original-text {
  font-family: var(--f-head);
  font-size: 19px;
  line-height: 1.6;
  color: #2B2621;
  background: #F4EFE6;
  padding: 20px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-gold);
  font-style: italic;
}

.folio-translation-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-main);
}

.folio-marginalia {
  background: #FAF1E4;
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 13.5px;
  color: #5C4A32;
  line-height: 1.6;
}

.folio-marginalia-title {
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  color: var(--accent-gold);
}

@media (max-width: 860px) {
  .folio-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .folio-scan-panel {
    border-right: none;
    border-bottom: 1px solid rgba(28, 28, 28, 0.12);
  }
}