/*
Theme Name: CTP Theme - PornoTelegram
Theme URI: https://kreacode.it
Description: Tema directory canali Telegram per adulti (PornoTelegram). Re-skin completo.
Version: 1.2.0
Author: Kreacode
*/
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@500;700;900&family=Roboto+Condensed:wght@400;500;700&display=swap");

:root {
  --bg: #f7fcff;
  --panel: #ffffff;
  --panel-soft: #eef8ff;
  --text: #101923;
  --muted: #526372;
  --cyan: #35b5f6;
  --cyan-dark: #0288d1;
  --line: rgba(2, 136, 209, 0.18);
  --accent: #ff4f8b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(53, 181, 246, 0.32), transparent 34%),
    radial-gradient(circle at 86% 28%, rgba(255, 79, 139, 0.10), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #eef9ff 46%, #ffffff 100%);
  background-attachment: fixed;
  background-size: cover;
  color: var(--text);
  font-family: "Roboto Condensed", Arial, Helvetica, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 10px max(16px, calc((100% - 1120px) / 2));
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(2, 136, 209, 0.08);
}

.site-header.compact {
  padding-top: 9px;
  padding-bottom: 9px;
}

.brand img {
  display: block;
  width: 218px;
  height: auto;
}

.compact .brand img {
  width: 198px;
}

.main-nav {
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  width: auto;
}

.menu-toggle {
  display: none;
}

.menu-button {
  display: inline-flex;
  position: fixed;
  right: 16px;
  top: 12px;
  z-index: 40;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(2, 136, 209, 0.08);
  cursor: pointer;
}

.menu-button span,
.menu-button::before,
.menu-button::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: #067fc3;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-button::before,
.menu-button::after {
  position: absolute;
}

.menu-button::before {
  transform: translateY(-7px);
}

.menu-button::after {
  transform: translateY(7px);
}

.menu-toggle:checked + .menu-button span {
  opacity: 0;
}

.menu-toggle:checked + .menu-button::before {
  transform: rotate(45deg);
}

.menu-toggle:checked + .menu-button::after {
  transform: rotate(-45deg);
}

.menu-toggle:checked ~ .main-nav {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-top: 10px;
}

.main-nav a,
.pill-list a,
.sidebar a,
.button,
.search-row button {
  border-radius: 6px;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-dark));
  color: #fff;
  font-weight: 800;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0;
  box-shadow: 0 3px 0 #00669e;
}

.main-nav a {
  min-width: 32px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: #067fc3;
  font-size: 11px;
  box-shadow: 0 8px 18px rgba(2, 136, 209, 0.08);
}

.main-nav a.active,
.main-nav a:hover {
  border-color: transparent;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-dark));
  color: #fff;
  box-shadow: 0 2px 0 #00669e;
  filter: none;
}

.main-nav a.live-cam-link {
  border-color: rgba(255, 159, 26, 0.44);
  background: linear-gradient(180deg, #ffcf4a, #ff9f1a);
  color: #15100a;
  box-shadow: 0 2px 0 rgba(143, 82, 0, 0.55);
  min-width: 32px;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 11px;
}

.main-nav a.live-cam-link:hover,
.main-nav a.live-cam-link:active {
  border-color: rgba(255, 159, 26, 0.55);
  background: linear-gradient(180deg, #ffe27a, #ffad24);
  color: #15100a;
  box-shadow: 0 2px 0 rgba(143, 82, 0, 0.65);
}

.pill-list a:hover,
.sidebar a.active,
.sidebar a:hover {
  filter: brightness(1.15);
}

.hero,
.page-title,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 7vw, 86px) 20px;
  background: transparent;
}

.hero-inner,
.page-title,
.content-band,
.category-layout,
.detail-hero,
.detail-layout,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  text-align: center;
}

.centered-title {
  text-align: center;
}

.centered-title .lead {
  margin-left: auto;
  margin-right: auto;
}

