/*
Theme Name: AIFI Stage
Theme URI: https://aifi.net/
Author: AIFI
Author URI: https://aifi.net/
Description: Tema minimale e leggero per AIFI, ottimizzato per Gutenberg.
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aifi-stage
*/

:root {
  --aifi-bg: #002f48;
  --aifi-ink: #e9f4f9;
  --aifi-ink-muted: #c3d7e2;
  --aifi-accent: #2fb7ff;
  --aifi-card: #0a3c55;
  --aifi-line: rgba(255, 255, 255, 0.08);
  --aifi-divider: rgba(255, 255, 255, 0.45);
  --aifi-radius: 18px;
}

body.is-light {
  --aifi-bg: #f4f8fb;
  --aifi-ink: #082536;
  --aifi-ink-muted: #4c6b7c;
  --aifi-accent: #0077a8;
  --aifi-card: #ffffff;
  --aifi-line: rgba(8, 37, 54, 0.12);
  --aifi-divider: rgba(8, 37, 54, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--aifi-ink);
  background: radial-gradient(circle at 15% 10%, rgba(47, 183, 255, 0.25), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(21, 98, 130, 0.55), transparent 55%),
    linear-gradient(140deg, #002f48, #012537 70%);
  min-height: 100vh;
}

strong,
b {
  font-weight: 600;
}

body.is-light {
  background: radial-gradient(circle at 20% 15%, rgba(0, 119, 168, 0.12), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(0, 119, 168, 0.18), transparent 50%),
    linear-gradient(140deg, #ffffff, #edf4f8 70%);
}

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

a {
  color: var(--aifi-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--aifi-accent);
}

.content-wrap--post .post-content a {
  color: var(--aifi-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.content-wrap--post .post-content a:hover,
.content-wrap--post .post-content a:focus {
  color: var(--aifi-ink);
}

.content-wrap--post .post-related a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 2.5vw, 2.75rem);
}

h2 {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
}

h3 {
  font-size: clamp(1.3rem, 1.6vw, 1.8rem);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: transparent;
  border-bottom: 1px solid var(--aifi-divider);
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.site-logo__mark {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.site-logo__mark img {
  width: 120px;
  height: 120px;
  max-width: none;
  display: block;
  transform: translate(0, 2px);
}

.site-actions {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}

.site-time-machine {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--aifi-divider);
  color: var(--aifi-ink-muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.site-time-machine.is-active {
  opacity: 1;
  pointer-events: auto;
}

.site-time-machine__label {
  font-weight: 600;
}

.site-time-machine__year {
  font-weight: 700;
  color: var(--aifi-ink);
}

.site-time-machine__clear {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.site-time-machine__clear span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: var(--aifi-ink);
  border-radius: 999px;
}

.site-time-machine__clear span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.site-time-machine__clear span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.site-search-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid var(--aifi-divider);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.site-search-button span {
  width: 16px;
  height: 16px;
  border: 2px solid var(--aifi-ink);
  border-radius: 50%;
  position: relative;
}

.site-search-button span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: var(--aifi-ink);
  right: -6px;
  bottom: -2px;
  transform: rotate(45deg);
  border-radius: 999px;
}

.site-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid var(--aifi-divider);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

body.is-light .site-toggle {
  background: rgba(8, 37, 54, 0.06);
}

.site-toggle span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--aifi-ink);
  position: relative;
  overflow: hidden;
}

.site-toggle span::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--aifi-ink);
}

body.is-light .site-toggle span::after {
  right: -10px;
  background: var(--aifi-ink);
}

.site-menu-button {
  width: 46px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid var(--aifi-divider);
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  cursor: pointer;
}

.site-menu-button span {
  height: 2px;
  background: var(--aifi-ink);
  border-radius: 999px;
}

.site-user-button {
  width: 46px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid var(--aifi-divider);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.site-user-button svg {
  width: 22px;
  height: 22px;
  fill: var(--aifi-ink);
}

.site-user-button--active {
  background: rgba(47, 183, 255, 0.18);
  border-color: rgba(47, 183, 255, 0.6);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  position: relative;
}

.site-user-button--active svg {
  fill: var(--aifi-accent);
}

.site-user-button--active::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 2px var(--aifi-bg);
}

.site-nav {
  display: none;
}

.user-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 27;
}

.user-menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 25;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 28;
}

