/*!
 * 123PhotoTool: the content under a tool (inc/tool-content.inc.php).
 *
 * One look for every page: an answer-first summary with the key facts,
 * a dark before/after band, three steps with pictures, feature rows that
 * alternate sides, an "at a glance" table, the FAQ, related tools and a
 * closing call to action. Icons are the tool icons' squircle tiles
 * (pt_content_icon), never the theme's icon sets.
 *
 * Loaded on every page by head-ui.inc.php. Behaviour: pt-content.js.
 */
.ptc {
  --ptc-ink: #1d2433;
  --ptc-text: #465163;
  --ptc-muted: #667185;
  --ptc-bg: #f4f6fa;
  --ptc-line: #e2e7ef;
  --ptc-dark: #151a23;
  --ptc-frame: #252b36;
  --ptc-accent: var(--pt-accent, #3f78e0);
  --ptc-accent-hover: #2f63c4;
  --ptc-shadow: 0 24px 50px -26px rgba(21, 30, 48, 0.38);
  --ptc-radius: 24px;
  color: var(--ptc-text);
  background: var(--ptc-bg);
}
.ptc h2,
.ptc h3 {
  color: var(--ptc-ink);
  letter-spacing: -0.02em;
  word-spacing: normal;
}
.ptc p { line-height: 1.65; }
.ptc img { max-width: 100%; }

.ptc-section { padding: 88px 0; }
.ptc-section-tight { padding: 44px 0; }
.ptc-title {
  max-width: 860px;
  margin: 0 auto 44px;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem) !important;
  font-weight: 800;
  line-height: 1.12;
  text-align: center;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}
/* Japanese breaks between characters, so a heading could end on one kana
   ("を"); break between phrases instead (Chrome 119+, others ignore it). */
.ptc :is(h2, h3):lang(ja) { word-break: auto-phrase; }

/* The icons: the tool icons' tile, at a few sizes. */
.ptc-icon { display: block; flex: none; width: 48px; height: 48px; }
.ptc-icon-sm { width: 34px; height: 34px; }
.ptc-icon-xs { width: 26px; height: 26px; }

/* ---- Summary: the answer first, then the key facts ---- */

.ptc-summary { padding-bottom: 72px; text-align: center; }
.ptc-summary .ptc-title { margin-bottom: 20px; }
.ptc-lead {
  max-width: 780px;
  margin: 0 auto;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--ptc-text);
}
.ptc-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 960px;
  margin: 34px auto 0;
  padding: 0;
  list-style: none;
}
.ptc-facts li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px 16px 7px 8px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ptc-ink);
  text-align: start;
  background: #fff;
  border: 1px solid var(--ptc-line);
  border-radius: 999px;
  box-shadow: 0 8px 20px -16px rgba(21, 30, 48, 0.4);
}
[dir="rtl"] .ptc-facts li { padding: 7px 8px 7px 16px; }

/* ---- Before / after: a dark band that the frame hangs out of ---- */