.category-description {
  max-width: 860px;
  margin: 14px auto 0;
}

.category-description p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.search-page-hero {
  display: grid;
  justify-items: center;
}

.search-page-form {
  width: min(760px, 100%);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  width: min(1120px, calc(100% - 32px));
  margin: 22px auto 0;
  color: var(--muted);
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: #067fc3;
}

.breadcrumbs span,
.breadcrumbs strong {
  color: var(--text);
}

.breadcrumbs a::after,
.breadcrumbs span::after {
  content: ">";
  margin-left: 7px;
  color: rgba(6, 127, 195, 0.45);
}

.eyebrow,
.category {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.95;
  text-transform: uppercase;
  color: #07131c;
  overflow-wrap: anywhere;
}

.animated-title {
  display: inline-block;
  background: linear-gradient(90deg, #07131c 0%, #07131c 34%, #35b5f6 48%, #ffffff 52%, #07131c 66%, #07131c 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shine 4.2s ease-in-out infinite, title-float 5.4s ease-in-out infinite;
}

@keyframes title-shine {
  0% {
    background-position: 160% 0;
  }
  48%,
  100% {
    background-position: -60% 0;
  }
}

@keyframes title-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .animated-title {
    animation: none;
    color: #07131c;
    background: none;
  }
}

h2 {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: clamp(18px, 2vw, 19px);
  line-height: 1.05;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 8px;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 24px;
}

.lead {
  max-width: 760px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 18px;
}

.search-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 45px rgba(2, 136, 209, 0.16);
}

.search-panel.slim {
  margin: 0 0 28px;
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 800;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(2, 136, 209, 0.22);
  border-radius: 7px;
  padding: 11px 13px;
  background: #fff;
  color: #111;
  font-size: 15px;
}

button,
.button {
  border: 0;
  cursor: pointer;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  padding: 9px 12px;
  font-size: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.large {
  padding: 11px 15px;
  font-size: 13px;
}

.button.ghost {
  background: #e8f6ff;
  color: #067fc3;
  box-shadow: 0 3px 0 #b9ddf2;
}

.content-band {
  padding: 48px 0;
}

.section-heading,
.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading a {
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-card,
.list-card,
.article-copy,
.sidebar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(2, 136, 209, 0.10);
}

.channel-card {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
}

.rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 7px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffcf4a, #ff9f1a);
  color: #15100a;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 2px 0 rgba(143, 82, 0, 0.55);
}

.thumb,
.detail-media,
.mini-thumb {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(53, 181, 246, 0.86), rgba(255, 79, 139, 0.72)),
    #20242b;
}

.thumb {
  width: 118px;
  min-height: 112px;
  aspect-ratio: auto;
}

.thumb.alt-one,
.mini-thumb.warm {
  background: linear-gradient(135deg, #ff4f8b, #ffb33f);
}

.thumb.alt-two,
.mini-thumb.cool {
  background: linear-gradient(135deg, #35b5f6, #705cff);
}

.thumb span,
.detail-media span,
.mini-thumb span {
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
}

.card-body {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 0;
  padding: 12px 14px;
  overflow: hidden;
}

.card-body .button,
.list-card .button {
  align-self: start;
  gap: 5px;
  padding: 6px 9px;
  font-size: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: #067fc3;
  box-shadow: 0 8px 18px rgba(2, 136, 209, 0.08);
}

.card-body .button::before,
.list-card .button::before {
  content: "";
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.card-body .button:hover,
.card-body .button:active,
.list-card .button:hover,
.list-card .button:active {
  border-color: transparent;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-dark));
  color: #fff;
  box-shadow: 0 2px 0 #00669e;
}

.card-body p:not(.category) {
  max-width: 520px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.card-body h3 {
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.card-body .category {
  margin-bottom: 5px;
  font-size: 12px;
}

.card-body p:not(.category),
.article-copy p,
.list-card p,
.muted {
  color: var(--muted);
}

.pill-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.pill-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: #067fc3;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(2, 136, 209, 0.08);
}

.pill-list a:hover,
.pill-list a:active {
  border-color: transparent;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-dark));
  color: #fff;
  box-shadow: 0 2px 0 #00669e;
  filter: none;
}