.search-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.search-panel {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  width: min(520px, calc(100% - 3rem));
  background: rgba(0, 48, 72, 0.95);
  border-radius: 24px;
  border: 1px solid var(--aifi-divider);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  padding: 1.5rem;
  display: grid;
  gap: 1.5rem;
}

body.is-light .search-panel {
  background: rgba(255, 255, 255, 0.95);
}

.search-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-panel__title {
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.search-panel__close {
  width: 40px;
  height: 36px;
  border-radius: 12px;
  border: 2px solid var(--aifi-divider);
  background: transparent;
  position: relative;
  cursor: pointer;
}

.search-panel__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--aifi-ink);
  border-radius: 999px;
}

.search-panel__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.search-panel__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.search-panel__form {
  display: grid;
  gap: 0.75rem;
}

.search-panel__form input[type="search"] {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--aifi-divider);
  background: transparent;
  color: var(--aifi-ink);
}

.search-panel__form button {
  justify-self: start;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--aifi-divider);
  background: rgba(255, 255, 255, 0.08);
  color: var(--aifi-ink);
  cursor: pointer;
}

.search-panel__filters {
  display: grid;
  gap: 0.75rem;
}

.search-panel__filters-title {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--aifi-ink-muted);
}

.search-panel__filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tm-badge--overlay.is-active {
  display: inline-flex;
}

.search-panel__year {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--aifi-divider);
  background: transparent;
  color: var(--aifi-ink);
  cursor: pointer;
}

.search-panel__year.is-active {
  background: #229696;
  border-color: #229696;
  color: #ffffff;
}
.menu-panel {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: min(420px, calc(100% - 3rem));
  height: calc(100vh - 3rem);
  background: rgba(0, 48, 72, 0.95);
  border-radius: 24px;
  border: 1px solid var(--aifi-divider);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

body.is-light .menu-panel {
  background: rgba(255, 255, 255, 0.95);
}

.menu-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.user-menu-panel {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: min(360px, calc(100% - 3rem));
  background: rgba(0, 48, 72, 0.95);
  border-radius: 24px;
  border: 1px solid var(--aifi-divider);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 31;
  display: flex;
  flex-direction: column;
}

body.is-light .user-menu-panel {
  background: rgba(255, 255, 255, 0.95);
}

.user-menu-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.menu-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--aifi-line);
}

.menu-panel__title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.menu-panel__close {
  width: 46px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid var(--aifi-divider);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.menu-panel__close span {
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--aifi-ink);
  border-radius: 999px;
}

.menu-panel__close span:first-child {
  transform: rotate(45deg);
}

.menu-panel__close span:last-child {
  transform: rotate(-45deg);
}

.menu-panel__content {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.menu-panel__content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.menu-panel__content .menu-item-has-children {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.menu-panel__content .menu-item-has-children > ul {
  grid-column: 1 / -1;
  display: none;
  padding-left: 1.25rem;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.menu-panel__content .menu-item-has-children.is-open > ul {
  display: grid;
}

.submenu-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid var(--aifi-divider);
  background: transparent;
  position: relative;
  cursor: pointer;
}

.submenu-toggle::before,
.submenu-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: var(--aifi-ink);
  transform: translate(-50%, -50%);
}

.submenu-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.menu-item-has-children.is-open .submenu-toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.menu-panel__content a {
  font-size: 1.6rem;
  font-weight: 600;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--aifi-line);
  display: block;
}

.aifi-auth__notice {
  background: rgba(47, 183, 255, 0.12);
  border: 1px solid var(--aifi-divider);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  color: var(--aifi-ink);
}

.aifi-auth__panel {
  background: var(--aifi-card);
  border-radius: 22px;
  padding: 2rem;
  border: 1px solid var(--aifi-line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
}

.aifi-auth__panel h2 {
  margin-bottom: 1.25rem;
}

.aifi-auth__form {
  display: grid;
  gap: 1rem;
}

.aifi-auth__form label,
.aifi-auth__form legend {
  font-weight: 600;
}

.aifi-auth__form label {
  display: grid;
  gap: 0.45rem;
}

.aifi-auth__form input[type="text"],
.aifi-auth__form input[type="email"],
.aifi-auth__form input[type="password"] {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--aifi-divider);
  background: transparent;
  color: var(--aifi-ink);
  width: 100%;
}

.aifi-auth__form fieldset {
  border: 1px solid var(--aifi-line);
  border-radius: 16px;
  padding: 1rem 1.25rem;
}

