/* =========================
   SECTION BACKGROUNDS
========================= */

.bg-secondary {
  background: var(--color-secondary);
}

.bg-primary {
  background: var(--color-primary);
  color: var(--color-bg);
}

/* =========================
   BUTTON SYSTEM
========================= */

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

/* PRIMARY */
.btn-primary {
  background: var(--text-main);
  color: var(--color-bg);
}

/* hover elegante */
.btn-primary:hover {
  opacity: 0.85;
  color: var(--color-bg);
}

/* =========================
   HEADER
========================= */

.tos-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);

  padding: 1rem 0;
  transition: box-shadow 0.2s ease;
}

.tos-header.is-scrolled {
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tos-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================
   LOGO
========================= */

.tos-logo img {
  max-height: 2.5rem;
  height: auto;
}

/* =========================
   MENU DESKTOP
========================= */

.tos-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tos-menu li {
  list-style: none;
}

.tos-menu a {
  font-size: 1rem;
  font-weight:600;
  color: var(--text-main);
  text-decoration: none;
}

.tos-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.tos-header-search {
  flex-shrink: 0;
}

.tos-header-search__inner {
  position: relative;
  width: min(18rem, 28vw);
}

.tos-header-search__input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.4;
}

.tos-header-search__input::placeholder {
  color: var(--text-light);
  opacity: 1;
}

.tos-header-search__input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.tos-header-search__button {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
}

.tos-header-search__button svg {
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
}

.tos-header-cta {
  flex-shrink: 0;
}

/* =========================
   TOGGLE BUTTON
========================= */

.tos-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.tos-menu-toggle svg {
  stroke: var(--text-main);
  stroke-width: 1.5;
  fill: none;
}

/* hide close icon */
.icon-close {
  display: none;
}

/* active state */
.tos-menu-toggle.active .icon-menu {
  display: none;
}

.tos-menu-toggle.active .icon-close {
  display: block;
}

/* =========================
   MOBILE MENU
========================= */

@media (max-width: 62rem) {

  .tos-menu-toggle {
    display: block;
  }

  .tos-nav.active .tos-menu li {
    opacity: 1;
  }
  
  .tos-nav .tos-menu li {
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  
  .tos-nav.active .tos-menu li {
    opacity: 1;
  }

  .tos-nav {
    position: fixed;
    inset: 0;
    background: var(--color-bg);

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    opacity: 0;
    pointer-events: none;

    padding: 6rem 2rem 2rem;

    transition: opacity 0.25s ease;
  }

  .tos-nav.active {
    opacity: 1;
    pointer-events: auto;
  }

  .tos-header-search {
    width: 100%;
  }

  .tos-header-search__inner {
    width: 100%;
  }

  .tos-menu {
    flex-direction: column;
    gap: 2rem;
  }

  .tos-header-cta {
    margin-top: 0.5rem;
  }

  .tos-menu a {
    font-size: 1.2rem;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  .tos-menu-toggle {
    position: relative;
    z-index: 1001;
  }

}

/* =========================
   MENU ICON SWITCH
========================= */

/* stato base */
.icon-menu {
  display: block;
}

.icon-close {
  display: none;
}

/* stato attivo */
.tos-menu-toggle.active .icon-menu {
  display: none;
}

.tos-menu-toggle.active .icon-close {
  display: block;
}

/* =========================
   BODY LOCK
========================= */

body.menu-open {
  overflow: hidden;
}

/* =========================
   LOGO
========================= */

.tos-logo {
  display: flex;
  align-items: center;
}

/* LINK */
.tos-logo-link {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
}

/* LIMITLESS */
.tos-logo-strong {
  font-weight: 700;
}

/* WORKSPACE */
.tos-logo-light {
  font-weight: 400;
  opacity: 0.65;
}

/* SVG / IMG LOGO */
.custom-logo {
  max-height: 2.5rem;
  height: auto;
  width: auto;
}

/* =========================
   SHARED TYPOGRAPHY / UI
========================= */

/* TOS KICKER META (CATEGORY + AUTHOR) */

.tos-kicker,
.tos-category,
.tos-card-category,
.tos-hero-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 0.625rem;
  letter-spacing: 0.04em;
}

/* TOS KICKER META (INLINE + DOT) */

.tos-kicker--meta {
  display: flex;
  align-items: center;
}

/* container elementi */
.tos-kicker__left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* singolo item */
.tos-kicker__item {
  display: inline-flex;
  align-items: center;
}

/* aggiunge spazio tra gli elementi */
.tos-kicker__item + .tos-kicker__item {
  margin-left: 0.3rem;
  padding-left: 0.8rem;
  position: relative;
}

/* DOT perfettamente centrato */
.tos-kicker__item + .tos-kicker__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  background: currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.6;
}