.ptc-compare {
  padding: 84px 0 0;
  text-align: center;
  color: #c8cdd6;
  background: linear-gradient(to bottom, var(--ptc-dark) 0, var(--ptc-dark) 62%, var(--ptc-bg) 62%);
}
.ptc-compare .ptc-title { margin-bottom: 12px; color: #fff; }
.ptc-compare-sub { max-width: 600px; margin: 0 auto; font-size: 1.05rem; }
.ptc-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 0;
}
.ptc-chip {
  min-height: 40px;
  padding: 7px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #d9dde3;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.ptc-chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.ptc-chip[aria-pressed="true"] { color: var(--ptc-ink); background: #fff; border-color: #fff; }
.ptc-chip:focus-visible { outline: 3px solid #8bb6ff; outline-offset: 2px; }
.ptc-compare-frame {
  max-width: 960px;
  margin: 36px auto 0;
  padding: 12px;
  background: var(--ptc-frame);
  border-radius: 22px;
  box-shadow: 0 34px 70px -30px rgba(0, 0, 0, 0.6);
}

/* The slider itself: the "after" picture underneath, the "before" one on
   top cut at --pos. The range input is the control for keyboards and
   screen readers; pointers drag the picture (pt-content.js). */
.ptc-ba {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 14px;
  background: #3a404b;
  cursor: ew-resize;
  touch-action: pan-y;          /* a vertical swipe still scrolls the page */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ptc-ba img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ptc-ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ptc-ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.ptc-ba-handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ptc-accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.ptc-ba-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;         /* focusable, but the picture takes the pointer */
}
.ptc-ba-range:focus-visible ~ .ptc-ba-handle { outline: 3px solid #fff; outline-offset: 3px; }
.ptc-ba-label {
  position: absolute;
  top: 14px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  background: rgba(21, 26, 35, 0.66);
  border-radius: 999px;
  pointer-events: none;
}
.ptc-ba-label-before { left: 14px; }
.ptc-ba-label-after { right: 14px; }
.ptc-ba-wait .ptc-ba-after,
.ptc-ba-wait .ptc-ba-before { visibility: hidden; }   /* until both pictures of a new pair are in */
.ptc-ba-ease .ptc-ba-before { transition: clip-path 0.35s ease; }
.ptc-ba-ease .ptc-ba-line,
.ptc-ba-ease .ptc-ba-handle { transition: left 0.35s ease; }
@media (prefers-reduced-motion: reduce) {
  .ptc-ba-ease .ptc-ba-before,
  .ptc-ba-ease .ptc-ba-line,
  .ptc-ba-ease .ptc-ba-handle { transition: none; }
}

/* ---- How it works: three numbered steps with pictures ---- */

.ptc-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ptc-step { min-width: 0; }
.ptc-step-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  margin-bottom: 22px;
  border-radius: 18px;
  background: #e6eaf1;
  box-shadow: var(--ptc-shadow);
}
.ptc-step-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ptc-step-media .ptc-ba { position: absolute; top: 0; left: 0; height: 100%; border-radius: 0; }
.ptc-step-media .ptc-ba-label { top: auto; bottom: 12px; }   /* the step icon is at the top */
.ptc-step-media .ptc-ba-handle { width: 38px; height: 38px; }
.ptc-step-icon {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}
.ptc-step h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.3;
}
.ptc-step-n {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: var(--ptc-accent);
  border-radius: 50%;
  transform: translateY(-1px);
}
.ptc-step p { margin: 0; color: var(--ptc-muted); }

/* Steps without pictures: cards, the icon on top. */
.ptc-step-card {
  padding: 28px 26px 26px;
  background: #fff;
  border: 1px solid var(--ptc-line);
  border-radius: 22px;
  box-shadow: 0 18px 40px -30px rgba(21, 30, 48, 0.45);
}
.ptc-step-card .ptc-icon { margin-bottom: 18px; }

/* ---- Cards: short points with an icon each ---- */

.ptc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.ptc-cardlet {
  min-width: 0;
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--ptc-line);
  border-radius: 22px;
  box-shadow: 0 18px 40px -30px rgba(21, 30, 48, 0.45);
}
.ptc-cardlet .ptc-icon { margin-bottom: 16px; }
.ptc-cardlet h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
  hyphens: auto;
}
.ptc-cardlet p { margin: 0; color: var(--ptc-muted); }

/* ---- Feature rows: picture and text, alternating sides ---- */