.aifi-auth__hint {
  font-size: 0.85rem;
  color: var(--aifi-ink-muted);
}

.aifi-auth__switch {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 600;
}

.aifi-auth__switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.aifi-auth__switch-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--aifi-divider);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  flex: 0 0 auto;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.aifi-auth__switch-track::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--aifi-ink);
  transform: translateY(-50%);
  transition: transform 0.2s ease, background 0.2s ease;
}

.aifi-auth__switch input:checked + .aifi-auth__switch-track {
  background: rgba(47, 183, 255, 0.35);
  border-color: rgba(47, 183, 255, 0.6);
}

.aifi-auth__switch input:checked + .aifi-auth__switch-track::after {
  transform: translate(20px, -50%);
  background: #e9f4f9;
}

.aifi-auth__switch-label {
  color: var(--aifi-ink-muted);
}
.aifi-auth__form button {
  justify-self: start;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--aifi-divider);
  background: rgba(255, 255, 255, 0.08);
  color: var(--aifi-ink);
  cursor: pointer;
  font-weight: 600;
}

.aifi-auth__link {
  color: var(--aifi-ink-muted);
  font-size: 0.95rem;
}



.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4.5rem;
}

.content-wrap {
  background: var(--aifi-card);
  border-radius: var(--aifi-radius);
  padding: 2.5rem;
  border: 1px solid var(--aifi-line);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.content-wrap--post {
  display: grid;
  gap: 2rem;
}

.content-wrap--home {
  display: grid;
  gap: 3rem;
}

.content-wrap--archive {
  display: grid;
  gap: 2.5rem;
}

.content-wrap--parent {
  display: grid;
  gap: 2.5rem;
}

.page-header-card {
  padding: 1.5rem 1.75rem;
  border-radius: 18px;
  border: 1px solid var(--aifi-line);
  background: rgba(0, 47, 72, 0.25);
  display: grid;
  gap: 0.9rem;
}

.page-header-card h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.page-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--aifi-ink-muted);
  border-bottom: 1px solid var(--aifi-line);
  padding-bottom: 0.9rem;
}

.page-breadcrumbs a {
  color: var(--aifi-ink-muted);
}

.page-content {
  line-height: 1.8;
  margin-top: 60px;
  padding: 2rem 2.2rem;
  border-radius: 18px;
  border: 1px solid var(--aifi-line);
  background: var(--aifi-card);
}

