@import url("https://fonts.googleapis.com/css2?family=Literata:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --blue-950: #00483d;
  --blue-900: #005a4d;
  --blue-800: #007664;
  --blue-700: #00a88f;
  --blue-100: #c9f5ee;
  --blue-50: #effcf9;
  --ink-900: #1a202c;
  --ink-700: #4a5568;
  --ink-500: #718096;
  --white: #ffffff;
  --line: rgba(0, 118, 100, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 18px rgba(0, 118, 100, 0.1);
  --shadow-md: 0 12px 30px rgba(0, 118, 100, 0.18);
  --font-sans: "Manrope", sans-serif;
  --font-serif: "Literata", serif;
  --trans: 0.2s ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--blue-50);
  display: flex;
  flex-direction: column;
}

/* Hidden scrollbar by default, shown only when JS adds .show-scrollbar */
html {
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html.show-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 118, 100, 0.62) transparent;
}

html.show-scrollbar::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html.show-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

html.show-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 118, 100, 0.62);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

html.show-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 118, 100, 0.78);
}

body.has-navbar-fixed-top {
  padding-top: 4.6rem;
}

.back_pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 8% 22%,
      rgba(0, 118, 100, 0.07) 0%,
      transparent 48%
    ),
    radial-gradient(
      circle at 88% 76%,
      rgba(255, 217, 61, 0.06) 0%,
      transparent 45%
    ),
    var(--blue-50);
}

h1,
h2,
h3,
.title,
.subtitle {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
}

a {
  color: inherit;
}

.post-text {
  white-space: pre-line;
}

.content a {
  color: var(--blue-800);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 1.5px;
  transition:
    color var(--trans),
    background-color var(--trans);
}

.content a:hover,
.content a:focus-visible {
  color: var(--blue-700);
  background: rgba(0, 118, 100, 0.1);
  border-radius: 4px;
}

.site-main.section {
  padding-top: 2rem;
  flex-grow: 1;
}

.site-footer {
  margin-top: auto;
  padding: 1.2rem 1rem 1.6rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-700);
  font-weight: 600;
  line-height: 1.5;
  background: var(--blue-50);
}

.site-footer p {
  margin: 0;
}

.romashka-navbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(0, 118, 100, 0.08);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.romashka-navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-shell {
  min-height: 4.6rem;
}

.brand-item {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 0.75rem;
  padding: 0.35rem 0.7rem;
  margin: 0.28rem 0;
  border-radius: var(--radius-md);
  min-height: 0;
  transition:
    background var(--trans),
    box-shadow var(--trans),
    transform var(--trans);
}

.brand-item:hover {
  background: rgba(0, 118, 100, 0.1);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.brand-item img {
  width: 56px;
  height: 56px;
  max-height: none;
  border-radius: 10px;
  object-fit: contain;
  background: var(--white);
  padding: 3px;
  border: 1px solid var(--line);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--blue-900);
  font-weight: 600;
  line-height: 1.15;
}

.navbar-menu {
  align-items: center;
}

.navbar-start {
  margin-left: auto;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-900);
  border-radius: var(--radius-sm);
  margin: 0.5rem 0.25rem;
  padding: 0.35rem 0.75rem;
  transition:
    background var(--trans),
    color var(--trans),
    transform var(--trans),
    box-shadow var(--trans);
}

.nav-link.nav-active {
  background: rgba(0, 118, 100, 0.1);
  box-shadow: var(--shadow-sm);
}

