/* ============================================
   PAGE TEMPLATE - MOBILE-FIRST DESIGN SYSTEM
   Extends Kargoza home design to inner pages
   Mobile rules live BELOW 768px; desktop fallback
   above 769px (and inside the page wrapper).
   ============================================ */

/* ===== INNER PAGE HERO (mobile-first) ===== */
.ip-hero {
  position: relative;
  background-color: #0a0a0a;
  background-image: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  color: #fff;
  padding: 88px 16px 36px; /* leave room for fixed header (60px) + visual breath */
  overflow: hidden;
  isolation: isolate;
}

.ip-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(211, 27, 44, 0.18), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(211, 27, 44, 0.08), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.ip-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.ip-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d31b2c;
  margin-bottom: 14px;
}

.ip-hero-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: #d31b2c;
  display: inline-block;
}

.ip-hero h1 {
  font-family: 'Outfit', sans-serif;
  color: #fff !important;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.ip-hero h1 .ip-hero-accent {
  color: #d31b2c;
  display: inline;
}

.ip-hero-lede {
  font-size: 15px;
  line-height: 1.55;
  color: #c4c4c4;
  margin: 0 0 22px;
  max-width: 56ch;
}

.ip-hero-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.ip-hero-cta .btn {
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
  font-size: 14px;
}

/* ===== BREADCRUMBS (mobile) ===== */
.ip-breadcrumbs {
  background: #f7f7f7;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
  padding: 10px 16px;
  font-size: 12px;
}

.ip-breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #6b6b6b;
  font-weight: 500;
  max-width: 1280px;
  margin: 0 auto;
}

.ip-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ip-breadcrumbs a {
  color: #6b6b6b;
  text-decoration: none;
  transition: color 0.2s;
}

.ip-breadcrumbs a:hover { color: #d31b2c; }

.ip-breadcrumbs [aria-current="page"] {
  color: #1a1a1a;
  font-weight: 600;
}

.ip-breadcrumbs .ip-bc-sep {
  color: #b5b5b5;
  user-select: none;
}

/* ===== MAIN CONTENT WRAPPER ===== */
.ip-main {
  background: #fff;
  padding: 28px 0 48px;
}

.ip-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.ip-content > * { margin: 0 0 18px; }
.ip-content h2 {
  font-family: 'Outfit', sans-serif;
  color: #0a0a0a;
  font-size: clamp(20px, 5vw, 26px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 28px 0 10px;
}

.ip-content h2:first-child { margin-top: 0; }

.ip-content h3 {
  font-family: 'Outfit', sans-serif;
  color: #1a1a1a;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 600;
  margin: 22px 0 8px;
}

.ip-content p {
  font-size: 15px;
  line-height: 1.65;
  color: #404040;
  margin: 0 0 14px;
}

.ip-content ul,
.ip-content ol {
  margin: 0 0 18px;
  padding-left: 20px;
  color: #404040;
  font-size: 15px;
  line-height: 1.65;
}

.ip-content li { margin-bottom: 6px; }

.ip-content a {
  color: #d31b2c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ip-content a:hover { color: #b31525; }

.ip-content strong { color: #1a1a1a; }

/* ===== INFO / FEATURE CARDS GRID (mobile) ===== */
.ip-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 24px 0;
}

.ip-feature {
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ip-feature-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  background: rgba(211, 27, 44, 0.08);
  color: #d31b2c;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ip-feature-icon svg { width: 20px; height: 20px; }

.ip-feature-text { flex: 1; min-width: 0; }

.ip-feature-text h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #0a0a0a;
  margin: 0 0 4px;
  line-height: 1.3;
}

.ip-feature-text p {
  font-size: 13px;
  color: #5a5a5a;
  margin: 0;
  line-height: 1.5;
}

/* ===== 2-COL / 3-COL STAT STRIP (mobile) ===== */
.ip-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 24px 0;
}

.ip-stat {
  background: #0a0a0a;
  color: #fff;
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
}

.ip-stat strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #d31b2c;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.ip-stat span {
  font-size: 11px;
  color: #c4c4c4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== CTA BAND (mobile) ===== */
.ip-cta-band {
  background: linear-gradient(135deg, #d31b2c 0%, #b31525 100%);
  color: #fff;
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  margin: 28px 0 0;
}

.ip-cta-band h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #fff;
  line-height: 1.25;
}

.ip-cta-band p {
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  margin: 0 0 14px;
  line-height: 1.5;
}

.ip-cta-band .btn {
  background: #fff;
  color: #d31b2c;
  border: none;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 13px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

/* ===== FAQ (mobile accordion) ===== */
.ip-faq {
  margin: 24px 0 0;
}

.ip-faq-item {
  border: 1px solid #ececec;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
}

.ip-faq-item summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #0a0a0a;
  list-style: none;
  position: relative;
  padding-right: 44px;
  font-family: 'Outfit', sans-serif;
  line-height: 1.4;
}

.ip-faq-item summary::-webkit-details-marker { display: none; }

.ip-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #d31b2c;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s;
}

.ip-faq-item[open] summary::after {
  content: "−";
}

.ip-faq-item .ip-faq-body {
  padding: 0 16px 14px;
  font-size: 14px;
  color: #404040;
  line-height: 1.6;
}

/* ===== RELATED LINKS (mobile) ===== */
.ip-related {
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid #ececec;
}

.ip-related h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0 0 12px;
}

