/*
 * Styles that used to sit in <style> blocks inside page content.
 *
 * Only administrators may save raw HTML since October 2026
 * (includes/users/html-policy.php), so the next save of these pages by an
 * editor would have dropped the blocks. They were moved here as they were,
 * with the page's paper colours on theme tokens so the pages follow the dark
 * theme; in the light theme they look as before.
 *
 * Classes made up for one design (kaf-news-card, master-table, …) are global:
 * the English copies of these pages lost the <style> blocks in translation,
 * and an editor can reuse a class on a new page. Rules on generic selectors
 * (details, .container, .card) are kept to the page they were written for.
 */

/* «Фінансова діяльність» (2326), its English copy (89642) and a draft copy
   (89542): document accordions, file links and the «go to» button. */
:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details[open] {
  border-color: var(--color-blue-200);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details summary {
  padding: 1.25rem 1.5rem;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-heading);
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: all 0.3s ease;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details summary::-webkit-details-marker {
  display: none;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details summary::after {
  content: "";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s ease;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details[open] summary {
  background-color: var(--color-blue-200);
  color: var(--color-white);
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details h4 {
  margin: 1.5rem 1.5rem 1rem 1.5rem;
  color: var(--color-text-primary);
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details ul {
  margin: 0 1.5rem 1.5rem 3.5rem;
  padding: 0;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details ul > li {
  margin-bottom: 0.75rem;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography a.file {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text-heading);
  font-weight: 500;
  line-height: 1.4;
  padding: 4px 0;
  transition: color 0.3s ease;
  background-color: var(--color-surface-card);
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography a.file::before {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23265aa6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='12' y1='18' x2='12' y2='12'/%3E%3Cpolyline points='9 15 12 18 15 15'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 2px;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography a.file:hover {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 899px) {
  :is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details ul {
    margin-left: 2.5rem;
  }
  :is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details summary {
    padding: 1rem 3rem 1rem 1rem;
  }
  :is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details summary::after {
    right: 1rem;
  }
  :is(.page-id-2326, .page-id-89642, .page-id-89542) .typography details.wp-block-details h4 {
    margin: 1rem 1rem 0.75rem 1rem;
  }
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography a.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background-color: var(--color-blue-200);
  color: var(--color-white) !important;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border: none;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography a.page-btn:hover {
  background-color: var(--color-blue-100);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(38, 90, 166, 0.2);
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography a.page-btn::after {
  content: "→";
  margin-left: 8px;
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

:is(.page-id-2326, .page-id-89642, .page-id-89542) .typography a.page-btn:hover::after {
  transform: translateX(4px);
}

/* Department of Business and Management: news cards (11489) and student
   research groups (73829) styled the same class a little differently. */
.kaf-news-grid {
  gap: 18px;
}

.kaf-news-card {
  background: var(--color-surface-card);
  border: 1px solid rgba(var(--color-ink--rgb), 0.12);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.page-id-11489 .kaf-news-card {
  margin-bottom: 32px;
  overflow: hidden;
}

.page-id-11489 .kaf-news-card .wp-block-media-text__media img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.page-id-11489 .kaf-news-card .wp-block-gallery img {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.page-id-73829 .kaf-news-card {
  padding: 14px;
}

.page-id-73829 .kaf-news-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.page-id-73829 .kaf-news-card h2,
.page-id-73829 .kaf-news-card h3 {
  margin-top: 0;
  line-height: 1.2;
  font-size: 20px;
}

/* A table of teachers' qualification courses (13336). */
.fixed-table-custom {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.fixed-table-custom th,
.fixed-table-custom td {
  border: 1px solid rgb(var(--color-ink--rgb));
  padding: 10px;
  vertical-align: top;
  word-wrap: break-word;
}

/* Full-width buttons on phones: «Спробуй себе в професії» (17236),
   «Майстер-класи» (19014), Career Forum (23420), the children's science
   conference (95879), «Безбар'єрність» (128095). */
@media (max-width: 600px) {
  .op-btn-group .wp-block-button,
  .op-btn-group > * {
    width: 100% !important;
    flex-basis: 100% !important;
  }

  .career-btn-group {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
  }
  .career-btn-group > * {
    width: 100% !important;
  }
  .career-btn-group a {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 781px) {
  .buttons-mobile-full {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .buttons-mobile-full > .wp-block-group {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
  .buttons-mobile-full a,
  .buttons-mobile-full .page-link-button,
  .buttons-mobile-full [class*="button"] {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
  }
}

/* The master-class table (19014): a navy header row over the page's paper. */
.master-table {
  --master-table-line: #ccc;
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0 35px;
  font-size: 16px;
}

html[data-theme="dark"] .master-table {
  --master-table-line: var(--color-border);
}

.master-table th,
.master-table td {
  border: 1px solid var(--master-table-line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.master-table th {
  background-color: var(--color-blue-200);
  color: var(--color-white);
  font-weight: 700;
}

.master-table tr:nth-child(even) {
  background-color: var(--color-bg-secondary);
}

/* Faculty cards on «Інформаційні ресурси та соцмережі» (41858, 87456). */
.faculty-grid-card {
  background: var(--color-surface-card);
  padding: 30px 20px !important;
  border: 1px solid rgba(var(--color-ink--rgb), 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.faculty-grid-card .wp-block-image {
  margin-bottom: 15px;
}

.faculty-grid-card h4 {
  color: var(--color-text-heading);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.4;
  flex-grow: 1;
}

/* The link to the event page in the news about the Educational Leadership
   Days forum (114141). */
.saytzakhoduButton {
  padding: 10px 30px;
  background: blue;
  color: #fff !important;
  margin-top: 50px;
  text-decoration: none;
}

/* Consultation schedule of the Department of Business and Management (72828).
   It was pasted as a whole HTML document whose styles reached past the
   content — the body's background and padding, any .container and .card on
   the page — so they are kept inside the content here, and the body rule,
   which restyled the theme's own page, is left out. */
.page-id-72828 .typography {
  --zp-blue: #1b3252;
  --zp-ink: #1b3252;
  --zp-muted: #666;
  --zp-line: #eee;
  --zp-note-bg: #f9f9f9;
  --zp-note-text: #555;
  --zp-card-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .page-id-72828 .typography {
  --zp-ink: var(--color-text-heading);
  --zp-muted: var(--color-text-secondary);
  --zp-line: var(--color-border);
  --zp-note-bg: var(--color-bg-secondary);
  --zp-note-text: var(--color-text-secondary);
}

.page-id-72828 .typography .container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-id-72828 .typography .card {
  background: var(--color-surface-card);
  border-radius: 4px;
  border-left: 4px solid var(--zp-blue);
  padding: 20px;
  box-shadow: var(--zp-card-shadow);
  display: flex;
  flex-direction: column;
}

.page-id-72828 .typography .teacher-name {
  color: var(--zp-ink);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.page-id-72828 .typography .teacher-rank {
  font-size: 0.8rem;
  color: var(--zp-muted);
  margin-bottom: 15px;
  min-height: 3em;
}

.page-id-72828 .typography .schedule-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--zp-line);
  font-size: 0.95rem;
}

.page-id-72828 .typography .day-name {
  font-weight: 600;
  color: var(--zp-ink);
}

.page-id-72828 .typography .time-val {
  font-weight: 500;
}

.page-id-72828 .typography .link-btn {
  display: block;
  background: var(--zp-blue);
  color: var(--color-white);
  text-decoration: none;
  text-align: center;
  padding: 10px;
  border-radius: 4px;
  font-weight: 600;
  margin-top: 15px;
  font-size: 0.9rem;
}

.page-id-72828 .typography .link-btn.meet {
  background: #188038;
}

.page-id-72828 .typography .zoom-info {
  background: var(--zp-note-bg);
  border: 1px solid var(--zp-line);
  padding: 8px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--zp-note-text);
  border-radius: 4px;
}

@media (max-width: 600px) {
  .page-id-72828 .typography .container {
    grid-template-columns: 1fr;
  }
}