.ptc-feature {
  display: flex;
  align-items: center;
  gap: 64px;
  padding: 36px 0;
}
.ptc-feature:nth-child(even) { flex-direction: row-reverse; }
.ptc-feature-media {
  position: relative;
  flex: 1 1 50%;
  width: 100%;
  min-width: 0;
  max-width: 520px;
}
.ptc-feature-media::before {   /* a soft glow behind the picture */
  content: "";
  position: absolute;
  top: 8%;
  right: 8%;
  bottom: 8%;
  left: 8%;
  z-index: 0;
  background: radial-gradient(closest-side, rgba(63, 120, 224, 0.28), transparent),
              radial-gradient(closest-side at 22% 80%, rgba(139, 92, 246, 0.24), transparent);
  filter: blur(30px);
}
.ptc-feature-media > img,
.ptc-feature-media > .ptc-ba {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;   /* the width and height attributes only reserve the shape */
  border: 8px solid #fff;
  border-radius: var(--ptc-radius);
  background: #fff;
  box-shadow: var(--ptc-shadow);
}
.ptc-feature-media > .ptc-ba img { border-radius: 16px; }
.ptc-feature-text { flex: 1 1 50%; min-width: 0; }
.ptc-feature-text h3 {
  margin-bottom: 16px;
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  font-weight: 800;
  line-height: 1.18;
  overflow-wrap: break-word;
  hyphens: auto;
}
.ptc-feature-text p { margin: 0; font-size: 1.05rem; color: var(--ptc-muted); }

/* ---- Cards: at a glance, FAQ ---- */

.ptc-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 44px clamp(18px, 4vw, 44px);
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 30px 60px -36px rgba(21, 30, 48, 0.38);
}
.ptc-card h2 {
  margin-bottom: 28px;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: break-word;
  hyphens: auto;
}
.ptc-glance table { width: 100%; border-collapse: collapse; }
.ptc-glance th,
.ptc-glance td {
  padding: 14px 6px;
  vertical-align: top;
  text-align: start;
  border-bottom: 1px solid var(--ptc-line);
}
.ptc-glance tr:last-child th,
.ptc-glance tr:last-child td { border-bottom: 0; }
.ptc-glance th { width: 34%; padding-inline-end: 18px; font-weight: 700; color: var(--ptc-ink); }
.ptc-glance td { color: var(--ptc-text); }
.ptc-updated { margin: 18px 0 0; font-size: 0.85rem; color: var(--ptc-muted); text-align: center; }

/* A side-by-side table (a converter's two formats). */
.ptc-card-sub { max-width: 640px; margin: -14px auto 24px; color: var(--ptc-muted); text-align: center; }
.ptc-vs table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ptc-vs th,
.ptc-vs td {
  padding: 13px 10px;
  vertical-align: top;
  text-align: start;
  overflow-wrap: break-word;
  border-bottom: 1px solid var(--ptc-line);
}
.ptc-vs thead th {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ptc-ink);
  border-bottom: 2px solid var(--ptc-line);
}
.ptc-vs thead td { width: 30%; border-bottom: 2px solid var(--ptc-line); }
.ptc-vs tbody th { font-weight: 700; color: var(--ptc-ink); }
.ptc-vs tbody tr:last-child th,
.ptc-vs tbody tr:last-child td { border-bottom: 0; }

.ptc-faq details {
  margin-bottom: 12px;
  border: 1px solid var(--ptc-line);
  border-radius: 16px;
  background: #fff;
  transition: box-shadow 0.15s;
}
.ptc-faq details:last-child { margin-bottom: 0; }
.ptc-faq details[open] { box-shadow: 0 10px 24px -16px rgba(21, 30, 48, 0.38); }
.ptc-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 16px 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ptc-ink);
  list-style: none;
  cursor: pointer;
  overflow-wrap: break-word;
}
.ptc-faq summary::-webkit-details-marker { display: none; }
.ptc-faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ptc-muted);
}
.ptc-faq details[open] summary::after { content: "\2212"; }
.ptc-faq summary:focus-visible { outline: 3px solid var(--ptc-accent); outline-offset: 2px; border-radius: 16px; }
.ptc-faq details p { margin: 0; padding: 0 22px 20px; color: var(--ptc-muted); }

/* ---- Related tools ---- */

