/*
Theme Name: Kassa Ufab
Theme URI: https://kassa.ufab.ru
Author: kassa.ufab
Description: Страница оповещения акционеров АО «Башторгтехника» — актуальное сообщение, вкладки архива и пагинация.
Version: 1.0.0
Text Domain: kassa-ufab
*/

:root {
  --bg: #eef1f4;
  --bg-accent: #dfe6ec;
  --surface: #f8fafb;
  --ink: #1a242e;
  --muted: #5a6876;
  --line: #c5d0da;
  --accent: #1f5c4d;
  --accent-soft: #e4f0ec;
  --max: 48rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Manrope, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #d7e8e2 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #d5dde8 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-accent) 100%);
  line-height: 1.55;
}

.page {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 2.5rem 0 3.5rem;
}

.site-header {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
  animation: rise 0.55s ease both;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-header h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  margin-top: 0.9rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.02rem;
}

main {
  display: grid;
  gap: 1.75rem;
  padding-top: 1.75rem;
}

.site-section {
  animation: rise 0.6s ease both;
}

.site-section:nth-of-type(2) { animation-delay: 0.08s; }
.site-section:nth-of-type(3) { animation-delay: 0.14s; }
.site-section:nth-of-type(4) { animation-delay: 0.2s; }

.site-section h2 {
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

#archive-title {
  scroll-margin-top: 28px;
}

.current {
  padding: 1.15rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}

.current-label {
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.current h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.55rem;
}

.current .current-body {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.current .current-body p {
  margin-bottom: 0.65rem;
}

.current .current-body a {
  color: var(--accent);
  font-weight: 600;
}

.current .notice-meta {
  display: block;
  margin-top: 0.75rem;
}

.layout {
  display: grid;
  gap: 1rem;
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.3rem;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--line);
}

@media (min-width: 640px) {
  .tabs {
    flex-direction: row;
    flex-wrap: nowrap;
  }
}

.tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 0.75rem 1rem;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

@media (min-width: 640px) {
  .tab {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
}

.tab:hover,
.tab:focus-visible {
  color: var(--accent);
  outline: none;
}

.tab[aria-selected="true"],
.tab.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--accent);
}

.panels {
  min-width: 0;
  position: relative;
}

.panel {
  animation: panel-in 0.35s ease both;
}

.panel[hidden] {
  display: none;
}

.notice-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.notice-list li {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  animation: item-in 0.4s ease both;
}

.notice-list li:nth-child(1) { animation-delay: 0.02s; }
.notice-list li:nth-child(2) { animation-delay: 0.06s; }
.notice-list li:nth-child(3) { animation-delay: 0.1s; }
.notice-list li:nth-child(4) { animation-delay: 0.14s; }
.notice-list li:nth-child(5) { animation-delay: 0.18s; }

.notice-list h3 {
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.notice-list h3 a {
  color: inherit;
  text-decoration: none;
}

.notice-list h3 a:hover,
.notice-list h3 a:focus-visible {
  color: var(--accent);
  outline: none;
}

.notice-list .excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.notice-list a.file-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
}

.notice-list a.file-link:hover,
.notice-list a.file-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  animation: item-in 0.35s ease both;
  animation-delay: 0.12s;
}

.pagination-info {
  width: 100%;
  margin-bottom: 0.15rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.page-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.65rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.page-btn:hover:not(.is-disabled):not(:disabled):not([aria-current="page"]),
.page-btn:focus-visible:not([aria-current="page"]) {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.page-btn:hover:not(.is-disabled):not(:disabled) {
  transform: translateY(-1px);
}

.page-btn[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page-btn[aria-current="page"]:hover,
.page-btn[aria-current="page"]:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  outline: none;
}

.page-btn.is-disabled,
.page-btn:disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  transform: none;
}

.notice-meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.empty {
  padding: 1.15rem 1.2rem;
  background: var(--accent-soft);
  border: 1px dashed #9bb8ae;
  color: var(--muted);
  font-size: 0.95rem;
}

.hint {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.facts {
  display: grid;
  gap: 0.55rem 1.25rem;
}

@media (min-width: 560px) {
  .facts {
    grid-template-columns: 9.5rem 1fr;
  }
}

.facts dt {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.facts dd {
  font-weight: 500;
}

.contacts {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
}

.contacts a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.contacts a:hover,
.contacts a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.site-footer {
  margin-top: 2.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  animation: rise 0.65s ease both;
  animation-delay: 0.18s;
}

.single-article {
  padding: 1.15rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}

.single-article h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  margin-bottom: 0.75rem;
}

.single-article .content {
  overflow-wrap: anywhere;
}

.single-article .content p {
  margin-bottom: 0.75rem;
}

.single-article .content a {
  color: var(--accent);
  font-weight: 600;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes item-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-section,
  .site-footer,
  .panel,
  .notice-list li,
  .pagination {
    animation: none;
  }

  .tab,
  .page-btn {
    transition: none;
  }

  .page-btn:hover:not(.is-disabled) {
    transform: none;
  }
}
