/* Crimea is Ukraine - Custom Theme Stylesheet */
.md-container {
  overflow-x: hidden;
}
:root {
  /* Override Material theme primary & accent colors */
  --md-primary-fg-color: #212736 !important; /* Navigation background (Dark Blue-Gray) */
  --md-primary-fg-color--dark: #141414 !important; /* Headings and dark UI */
  --md-accent-fg-color: #0000EE !important; /* Primary Interactive (Blue) */
  --md-accent-fg-color--transparent: rgba(0, 0, 238, 0.1) !important;

  /* Reset margins, paddings, and border radius */
  --md-admonition-border-radius: 0px !important;
  --md-card-border-radius: 0px !important;

  /* Text and UI details */
  --md-typeset-color: #141414 !important;
  --md-typeset-a-color: #0000EE !important;
}

/* Mandatory Sharp Edges */
* {
  border-radius: 0px !important;
}

/* Core Typography (Roboto) */
body, .md-typeset {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 300 !important; /* Light text for readability */
  font-size: 20px !important; /* Primary content size */
  line-height: 24px !important; /* Standard line height */
  color: #141414 !important;
  -webkit-font-smoothing: antialiased;
}

/* Headings Hierarchy */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: 'Roboto', sans-serif !important;
  font-weight: 700 !important; /* Bold headings */
  color: #141414 !important;
  letter-spacing: 0px !important;
  margin-top: 40px;
  margin-bottom: 20px;
}

.md-typeset h1 {
  font-size: 48px !important;
  line-height: 58px !important;
  margin-top: 0 !important;
}

.md-typeset h2 {
  font-size: 36px !important;
  line-height: 44px !important;
  border-bottom: 1px solid #D8D8D8;
  padding-bottom: 12px;
  margin-top: 52px !important; /* Consistent section rhythm */
  margin-bottom: 32px !important;
}

.md-typeset h3 {
  font-size: 28px !important;
  line-height: 34px !important;
}

.md-typeset h4 {
  font-size: 24px !important;
  line-height: 28px !important;
}

.md-typeset h5 {
  font-size: 20px !important;
  line-height: 24px !important;
}

/* Links & Interactive States */
.md-typeset a {
  color: #0000EE !important; /* Primary Interactive */
  font-weight: 300 !important;
  text-decoration: none !important;
  transition: opacity 0.2s, color 0.2s;
}

.md-typeset a:hover {
  text-decoration: underline !important;
  opacity: 0.8 !important;
}

.md-typeset a:active {
  opacity: 0.6 !important;
  color: #0000EE !important;
}

/* Header & Menu Override */
.md-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background-color: #212736 !important; /* Dark Blue-Gray */
  padding: 20px 40px !important;
  border-bottom: 1px solid #000000 !important;
}

.md-header__title {
  font-family: 'Roboto', sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
}

.md-header__topic {
  font-weight: 300 !important;
}

/* Navigation Sidebars */
.md-sidebar--primary, .md-sidebar--secondary {
  background-color: #ECECEC !important; /* Very Light Gray surface */
}

.md-nav {
  font-family: 'Roboto', sans-serif !important;
  font-size: 15px !important;
}

.md-nav__title {
  font-weight: 700 !important;
  color: #141414 !important;
  padding: 16px 20px !important;
}

.md-nav__title[for="__drawer"] {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  white-space: normal !important;
  line-height: 1.3 !important;
  color: #FFFFFF !important;
  background-color: #212736 !important;
  padding: 20px 24px !important;
}

.md-nav__title[for="__drawer"] .md-logo {
  margin: 0 !important;
  padding: 0 !important;
}

.md-nav__title[for="__drawer"] .md-logo svg {
  fill: #FFFFFF !important;
  width: 24px !important;
  height: 24px !important;
}

.md-nav__link {
  color: #141414 !important;
  font-weight: 300 !important;
  padding: 8px 20px !important;
  line-height: 22.5px !important;
  transition: color 0.2s;
}

.md-nav__link:hover {
  color: #0000EE !important;
  text-decoration: underline !important;
}

.md-nav__link--active,
.md-nav__item--active > .md-nav__link {
  color: #0000EE !important;
  font-weight: 400 !important;
}