.ptc-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}
.ptc-tool {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 72px;
  padding: 12px 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ptc-ink);
  background: #fff;
  border: 1px solid var(--ptc-line);
  border-radius: 18px;
  box-shadow: 0 18px 40px -30px rgba(21, 30, 48, 0.45);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.ptc-tool span { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.ptc-tool:hover,
.ptc-tool:focus-visible {
  color: var(--ptc-ink);
  border-color: #cdd6e4;
  transform: translateY(-2px);
  box-shadow: 0 24px 46px -28px rgba(21, 30, 48, 0.5);
}
.ptc-tool-icon { display: block; flex: none; width: 44px; height: 44px; }

/* ---- Closing call to action ---- */

.ptc-cta {
  position: relative;
  overflow: hidden;
  padding: 96px 0 108px;
  text-align: center;
  background:
    radial-gradient(34% 60% at 18% 60%, rgba(63, 120, 224, 0.20), transparent 70%),
    radial-gradient(30% 56% at 82% 40%, rgba(139, 92, 246, 0.18), transparent 70%),
    radial-gradient(26% 50% at 52% 100%, rgba(20, 184, 166, 0.16), transparent 70%),
    var(--ptc-bg);
}
.ptc-cta h2 {
  max-width: 860px;
  margin: 0 auto 30px;
  font-size: clamp(1.9rem, 4.6vw, 3.3rem) !important;
  font-weight: 800;
  line-height: 1.08;
  overflow-wrap: break-word;
  hyphens: auto;
}
.ptc-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 28px 12px 14px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: var(--ptc-accent);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 26px -12px rgba(63, 120, 224, 0.7);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
}
[dir="rtl"] .ptc-cta-btn { padding: 12px 14px 12px 28px; }
.ptc-cta-btn:hover,
.ptc-cta-btn:focus-visible {
  background: var(--ptc-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -12px rgba(63, 120, 224, 0.75);
}
.ptc-cta-btn:focus-visible { outline: 3px solid rgba(63, 120, 224, 0.45); outline-offset: 3px; }

/* ---- Tablets and phones ---- */

@media (max-width: 991.98px) {
  .ptc-steps { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; gap: 40px; }
  .ptc-feature { gap: 40px; }
}
@media (max-width: 767.98px) {
  .ptc-section { padding: 60px 0; }
  .ptc-section-tight { padding: 30px 0; }
  .ptc-summary { padding-bottom: 52px; }
  .ptc-title { margin-bottom: 32px; }
  .ptc-facts { gap: 8px; margin-top: 26px; }
  .ptc-facts li { font-size: 0.9rem; }
  .ptc-compare { padding-top: 60px; }
  .ptc-chips { gap: 6px; }
  .ptc-chip { padding: 7px 13px; font-size: 0.92rem; }
  .ptc-compare-frame { margin-top: 26px; padding: 8px; border-radius: 18px; }
  .ptc-ba { border-radius: 12px; }
  .ptc-ba-handle { width: 40px; height: 40px; }
  .ptc-ba-label { top: 10px; padding: 3px 10px; font-size: 0.75rem; }
  .ptc-ba-label-before { left: 10px; }
  .ptc-ba-label-after { right: 10px; }
  .ptc-feature,
  .ptc-feature:nth-child(even) { flex-direction: column; gap: 26px; padding: 22px 0; }
  .ptc-feature-media { max-width: 560px; }
  .ptc-card { padding: 32px 16px; border-radius: 22px; }
  .ptc-card h2 { margin-bottom: 22px; }
  .ptc-glance th,
  .ptc-glance td { display: block; width: auto; padding: 0; border: 0; }
  .ptc-glance th { padding-top: 14px; }
  .ptc-glance td { padding: 3px 0 14px; border-bottom: 1px solid var(--ptc-line); }
  .ptc-glance tr:last-child td { border-bottom: 0; }
  .ptc-vs th,
  .ptc-vs td { padding: 11px 6px; font-size: 0.92rem; }
  .ptc-vs thead td { width: 32%; }
  .ptc-step-card,
  .ptc-cardlet { padding: 22px 18px; }
  .ptc-faq summary { padding: 14px 16px; }
  .ptc-faq details p { padding: 0 16px 16px; }
  .ptc-cta { padding: 68px 0 76px; }
}
