/*
Theme Name: IPBD Multipurpose
Theme URI: https://www.shark.mu
Author: Shark Network Services Ltd
Author URI: https://www.shark.mu
Description: A professional multipurpose WordPress theme for IPBD Distributors Ltd. Built with Elementor, Gravity Forms, and full Customizer support for header and footer layouts. Features 3 header styles, 3 footer styles, and full design token control.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: https://www.shark.mu
Text Domain: ipbd
Tags: elementor, multipurpose, business, distribution, gravity-forms, custom-header, custom-footer, full-site-editing
*/

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════════════════════ */
:root {
  --ipbd-primary:        #6d1816;
  --ipbd-primary-dark:   #4a0f0e;
  --ipbd-primary-light:  #8b1f1c;
  --ipbd-primary-faint:  rgba(109,24,22,.07);
  --ipbd-dark:           #0e0e0e;
  --ipbd-gray-900:       #111827;
  --ipbd-gray-800:       #1f2937;
  --ipbd-gray-700:       #374151;
  --ipbd-gray-600:       #4b5563;
  --ipbd-gray-500:       #6b7280;
  --ipbd-gray-400:       #9ca3af;
  --ipbd-gray-300:       #d1d5db;
  --ipbd-gray-200:       #e5e7eb;
  --ipbd-gray-100:       #f3f4f6;
  --ipbd-gray-50:        #f9fafb;
  --ipbd-white:          #ffffff;

  --ipbd-font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ipbd-font-display:   'Inter', sans-serif;

  --ipbd-header-height:      80px;
  --ipbd-header-bg:          rgba(255,255,255,.97);
  --ipbd-header-text:        var(--ipbd-gray-700);
  --ipbd-header-text-hover:  var(--ipbd-primary);
  --ipbd-header-border:      var(--ipbd-gray-200);

  --ipbd-radius-sm:   4px;
  --ipbd-radius-md:   8px;
  --ipbd-radius-lg:   12px;
  --ipbd-radius-xl:   16px;
  --ipbd-radius-2xl:  24px;
  --ipbd-radius-full: 9999px;

  --ipbd-shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --ipbd-shadow-md:  0 4px 12px rgba(0,0,0,.1);
  --ipbd-shadow-lg:  0 10px 30px rgba(0,0,0,.12);
  --ipbd-shadow-xl:  0 20px 60px rgba(0,0,0,.15);

  --ipbd-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ipbd-font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ipbd-gray-700);
  background: var(--ipbd-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.admin-bar .ipbd-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .ipbd-header { top: 46px; } }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ═══════════════════════════════════════════════════════════════════════════
   SKIP LINK
═══════════════════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--ipbd-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--ipbd-radius-sm);
  font-size: 14px;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT WRAPPER
═══════════════════════════════════════════════════════════════════════════ */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   ██████  HEADER — SHARED
═══════════════════════════════════════════════════════════════════════════ */
.ipbd-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: box-shadow var(--ipbd-transition), border-color var(--ipbd-transition);
  background: var(--ipbd-header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ipbd-header-border);
}
.ipbd-header.scrolled {
  box-shadow: var(--ipbd-shadow-md);
  border-color: var(--ipbd-gray-300);
}
.ipbd-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: var(--ipbd-header-height);
  display: flex;
  align-items: center;
  gap: 24px;
}
@media (max-width: 1024px) { .ipbd-header-inner { padding: 0 20px; } }

/* — Logo — */
.ipbd-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.ipbd-logo img { height: 44px; width: auto; object-fit: contain; }
.ipbd-logo .site-title-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ipbd-primary);
  letter-spacing: -0.025em;
}

/* — Nav — */
.ipbd-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ipbd-nav > li { position: relative; }
.ipbd-nav > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ipbd-header-text);
  border-radius: var(--ipbd-radius-sm);
  transition: color var(--ipbd-transition), background var(--ipbd-transition);
  position: relative;
  white-space: nowrap;
}
.ipbd-nav > li > a:hover,
.ipbd-nav > li.current-menu-item > a,
.ipbd-nav > li.current-menu-parent > a {
  color: var(--ipbd-primary);
}
.ipbd-nav > li.current-menu-item > a::after,
.ipbd-nav > li.current-menu-parent > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 16px; right: 16px;
  height: 2px;
  background: var(--ipbd-primary);
  border-radius: 2px;
}