/* Author */
.tos-author {
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  opacity: 0.75;
  white-space: nowrap;
}

.tos-author a {
  color: inherit;
  text-decoration: none;
}

/* Date */
.tos-date {
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 400;
  text-transform: none;
}

.tos-meta,
.tos-hero-meta,
.tos-card-meta {
  font-size: 0.875rem;
  color: var(--text-light);
}

.tos-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--color-border);
}

.tos-section-title {
  border-bottom: 1px solid var(--color-primary);
  padding-bottom:0.5rem;
  margin-bottom:1.5rem;
}

.tos-section-title :is(h1, h2, h3, h4, h5, h6) {
  font-size: 1.4rem;
  line-height:1.5;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  font-weight: 500;
}

.tos-section-link {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* =========================
   BLOCKQUOTE (EDITORIAL)
========================= */

.wp-block-quote {
  margin: 1rem 0;
  padding-left: 1.25rem;

  border-left: 3px solid var(--color-primary);
}

.wp-block-quote p {
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text-main);
}

/* =========================
   LISTS (EDITORIAL SYSTEM)
========================= */

/* BASE */
.wp-block-list {
  margin: 0.5rem 0;
  padding-left: 0;
}

/* LIST ITEMS */
.wp-block-list li {
  position: relative;
  padding-left: 0.6rem;
  margin-bottom: 0.6rem;
  line-height: 1.6;
  color: var(--text-light);
}

/* =========================
   UNORDERED LIST (CUSTOM BULLET)
========================= */

ul.wp-block-list {
  list-style: none;
  padding-left: 1.5rem;
}

ul.wp-block-list li::before {
  content: "-";
  position: absolute;
  left: -0.85rem;
  top: 0;
  color: var(--text-light);
}

/* =========================
   ORDERED LIST (NUMBERS)
========================= */

ol.wp-block-list {
  list-style: decimal;
  padding-left: 1.5rem;
}

ol.wp-block-list li::before {
  content: none;
}

/* =========================
   TABLE
========================= */

.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin:1rem 0rem;
}

/* TABLE BASE */
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* forza scroll su mobile */
  border-bottom: 1px solid var(--color-border);
}

/* CELLS */
.wp-block-table th,
.wp-block-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
/* REMOVE LAST ROW BORDER */
.wp-block-table tr:last-child td {
  border-bottom: none;
}
.wp-block-table td:not([style*="border"]),
.wp-block-table th:not([style*="border"]) {
  border-color: var(--color-border);
}

/* HEADER */
.wp-block-table th {
  font-weight: 600;
  color: var(--text-main);
}

/* ROW TEXT */
.wp-block-table td {
  color: var(--text-light);
}

/* =========================
   TITLE HOVER (EDITORIAL)
========================= */

/* HERO */
.tos-home-hero__title a:hover {
  text-decoration: none;
  color: var(--color-primary);
}

/* CARD */
.tos-card-title a:hover,
.tos-card-post__title a:hover {
  text-decoration: none;
  color: var(--color-primary);
}

/* =========================
   LINK UNDERLINE SYSTEM
========================= */

.tos-menu a,
.tos-sidebar-listing__title a,
.tos-footer-menu a,
.tos-section-link,
.tos-hover-underline {
  position: relative;
  text-decoration: none;
}

/*.tos-menu a::after,
.tos-sidebar-listing__title a::after,
.tos-footer-menu a::after,
.tos-section-link::after,
.tos-hover-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}
  
.tos-menu a:hover::after,
.tos-sidebar-listing__title a:hover::after,
.tos-footer-menu a:hover::after,
.tos-section-link:hover::after,
.tos-hover-underline:hover::after  {
  transform: scaleX(1);
}*/

/* ========================================
   TOS UNDERLINE SYSTEM (MULTI-LINE SAFE)
======================================== */

/* Base */
.tos-menu a,
.tos-sidebar-listing__title a,
.tos-footer-menu a,
.tos-section-link,
.tos-hover-underline {

  position: relative;
  text-decoration: none;

  /* underline system */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 calc(100% - 0.1rem);

  transition: background-size 0.22s ease;
}

/* Hover */
.tos-menu a:hover,
.tos-sidebar-listing__title a:hover,
.tos-footer-menu a:hover,
.tos-section-link:hover,
.tos-hover-underline:hover {
  background-size: 100% 1px;
}

