/* =============================================
   iProv Base CSS
   Shared foundation for all iProv static sites.
   Override custom properties in site.css.
   ============================================= */

/* ---------- Custom Properties ---------- */
:root {
  --color-primary: #0D5FE3;
  --color-primary-dark: #0A4FBF;
  --color-secondary: #0A2A6E;
  --color-accent: #0B1F4A;
  --color-dark: #1A1A2E;
  --color-light: #F5F7FA;
  --color-white: #fff;
  --color-border: #E2E6EC;
  --color-text: #1A1A2E;
  --color-text-body: #4B5563;
  --color-text-light: #6B7280;
  --color-footer-bg: #0B1730;

  --font-base: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --radius: 12px;
  --section-spacing: 80px;
}

/* ---------- Reset & Defaults ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-base); }

/* ---------- Layout Utilities ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.text-center { text-align: center; }
.items-center { align-items: center; }

/* ---------- Typography ---------- */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.12; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 700; margin-bottom: 10px; }

.text-sub {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.text-sm { font-size: 15px; color: var(--color-text-body); line-height: 1.75; }
.text-xs { font-size: 13px; color: var(--color-text-body); line-height: 1.7; }
.text-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--color-text-light);
}
.link-arrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.accent { color: var(--color-primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 14px 32px;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}
.btn-dark {
  background: var(--color-dark);
  color: var(--color-white);
}
.btn-dark:hover { filter: brightness(1.3); }
.btn-white {
  background: var(--color-white);
  color: var(--color-secondary);
}
.btn-white:hover { opacity: 0.92; }
.btn-outline {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}
.card-white {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 24px;
}
.icon-box {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-box svg { width: 20px; height: 20px; fill: var(--color-white); }

/* ---------- Sections ---------- */
.section { padding: var(--section-spacing) 0; }
.section-lg { padding: calc(var(--section-spacing) * 1.25) 0; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.logo img { height: 36px; width: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.nav a:hover { color: var(--color-primary); }
.header-cta {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 10px 28px;
  border-radius: 50px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.header-cta:hover { background: var(--color-primary-dark); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 20px 24px;
}
.mobile-menu.active { display: block; }
.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-white);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-brand img {
  height: 34px;
  margin-bottom: 14px;
  filter: brightness(0) invert(1);
}
.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 16px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--color-primary); }
.footer-social svg { width: 15px; height: 15px; fill: var(--color-white); }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--color-white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-bottom a {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-left: 14px;
}
.footer-bottom a:hover { color: var(--color-white); }

/* ---------- Footer Search ---------- */
.footer-search {
  position: relative;
  max-width: 420px;
  margin: 0 auto 28px;
}
.footer-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid rgba(197,159,93,0.3);
  padding-bottom: 8px;
  transition: border-color 0.2s;
}
.footer-search-box:focus-within { border-bottom-color: var(--color-primary); }
.footer-search-icon {
  color: rgba(197,159,93,0.6);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.footer-search-box:focus-within .footer-search-icon { color: var(--color-primary); opacity: 1; }
.footer-search-input {
  width: 100%;
  padding: 8px 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-white);
  background: transparent;
  border: none;
  outline: none;
}
.footer-search-input::placeholder { color: rgba(255,255,255,0.3); }
.search-results {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  background: #1a2744;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
  z-index: 100;
}
.search-results[hidden] { display: none; }
.search-result-item {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,255,255,0.06); }
.search-result-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 4px;
}
.search-result-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-no-results {
  padding: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* ---------- FAQ Accordion ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}
.faq-item {
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  cursor: pointer;
  background: var(--color-white);
  border: none;
  width: 100%;
  text-align: left;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-base);
  gap: 14px;
  transition: background 0.15s;
}
.faq-btn:hover { background: var(--color-light); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--color-white);
}
.faq-answer-inner {
  padding: 0 22px 18px;
  font-size: 14px;
  color: var(--color-text-body);
  line-height: 1.75;
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 14px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 14px;
  font-family: var(--font-base);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--color-primary); }