.page-content a {
  color: var(--aifi-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content h1 a,
.page-content h2 a,
.page-content h3 a,
.page-content h4 a,
.page-content h5 a,
.page-content h6 a {
  text-decoration: none;
}

.page-content a:hover,
.page-content a:focus {
  color: var(--aifi-ink);
}

.aifi-query-card .wp-block-post-template {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aifi-query-card__item {
  border-radius: 18px;
  border: 1px solid var(--aifi-line);
  background: rgba(0, 47, 72, 0.25);
  padding: 0;
  overflow: hidden;
  display: grid;
}

.aifi-query-card__media {
  height: 240px;
  overflow: hidden;
}

.aifi-query-card__body {
  padding: 1.25rem;
  display: grid;
  gap: 0.6rem;
}

.aifi-query-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.aifi-query-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.aifi-query-card__image {
  margin: 0;
  line-height: 0;
  display: block;
  padding: 0;
}

.aifi-query-card .wp-block-post-featured-image {
  margin: 0;
}

.aifi-query-card .wp-block-post-featured-image__wrapper,
.aifi-query-card .wp-block-post-featured-image a {
  margin: 0;
  display: block;
  line-height: 0;
}

.aifi-query-card .wp-block-post-featured-image img {
  display: block;
  vertical-align: top;
}

.aifi-query-card__excerpt {
  margin: 0;
  color: var(--aifi-ink-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .aifi-query-card .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aifi-query-card__media {
    height: 200px;
  }

  .aifi-query-card__excerpt {
    display: none;
  }
}

@media (max-width: 640px) {
  .aifi-query-card .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}
.page-block {
  margin-bottom: 20px;
}

.page-single > :last-child {
  margin-bottom: 0;
}

.page-info-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.page-info-card {
  border-radius: 18px;
  border: 1px solid var(--aifi-line);
  background: rgba(0, 47, 72, 0.25);
  overflow: hidden;
  min-height: 220px;
}

.page-info-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.page-info-placeholder {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  background-image: url("/logo-aifi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40%;
  opacity: 0.5;
}

.page-info-card--meta {
  padding: 1.4rem 1.6rem;
  display: grid;
  gap: 1.4rem;
  align-content: start;
}

.page-info-meta {
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--aifi-ink-muted);
}

.page-info-quote {
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--aifi-divider);
  color: var(--aifi-ink);
  font-style: italic;
  line-height: 1.6;
}

.page-tree {
  display: grid;
  gap: 0.6rem;
}

.page-tree__label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--aifi-ink-muted);
}

.page-tree__parent {
  font-weight: 600;
  color: var(--aifi-ink);
}

.page-tree__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.page-tree__list a {
  color: var(--aifi-ink-muted);
}

@media (max-width: 860px) {
  .page-info-grid {
    grid-template-columns: 1fr;
  }
}
.parent-bar {
  padding: 1.5rem 1.75rem;
  border-radius: 18px;
  border: 1px solid var(--aifi-line);
  background: rgba(0, 47, 72, 0.25);
}

.parent-bar h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.parent-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.parent-split__media,
.parent-split__content {
  border-radius: 18px;
  border: 1px solid var(--aifi-line);
  background: rgba(0, 47, 72, 0.25);
  overflow: hidden;
}

.parent-split__media {
  min-height: 260px;
}

.parent-split__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.parent-split__placeholder {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  background-image: url("/logo-aifi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40%;
  opacity: 0.5;
}

.parent-split__content {
  padding: 1.5rem 1.75rem;
  line-height: 1.8;
}

.parent-date {
  font-size: 0.9rem;
  color: var(--aifi-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.parent-index {
  display: grid;
  gap: 1.5rem;
}

.parent-index__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.parent-index__head span {
  color: var(--aifi-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.parent-index__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 1.6rem;
}

.parent-card {
  border-radius: 22px;
  border: 1px solid var(--aifi-line);
  overflow: hidden;
  background: rgba(0, 47, 72, 0.35);
  transition: transform 0.2s ease;
  max-width: 560px;
  justify-self: center;
}

body.is-light .parent-card {
  background: rgba(8, 37, 54, 0.04);
}

.parent-card:hover {
  transform: translateY(-4px);
}

.parent-card a {
  display: block;
  color: inherit;
}

.parent-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.parent-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.parent-card__placeholder {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  background-image: url("/logo-aifi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50%;
  opacity: 0.5;
}

.parent-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1.4rem 1.6rem;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
}

.parent-card__overlay h3 {
  margin: 0;
  font-size: 1.2rem;
}

@media (max-width: 860px) {
  .parent-split {
    grid-template-columns: 1fr;
  }

  .parent-index__grid {
    grid-template-columns: 1fr;
  }
}

.parent-content {
  line-height: 1.8;
}

.archive-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.archive-hero__desc {
  color: var(--aifi-ink-muted);
  max-width: 720px;
}

.tm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--aifi-divider);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--aifi-ink);
  margin-bottom: 0.9rem;
}

body.is-light .tm-badge {
  background: rgba(8, 37, 54, 0.06);
}

.tm-badge--overlay {
  margin-bottom: 0;
  display: none;
}

.tm-badge__year {
  font-weight: 700;
}

.tm-badge__clear {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.tm-badge__clear span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

.tm-badge__clear span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.tm-badge__clear span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}

.archive-card {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--aifi-line);
  background: rgba(0, 47, 72, 0.35);
  display: grid;
  grid-template-rows: auto 1fr;
}

body.is-light .archive-card {
  background: rgba(8, 37, 54, 0.04);
}

.archive-card__media {
  position: relative;
  display: block;
  height: 200px;
  overflow: hidden;
}

.archive-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.archive-card__placeholder {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  background-image: url("/logo-aifi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50%;
  opacity: 0.5;
}

.archive-card__date {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

body.is-light .archive-card__date {
  background: rgba(8, 37, 54, 0.7);
}

.archive-card__body {
  padding: 1.2rem 1.4rem 1.6rem;
}

.archive-card__body h2 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
}

.archive-card__body p {
  margin: 0;
  color: var(--aifi-ink-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.archive-pagination {
  display: flex;
  justify-content: center;
}

.archive-pagination .page-numbers {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.archive-pagination .page-numbers a,
.archive-pagination .page-numbers span {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--aifi-line);
  color: var(--aifi-ink);
}

.archive-pagination .page-numbers .current {
  background: rgba(255, 255, 255, 0.1);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: center;
}

.home-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--aifi-ink-muted);
  text-align: left;
}

.home-hero__title {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin: 0.6rem 0 1rem;
}

.home-hero__subtitle {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--aifi-ink-muted);
  margin: 0 0 1.8rem;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.home-btn {
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
}

.home-btn--primary {
  border-color: var(--aifi-divider);
  color: var(--aifi-ink);
}

.home-btn--ghost {
  border-color: var(--aifi-divider);
  color: var(--aifi-ink);
}

.home-hero__visual {
  display: grid;
  gap: 1.5rem;
}

.home-hero__card {
  border-radius: 22px;
  padding: 2rem;
  background: rgba(0, 47, 72, 0.35);
  border: 1px solid var(--aifi-line);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.18);
}

body.is-light .home-hero__card {
  background: rgba(8, 37, 54, 0.04);
}

.home-hero__card h2 {
  margin: 0.75rem 0 1rem;
  font-size: 1.6rem;
}

.home-hero__card p {
  margin: 0;
  color: var(--aifi-ink-muted);
}

.home-hero__tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--aifi-ink-muted);
}

