/* ============================================================
   Just KHI — Frontend Section Styles (sections.css)
   Used by page.php when rendering CMS sections
   ============================================================ */

:root {
  --khi-accent:   #16a34a;
  --khi-blue:     #2563eb;
  --khi-dark:     #0f172a;
  --khi-text:     #334155;
  --khi-muted:    #64748b;
  --khi-border:   #e2e8f0;
  --khi-radius:   12px;
  --khi-container:1100px;
}

/* Container */
.khi-container {
  max-width: var(--khi-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Common section wrapper */
.khi-section { padding: 5rem 0; }

/* Section headings */
.khi-section__heading {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--khi-dark);
  margin: 0 0 1rem;
  line-height: 1.2;
}
.khi-section__sub {
  font-size: 1.05rem;
  color: var(--khi-muted);
  margin: 0 0 2rem;
}

/* Prose (rich text output) */
.khi-prose { line-height: 1.8; color: var(--khi-text); font-size: 1.05rem; }
.khi-prose h1,.khi-prose h2,.khi-prose h3 { color: var(--khi-dark); font-weight: 700; margin: 1.25rem 0 .5rem; }
.khi-prose p  { margin: 0 0 1rem; }
.khi-prose ul,.khi-prose ol { padding-left: 1.5rem; margin: 0 0 1rem; }
.khi-prose li { margin-bottom: .4rem; }
.khi-prose a  { color: var(--khi-accent); }
.khi-prose strong { color: var(--khi-dark); }

/* Utilities */
.khi-text-center { text-align: center; }
.khi-mt { margin-top: 1.5rem; }

/* Buttons */
.khi-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .75rem 1.75rem; border-radius: 8px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  transition: .2s; cursor: pointer; border: 2px solid transparent;
}
.khi-btn--primary     { background: var(--khi-accent); color: #fff; }
.khi-btn--primary:hover{ background: #15803d; }
.khi-btn--outline     { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.khi-btn--outline:hover{ background: rgba(255,255,255,.15); }
.khi-btn--light       { background: #fff; color: var(--khi-dark); }
.khi-btn--light:hover { background: #f1f5f9; }
.khi-btn--outline-light{ background:transparent; color:#fff; border-color:rgba(255,255,255,.5); }
.khi-btn--outline-light:hover{ background:rgba(255,255,255,.1); }

/* ─── HERO ─────────────────────────────────────────────── */
.khi-hero {
  min-height: 70vh; display: flex; align-items: center;
  position: relative; color: #fff;
  background-size: cover; background-position: center;
}
.khi-hero .khi-container { width: 100%; padding: 4rem 1.5rem; }
.khi-hero__heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; color: #fff;
  margin: 0 0 1rem; line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.khi-hero__sub {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255,255,255,.88); margin: 0 0 2rem; max-width: 600px;
}
.khi-hero .khi-container[style*="center"] .khi-hero__sub { margin-left: auto; margin-right: auto; }
.khi-hero__btns { display: flex; flex-wrap: wrap; gap: 1rem; }
.khi-hero .khi-container[style*="center"] .khi-hero__btns { justify-content: center; }
.khi-hero .khi-container[style*="right"]  .khi-hero__btns { justify-content: flex-end; }

/* ─── TEXT BLOCK ───────────────────────────────────────── */
.khi-text-block { background: #fff; }

/* ─── IMAGE + TEXT ─────────────────────────────────────── */
.khi-image-text__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.khi-image-text--reverse .khi-image-text__inner {
  direction: rtl;
}
.khi-image-text--reverse .khi-image-text__inner > * {
  direction: ltr;
}
.khi-image-text__img img {
  width: 100%; border-radius: var(--khi-radius);
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}
.khi-image-text__placeholder {
  width: 100%; min-height: 300px; background: #f1f5f9;
  border-radius: var(--khi-radius); display: flex;
  align-items: center; justify-content: center; font-size: 3rem;
}
@media(max-width: 768px) {
  .khi-image-text__inner { grid-template-columns: 1fr; gap: 2rem; }
  .khi-image-text--reverse .khi-image-text__inner { direction: ltr; }
}

/* ─── FEATURES ─────────────────────────────────────────── */
.khi-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.khi-feature-card {
  background: #fff; border-radius: var(--khi-radius);
  padding: 2rem; border: 1px solid var(--khi-border);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}
.khi-feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.1); }
.khi-feature-card__icon  { font-size: 2rem; margin-bottom: .75rem; }
.khi-feature-card__title { font-size: 1.15rem; font-weight: 700; color: var(--khi-dark); margin: 0 0 .5rem; }
.khi-feature-card__desc  { font-size: .9rem; color: var(--khi-muted); line-height: 1.6; margin: 0; }

/* ─── GALLERY ──────────────────────────────────────────── */
.khi-gallery__grid {
  display: grid; gap: 1rem; margin-top: 2rem;
}
.khi-gallery__item img {
  width: 100%; height: 220px; object-fit: cover;
  border-radius: 8px; display: block;
  transition: transform .2s, box-shadow .2s;
}
.khi-gallery__item img:hover { transform: scale(1.02); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
@media(max-width:600px) { .khi-gallery__grid { grid-template-columns: 1fr 1fr !important; } }

/* ─── TESTIMONIALS ─────────────────────────────────────── */
.khi-testimonials { padding: 5rem 0; }
.khi-testimonials .khi-section__heading { color: #fff !important; }
.khi-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.khi-testimonial-card {
  background: rgba(255,255,255,.07); border-radius: var(--khi-radius);
  padding: 2rem; border: 1px solid rgba(255,255,255,.12);
}
.khi-testimonial-card__quote {
  font-size: 1.05rem; color: rgba(255,255,255,.88);
  line-height: 1.7; font-style: italic; margin: 0 0 1.25rem;
}
.khi-testimonial-card__author {
  display: flex; align-items: center; gap: .75rem;
}
.khi-testimonial-card__avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.3);
}
.khi-testimonial-card__author strong { display: block; color: #fff; font-size: .9rem; }
.khi-testimonial-card__author span   { color: rgba(255,255,255,.55); font-size: .8rem; }

/* ─── CTA ──────────────────────────────────────────────── */
.khi-cta { padding: 5rem 0; text-align: center; }
.khi-cta__heading { font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 800; margin: 0 0 .75rem; }
.khi-cta__sub     { font-size: 1.1rem; opacity: .85; margin: 0 0 2rem; }

/* ─── Responsive ───────────────────────────────────────── */
@media(max-width: 640px) {
  .khi-section { padding: 3rem 0; }
  .khi-hero    { min-height: 55vh; }
  .khi-hero__btns { flex-direction: column; }
  .khi-features__grid { grid-template-columns: 1fr; }
}