.form-input::placeholder { color: var(--color-text-light); }
textarea.form-input { resize: vertical; min-height: 90px; }
.form-border {
  background: var(--color-primary);
  border-radius: 16px;
  padding: 36px;
  color: var(--color-white);
}
.form-border .form-input {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  color: var(--color-white);
}
.form-border .form-input::placeholder { color: rgba(255,255,255,0.5); }
.form-border .form-input:focus { border-color: var(--color-white); }

/* ---------- Partners ---------- */
.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px 36px;
}
.partners img { height: 30px; width: auto; object-fit: contain; }

/* ---------- Stagger Grid ---------- */
.stagger { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.stagger > :nth-child(2),
.stagger > :nth-child(4) { transform: translateY(28px); }
.stagger > :nth-child(2):hover,
.stagger > :nth-child(4):hover { transform: translateY(24px); }

/* ---------- Video Embed ---------- */
.video-wrap {
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}
.video-wrap iframe { width: 100%; height: 100%; border: none; }

/* ---------- Background Utilities ---------- */
.bg-white { background: var(--color-white); }
.bg-light { background: var(--color-light); }
.bg-primary { background: var(--color-primary); color: var(--color-white); }
.bg-secondary { background: var(--color-secondary); color: var(--color-white); }
.bg-dark { background: var(--color-dark); color: var(--color-white); }

/* ---------- Spacing Helpers ---------- */
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }
.mb-6 { margin-bottom: 64px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mt-6 { margin-top: 64px; }

/* ---------- Page Hero ---------- */
.page-hero {
  padding: 64px 0;
  text-align: center;
  background: var(--color-primary);
  color: var(--color-white);
}
.page-hero h1 { margin-bottom: 16px; }
.page-hero p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Blog Cards ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s;
}
.blog-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}
.blog-card-img {
  width: 100%;
  height: 200px;
  background: var(--color-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-date {
  font-size: 12px;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.blog-card-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.blog-card-body p {
  font-size: 14px;
  color: var(--color-text-body);
  line-height: 1.65;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* ---------- Article ---------- */
.article { padding: var(--section-spacing) 0; }
.article-header { margin-bottom: 36px; }
.article-header h1 { margin-bottom: 12px; }
.article-meta { font-size: 13px; color: var(--color-text-light); margin-bottom: 8px; }
.article-meta span { margin-right: 16px; }
.article-body { max-width: 760px; }
.article-body h2 { font-size: 26px; font-weight: 800; margin: 32px 0 12px; color: var(--color-text); }
.article-body p { font-size: 15px; color: var(--color-text-body); line-height: 1.85; margin-bottom: 18px; }
.article-body ul { list-style: none; margin: 12px 0 18px; }
.article-body li {
  font-size: 15px;
  color: var(--color-text-body);
  line-height: 1.75;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}
.article-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* ---------- Related Posts ---------- */
.related-posts { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--color-border); }
.related-posts h3 { font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.related-card {
  background: var(--color-light);
  border-radius: var(--radius);
  padding: 24px;
}
.related-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.related-card p { font-size: 13px; color: var(--color-text-body); line-height: 1.6; margin-bottom: 10px; }

/* ---------- CTA Banner ---------- */
.cta-banner {
  padding: 56px 0;
  background: var(--color-secondary);
  color: var(--color-white);
  text-align: center;
}
.cta-banner h2 { margin-bottom: 14px; }
.cta-banner p {
  font-size: 15px;
  opacity: 0.85;
  max-width: 540px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

/* =========== RESPONSIVE: 1024px =========== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
}

/* =========== RESPONSIVE: 768px =========== */
@media (max-width: 768px) {
  .nav, .header-cta.desktop { display: none; }
  .hamburger { display: flex; }

  h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 1.875rem); }

  .grid-2,
  .grid-3,
  .faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .grid-4 { grid-template-columns: 1fr; }

  .stagger { grid-template-columns: 1fr; }
  .stagger > :nth-child(2),
  .stagger > :nth-child(4) { transform: none; }
  .stagger > :nth-child(2):hover,
  .stagger > :nth-child(4):hover { transform: translateY(-4px); }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}