.popular-categories {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding-top: 34px;
}

.popular-copy h2 {
  margin-bottom: 10px;
}

.popular-copy p {
  margin-bottom: 0;
}

.seo-block {
  padding-top: 18px;
}

.seo-copy {
  width: 100%;
  max-width: none;
}

.seo-copy h2 {
  max-width: none;
  margin-bottom: 14px;
  font-size: clamp(20px, 2.2vw, 22px);
  line-height: 1.04;
}

.seo-copy p:not(.eyebrow) {
  max-width: none;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.seo-copy p:last-child {
  margin-bottom: 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
}

.pagination a,
.pagination span,
.page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: #067fc3;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(2, 136, 209, 0.08);
}

.button-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pagination a.active,
.page-button.active {
  border-color: transparent;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-dark));
  color: #fff;
  box-shadow: 0 2px 0 #00669e;
}

.page-button:hover,
.page-button:active {
  border-color: transparent;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-dark));
  color: #fff;
  box-shadow: 0 2px 0 #00669e;
}

.pagination a.disabled,
.pagination span {
  color: #89a1b4;
  pointer-events: none;
}

.categories-page {
  padding-top: 38px;
}

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.category-card {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 36px rgba(2, 136, 209, 0.10);
}

.category-card.active {
  background:
    linear-gradient(135deg, rgba(53, 181, 246, 0.14), rgba(255, 255, 255, 0.92)),
    #ffffff;
}

.category-card h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.05;
}

.category-card p:not(.category) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.42;
}

.category-card strong.cat-count {
  display: inline-flex;
  justify-self: start;
  padding: 5px 9px;
  border-radius: 6px;
  background: #eef8ff;
  color: #067fc3;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-card p strong, .category-card p b {
  display: inline;
  padding: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-transform: none;
  border-radius: 0;
}

.about-page {
  display: grid;
  gap: 18px;
  padding-top: 38px;
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 36px rgba(2, 136, 209, 0.10);
}

.info-card h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.info-card p:not(.category) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.42;
}

.contact-page,
.submit-page {
  padding-top: 38px;
}

.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-card,
.submit-form,
.contact-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 36px rgba(2, 136, 209, 0.10);
}

.contact-card {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.contact-card h3 {
  margin-bottom: 0;
  font-size: 26px;
}

.contact-card p:not(.category),
.contact-side p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.42;
}

.submit-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
}

.submit-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.submit-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.submit-form input,
.submit-form select,
.submit-form textarea {
  width: 100%;
  border: 1px solid rgba(2, 136, 209, 0.22);
  border-radius: 7px;
  padding: 11px 13px;
  background: #fff;
  color: #111;
  font-family: "Roboto Condensed", Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.submit-form textarea {
  resize: vertical;
}

.contact-side {
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 20px;
}

.contact-side h2 {
  margin-bottom: 0;
  font-size: 13px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.blog-card {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 36px rgba(2, 136, 209, 0.10);
}

.blog-card h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.12;
}

.blog-card p:not(.category) {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.42;
}

.article-hero h1 {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(34px, 6vw, 64px);
}

.article-page {
  padding-top: 38px;
}

.blog-article {
  max-width: none;
  margin: 0 auto;
}

.blog-article h2 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 14px;
}

.blog-article p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
}

.article-meta {
  color: #067fc3;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.ad-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
}

.ad-banner {
  display: grid;
  place-items: center;
  aspect-ratio: auto;
  border: 1px solid rgba(2, 136, 209, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(53, 181, 246, 0.20), rgba(255, 255, 255, 0.76)),
    #ffffff;
  color: #067fc3;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 16px 36px rgba(2, 136, 209, 0.12);
}