/* =========================
   TITLE HOVER
========================= */

.tos-home-hero__title a,
.tos-card-title a,
.tos-card-post__title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tos-home-hero__title a:hover,
.tos-card-title a:hover,
.tos-card-post__title a:hover {
  color: var(--color-primary);
}

/* =========================
   HERO SECTION
========================= */

.tos-home-hero,
.tos-archive-hero {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 0rem;
}

/* IMAGE FULL WIDTH */
.tos-home-hero__media,
.tos-archive-hero__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.tos-home-hero__media img,
.tos-archive-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CONTENT */
.tos-home-hero__title,
.tos-archive-hero__title,
.tos-single-hero__title,
.tos-page-hero__title {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.tos-home-hero__subtitle,
.tos-archive-hero__subtitle,
.tos-single-hero__subtitle {
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1rem;
}

/* REMOVE SIDE-BY-SIDE */
@media (min-width: 56.25rem) {
  .tos-home-hero,
  .tos-archive-hero {
    grid-template-columns: 1fr;
  }
}

/* =========================
   STRIP
========================= */

.tos-latest-strip,
.tos-post-strip {
  display:inline-block;
  margin: 2.5rem 0;
}

.tos-strip-grid,
.tos-post-strip__grid,
.tos-strip {
  display: grid;
  gap: 1.25rem;
}

.tos-strip-card h4,
.tos-strip-card__title,
.tos-strip-item h4,
.tos-popular-topics__card-title {
  font-size: 1.3rem;
  line-height: 1.3;
  margin-top: 0rem;
}

/* CATEGORY */
.tos-post-strip .tos-kicker,
.tos-popular-topics__card .tos-kicker {
  line-height: 1.2;
  padding-top: 0.875rem;
  margin-bottom: 0rem;
}

/* STRIP IMAGE SYSTEM */
.tos-strip-card__image,
.tos-popular-topics__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.tos-strip-card__image img,
.tos-popular-topics__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 48rem) {
  .tos-strip-grid,
  .tos-post-strip__grid,
  .tos-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 68.75rem) {
  .tos-strip-grid,
  .tos-post-strip__grid,
  .tos-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================
   CARD
========================= */

/* CARD IMAGE SYSTEM */
.tos-card-image,
.tos-card-post__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.tos-card-image img,
.tos-card-post__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tos-card,
.tos-card-post,
.tos-strip-card,
.tos-popular-topics__card {
  display: flex;
  flex-direction: column;
}

.tos-card-title,
.tos-card-post__title {
  font-size: 1.1rem;
  line-height: 1.3;
}

/* =========================
   SIDEBAR LISTING (EDITORIAL)
========================= */

.tos-sidebar-listing {
  border-left: none;
  padding-left: 0;
}

/* TITLE */
.tos-sidebar-listing .tos-sidebar-block__title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-primary);
}

/* ITEMS */
.tos-sidebar-listing__items {
  display: flex;
  flex-direction: column;
}

/* SINGLE ITEM */
.tos-sidebar-listing__item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

/* INDEX NUMBER */
.tos-sidebar-listing__index {
  font-size: 0.85rem;
  font-weight:600;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

/* TITLE */
.tos-sidebar-listing__title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight:400;
  letter-spacing: -0.01em;
}

.tos-sidebar-listing__title a {
  color: var(--text-main);
  text-decoration: none;
}

.tos-sidebar-about {
  margin-top: 3.75rem;
  padding: 1.5rem;
  background: var(--color-secondary);
  border-radius: 0.5rem;
}

.tos-sidebar-about__logo-wrap {
  margin-bottom: 1rem;
}