/* — Dropdown — */
.ipbd-nav > li > .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--ipbd-gray-200);
  border-radius: var(--ipbd-radius-md);
  box-shadow: var(--ipbd-shadow-lg);
  list-style: none;
  padding: 8px;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s;
  z-index: 100;
}
.ipbd-nav > li:hover > .sub-menu,
.ipbd-nav > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ipbd-nav .sub-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--ipbd-gray-700);
  border-radius: var(--ipbd-radius-sm);
  transition: background var(--ipbd-transition), color var(--ipbd-transition);
}
.ipbd-nav .sub-menu a:hover {
  background: var(--ipbd-primary-faint);
  color: var(--ipbd-primary);
}

/* — Header CTA Button — */
.ipbd-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--ipbd-primary);
  color: #fff !important;
  border-radius: var(--ipbd-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background var(--ipbd-transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.ipbd-header-cta:hover { background: var(--ipbd-primary-light); color: #fff !important; }
.ipbd-header-cta svg { width: 16px; height: 16px; }

/* — Mobile toggle — */
.ipbd-mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--ipbd-gray-700);
  border-radius: var(--ipbd-radius-sm);
  transition: color var(--ipbd-transition), background var(--ipbd-transition);
}
.ipbd-mobile-toggle:hover { color: var(--ipbd-primary); background: var(--ipbd-gray-100); }
.ipbd-mobile-toggle svg { display: block; width: 24px; height: 24px; }

/* — Mobile menu — */
.ipbd-mobile-menu {
  display: none;
  background: #fff;
  border-top: 1px solid var(--ipbd-gray-100);
  box-shadow: var(--ipbd-shadow-md);
  padding: 12px 20px 20px;
}
.ipbd-mobile-menu.is-open { display: block; }
.ipbd-mobile-menu .ipbd-nav {
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}
.ipbd-mobile-menu .ipbd-nav > li > a {
  padding: 10px 12px;
  border-radius: var(--ipbd-radius-md);
}
.ipbd-mobile-menu .ipbd-nav > li > a:hover { background: var(--ipbd-gray-100); }
.ipbd-mobile-menu .sub-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: none;
  background: var(--ipbd-gray-50);
  border-radius: var(--ipbd-radius-md);
  margin-top: 4px;
  margin-left: 12px;
}
.ipbd-mobile-menu .ipbd-header-cta {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER LAYOUT: 1 — Classic (logo left, nav centre, cta right)
═══════════════════════════════════════════════════════════════════════ */
.header-layout-1 .ipbd-header-inner { justify-content: space-between; }
.header-layout-1 .ipbd-logo { order: 1; }
.header-layout-1 .ipbd-nav-wrap { order: 2; flex: 1; display: flex; justify-content: center; }
.header-layout-1 .ipbd-header-actions { order: 3; }

/* ═══════════════════════════════════════════════════════════════════════
   HEADER LAYOUT: 2 — Centred (logo top-centre, nav below)
═══════════════════════════════════════════════════════════════════════ */
.header-layout-2 .ipbd-header { position: static; }
.header-layout-2 .ipbd-header-inner {
  flex-direction: column;
  height: auto;
  padding-top: 20px;
  padding-bottom: 0;
  gap: 0;
}
.header-layout-2 .ipbd-logo { margin-bottom: 12px; }
.header-layout-2 .ipbd-nav-bar {
  width: 100%;
  border-top: 1px solid var(--ipbd-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 4px 0;
}
.header-layout-2 .ipbd-header-actions { position: absolute; top: 20px; right: 32px; }
.header-layout-2 ~ .site-content { margin-top: 0 !important; }

/* ═══════════════════════════════════════════════════════════════════════
   HEADER LAYOUT: 3 — Minimal (logo + hamburger only, full-screen overlay)
═══════════════════════════════════════════════════════════════════════ */
.header-layout-3 .ipbd-header-inner { justify-content: space-between; }
.header-layout-3 .ipbd-nav-wrap { display: none; }
.header-layout-3 .ipbd-header-cta { display: none; }
.header-layout-3 .ipbd-mobile-toggle { display: flex; }

/* Full-screen overlay nav */
.ipbd-overlay-nav {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--ipbd-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.ipbd-overlay-nav.is-open { opacity: 1; visibility: visible; }
.ipbd-overlay-nav .ipbd-overlay-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ipbd-overlay-nav .ipbd-overlay-close:hover { background: rgba(255,255,255,.1); }
.ipbd-overlay-nav nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.ipbd-overlay-nav nav li + li { margin-top: 8px; }
.ipbd-overlay-nav nav a {
  display: block;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: rgba(255,255,255,.7);
  letter-spacing: -0.02em;
  padding: 8px 24px;
  transition: color 0.2s;
}
.ipbd-overlay-nav nav a:hover { color: #fff; }
.ipbd-overlay-nav nav .current-menu-item a { color: #fff; }
.ipbd-overlay-cta {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--ipbd-primary);
  color: #fff;
  border-radius: var(--ipbd-radius-sm);
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.2s;
}
.ipbd-overlay-cta:hover { background: var(--ipbd-primary-light); }

/* ═══════════════════════════════════════════════════════════════════════
   HEADER TRANSPARENT MODE (for Elementor page with hero)
═══════════════════════════════════════════════════════════════════════ */
.page-template-elementor-canvas .ipbd-header,
.ipbd-header-transparent {
  background: transparent;
  border-bottom-color: rgba(255,255,255,.15);
}
.page-template-elementor-canvas .ipbd-header .ipbd-nav > li > a,
.ipbd-header-transparent .ipbd-nav > li > a {
  color: rgba(255,255,255,.85);
}
.page-template-elementor-canvas .ipbd-header .ipbd-nav > li > a:hover,
.ipbd-header-transparent .ipbd-nav > li > a:hover { color: #fff; }
.page-template-elementor-canvas .ipbd-header.scrolled,
.ipbd-header-transparent.scrolled {
  background: var(--ipbd-header-bg);
  border-bottom-color: var(--ipbd-gray-200);
}
.page-template-elementor-canvas .ipbd-header.scrolled .ipbd-nav > li > a,
.ipbd-header-transparent.scrolled .ipbd-nav > li > a {
  color: var(--ipbd-header-text);
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER TOP BAR
═══════════════════════════════════════════════════════════════════════ */
.ipbd-topbar {
  background: var(--ipbd-dark);
  color: rgba(255,255,255,.7);
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ipbd-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ipbd-topbar a { color: rgba(255,255,255,.7); transition: color 0.2s; }
.ipbd-topbar a:hover { color: #fff; }
.ipbd-topbar-left, .ipbd-topbar-right { display: flex; align-items: center; gap: 16px; }
.ipbd-topbar-item { display: flex; align-items: center; gap: 6px; }
.ipbd-topbar-item svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   MAIN CONTENT OFFSET (for fixed header)
═══════════════════════════════════════════════════════════════════════ */
.site-content { padding-top: var(--ipbd-header-height); }
.has-topbar .site-content { padding-top: calc(var(--ipbd-header-height) + 37px); }
.header-layout-2 .site-content { padding-top: 0; }
.elementor-page .site-content { padding-top: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   ██████  FOOTER — SHARED
═══════════════════════════════════════════════════════════════════════ */
.ipbd-footer {
  background: linear-gradient(to bottom right, var(--ipbd-gray-900), var(--ipbd-gray-800));
  color: #fff;
}
.ipbd-footer a { color: rgba(255,255,255,.6); transition: color var(--ipbd-transition); }
.ipbd-footer a:hover { color: #fff; }
.ipbd-footer-logo { height: 48px; width: auto; object-fit: contain; filter: brightness(0) invert(1); }

/* — Footer Logo Column — */
.ipbd-footer-brand p {
  color: rgba(255,255,255,.5);
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 16px 0 24px;
}
.ipbd-footer-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,.35);
  margin-bottom: 24px;
}
.ipbd-footer-tagline::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--ipbd-primary);
  flex-shrink: 0;
}
.ipbd-footer-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.ipbd-footer-social-link {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.05);
  border-radius: var(--ipbd-radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
  transition: background var(--ipbd-transition), color var(--ipbd-transition);
}
.ipbd-footer-social-link:hover { background: var(--ipbd-primary); color: #fff !important; }
.ipbd-footer-social-link svg { width: 16px; height: 16px; }

/* — Footer Widget Headings — */
.ipbd-footer-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  font-weight: 600;
  margin: 0 0 20px;
}

/* — Footer Nav — */
.ipbd-footer-nav { list-style: none; margin: 0; padding: 0; }
.ipbd-footer-nav li + li { margin-top: 10px; }
.ipbd-footer-nav a { font-size: 0.875rem; color: rgba(255,255,255,.55); }
.ipbd-footer-nav a:hover { color: #fff; }

/* — Footer Contact Items — */
.ipbd-footer-contact { list-style: none; margin: 0; padding: 0; }
.ipbd-footer-contact li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; font-size: 0.875rem; color: rgba(255,255,255,.55); }
.ipbd-footer-contact li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.ipbd-footer-contact a { color: rgba(255,255,255,.55); }
.ipbd-footer-contact a:hover { color: #fff; }

/* — Footer Icon Block (contact block hover) — */
.ipbd-footer-contact .icon-wrap {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.05);
  border-radius: var(--ipbd-radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--ipbd-transition);
}
.ipbd-footer-contact li:hover .icon-wrap { background: var(--ipbd-primary); }

/* — Footer Bottom Bar — */
.ipbd-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
}
.ipbd-footer-bottom-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: rgba(255,255,255,.35);
}
.ipbd-footer-bottom-inner a { color: rgba(255,255,255,.35); }
.ipbd-footer-bottom-inner a:hover { color: rgba(255,255,255,.7); }

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER LAYOUT: 1 — 4-column (brand + 3 widgets)
═══════════════════════════════════════════════════════════════════════ */
.footer-layout-1 .ipbd-footer-widgets {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 32px 60px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
}
@media (max-width: 1024px) {
  .footer-layout-1 .ipbd-footer-widgets { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .footer-layout-1 .ipbd-footer-widgets { grid-template-columns: 1fr; padding: 48px 20px 40px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER LAYOUT: 2 — Centred (logo + nav + socials centred)
═══════════════════════════════════════════════════════════════════════ */
.footer-layout-2 .ipbd-footer-widgets {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}
.footer-layout-2 .ipbd-footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-layout-2 .ipbd-footer-nav li { margin: 0; }
.footer-layout-2 .ipbd-footer-socials { justify-content: center; }
.footer-layout-2 .ipbd-footer-contact { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; }
.footer-layout-2 .ipbd-footer-contact li { flex-direction: column; align-items: center; text-align: center; }
@media (max-width: 640px) { .footer-layout-2 .ipbd-footer-contact { flex-direction: column; gap: 16px; } }

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER LAYOUT: 3 — Minimal (2-col: brand + contact only)
═══════════════════════════════════════════════════════════════════════ */
.footer-layout-3 .ipbd-footer-widgets {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}
.footer-layout-3 .ipbd-footer-brand p { margin-bottom: 0; }
@media (max-width: 640px) {
  .footer-layout-3 .ipbd-footer-widgets { grid-template-columns: 1fr; padding: 40px 20px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE BREAKPOINTS
═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .ipbd-nav-wrap,
  .ipbd-header-actions { display: none; }
  .ipbd-mobile-toggle { display: flex; }
}
@media (max-width: 768px) {
  .ipbd-header-inner { padding: 0 16px; }
  .ipbd-topbar-inner { padding: 6px 16px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   WORDPRESS CORE STYLES
═══════════════════════════════════════════════════════════════════════ */
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--ipbd-gray-900);
  margin: 1.5em 0 0.6em;
}
.entry-content h1 { font-size: 2.25rem; }
.entry-content h2 { font-size: 1.75rem; }
.entry-content h3 { font-size: 1.375rem; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content a { color: var(--ipbd-primary); text-decoration: underline; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em 1.5em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content blockquote {
  border-left: 4px solid var(--ipbd-primary);
  margin: 1.5em 0;
  padding: 16px 24px;
  background: var(--ipbd-gray-50);
  border-radius: 0 var(--ipbd-radius-md) var(--ipbd-radius-md) 0;
  font-style: italic;
  color: var(--ipbd-gray-600);
}
.entry-content img { border-radius: var(--ipbd-radius-md); }
.entry-content .wp-block-image figcaption { font-size: 0.85rem; color: var(--ipbd-gray-500); text-align: center; margin-top: 8px; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin: 0 auto 1em; display: block; }

/* ═══════════════════════════════════════════════════════════════════════
   GRAVITY FORMS STYLES
═══════════════════════════════════════════════════════════════════════ */
.gform_wrapper {
  font-family: var(--ipbd-font-sans) !important;
}
.gform_wrapper .gform_title {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--ipbd-gray-900) !important;
  margin-bottom: 8px !important;
}
.gform_wrapper .gform_description {
  color: var(--ipbd-gray-600) !important;
  margin-bottom: 24px !important;
}
.gform_wrapper .gfield label,
.gform_wrapper .gfield_label {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: var(--ipbd-gray-700) !important;
  margin-bottom: 6px !important;
  display: block;
}
.gform_wrapper .gfield_required { color: var(--ipbd-primary) !important; }
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"],
.gform_wrapper input[type="number"],
.gform_wrapper input[type="password"],
.gform_wrapper select,
.gform_wrapper textarea {
  width: 100% !important;
  background: var(--ipbd-gray-50) !important;
  border: 1.5px solid var(--ipbd-gray-300) !important;
  border-radius: var(--ipbd-radius-md) !important;
  padding: 10px 14px !important;
  font-size: 0.9375rem !important;
  color: var(--ipbd-gray-900) !important;
  font-family: var(--ipbd-font-sans) !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
  outline: none !important;
  box-shadow: none !important;
}
.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus {
  border-color: var(--ipbd-primary) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(109,24,22,.08) !important;
}
.gform_wrapper textarea { min-height: 120px !important; resize: vertical !important; }
.gform_wrapper .gfield_error input,
.gform_wrapper .gfield_error select,
.gform_wrapper .gfield_error textarea {
  border-color: #dc2626 !important;
}
.gform_wrapper .validation_message,
.gform_wrapper .gfield_description.validation_message {
  color: #dc2626 !important;
  font-size: 0.8rem !important;
  margin-top: 4px !important;
}
.gform_wrapper .gform_footer,
.gform_wrapper .gform_page_footer { margin-top: 8px; }
.gform_wrapper input[type="submit"],
.gform_wrapper button[type="submit"],
.gform_wrapper .gform_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 28px !important;
  background: var(--ipbd-primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--ipbd-radius-sm) !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  font-family: var(--ipbd-font-sans) !important;
  cursor: pointer !important;
  letter-spacing: 0.01em !important;
  transition: background 0.2s !important;
  width: auto !important;
}
.gform_wrapper input[type="submit"]:hover,
.gform_wrapper button[type="submit"]:hover,
.gform_wrapper .gform_button:hover {
  background: var(--ipbd-primary-light) !important;
}
.gform_wrapper .gform_confirmation_message {
  background: #f0fdf4 !important;
  border: 1.5px solid #bbf7d0 !important;
  color: #166534 !important;
  border-radius: var(--ipbd-radius-md) !important;
  padding: 20px 24px !important;
  font-size: 0.9375rem !important;
}
/* Checkbox + Radio */
.gform_wrapper .gfield_checkbox li label,
.gform_wrapper .gfield_radio li label {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 400 !important;
  color: var(--ipbd-gray-700) !important;
  font-size: 0.9375rem !important;
}
.gform_wrapper input[type="checkbox"],
.gform_wrapper input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  accent-color: var(--ipbd-primary) !important;
}
/* Half width fields */
.gform_wrapper .gf_left_half,
.gform_wrapper .gf_right_half {
  width: 48% !important;
  display: inline-block !important;
}
.gform_wrapper .gf_right_half { margin-left: 4% !important; }
/* Multi-column */
.gform_wrapper .gfield--width-half { width: calc(50% - 8px) !important; }

/* ═══════════════════════════════════════════════════════════════════════
   ELEMENTOR COMPATIBILITY
═══════════════════════════════════════════════════════════════════════ */
.elementor-page .site-content { padding-top: 0 !important; }
.elementor-section { position: relative; }
/* Prevent Elementor from overriding header typography */
.ipbd-header .elementor-element { font-family: inherit; }
/* Full-width Elementor sections */
.elementor-section.elementor-section-stretched { left: 0 !important; right: 0 !important; width: 100% !important; }

/* ═══════════════════════════════════════════════════════════════════════
   UTILITY COMPONENTS (usable in Elementor Custom CSS / HTML widgets)
═══════════════════════════════════════════════════════════════════════ */
.ipbd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--ipbd-radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--ipbd-transition);
  border: 2px solid transparent;
  text-decoration: none;
}
.ipbd-btn-primary {
  background: var(--ipbd-primary);
  color: #fff;
  border-color: var(--ipbd-primary);
}
.ipbd-btn-primary:hover { background: var(--ipbd-primary-light); border-color: var(--ipbd-primary-light); color: #fff; }
.ipbd-btn-outline {
  background: transparent;
  color: var(--ipbd-primary);
  border-color: var(--ipbd-primary);
}
.ipbd-btn-outline:hover { background: var(--ipbd-primary); color: #fff; }
.ipbd-btn-white { background: #fff; color: var(--ipbd-primary); border-color: #fff; }
.ipbd-btn-white:hover { background: var(--ipbd-gray-100); }
.ipbd-btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.ipbd-btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.ipbd-btn-lg { padding: 14px 36px; font-size: 1rem; }
.ipbd-btn-sm { padding: 8px 18px; font-size: 0.8125rem; }

.ipbd-section { padding: 96px 0; }
.ipbd-section-sm { padding: 64px 0; }
.ipbd-container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 768px) { .ipbd-container { padding: 0 20px; } .ipbd-section { padding: 64px 0; } }

.ipbd-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ipbd-primary);
  margin-bottom: 12px;
}
.ipbd-section-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ipbd-gray-900);
  margin: 0 0 20px;
}
.ipbd-section-subtitle {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ipbd-gray-600);
  max-width: 680px;
}

/* ═══════════════════════════════════════════════════════════════════════
   POSTS / BLOG
═══════════════════════════════════════════════════════════════════════ */
.ipbd-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}
.ipbd-post-card {
  background: #fff;
  border: 1px solid var(--ipbd-gray-200);
  border-radius: var(--ipbd-radius-lg);
  overflow: hidden;
  transition: box-shadow var(--ipbd-transition), transform var(--ipbd-transition);
}
.ipbd-post-card:hover { box-shadow: var(--ipbd-shadow-lg); transform: translateY(-3px); }
.ipbd-post-card-thumb { aspect-ratio: 16/9; overflow: hidden; }
.ipbd-post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.ipbd-post-card:hover .ipbd-post-card-thumb img { transform: scale(1.05); }
.ipbd-post-card-body { padding: 24px; }
.ipbd-post-card-cat {
  display: inline-flex;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ipbd-primary);
  background: var(--ipbd-primary-faint);
  padding: 3px 10px;
  border-radius: var(--ipbd-radius-full);
  margin-bottom: 12px;
}
.ipbd-post-card-title { font-size: 1.1rem; font-weight: 700; color: var(--ipbd-gray-900); margin: 0 0 10px; line-height: 1.3; }
.ipbd-post-card-title a { color: inherit; }
.ipbd-post-card-title a:hover { color: var(--ipbd-primary); }
.ipbd-post-card-excerpt { font-size: 0.875rem; color: var(--ipbd-gray-600); line-height: 1.6; margin-bottom: 16px; }
.ipbd-post-card-meta { font-size: 0.8rem; color: var(--ipbd-gray-400); display: flex; align-items: center; gap: 12px; }