.ad-banner.alt {
  background:
    linear-gradient(135deg, rgba(255, 79, 139, 0.16), rgba(53, 181, 246, 0.18)),
    #ffffff;
}

.ad-banner span {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
}

.paged-top-ad {
  padding-top: 34px;
}

.paged-list {
  padding-top: 28px;
}

.detail-ads {
  width: min(1120px, calc(100% - 32px));
  padding: 28px 0 8px;
}

.category-layout,
.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  padding: 34px 0;
}

.sidebar {
  align-self: start;
  padding: 18px;
}

.sidebar h2 {
  margin-bottom: 16px;
  font-size: 11px;
}

.sidebar a {
  display: block;
  margin-bottom: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.listing h2 {
  margin-bottom: 18px;
}

.channel-list {
  display: grid;
  gap: 14px;
}

.list-card {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
}

.mini-thumb {
  width: 68px;
  aspect-ratio: 1;
  border-radius: 8px;
}

.mini-thumb span {
  font-size: 20px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.detail-media {
  width: 260px;
  min-height: 360px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.detail-copy .lead {
  margin-left: 0;
  margin-bottom: 16px;
  max-width: 760px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 24px;
}

.article-copy {
  padding: 26px;
}

.article-copy h2 {
  margin-top: 28px;
  margin-bottom: 12px;
}

.article-copy h2:first-child {
  margin-top: 0;
}

.description-content {
  width: 100%;
  padding-top: 0;
  border-top: 0;
}

.description-content p {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.55;
}

.description-content p:last-child {
  margin-bottom: 0;
}

.site-footer {
  display: grid;
  gap: 22px;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.footer-main {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.footer-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.footer-brand img {
  display: block;
  width: 170px;
  height: auto;
}

.site-footer p {
  max-width: 680px;
  margin-bottom: 0;
  text-align: center;
}

.footer-disclaimer {
  max-width: 980px;
  padding-top: 18px;
  border-top: 1px solid rgba(6, 127, 195, 0.14);
  text-align: center;
  justify-self: center;
}

.footer-disclaimer h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.15;
}

.footer-disclaimer p {
  max-width: none;
  margin-bottom: 9px;
  font-size: 13px;
  line-height: 1.45;
}

.footer-disclaimer .footer-credits {
  color: #067fc3;
  font-weight: 700;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
  justify-content: center;
  max-width: 560px;
}

.site-footer a {
  color: #067fc3;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-footer a + a::before {
  content: "|";
  margin-right: 8px;
  color: rgba(6, 127, 195, 0.45);
}

@media (min-width: 1101px) {
  .menu-button {
    display: none !important;
  }

  .main-nav {
    display: flex !important;
    grid-column: auto;
    width: auto;
    margin-top: 0;
  }
}

@media (max-width: 1100px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-content: space-between;
    column-gap: 12px;
  }

  .brand {
    justify-self: start;
  }

  .menu-button {
    display: inline-flex !important;
    position: fixed;
    right: 16px;
    top: 12px;
    z-index: 40;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 18px rgba(2, 136, 209, 0.08);
    cursor: pointer;
  }

  .menu-button span,
  .menu-button::before,
  .menu-button::after {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: #067fc3;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .menu-button::before,
  .menu-button::after {
    position: absolute;
  }

  .menu-button::before {
    transform: translateY(-7px);
  }

  .menu-button::after {
    transform: translateY(7px);
  }

  .menu-toggle:checked + .menu-button span {
    opacity: 0;
  }

  .menu-toggle:checked + .menu-button::before {
    transform: rotate(45deg);
  }

  .menu-toggle:checked + .menu-button::after {
    transform: rotate(-45deg);
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 10px;
    justify-content: stretch;
  }

  .menu-toggle:checked ~ .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .search-row,
  .section-heading,
  .footer-main {
    justify-items: center;
  }

  .popular-categories {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pill-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-layout,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-media {
    width: min(260px, 100%);
    min-height: 340px;
    justify-self: center;
  }

  .list-card {
    grid-template-columns: 68px 1fr;
  }

  .list-card .button {
    grid-column: 1 / -1;
  }

  .mini-thumb {
    width: 68px;
  }

  .site-footer nav {
    justify-content: center;
  }

  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-card-grid {
    grid-template-columns: 1fr;
  }

  .contact-card-grid,
  .submit-page,
  .form-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .ad-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero-inner,
  .page-title,
  .content-band,
  .category-layout,
  .detail-hero,
  .detail-layout,
  .site-footer {
    width: min(100% - 64px, 1120px);
  }

  .main-nav a {
    min-width: 0;
    text-align: center;
    padding: 7px 8px;
    font-size: 11px;
    white-space: normal;
  }

  .channel-grid,
  .compact-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 0;
    padding: 15px;
  }

  .popular-categories {
    padding-top: 24px;
  }

  .pill-list {
    grid-template-columns: 1fr;
  }

  .pill-list a {
    min-height: 28px;
    font-size: 11px;
  }

  .brand img {
    width: min(210px, 62vw);
  }

  .hero,
  .page-title,
  .detail-hero {
    padding-inline: 16px;
  }

  h1 {
    font-size: 28px;
    line-height: 1;
  }

  .search-panel {
    padding: 14px;
    overflow: hidden;
  }

  .search-panel label {
    font-size: 14px;
    line-height: 1.25;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .channel-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .thumb {
    width: 92px;
    min-height: 126px;
  }

  .thumb span {
    font-size: 21px;
  }

  .card-body {
    min-width: 0;
    padding: 11px;
  }

  .card-body h3 {
    margin-bottom: 5px;
    font-size: 18px;
    line-height: 1.15;
  }

  .card-body .category {
    font-size: 11px;
  }

  .card-body p:not(.category) {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.35;
  }

  .card-body .button,
  .list-card .button {
    padding: 6px 8px;
    font-size: 10px;
  }

  .lead {
    font-size: 16px;
    overflow-wrap: break-word;
  }

  .ad-band {
    width: min(100% - 64px, 1120px);
    gap: 10px;
  }

  .ad-banner {
    min-height: 110px;
    font-size: 13px;
  }
}

/* ===== Adattamenti dinamici WordPress ===== */
.thumb img,.detail-media img,.mini-thumb img{grid-area:1/1;width:100%;height:100%;object-fit:cover}
.ad-banner{padding:0}
.ad-banner img,img.ad-banner-img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.ad-banner.has-img{background:none;border:0;box-shadow:none}
.channel-card{color:inherit}
.channel-card .card-body h3 a{color:inherit}
body.admin-bar .site-header{top:32px}
@media (max-width:782px){body.admin-bar .site-header{top:46px}}
.ctp-msg{width:min(1120px,calc(100% - 32px));margin:0 auto 18px;padding:12px 16px;border:1px solid var(--line);border-radius:8px;background:var(--panel-soft);color:var(--text);font-weight:700}

/* --- Scheda canale: se c'e' immagine, niente fondo colorato + bordo azzurro 2px --- */
.detail-media.has-img {
  background: none !important;
  border: 2px solid var(--cyan) !important;
  border-radius: 8px;
  overflow: hidden;
  place-items: stretch;
}
.detail-media.has-img img { border-radius: 6px; }

/* --- Box descrizione categoria (come articolo blog, piena larghezza) --- */
.category-box { color: var(--muted); }
.category-box p { margin-bottom: 12px; }
.category-box p:last-child { margin-bottom: 0; }

/* --- Barra di ricerca hero a piena larghezza wrapper --- */
.hero .search-panel { max-width: none; }

/* --- Pagina 404: pulsanti affiancati --- */
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* --- Titolo scheda canale ridotto del 40% --- */
.detail-copy h1 { font-size: clamp(22px, 4.2vw, 46px); line-height: 1; }