.home-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.home-highlight {
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--aifi-line);
  background: rgba(255, 255, 255, 0.04);
}

body.is-light .home-highlight {
  background: rgba(8, 37, 54, 0.04);
}

.home-highlight span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--aifi-ink-muted);
}

.home-highlight h3 {
  margin: 0.7rem 0 0.5rem;
  font-size: 1.3rem;
}

.home-highlight p {
  margin: 0;
  color: var(--aifi-ink-muted);
}

.home-gallery {
  position: relative;
  min-height: 360px;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 24px;
}

.home-gallery__track {
  position: relative;
  width: min(100%, 980px);
  min-height: 320px;
  height: 540px;
}

.home-gallery__item {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 360px;
  border-radius: 22px;
  overflow: hidden;
  background: #0a3c55;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.6s ease, opacity 0.4s ease;
  cursor: pointer;
  transform-origin: top center;
}

.home-gallery__item a {
  display: block;
  position: relative;
  height: 100%;
  color: #ffffff;
}

.home-gallery__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}

.home-gallery__placeholder {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  background-image: url("/logo-aifi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50%;
  padding-bottom: 70%;
}

.home-gallery__title {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  padding: 1.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
}
.home-gallery__item.pos-1 {
  z-index: 6;
  transform: translate(25%, 0) scale(1.5);
}

.home-gallery__item.pos-2 {
  z-index: 5;
  transform: translate(65%, 0) scale(0.94);
}

.home-gallery__item.pos-3 {
  z-index: 4;
  transform: translate(75%, 0) scale(0.9);
}

.home-gallery__item.pos-4 {
  z-index: 3;
  transform: translate(85%, 0) scale(0.86);
}

.home-gallery__item.pos-5 {
  z-index: 2;
  transform: translate(95%, 0) scale(0.82);
  opacity: 0.85;
}

.home-gallery__item.pos-6 {
  z-index: 1;
  transform: translate(105%, 0) scale(0.78);
  opacity: 0.75;
}

.home-gallery__controls {
  display: none;
  gap: 0.75rem;
  margin-top: 1rem;
}

.home-gallery__control {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid var(--aifi-divider);
  background: transparent;
  color: var(--aifi-ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.home-latest__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-latest__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.home-post-card {
  border-radius: 20px;
  border: 1px solid var(--aifi-line);
  overflow: hidden;
  background: rgba(0, 47, 72, 0.35);
}

body.is-light .home-post-card {
  background: rgba(8, 37, 54, 0.04);
}

.home-post-card__media {
  height: 180px;
  overflow: hidden;
}

.home-post-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-post-card__placeholder {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  background-image: url("/logo-aifi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50%;
  opacity: 0.5;
}

.home-post-card__body {
  padding: 1.25rem 1.4rem 1.6rem;
}

.home-post-card__body h3 {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  line-height: 1.3;
}

.home-post-card__body p {
  margin: 0;
  color: var(--aifi-ink-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.post-hero {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 2.5rem;
  align-items: center;
}

.post-hero__media-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-hero__media {
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  background: rgba(0, 47, 72, 0.45);
  border: 1px solid var(--aifi-line);
  border-bottom: none;
  position: relative;
}

.post-hero__media--placeholder {
  aspect-ratio: 1 / 1;
}

.post-hero__image {
  width: 100%;
  height: auto;
  display: block;
}

.post-hero__placeholder {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  background-image: url("/logo-aifi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 55%;
  opacity: 0.5;
}

.post-hero__spacer {
  height: 40px;
  background: rgba(0, 47, 72, 0.3);
  border: 1px solid var(--aifi-line);
  border-top: none;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.post-title {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
}

.post-excerpt {
  margin: 0 0 1.5rem;
  color: var(--aifi-ink-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.post-summary {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem 1.75rem;
  border-radius: 18px;
  border: 1px solid var(--aifi-line);
  background: rgba(255, 255, 255, 0.05);
}

body.is-light .post-summary {
  background: rgba(8, 37, 54, 0.04);
}

.post-summary__label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--aifi-ink-muted);
}

.post-summary p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--aifi-divider);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 600;
}

.post-badge:hover,
.post-badge:focus {
  border-color: #ffffff;
  color: #ffffff;
}

.post-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--aifi-ink-muted);
  border-top: 1px solid var(--aifi-line);
  padding-top: 1.5rem;
}

.post-breadcrumbs a {
  color: var(--aifi-ink-muted);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--aifi-ink-muted);
}

.post-content {
  line-height: 1.8;
}

.post-share {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--aifi-line);
}

.post-share__label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--aifi-ink-muted);
}