/* ═══════════════════════════════════════════════════════════════════════
   404 / NO RESULTS
═══════════════════════════════════════════════════════════════════════ */
.ipbd-error-page { text-align: center; padding: 120px 20px; }
.ipbd-error-page .error-code { font-size: 8rem; font-weight: 900; color: var(--ipbd-gray-100); line-height: 1; }
.ipbd-error-page h1 { font-size: 2rem; color: var(--ipbd-gray-900); margin: 0 0 12px; }
.ipbd-error-page p { color: var(--ipbd-gray-600); max-width: 480px; margin: 0 auto 32px; }

/* ═══════════════════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════════════════ */
.ipbd-pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 48px; }
.ipbd-pagination a,
.ipbd-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--ipbd-radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1.5px solid var(--ipbd-gray-200);
  color: var(--ipbd-gray-700);
  background: #fff;
  transition: all var(--ipbd-transition);
}
.ipbd-pagination a:hover { border-color: var(--ipbd-primary); color: var(--ipbd-primary); }
.ipbd-pagination .current { background: var(--ipbd-primary); color: #fff; border-color: var(--ipbd-primary); }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE TYPOGRAPHY
═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .entry-content h1 { font-size: 1.75rem; }
  .entry-content h2 { font-size: 1.5rem; }
  .entry-content h3 { font-size: 1.2rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════════════════════════ */
@media print {
  .ipbd-header, .ipbd-footer, .ipbd-mobile-toggle { display: none !important; }
  .site-content { padding-top: 0 !important; }
  body { font-size: 12pt; }
  a::after { content: " (" attr(href) ")"; font-size: 10pt; }
}