.tos-sidebar-about__logo {
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 50%;
  background: var(--color-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tos-sidebar-about__logo span {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.tos-sidebar-about__text {
  margin-top: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-light);
  text-align: left;
}

/* =========================
   SECTIONS
========================= */

.tos-home-section,
.tos-grid-section,
.tos-home-grid-section {
  margin-bottom: 6.25rem;
}

/* =========================
   FOOTER (DARK)
========================= */

.tos-footer {
  margin-top: 6rem;
  padding: 4rem 0 2rem;

  background: var(--color-footer-bg);
  color: var(--color-footer-text);
}

/* INNER */
.tos-footer-inner {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 48rem) {
  .tos-footer-inner {
    grid-template-columns: 1.5fr 1fr;
  }
}

/* LOGO */
.tos-footer-logo {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  display: inline-flex;
  margin-bottom: 0.75rem;

  color: var(--color-footer-text);
}

.tos-footer-logo .tos-logo-light {
  opacity: 0.6;
}

/* DESCRIPTION */
.tos-footer-description {
  font-size: 0.95rem;
  color: var(--color-footer-muted);
  max-width: 30rem;
}

.tos-footer-contact {
  margin-bottom: 1.75rem;
}

.tos-footer-contact__label {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--color-footer-text);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.tos-footer-contact__email {
  font-size: 1rem;
  color: var(--color-footer-text);
  text-decoration: none;
  opacity: 0.9;
}

.tos-footer-contact__email:hover {
  opacity: 1;
}

@media (min-width: 48rem) {
  .tos-footer-contact,
  .tos-footer-nav {
    text-align: right;
  }
}

/* MENU */
.tos-footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;

  display: grid;
  gap: 0.5rem;
}

.tos-footer-menu li {
  list-style: none;
}

.tos-footer-menu a {
  font-size: 0.95rem;
  color: var(--color-footer-text);
  opacity: 0.85;
  text-decoration: none;
}

.tos-footer-menu a:hover {
  opacity: 1;
}

/* BOTTOM */
.tos-footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-footer-border);
}

.tos-footer-bottom p {
  font-size: 0.85rem;
  color: var(--color-footer-muted);
}

.tos-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.tos-footer-legal a {
  font-size: 0.85rem;
  color: var(--color-footer-muted);
  text-decoration: none;
}

.tos-footer-legal a:hover {
  color: var(--color-footer-text);
}

@media (min-width: 48rem) {
  .tos-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .tos-footer-legal {
    justify-content: flex-end;
  }
}

/* =========================
   FEATURED SECTION
========================= */

.tos-home-featured {
  background: var(--color-secondary);
  padding: 3rem 0;
  margin: 3rem 0;
  border-radius: 0.5rem;
}

/* BASE (mobile first) */

.tos-home-featured-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* IMAGE */
.tos-home-featured__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.tos-home-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CONTENT */
.tos-home-featured__title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.tos-home-featured__text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  max-width: 40rem;
}

/* TABLET  */

@media (min-width: 36rem) {

  .tos-home-featured-inner {
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 1.5rem;
  }

  .tos-home-featured__media {
    max-width: 180px;
  }

}

/* DESKTOP */

@media (min-width: 62rem) {

  .tos-home-featured-inner {
    grid-template-columns: 240px 1fr;
    gap: 2rem;
  }

  .tos-home-featured__media {
    max-width: 240px;
  }

  .tos-home-featured__title {
    font-size: 1.8rem;
  }

}

/* =========================
   POPULAR TOPICS
========================= */

.tos-popular-topics {
  display:inline-block;
  margin: 2.5rem 0 0;
}

.tos-popular-topics__header {
  display: block;
  margin-bottom: 1.75rem;
}

.tos-popular-topics__header .tos-section-title {
  margin-bottom: 0;
}

.tos-popular-topics__grid {
  display: grid;
  gap: 1.5rem;
}

.tos-popular-topics__intro {
  min-width: 0;
}

.tos-popular-topics__topic-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400;
  line-height: 1.08;
  margin-bottom: 1rem;
}

.tos-popular-topics__topic-text {
  max-width: 24rem;
  margin-bottom: 1rem;
  font-size: 0.98rem;
  line-height: 1.65;
}

.tos-popular-topics__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.tos-popular-topics__link::after {
  content: "\2192";
  font-size: 1rem;
  line-height: 1;
}

.tos-popular-topics__posts {
  display: grid;
  gap: 1.5rem;
}

.tos-popular-topics__card {
  min-width: 0;
}

.tos-popular-topics__card-title {
  margin-bottom: 0;
}

.tos-popular-topics__card-title a {
  color: var(--text-main);
  text-decoration: none;
}

@media (min-width: 62rem) {
  .tos-popular-topics__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .tos-popular-topics__posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: span 2;
  }
}

/* =========================
   TABLE OF CONTENTS
========================= */

.tos-toc {
  padding: 1.5rem;
  margin-bottom: 3.5rem;
  background: var(--color-secondary);
  border-radius: 0.5rem;
}

