/* =====================================================
   PAGE HERO TEMPLATE
   Шаблон для Privacy, Terms, Про мене, Контакти
   Префікс .ph-* щоб не конфліктувати з рештою
   ===================================================== */

.ph-page {
  width: 100%;
}

.ph-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.ph-container--narrow {
  max-width: 820px;
}

/* =====================================================
   HERO
   ===================================================== */
.ph-hero {
  position: relative;
  padding: 80px 24px;
  text-align: center;
  background: var(--bg-card, #f6f7fb);
  overflow: hidden;
}

.ph-hero--bg {
  background-size: cover;
  background-position: center;
  color: #fff;
}

.ph-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 40, 90, 0.75), rgba(75, 94, 240, 0.55));
  z-index: 1;
}

.ph-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}

.ph-hero__title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.ph-hero__subtitle {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.6;
  opacity: 0.88;
}

@media (max-width: 640px) {
  .ph-hero { padding: 56px 20px; }
}

/* =====================================================
   FEATURES
   ===================================================== */
.ph-features {
  padding: 64px 0;
}

.ph-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.ph-feature {
  text-align: center;
  padding: 24px 16px;
}

.ph-feature__icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 16px;
}

.ph-feature__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
}

.ph-feature__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted, #5b6478);
}

/* =====================================================
   CONTENT SECTIONS (two-column з картинкою)
   ===================================================== */
.ph-sections {
  padding: 40px 0 64px;
}

.ph-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}

.ph-section:last-child { margin-bottom: 0; }

.ph-section--text-only {
  grid-template-columns: 1fr;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.ph-section--reversed .ph-section__media { order: -1; }

.ph-section__title {
  margin: 0 0 20px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.2;
  font-weight: 600;
}

.ph-section__text {
  font-size: 1.02rem;
  line-height: 1.75;
}

.ph-section__text p { margin: 0 0 1em; }
.ph-section__text p:last-child { margin-bottom: 0; }
.ph-section__text ul, .ph-section__text ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
  list-style: revert;
}
.ph-section__text li { margin-bottom: 0.4em; }

.ph-section__media img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  .ph-section {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 48px;
  }
  .ph-section--reversed .ph-section__media { order: 0; }
}

/* =====================================================
   WP CONTENT (fallback для Gutenberg)
   ===================================================== */
.ph-wp-content {
  padding: 24px 0 48px;
}

.ph-wp-content .page-content {
  padding: 0;
  max-width: none;
}

/* =====================================================
   FAQ ACCORDION
   ===================================================== */
.ph-faq {
  padding: 64px 0;
  background: var(--bg-card, #f6f7fb);
}

.ph-faq__heading {
  margin: 0 0 32px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  font-weight: 600;
}

.ph-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ph-accordion__item {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border, #e6e8f0);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.ph-accordion__item[open] {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.ph-accordion__q {
  padding: 18px 52px 18px 20px;
  cursor: pointer;
  font-weight: 500;
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  user-select: none;
}

.ph-accordion__q::-webkit-details-marker { display: none; }

.ph-accordion__q::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent, #4b5ef0);
  transition: transform 0.2s;
}

.ph-accordion__item[open] .ph-accordion__q::after {
  content: '−';
}

.ph-accordion__a {
  padding: 0 20px 20px;
  line-height: 1.7;
  color: var(--text-muted, #5b6478);
}

.ph-accordion__a p { margin: 0 0 0.8em; }
.ph-accordion__a p:last-child { margin-bottom: 0; }

/* =====================================================
   CTA CARD
   ===================================================== */
.ph-cta {
  padding: 64px 0;
}

.ph-cta__card {
  background: linear-gradient(135deg, var(--accent, #4b5ef0), #6d7df5);
  color: #fff;
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(75, 94, 240, 0.25);
}

.ph-cta__title {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
}

.ph-cta__text {
  margin: 0 0 24px;
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.95;
}

.ph-cta__btn {
  display: inline-block;
  padding: 14px 32px;
  background: #fff;
  color: var(--accent, #4b5ef0);
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}

.ph-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* =====================================================
   CONTACT FORM
   ===================================================== */
.ph-contact {
  padding: 64px 0;
  background: var(--bg-card, #f6f7fb);
}

.ph-contact__heading {
  margin: 0 0 32px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  font-weight: 600;
}

.ph-contact-form {
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}

.ph-field {
  margin-bottom: 20px;
}

.ph-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.95rem;
}

.ph-required {
  color: #d64545;
}

.ph-field input,
.ph-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border, #e6e8f0);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ph-field input:focus,
.ph-field textarea:focus {
  outline: none;
  border-color: var(--accent, #4b5ef0);
  box-shadow: 0 0 0 3px rgba(75, 94, 240, 0.15);
}

.ph-field textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* Honeypot — приховати від людей, боти заповнять */
.ph-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ph-contact-form__submit {
  padding: 14px 32px;
  background: var(--accent, #4b5ef0);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.ph-contact-form__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(75, 94, 240, 0.3);
}

.ph-contact-form__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.ph-contact-form__status {
  margin-top: 16px;
  font-size: 0.95rem;
  min-height: 1.2em;
}

.ph-contact-form__status.is-success {
  color: #2a7f4f;
}

.ph-contact-form__status.is-error {
  color: #c53030;
}

@media (max-width: 640px) {
  .ph-contact-form { padding: 24px 20px; }
  .ph-cta__card { padding: 36px 24px; }
}
