/* ATP Method starter styles (front page) */
:root{
  --atp-red: #E01937;
  --atp-black:#0A0A0A;
  --atp-white:#FFFFFF;
  --atp-muted:#111111;
  --atp-note:#1f1f1f;
  --atp-bg:#F6F6F6;
  --atp-border: rgba(10,10,10,.10);
  --atp-shadow: 0 14px 40px rgba(10,10,10,.08);
}

.atp-section--alt{ background: #fff; }

.atp-section{ padding: clamp(48px, 6vw, 84px) 0; background:#fff; }
/*
  Kadence + Gutenberg: alignfull nie centruje samego inner-container.
  Dlatego wymuszamy szerokość + auto-margins i spójne paddingi.
*/
.atp-section.alignfull{ padding-left: 0; padding-right: 0; }
.atp-section.alignfull{ width:100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); overflow-x: hidden; }

.atp-section .wp-block-group__inner-container,
.atp-hero .wp-block-cover__inner-container{
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 3vw, 28px);
  padding-right: clamp(16px, 3vw, 28px);
  box-sizing: border-box;
}

.atp-hero{ position: relative; overflow:hidden; }
.atp-hero h1{ letter-spacing:-.02em; }
.atp-badge{ display:inline-block; padding:.4rem .7rem; border:1px solid rgba(255,255,255,.22); border-radius:999px; font-size:.85rem; }

.atp-cta .wp-block-button__link{ background:var(--atp-red); border-color:var(--atp-red); }
.atp-cta .wp-block-button__link:hover{ filter:brightness(.95); }
.atp-outline .wp-block-button__link{ background:transparent; border:2px solid var(--atp-red); color:var(--atp-red); }
.atp-outline .wp-block-button__link:hover{ background: rgba(224,25,55,.10); }