.nav-link.custom-hover:hover,
.button.custom-hover:hover {
  background: var(--blue-800);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.navbar-burger {
  color: var(--blue-900);
}

.button {
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition:
    background var(--trans),
    color var(--trans),
    transform var(--trans),
    box-shadow var(--trans);
}

.button.is-primary {
  background: var(--blue-800);
  border-color: var(--blue-800);
  color: var(--white);
}

.button.is-primary:hover {
  background: var(--blue-700);
}

.hero-banner {
  position: relative;
  min-height: 76vh;
  max-height: 920px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("/static/images/main.jpeg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 25%;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 660px;
  width: calc(100% - 2rem);
  margin: 7rem auto 0;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 54px rgba(0, 118, 100, 0.22);
  text-align: center;
}

.hero-kicker {
  margin: 0;
  color: var(--blue-900);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-title {
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
  color: var(--blue-950);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.hero-subtitle {
  margin: 0;
  color: var(--ink-700);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.home-links {
  padding-top: 2.5rem;
}

/* Carousel */
.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  padding: 0.5rem;
  margin: -0.5rem;
}

.carousel-track.home-link-grid {
  display: flex;
  gap: 1rem;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: var(--blue-800);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans);
  box-shadow: var(--shadow-sm);
}

.carousel-btn:hover {
  background: var(--blue-800);
  color: var(--white);
  border-color: var(--blue-800);
  transform: scale(1.08);
}

.home-link-card {
  flex: 0 0 calc((100% - 2rem) / 3);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  text-decoration: none;
  transition:
    transform var(--trans),
    box-shadow var(--trans),
    border-color var(--trans);
}

.home-link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(0, 118, 100, 0.38);
}

.home-link-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--blue-900);
}

.home-link-text {
  color: var(--ink-700);
  line-height: 1.5;
}

.news-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
}

.news-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--line);
  border-top-color: var(--blue-800);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.news-feed-list .news-card {
  border: 1px solid rgba(0, 118, 100, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(0, 118, 100, 0.08);
  overflow: hidden;
  transition:
    transform var(--trans),
    box-shadow var(--trans),
    border-color var(--trans);
}

.news-feed-list .news-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 118, 100, 0.28);
  box-shadow: 0 12px 26px rgba(0, 118, 100, 0.12);
}

.news-feed-list .news-card .card-header {
  border-bottom: 1px solid rgba(0, 118, 100, 0.12);
  background: linear-gradient(
    180deg,
    rgba(239, 252, 249, 0.8) 0%,
    rgba(255, 255, 255, 0.9) 100%
  );
  box-shadow: none;
}

.news-feed-list .news-card .card-header-title {
  color: var(--blue-900);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.35;
  padding: 1rem 1.2rem;
}

.news-feed-list .news-card .card-header-title:hover {
  color: var(--blue-700);
}

.news-feed-list .news-card .card-content {
  padding: 1rem 1.2rem 1.15rem;
}

.news-card-meta {
  color: var(--ink-500) !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.news-feed-list .news-card .post-text {
  color: var(--ink-700);
  margin-bottom: 0.2rem;
}

.news-feed-list .news-card .button.is-primary.is-light {
  background: rgba(0, 118, 100, 0.1);
  color: var(--blue-900);
  border: 1px solid rgba(0, 118, 100, 0.2);
  box-shadow: none;
}

.news-feed-list .news-card .button.is-primary.is-light:hover {
  background: rgba(0, 118, 100, 0.16);
  border-color: rgba(0, 118, 100, 0.35);
}

/* News card images */
.news-card .card-image {
  overflow: hidden;
  background: var(--blue-50);
  padding: 0.75rem 1.2rem 0;
}

.news-card-single-img {
  max-width: 280px;
}

.news-card-single-img img {
  display: block;
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.news-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 4px;
  max-width: 400px;
}

.news-card-grid a,
.news-card-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.news-card-video-thumb {
  margin-top: 4px;
}

.news-card-video-thumb a {
  position: relative;
  display: block;
  overflow: hidden;
}

.news-card-video-thumb img {
  display: block;
  width: 100%;
}

.news-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  pointer-events: none;
  transition: background var(--trans);
}

.news-card-video-thumb a:hover .news-video-play {
  background: rgba(0, 0, 0, 0.75);
}

.news-video-hint {
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
  color: var(--blue-800);
}

.news-video-hint a {
  color: var(--blue-800);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-video-hint a:hover {
  color: var(--blue-700);
}

.section .title {
  color: var(--blue-900);
  margin-bottom: 1.25rem;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
}

.about-box {
  max-width: 950px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-sm);
}

.about-box .content,
.about-box .content * {
  color: var(--ink-900);
}

.about-box .content h1,
.about-box .content h2,
.about-box .content h3 {
  color: var(--blue-900);
  margin-top: 1.4rem;
}