.ip-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.ip-related a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 8px;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.ip-related a:hover {
  background: #fff;
  border-color: #d31b2c;
  color: #d31b2c;
}

.ip-related a::after {
  content: "→";
  color: #d31b2c;
  font-weight: 600;
}

/* ===== DESKTOP OVERRIDES (>= 769px) ===== */
@media (min-width: 769px) {
  .ip-hero {
    padding: 140px 32px 60px;
  }
  .ip-hero-inner {
    max-width: 900px;
  }
  .ip-hero h1 {
    font-size: clamp(36px, 4.5vw, 52px);
  }
  .ip-hero-lede {
    font-size: 17px;
  }
  .ip-hero-cta {
    flex-direction: row;
    gap: 12px;
  }
  .ip-hero-cta .btn {
    width: auto;
    padding: 14px 28px;
    font-size: 14px;
  }
  .ip-breadcrumbs {
    padding: 14px 32px;
    font-size: 13px;
  }
  .ip-breadcrumbs ol {
    padding: 0;
  }
  .ip-main { padding: 56px 0 72px; }
  .ip-container { padding: 0 32px; }
  .ip-content > * { margin-bottom: 22px; }
  .ip-content h2 {
    font-size: clamp(26px, 3vw, 34px);
    margin: 36px 0 14px;
  }
  .ip-content h3 {
    font-size: 20px;
  }
  .ip-content p {
    font-size: 16px;
    line-height: 1.7;
  }
  .ip-features {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .ip-feature {
    padding: 22px;
  }
  .ip-feature-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }
  .ip-feature-text h3 { font-size: 17px; }
  .ip-feature-text p { font-size: 14px; }
  .ip-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .ip-stat {
    padding: 22px 14px;
  }
  .ip-stat strong { font-size: 28px; }
  .ip-stat span { font-size: 12px; }
  .ip-cta-band {
    padding: 32px;
  }
  .ip-cta-band h3 { font-size: 22px; }
  .ip-cta-band p { font-size: 14px; }
  .ip-related ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .ip-faq-item summary { font-size: 15px; }
  .ip-faq-item .ip-faq-body { font-size: 15px; }
}

@media (min-width: 1025px) {
  .ip-hero { padding: 160px 40px 80px; }
  .ip-hero h1 { font-size: clamp(40px, 4vw, 56px); }
  .ip-main { padding: 72px 0 96px; }
  .ip-container { padding: 0 40px; }
  .ip-content h2 { font-size: clamp(30px, 3vw, 40px); }
}

/* ===== KILL OLD INLINE STYLES & LEFTOVER GARBAGE ===== */
.page-hero,
.page-content section,
.content-wrapper { all: revert; }

/* Remove leftover inline-style headers/backgrounds from legacy content */
.page-content > div[style*="background: linear-gradient"] {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: left !important;
  color: inherit !important;
}

.page-content > div[style*="background: linear-gradient"] * { color: inherit !important; }

/* Strip hero inline h1/p paddings inside the page content */
.page-content h1[style*="font-size: 3rem"],
.page-content h1[style*="font-size"] {
  font-size: inherit !important;
  color: inherit !important;
  margin: 0 !important;
}

.page-content p[style*="font-size: 1.25rem"] {
  font-size: inherit !important;
  color: inherit !important;
  max-width: none !important;
  margin: 0 0 14px !important;
}

/* Make sure no rogue hero eats mobile space */
.page-content > .page-hero,
.page-content > div.page-hero,
.page-content > section.page-hero { display: none !important; }

/* Reset legacy grid/columns that use inline styles and break mobile */
.page-content .row,
.page-content [class*="col-"] {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.page-content [style*="display: flex"] {
  display: block !important;
}

.page-content [style*="display: grid"] {
  display: block !important;
}

.page-content [style*="display: inline-flex"] {
  display: inline-flex !important;
}

/* Form polish for legacy content (Contact / Quote pages) */
.page-content form {
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 18px;
  margin: 18px 0;
}

.page-content form input,
.page-content form select,
.page-content form textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.page-content form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.page-content form button[type="submit"],
.page-content form input[type="submit"] {
  background: #d31b2c;
  color: #fff;
  border: none;
  padding: 14px 22px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  margin: 0;
}

.page-content form button[type="submit"]:hover,
.page-content form input[type="submit"]:hover {
  background: #b31525;
}