.atp-card{ border:1px solid var(--atp-border); border-radius:18px; padding:18px; background:#fff; box-shadow: var(--atp-shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.atp-card h3{ margin-top: .2rem; }
.atp-kicker{ color: var(--atp-red); text-transform: uppercase; letter-spacing:.10em; font-size:.82rem; font-weight: 800; }
.atp-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.atp-grid-2{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
@media (max-width: 900px){
  .atp-grid{ grid-template-columns:1fr; }
  .atp-grid-2{ grid-template-columns:1fr; }
}

/* Trust / bento grid */
.atp-trust__grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1100px){
  .atp-trust__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px){
  .atp-trust__grid{ grid-template-columns: 1fr; }
}

.atp-table table{ width:100%; border-collapse: collapse; }
.atp-table th,.atp-table td{ border:1px solid rgba(10,10,10,.10); padding:.65rem .75rem; vertical-align: top; }
.atp-table th{ background:#fff; }
.atp-note{ color: var(--atp-note); font-size:.92rem; }

.atp-instructor{ display:flex; gap:14px; align-items:center; }
.atp-instructor img{ width:74px; height:74px; border-radius:18px; object-fit:cover; border:1px solid rgba(10,10,10,.08); }

.atp-legal small{ color: var(--atp-note); }

/* Gallery */
.atp-gallery-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.atp-gallery-grid img{
  width:100%;
  height: 240px;
  object-fit: cover;
  border-radius: 18px;
  border:1px solid var(--atp-border);
  box-shadow: var(--atp-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
@media (max-width: 900px){
  .atp-gallery-grid{ grid-template-columns: 1fr; }
  .atp-gallery-grid img{ height: 220px; }
}

/* Pages (multi-page) */
.atp-page-hero .wp-block-cover__inner-container{ max-width: 1200px; margin:0 auto; padding-left: clamp(16px, 3vw, 28px); padding-right: clamp(16px, 3vw, 28px); }

/* Upcoming + calendar */
.atp-events{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
@media (max-width: 900px){ .atp-events{ grid-template-columns: 1fr; } }
.atp-event-card{ border:1px solid var(--atp-border); border-radius:18px; padding:18px; background:#fff; box-shadow: var(--atp-shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.atp-event-meta{ display:flex; gap:10px; align-items:center; flex-wrap: wrap; margin-bottom: 8px; }
.atp-tag{ display:inline-flex; align-items:center; gap:6px; padding:.28rem .55rem; border-radius:999px; font-size:.78rem; font-weight:700; letter-spacing:.02em; }
.atp-tag--basic{ background: rgba(224,25,55,.12); color: var(--atp-red); border: 1px solid rgba(224,25,55,.28); }
.atp-tag--adv{ background: rgba(10,10,10,.08); color: var(--atp-black); border: 1px solid rgba(10,10,10,.18); }
.atp-event-date{ font-weight:700; }
.atp-event-title{ margin:.2rem 0 .4rem; font-size:1.1rem; }
.atp-event-list{ margin:0; padding-left: 1.1rem; }

.atp-calendar-grid{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
@media (max-width: 900px){ .atp-calendar-grid{ grid-template-columns: 1fr; } }

/* Infographics */
.atp-infographic{ border-radius:18px; border:1px solid rgba(10,10,10,.08); box-shadow:0 10px 30px rgba(10,10,10,.05); background:#fff; overflow:hidden; }
.atp-infographic img{ width:100%; height:auto; display:block; }

/* Link cards */
.atp-linkcard{ display:flex; gap:16px; align-items:stretch; }
.atp-linkcard img{ width: 180px; height: 140px; object-fit:cover; border-radius:14px; border:1px solid rgba(10,10,10,.08); }
@media (max-width: 900px){ .atp-linkcard{ flex-direction:column; } .atp-linkcard img{ width:100%; height:220px; } }

/* Sticky table of contents (Program BASIC) */
.atp-toc{
  position: sticky;
  top: 8px;
  z-index: 50;
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--atp-border);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  box-shadow: 0 10px 26px rgba(10,10,10,.06);
}
.atp-toc a{
  display:inline-flex;
  align-items:center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(10,10,10,.10);
  text-decoration:none;
  font-weight: 900;
  font-size: 13px;
  color: var(--atp-black);
  background:#fff;
  white-space: nowrap;
}
.atp-toc a:hover{ border-color: rgba(224,25,55,.35); box-shadow: 0 10px 22px rgba(10,10,10,.08); transform: translateY(-1px); }
@media (max-width: 900px){
  .atp-toc{ flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .atp-toc::-webkit-scrollbar{ display:none; }
}


/* Wider containers for big infographics */
.atp-section--wide .wp-block-group__inner-container{ max-width: 1400px; }

/* Tree infographic: keep readable on mobile by allowing horizontal scroll */
.atp-tree-wrap{ overflow-x:auto; -webkit-overflow-scrolling: touch; }
.atp-tree-wrap img{ min-width: 1100px; }


/* Subtle premium interactions */
.atp-card:hover,
.atp-event-card:hover,
.atp-gallery-grid img:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 55px rgba(10,10,10,.12);
  border-color: rgba(224,25,55,.28);
}

/* Hero extras */
.atp-hero{ position: relative; overflow:hidden; }
.atp-hero:after{
  content:"";
  position:absolute;
  inset:-40% -30% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 30% 30%, rgba(224,25,55,.32), rgba(224,25,55,0) 60%);
  pointer-events:none;
  filter: blur(2px);
}

/* Education flow (home preview) */
.atp-flow{
  display:flex;
  gap:12px;
  align-items:stretch;
  overflow-x:auto;
  padding: 10px;
  border:1px solid var(--atp-border);
  border-radius: 18px;
  background:#fff;
  box-shadow: var(--atp-shadow);
  -webkit-overflow-scrolling: touch;
}
.atp-flow-item{
  display:flex;
  gap:10px;
  align-items:center;
  padding: 12px 14px;
  border:1px solid var(--atp-border);
  border-radius: 16px;
  background: #fff;
  min-width: 260px;
}
.atp-flow-sep{
  display:flex;
  align-items:center;
  font-weight: 900;
  color: var(--atp-red);
  padding: 0 2px;
}
.atp-flow-text{ line-height: 1.2; }
.atp-meta{ font-size:.92rem; color: var(--atp-note); }

/* Pills */
.atp-pill{
  display:inline-flex;
  align-items:center;
  padding:.28rem .62rem;
  border-radius: 999px;
  border:1px solid var(--atp-border);
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.atp-pill--basic{ background: rgba(224,25,55,.10); border-color: rgba(224,25,55,.22); color: var(--atp-red); }
.atp-pill--master{ background: rgba(10,10,10,.06); border-color: rgba(10,10,10,.18); color: var(--atp-black); }
.atp-pill--title{ background: rgba(224,25,55,.14); border-color: rgba(224,25,55,.26); color: var(--atp-black); }

/* Stepper (Edukacja) */
.atp-stepper{ margin-top: 14px; }
.atp-step{ display:flex; gap:16px; align-items:stretch; }
.atp-rail{ position: relative; width: 28px; flex: 0 0 28px; }
.atp-dot{ display:block; width: 14px; height: 14px; border-radius: 50%; background: var(--atp-red); margin: 10px auto 0; box-shadow: 0 0 0 6px rgba(224,25,55,.12); }
.atp-line{ position:absolute; left:50%; top: 28px; bottom: -18px; width: 2px; background: rgba(10,10,10,.20); transform: translateX(-50%); }
.atp-step--end .atp-line{ display:none; }
.atp-step-card{
  border:1px solid var(--atp-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--atp-shadow);
  padding: 18px 18px 16px;
  width: 100%;
  min-width: 0;
  margin-bottom: 14px;
}
.atp-step-top{ display:flex; gap:10px; align-items:center; flex-wrap: wrap; margin-bottom: 8px; }
.atp-step-card h3{ margin: .2rem 0 .55rem; }
.atp-bullets{ margin: 0.5rem 0 0; padding-left: 1.2rem; }
.atp-bullets li{ margin: .2rem 0; }
.atp-branch-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.atp-branch-card{
  border:1px solid var(--atp-border);
  border-radius: 16px;
  background: #fff;
  padding: 14px 14px 12px;
}
.atp-branch-top{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom: 8px; }
.atp-branch-card h4{ margin: .15rem 0 .35rem; font-size: 1.05rem; }
@media (max-width: 900px){
  .atp-branch-grid{ grid-template-columns: 1fr; }
  .atp-flow-item{ min-width: 220px; }
}

.atp-kicker{ position:relative; display:inline-block; }
.atp-kicker:after{ content:""; display:block; height:3px; width:64px; background: var(--atp-red); margin-top:10px; border-radius: 999px; }

/* Expandable long descriptions */
.atp-details{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(10,10,10,.18);
}
.atp-details summary{
  cursor: pointer;
  font-weight: 900;
  color: var(--atp-red);
  list-style: none;
}
.atp-details summary::-webkit-details-marker{ display:none; }
.atp-details summary:before{
  content:"+";
  display:inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align:center;
  border-radius: 8px;
  background: rgba(224,25,55,.10);
  border: 1px solid rgba(224,25,55,.22);
  margin-right: 10px;
  font-weight: 900;
}
.atp-details[open] summary:before{ content:"–"; }
.atp-details[open] summary{ margin-bottom: 10px; }


/* Robust wrapping + column safety */
.atp-section, .atp-section *{ box-sizing: border-box; }
.atp-section h1, .atp-section h2, .atp-section h3, .atp-section h4,
.atp-section p, .atp-section li, .atp-section a,
.atp-step-card, .atp-branch-card, .atp-event-card, .atp-card{
  overflow-wrap: anywhere;
  word-break: break-word;
}

.atp-section .wp-block-columns{ gap: clamp(14px, 2vw, 26px); }
.atp-section .wp-block-column{ min-width: 0; }

/* Typography tuning (theme-agnostic) */
.atp-section h1{ font-size: clamp(2.05rem, 3.3vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; }
.atp-section h2{ font-size: clamp(1.55rem, 2.2vw, 2.25rem); line-height: 1.15; letter-spacing: -0.015em; }
.atp-section h3{ line-height: 1.2; }

/* Bullets: remove weird hyphens/bullets from theme defaults */
.atp-bullets{ list-style: none !important; padding-left: 0 !important; margin: .6rem 0 0; }
.atp-bullets li{ position: relative; padding-left: 18px; margin: .22rem 0; }
.atp-bullets li:before{
  content:"";
  position:absolute;
  left:0;
  top:.55em;
  width:8px;
  height:8px;
  border-radius:999px;
  background: var(--atp-red);
  box-shadow: 0 0 0 4px rgba(224,25,55,.10);
}

/* Cleaner separators (no grey bands) */
.atp-section + .atp-section{ border-top: 1px solid rgba(10,10,10,.06); }
.atp-page-hero + .atp-section{ border-top: 0; }

/* Stepper polish */
.atp-step-card{ border-left: 4px solid rgba(224,25,55,.55); }
.atp-dot{ width: 16px; height: 16px; }
.atp-rail{ width: 32px; flex: 0 0 32px; }

/* Responsive infographic switching */
.atp-only-mobile{ display:none; }
.atp-only-desktop{ display:block; }
@media (max-width: 900px){
  .atp-only-mobile{ display:block; }
  .atp-only-desktop{ display:none; }
}

/* Figure wrapper for centered infographics inside container */
.atp-figure{ margin-top: 10px; }
.atp-figure .atp-infographic{ margin-left:auto; margin-right:auto; }

/* Bullet markers: never show dashes, keep high contrast */
.atp-bullets{ list-style: disc; }
.atp-bullets li::marker{ color: var(--atp-red); font-weight: 900; }

/* Gutenberg lists inside our sections: enforce readable bullets (no hyphens) */
.atp-section ul{ list-style: disc; padding-left: 1.2rem; }
.atp-section ul li::marker{ color: var(--atp-red); font-weight: 900; }