.tos-toc__title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* LIST RESET + COUNTER */
.tos-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tos-toc__list li {
  margin-bottom: 0.6rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* NUMBER */
.tos-toc__number {
  font-size: 0.80rem;
  font-weight: 600;
  color: var(--color-primary);
  min-width: 2.5ch;
  flex-shrink: 0;
}

/* LINK */
.tos-toc__list a {
  font-size: 0.95rem;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.4;
  background-image: none;
  background-size: 0 0;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  transition: text-decoration-color 0.22s ease;
}

.tos-toc__list a:hover {
  text-decoration-color: currentColor;
}

/* LEVEL 3 (SUBITEMS) */
.toc-level-3 {
  margin-left: 1.5rem;
  font-size: 0.9rem;
}


/* =========================
   SINGLE POST
========================= */

/* HERO */
.tos-single-hero {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

.tos-single-hero__inner {
  max-width: 48rem;
}

/* GRID */

.tos-single-grid {
  display: grid;
  gap: 3rem;
}

/* CONTENT */
.tos-single-content {
  font-size: 1.05rem;
  line-height: 1.6;
  padding-bottom:2.5rem;
}

/* headings spacing */
.tos-single-content h2 {
  margin-top: 2.5rem;
}

.tos-single-content h3 {
  margin-top: 2rem;
}

/* images inside content */
.tos-single-content img {
  margin: 2rem 0;
  border-radius: 4px;
}

/* SIDEBAR */
.tos-single-sidebar {
  position: relative;
}

/* DESKTOP */

@media (min-width: 68.75rem) {

  .tos-single-grid {
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
    align-items: start;
  }

  .tos-single-sidebar {
    position: sticky;
    top: 6rem;
  }

}

/* =========================
   ARCHIVE LIST
========================= */

.tos-archive-list {
  display: flex;
  flex-direction: column;
}

/* ITEM */
.tos-archive-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;

  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}
.tos-archive-item:first-child {
  padding-top: 0;
}

/* =========================
   ARCHIVE ITEM
========================= */

.tos-archive-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;

  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

/* IMAGE */
.tos-archive-item__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.tos-archive-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CONTENT */
.tos-archive-item__content {
  min-width: 0;
}

/* TABLET */
@media (min-width: 36rem) {

  .tos-archive-item {
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 1.25rem;
  }

}

/* DESKTOP */
@media (min-width: 62rem) {

  .tos-archive-item {
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
  }

}

/* KICKER */
.tos-archive-item__content .tos-kicker {
  line-height: 1.2;
  padding-top: 0.75rem;
  margin-bottom: 0;
}

/* TITLE */
.tos-archive-item__title {
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0.25rem 0;
}

/* EXCERPT */
.tos-archive-item__excerpt {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* HERO (ARCHIVE) */
.tos-archive-hero {
  margin-bottom: 3rem;
}

.tos-author-hero__subtitle {
  max-width: 44rem;
}

.tos-author-panel {
  position: sticky;
  top: 6rem;
  padding: 1.5rem;
  background: var(--color-secondary);
  border-radius: 0.5rem;
}

.tos-author-panel__photo {
  margin-bottom: 1.25rem;
}

.tos-author-panel__photo img,
.tos-author-panel__avatar {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem;
  display: block;
}

.tos-author-panel__name {
  font-size: 1.6rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.tos-author-panel__headline {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-light);
}

.tos-author-panel__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.tos-author-panel__links a {
  color: var(--text-main);
  text-decoration: none;
}

@media (max-width: 68.74rem) {
  .tos-author-panel {
    position: static;
  }
}

/* =========================
   ARCHIVE EMPTY
========================= */

.tos-archive-empty {
  padding: 3rem 0;
  max-width: 40rem;
}

.tos-archive-empty__title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.tos-archive-empty__text {
  color: var(--text-light);
}

/* =========================
   PAGE
========================= */

.tos-page-hero {
  padding-bottom: 2.5rem;
}

.tos-page-section {
  padding-top: 0;
}

.tos-page-hero__intro {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text-light);
  max-width: 48rem;
  margin-bottom: 1.5rem;
}

.tos-page-content {
  font-size: 1.05rem;
  line-height: 1.6;
  padding-bottom: 2.5rem;
}

/* headings spacing */
.tos-page-content :is(h2, h3, h4, h5, h6) {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.tos-page-content :is(h2, h3, h4, h5, h6):first-of-type {
  margin-top: 0;
}

.tos-page-content h3 {
  margin-top: 2rem;
}

/* images */
.tos-page-content img {
  margin: 2rem 0;
  border-radius: 4px;
}

/* =========================
   CONTACT PAGE
========================= */

.tos-contact-page {
  padding-top: 5rem;
  padding-bottom: 2.5rem;
}

.tos-contact-layout {
  display: grid;
  gap: 2rem;
}

.tos-contact-section {
  padding-top: 0;
}

.tos-contact-intro {
  min-width: 0;
}

.tos-contact-header {
  padding-bottom: 0;
  border-bottom: 0;
}

.tos-contact-hero__intro {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text-light);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.tos-contact-card {
  display: inline-flex;
  padding: 1rem 1.25rem;
  background: var(--color-secondary);
  border-radius: 0.5rem;
  align-self: start;
  margin-bottom: 1.75rem;
  max-width: 100%;
}

.tos-contact-card__email {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--text-main);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.tos-contact-form-wrap {
  min-width: 0;
}

.tos-contact-alert {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.tos-contact-alert.is-success {
  background: #edf6ef;
  color: #1f5130;
}

.tos-contact-alert.is-error {
  background: #fbefec;
  color: #8b3a2f;
}

.tos-contact-form {
  display: grid;
  gap: 1rem;
}

.tos-contact-form__row {
  display: grid;
  gap: 1rem;
}

.tos-contact-form input,
.tos-contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.35rem;
  background: var(--color-bg);
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.5;
  font-family: inherit;
}

.tos-contact-form input::placeholder,
.tos-contact-form textarea::placeholder {
  color: var(--text-light);
  opacity: 1;
}

.tos-contact-form textarea {
  resize: vertical;
  min-height: 12rem;
}

.tos-contact-form input:focus,
.tos-contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.tos-contact-form__honeypot {
  position: absolute;
  left: -9999px;
}

.tos-contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.tos-contact-form__consent input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  padding: 0;
  flex-shrink: 0;
}

.tos-contact-form__consent label {
  font-size: 0.92rem;
  line-height: 1.6;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-light);
  font-weight: 400;
}