.gallery-season {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.gallery-season:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.gallery-season .title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.albums-grid,
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
}

.album-tile,
.achievement-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  scroll-margin-top: 5rem;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--trans),
    box-shadow var(--trans),
    border-color var(--trans);
}

.achievement-tile {
  cursor: pointer;
}

.album-tile:hover,
.achievement-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 118, 100, 0.45);
}

.album-thumb,
.achievement-tile img {
  width: 100%;
  height: 100%;
}

.album-thumb img,
.achievement-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.album-tile:hover .album-thumb img,
.achievement-tile:hover img {
  transform: scale(1.06);
}

.album-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink-500);
  background: var(--blue-50);
}

.album-caption,
.achievement-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 72, 61, 0.9) 100%
  );
  color: var(--white);
  font-weight: 600;
  font-size: 0.93rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal.is-active {
  display: flex;
}

.modal-background {
  background: rgba(0, 72, 61, 0.72);
}

.modal-card {
  width: min(760px, calc(100vw - 2rem));
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 72, 61, 0.35);
}

.modal-card-head {
  border: 0;
  background: var(--blue-900);
}

.modal-card-title {
  color: var(--white);
}

.modal-card-body {
  background: var(--white);
}

.modal-card-body .content {
  color: var(--ink-700);
}

.post-text {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.post-text.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 12;
  overflow: hidden;
}

.fade-in {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media screen and (max-width: 1023px) {
  body.has-navbar-fixed-top {
    padding-top: 4rem;
  }

  .navbar-shell {
    min-height: 4rem;
  }

  .brand-item {
    padding: 0.35rem 0.5rem;
  }

  .brand-item img {
    width: 42px;
    height: 42px;
    max-height: none;
  }

  .brand-text {
    font-size: 0.95rem;
  }

  .navbar-menu {
    margin-top: 0.45rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
  }

  .navbar-start {
    margin-left: 0;
  }

  .nav-link {
    margin: 0.2rem 0.35rem;
  }
}

@media screen and (max-width: 768px) {
  .site-main.section {
    padding-top: 1.3rem;
  }

  .hero-banner {
    min-height: 62vh;
    background-position: 55% 30%;
  }

  .hero-inner {
    width: calc(100% - 2rem);
    margin: 2.2rem auto 0;
    padding: 0.5rem;
  }

  .hero-kicker {
    font-size: 0.62rem;
  }

  .hero-title {
    font-size: 1rem;
    margin-top: 0.4rem;
    margin-bottom: 0.35rem;
  }

  .hero-subtitle {
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .hero-actions {
    margin-top: 0.5rem;
    gap: 0.35rem;
  }

  .hero-actions .button {
    font-size: 0.7rem;
    padding: 0.35rem 0.55rem;
    height: auto;
  }

  .carousel-wrapper {
    position: relative;
    gap: 0;
    margin: 0 -0.75rem;
    padding: 0 2.5rem;
  }

  .carousel-track.home-link-grid {
    gap: 0.5rem;
  }

  .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    z-index: 10;
  }

  /* Keep mobile arrows fixed vertically on tap/hover states */
  .carousel-btn:hover,
  .carousel-btn:active,
  .carousel-btn:focus-visible {
    transform: translateY(-50%);
  }

  .carousel-btn-prev {
    left: 0.4rem;
  }

  .carousel-btn-next {
    right: 0.4rem;
  }

  .carousel-btn svg {
    width: 16px;
    height: 16px;
  }

  .carousel-viewport {
    padding: 0.5rem 0;
    margin: -0.5rem 0;
    touch-action: pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
  }

  .carousel-track {
    touch-action: pan-y pinch-zoom;
  }

  .home-link-card {
    flex: 0 0 100%;
  }

  .albums-grid,
  .achievements-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.85rem;
  }

  .modal-card {
    width: calc(100vw - 1.2rem);
  }
}

@media screen and (max-width: 430px) {
  .brand-text {
    display: none;
  }
}

@media print {
  .romashka-navbar,
  .back_pattern,
  .hero-banner {
    display: none;
  }

  body.has-navbar-fixed-top {
    padding-top: 0;
  }
}
