/*
 * OTORIXA Paket 25 — Public Template Standard
 * Scope: content hub/detail, forum, regional authority and contact.
 * The V2 services/location family remains the reference. This layer only
 * converges spacing, widths, surfaces, buttons and mobile behavior.
 */

.otx-template-standard {
  --otx-p25-shell: 1180px;
  --otx-p25-radius: 24px;
  --otx-p25-radius-sm: 16px;
  --otx-p25-gap: clamp(18px, 2.4vw, 30px);
  --otx-p25-section: clamp(46px, 6vw, 78px);
}

/* Common public width rhythm */
.otx-template-content-index,
.otx-template-regional,
.otx-template-forum,
.otx-template-contact,
.otx-template-content-detail {
  width: min(100%, 100%);
  margin-inline: auto;
}

.otx-template-standard :where(.landing-breadcrumb,.landing-hero,.landing-section,.landing-cta-block,.forum-v2-breadcrumb,.forum-v2-hero,.forum-v2-section,.otx-contact-shell,.otx-cd-hero,.otx-cd-answer-belt,.otx-cd-main-section) {
  max-width: var(--otx-p25-shell);
  margin-left: auto;
  margin-right: auto;
}

/* Align the legacy landing family with the V2 surface language. */
.otx-template-standard:where(.landing) :where(.landing-hero,.landing-section,.landing-cta-block),
.otx-template-forum :where(.forum-v2-hero,.forum-v2-card,.forum-v2-cta,.forum-v2-faq),
.otx-template-contact :where(.otx-contact-panel,.otx-contact-card,.otx-contact-form-card,.otx-contact-side > *),
.otx-template-content-detail :where(.otx-cd-answer-main,.otx-cd-answer-card,.otx-cd-article,.otx-cd-block,.otx-cd-visual) {
  border-radius: var(--otx-p25-radius);
}

.otx-template-standard :where(.landing-section,.forum-v2-section,.otx-contact-section,.otx-cd-main-section) {
  scroll-margin-top: 96px;
}

/* Buttons/links use the same sizing and interaction density as services V2. */
.otx-template-standard :where(.landing-cta-primary,.landing-cta-secondary,.forum-v2-actions a,.forum-v2-cta a,.otx-contact-btn,.otx-contact-submit,.otx-cd-btn) {
  min-height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  line-height: 1.15;
}

/* Card grids: same minimum card width and predictable stretching. */
.otx-template-standard :where(.otx-category-surface,.landing-related,.forum-v2-grid,.otx-contact-grid,.regional-media-grid,.regional-audience-grid,.regional-proof-grid) {
  align-items: stretch;
}

.otx-template-standard :where(.otx-category-card,.landing-related > a,.forum-v2-card,.otx-contact-card) {
  min-width: 0;
  height: 100%;
}

/* Prevent old template images from forcing uneven page widths. */
.otx-template-standard img {
  max-width: 100%;
  height: auto;
}

.otx-template-standard :where(.landing-hero-grid,.otx-smart-hub-grid,.otx-cd-main-grid,.otx-contact-hero-grid,.otx-contact-form-shell) > * {
  min-width: 0;
}

/* Content detail readability follows V2 long-copy width. */
.otx-template-content-detail :where(.otx-smart-prose,.otx-cd-copy-stack,.otx-cd-article p,.otx-cd-article li) {
  text-wrap: pretty;
}

/* Forum becomes a first-class V2 surface rather than a separate visual product. */
.otx-template-forum {
  padding-bottom: var(--otx-p25-section);
}
.otx-template-forum .forum-v2-breadcrumb {
  padding-left: clamp(16px, 3vw, 30px);
  padding-right: clamp(16px, 3vw, 30px);
}
.otx-template-forum .forum-v2-hero,
.otx-template-forum .forum-v2-section {
  width: min(calc(100% - 32px), var(--otx-p25-shell));
}

/* Contact uses the same public page shell on large screens. */
.otx-template-contact .otx-contact-shell {
  width: min(calc(100% - 32px), var(--otx-p25-shell));
}

/* Regional pages no longer visually inherit the old emlak-era yellow identity. */
.otx-template-regional {
  --otx-accent: var(--otx-brand, #28d7e5) !important;
}

@media (max-width: 760px) {
  .otx-template-standard {
    --otx-p25-radius: 18px;
    --otx-p25-radius-sm: 14px;
    --otx-p25-section: 38px;
  }

  .otx-template-standard :where(.landing-hero,.landing-section,.landing-cta-block,.forum-v2-hero,.forum-v2-section,.otx-contact-shell,.otx-cd-hero,.otx-cd-answer-belt,.otx-cd-main-section) {
    width: min(calc(100% - 24px), var(--otx-p25-shell));
  }

  .otx-template-standard :where(.landing-hero-actions,.forum-v2-actions,.otx-contact-hero-actions,.otx-cd-actions) {
    width: 100%;
  }

  .otx-template-standard :where(.landing-cta-primary,.landing-cta-secondary,.forum-v2-actions a,.otx-contact-btn,.otx-contact-submit,.otx-cd-btn) {
    width: 100%;
  }

  .otx-template-standard :where(.otx-category-surface,.landing-related,.forum-v2-grid,.otx-contact-grid,.regional-media-grid,.regional-audience-grid,.regional-proof-grid) {
    grid-template-columns: 1fr !important;
  }
}