.tos-contact-form__consent a {
  color: var(--text-main);
}

.tos-contact-content {
  padding-top: 0;
  padding-bottom: 0;
}

@media (min-width: 48rem) {
  .tos-contact-form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 68.75rem) {
  .tos-contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: start;
    gap: 3rem;
  }
}

/* =========================
   404 PAGE
========================= */

.tos-page-404 {
  padding: 4rem 0 6rem;
}

.tos-404 {
  max-width: 42rem;
  padding: 3rem 0;
}

.tos-404__title {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin: 0.5rem 0 1rem;
}

.tos-404__text {
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text-light);
  max-width: 36rem;
}

.tos-404__actions {
  margin-top: 1.75rem;
}

/* =========================
   BREADCRUMBS
========================= */

.tos-breadcrumbs {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.tos-breadcrumbs a {
  color: var(--text-light);
  text-decoration: none;
}

.tos-breadcrumbs span {
  margin: 0 0.25rem;
}

/* =========================
   LONGFORM CONTENT
========================= */

.tos-single-content .privacy-services,
.tos-page-content .privacy-services {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.tos-single-content .privacy-services > h3,
.tos-page-content .privacy-services > h3 {
  margin: 0.5rem 0 0;
}

.tos-single-content .service-block,
.tos-page-content .service-block {
  padding: 1.35rem 1.5rem;
  background: var(--color-secondary);
  border-radius: 0.5rem;
}

.tos-single-content .service-block h4,
.tos-page-content .service-block h4 {
  margin-top: 0.5rem;
  margin-bottom: 0rem;
  color: var(--text-main);
}

.tos-single-content .table-x-scroll,
.tos-page-content .table-x-scroll,
.tos-single-content .wp-block-table,
.tos-page-content .wp-block-table {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tos-single-content .table-x-scroll::-webkit-scrollbar,
.tos-page-content .table-x-scroll::-webkit-scrollbar,
.tos-single-content .wp-block-table::-webkit-scrollbar,
.tos-page-content .wp-block-table::-webkit-scrollbar {
  display: none;
}

.tos-single-content .table-x-scroll table,
.tos-page-content .table-x-scroll table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  border-bottom: 1px solid var(--color-border);
  margin-top:1rem;
}

.tos-single-content .table-x-scroll th,
.tos-single-content .table-x-scroll td,
.tos-page-content .table-x-scroll th,
.tos-page-content .table-x-scroll td {
  padding: 0.8rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.tos-single-content .table-x-scroll th,
.tos-page-content .table-x-scroll th {
  font-weight: 600;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.015);
}

.tos-single-content .table-x-scroll td,
.tos-page-content .table-x-scroll td {
  color: var(--text-light);
}