.post-share__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-share__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--aifi-divider);
  background: transparent;
  color: var(--aifi-ink);
  font-size: 0.9rem;
  cursor: pointer;
}

.post-share__button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.post-share__button:hover,
.post-share__button:focus {
  background: rgba(34, 150, 150, 0.2);
  border-color: #229696;
  color: #ffffff;
}

.post-share__button:focus {
  outline: none;
}

.post-share__button:focus-visible {
  box-shadow: 0 0 0 2px rgba(34, 150, 150, 0.5);
}

.post-share__feedback {
  font-size: 0.85rem;
  color: var(--aifi-ink-muted);
  min-height: 1em;
}

.post-related {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--aifi-line);
  display: grid;
  gap: 1.5rem;
}

.post-related h2 {
  margin: 0;
  font-size: 1.4rem;
}

.post-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.post-related__card a {
  display: block;
  padding: 1.2rem 1.4rem;
  border-radius: 18px;
  border: 1px solid var(--aifi-line);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
}

body.is-light .post-related__card a {
  background: rgba(8, 37, 54, 0.04);
}

.post-related__card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.post-related__card p {
  margin: 0;
  color: var(--aifi-ink-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.site-footer {
  border-top: 1px solid var(--aifi-divider);
  padding: 2.5rem 1.5rem 3rem;
  background: transparent;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  color: var(--aifi-ink-muted);
}

.footer-title {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  margin-bottom: 0.75rem;
  color: var(--aifi-ink);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-legal {
  font-size: 0.85rem;
  line-height: 1.6;
}


.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1.5rem;
  top: 1.5rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  color: #002f48;
  border-radius: 6px;
  z-index: 999;
}

@media (max-width: 860px) {
  .site-header__inner {
    align-items: center;
    flex-wrap: wrap;
  }

  .site-actions {
    margin-left: auto;
  }

  .site-time-machine {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .site-main {
    padding: 2.5rem 1.25rem 3.5rem;
  }

  .content-wrap {
    padding: 2rem 1.5rem;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-gallery__track {
    width: 100%;
    min-height: 240px;
    height: 240px;
  }

  .home-gallery__item {
    width: 100%;
    height: 240px;
  }

  .home-gallery__item.pos-1 {
    transform: translate(0, 0) scale(1);
  }

  .home-gallery__item.pos-2,
  .home-gallery__item.pos-3,
  .home-gallery__item.pos-4,
  .home-gallery__item.pos-5,
  .home-gallery__item.pos-6 {
    transform: translate(0, 0) scale(1);
    opacity: 0;
    pointer-events: none;
  }

  .home-gallery {
    margin-bottom: 8px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .home-gallery__controls {
    display: flex;
    justify-content: center;
  }

  .home-latest__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-hero {
    grid-template-columns: 1fr;
  }

  .post-hero__media {
    width: 100%;
  }

  .site-logo__mark {
    width: 58px;
    height: 58px;
  }

  .site-logo__mark img {
    width: 84px;
    height: 84px;
    max-width: none;
    transform: translate(0, 2px);
  }
}