/* Remove top gap on homepage between header and hero banner */
.md-container:has(.hero-section) {
  padding-top: 0 !important;
  margin-top: -20px !important; /* Shifting up to fully overlap header and cover gap */
}
.md-main:has(.hero-section) {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.md-main__inner:has(.hero-section) {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.md-content:has(.hero-section) {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.md-content__inner:has(.hero-section) {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Full Viewport Hero Section */
.hero-section {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: -20px !important;
  background-color: #212736 !important;
  background-size: cover;
  background-position: center;
  height: 75vh;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  margin-bottom: 52px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65); /* dark cover for stark contrast */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  color: #FFFFFF !important;
  padding: 0 20px;
}

.hero-section .hero-title {
  font-family: 'Roboto', sans-serif !important;
  font-size: 104px !important; /* Display / Hero size */
  font-weight: 700 !important;
  line-height: 115px !important;
  letter-spacing: 0px !important;
  margin: 0 0 24px 0 !important;
  color: #FFFFFF !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
}

.hero-section .hero-subtitle {
  font-family: 'Roboto', sans-serif !important;
  font-size: 20px !important;
  font-weight: 300 !important;
  line-height: 28px !important;
  max-width: 850px;
  margin: 0 auto !important;
  color: #ECECEC !important;
}

/* Archive CSS Grid and Cards */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 52px;
  width: 100%;
}

.archive-card {
  background-color: #FFFFFF !important;
  border: 1px solid #D8D8D8 !important;
  padding: 32px !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: none !important;
}

.archive-card:hover {
  border-color: #141414 !important;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.archive-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  margin-bottom: 20px;
  background-color: #ECECEC;
  border: 1px solid #ECECEC;
}

.archive-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.archive-card:hover .archive-card-image img {
  transform: scale(1.03);
}

.archive-card-title {
  font-family: 'Roboto', sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 24px !important;
  margin: 0 0 12px 0 !important;
}

.archive-card-title a {
  color: #0F0F0F !important; /* Text Link Dark */
  text-decoration: none !important;
}

.archive-card-title a:hover {
  color: #0000EE !important;
  text-decoration: underline !important;
}

.archive-card-desc {
  font-family: 'Roboto', sans-serif !important;
  font-size: 15px !important;
  font-weight: 300 !important;
  line-height: 20px !important;
  color: #676767 !important; /* Medium Gray for description */
  margin: 0 !important;
  flex-grow: 1;
}

/* Team Grid and Horizontal Profile Cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 52px;
  width: 100%;
}

.team-card {
  background-color: #FFFFFF !important;
  border: 1px solid #D8D8D8 !important;
  padding: 24px !important;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.team-card:hover {
  border-color: #141414 !important;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.team-avatar-wrapper {
  width: 120px !important;
  height: 120px !important;
  flex-shrink: 0 !important;
  display: block;
}

.team-avatar-wrapper a {
  display: block;
  width: 100%;
  height: 100%;
}

.team-avatar {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border: 1px solid #D8D8D8 !important;
  filter: grayscale(100%); /* Archival feel */
  transition: filter 0.3s, transform 0.3s;
}

.team-card:hover .team-avatar {
  filter: none;
  transform: scale(1.02);
}

.team-card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-name {
  font-family: 'Roboto', sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  margin: 0 0 8px 0 !important;
  color: #141414 !important;
}

.team-name a {
  color: #141414 !important;
  text-decoration: none !important;
}

.team-name a:hover {
  color: #0000EE !important;
  text-decoration: underline !important;
}

.team-role {
  font-family: 'Roboto', sans-serif !important;
  font-size: 15px !important;
  font-weight: 300 !important;
  line-height: 20px !important;
  color: #676767 !important;
  margin: 0 !important;
}

/* Contact / Submission Section (Dark Charcoal Background) */
.contact-section {
  background-color: #141414 !important; /* Dark Charcoal */
  color: #FFFFFF !important;
  padding: 60px 40px !important;
  margin-top: 52px;
  border-top: 3px solid #50E3C2 !important; /* Accent Teal Accent Border */
  text-align: center;
}

.contact-section p {
  color: #ECECEC !important;
  font-size: 20px !important;
  font-weight: 300 !important;
  line-height: 28px !important;
  max-width: 800px;
  margin: 0 auto !important;
}

.contact-section a {
  color: #50E3C2 !important; /* Teal link on dark background */
  font-weight: 400 !important;
  text-decoration: none !important;
}

.contact-section a:hover {
  text-decoration: underline !important;
}

/* Document & Article Page Banner */
.page-banner {
  width: 100%;
  height: 300px;
  overflow: hidden;
  margin-top: 10px;
  margin-bottom: 40px;
  border: 1px solid #D8D8D8;
  background-color: #ECECEC;
}

.page-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Standard Page Hero Section Adjustments */
.hero-section.page-hero {
  height: 50vh;
  min-height: 350px;
}

.hero-section.page-hero .hero-title {
  font-size: 56px !important;
  line-height: 66px !important;
}

@media screen and (max-width: 1023px) {
  .hero-section.page-hero .hero-title {
    font-size: 44px !important;
    line-height: 52px !important;
  }
}

@media screen and (max-width: 599px) {
  .hero-section.page-hero {
    height: auto;
    padding: 60px 20px;
  }
  .hero-section.page-hero .hero-title {
    font-size: 32px !important;
    line-height: 38px !important;
  }
}

/* Fix images within typeset content */
.md-typeset img {
  border: 1px solid #D8D8D8 !important;
  max-width: 100%;
  height: auto;
}

/* Search Box override */
.md-search__form {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-radius: 0px !important;
}

.md-search__form:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

.md-search__input {
  color: #FFFFFF !important;
  font-size: 15px !important;
}

.md-search__input::placeholder {
  color: #D8D8D8 !important;
}

@media screen and (max-width: 959px) {
  .md-search__input {
    color: #141414 !important;
  }
  .md-search__input::placeholder {
    color: #676767 !important;
  }
  .md-search__form .md-search__icon {
    color: #676767 !important;
  }
}

.md-search__suggest {
  font-size: 15px !important;
}

/* Search Results & Autocomplete Suggestions Font Sizes Override */
.md-search__output,
.md-search__output * {
  font-size: 13px !important;
  line-height: 18px !important;
}

/* Reset headings inside search results dropdown which get bloated by global .md-typeset rules */
.md-search-result h1,
.md-search-result h2,
.md-search-result h3,
.md-search-result h4,
.md-search-result h5,
.md-search-result h6 {
  font-size: 15px !important;
  line-height: 20px !important;
  font-weight: 700 !important;
  margin: 0 0 4px 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
}

.md-search-result__article,
.md-search-result__article * {
  font-size: 15px !important;
  line-height: 20px !important;
  font-weight: 700 !important;
}

/* Hide page-level search links (without fragments) to leave only the specific text matches */
a.md-search-result__link:not([href*="#"]) {
  display: none !important;
}

/* Content Container paddings */
.md-content__inner {
  padding-top: 40px !important;
  padding-bottom: 52px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

/* Responsive Sizing Breakpoints */
@media screen and (max-width: 1023px) {
  .hero-section .hero-title {
    font-size: 72px !important;
    line-height: 84px !important;
  }
  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .md-content__inner {
    padding-left: 32px !important;
    padding-right: 32px !important;
  }
}

@media screen and (max-width: 599px) {
  .hero-section {
    height: auto;
    padding: 60px 20px;
  }
  .hero-section .hero-title {
    font-size: 48px !important;
    line-height: 58px !important;
  }
  .archive-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .team-card {
    flex-direction: column !important;
    text-align: center !important;
    gap: 16px !important;
  }
  .team-avatar-wrapper {
    width: 150px !important;
    height: 150px !important;
  }
  body, .md-typeset {
    font-size: 16px !important;
    line-height: 22px !important;
  }
  .md-content__inner {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .md-header {
    padding: 12px 20px !important;
  }
}

/* Option A: Clean Reader Layout - Hide sidebars on desktop and center content */
@media screen and (min-width: 1220px) {
  .md-sidebar--primary {
    display: none !important;
  }

  .md-sidebar--secondary {
    display: none !important;
  }
}

.md-content {
  max-width: 900px !important; /* Spacious but readable text column */
  margin: 0 auto !important;
  float: none !important;
}

.md-main__inner {
  display: block !important; /* Bypass CSS Grid columns */
}

/* Style for Back to Home link */
.back-link {
  margin-top: 20px;
  margin-bottom: 20px;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 400;
}

.back-link a {
  color: #676767 !important; /* Muted gray */
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.back-link a:hover {
  color: #0000EE !important; /* Interactive blue on hover */
  text-decoration: none !important;
}

/* Smooth Scrolling and Custom Header Navigation */
html {
  scroll-behavior: smooth;
}

h2[id], h3[id] {
  scroll-margin-top: 110px !important; /* Offset the sticky header when scrolling to anchors */
}

.custom-header-nav {
  display: none; /* Hidden on mobile */
}

.custom-nav-link {
  color: #ECECEC !important; /* Muted light gray */
  font-family: 'Roboto', sans-serif !important;
  font-size: 15px !important;
  font-weight: 300 !important;
  text-decoration: none !important;
  transition: color 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.custom-nav-link:hover {
  color: #FFFFFF !important; /* Bright white on hover */
  opacity: 1 !important;
  text-decoration: none !important;
}

@media screen and (min-width: 1220px) {
  .md-header__title {
    flex: 0 0 280px !important;
  }

  .custom-header-nav {
    display: flex !important;
    gap: 24px;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin-left: 20px;
    margin-right: 20px;
  }
}

/* Center Footer Copyright */
.md-copyright {
  width: 100% !important;
  text-align: center !important;
}

/* Hide Permalinks globally */
.md-typeset .headerlink {
  display: none !important;
}

/* Clickable Header Title Styles */
.md-header__topic a {
  color: inherit !important;
  text-decoration: none !important;
  transition: opacity 0.2s;
}

.md-header__topic a:hover {
  text-decoration: none !important;
  opacity: 0.85 !important;
}

/* Footer Logo Styling */
.footer-logo {
  margin-top: 12px;
  margin-bottom: 16px;
  text-align: center;
  width: 100%;
}

.md-typeset .footer-logo img,
.footer-logo-img {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  max-height: 48px;
  width: auto;
  display: inline-block;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.footer-logo-img:hover {
  opacity: 1;
}

/* Always show site title "Крим — це Україна" and hide page titles on scroll */
.md-header__topic:not([data-md-component="header-topic"]) {
  display: block !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  z-index: 1 !important;
}

.md-header__topic[data-md-component="header-topic"] {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Support Section Styling */
.support-card {
  background-color: #FFFFFF !important;
  border: 1px solid #D8D8D8 !important;
  padding: 40px !important;
  margin-top: 20px;
  margin-bottom: 52px;
  width: 100%;
}

.support-lead {
  font-family: 'Roboto', sans-serif !important;
  font-weight: 300 !important;
  font-size: 20px !important;
  line-height: 28px !important;
  color: #141414 !important;
  margin-bottom: 32px;
}

.support-info-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
  border-top: 1px solid #ECECEC;
  padding-top: 24px;
}

.support-info-row {
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid #ECECEC;
  padding-bottom: 16px;
  align-items: baseline;
}

.support-info-label {
  width: 220px;
  flex-shrink: 0;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  color: #676767 !important;
  text-transform: uppercase;
}

.support-info-value {
  font-family: 'Roboto', sans-serif !important;
  font-weight: 400 !important;
  font-size: 18px !important;
  color: #141414 !important;
  word-break: normal;
  overflow-wrap: break-word;
}

.support-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 32px;
}

.md-typeset .support-mono-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #141414 !important;
  color: #FFFFFF !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 32px !important;
  border: 1px solid #141414 !important;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  text-decoration: none !important;
}

.md-typeset .support-mono-btn:hover {
  background-color: #FFFFFF !important;
  color: #141414 !important;
  border-color: #141414 !important;
  text-decoration: none !important;
}

@media screen and (max-width: 599px) {
  .support-card {
    padding: 24px !important;
  }
  .support-info-row {
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
  }
  .support-info-label {
    width: auto;
  }
  .support-info-value {
    font-size: 16px !important;
  }
  .md-typeset .support-mono-btn {
    width: 100%;
    text-align: center;
  }
}

/* Footer Parkovy Logo */
.footer-parkovy {
  margin-top: 16px;
  display: block;
  text-align: center;
}

.footer-parkovy a {
  display: inline-block;
  line-height: 0;
}

.footer-parkovy svg {
  height: 48px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.2s ease-in-out;
}

.footer-parkovy svg:hover {
  opacity: 1;
}

/* Footer Divider */
.footer-divider {
  display: block !important;
  width: 60px !important;
  height: 1px !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
  margin: 24px auto !important;
  border: none !important;
}
