/*
 * AiHandText — Custom styles for Kadence child theme
 * Design tokens match the React app
 */

/* ---- Global box-sizing ---- */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ---- CLS Prevention ---- */
.hw-hero { min-height: 420px; }
.hw-hero h1 { min-height: 1.2em; }
header.wp-block-template-part { min-height: 61px; }
img, svg { max-width: 100%; height: auto; }

/* ---- Below-fold paint deferral ---- */
.aiht-section-secondary,
.aiht-features-grid { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* ---- Sticky Header ---- */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #DBDFE6;
  overflow: visible;
}
header.wp-block-template-part .wp-block-navigation {
  overflow: visible;
  position: relative;
}

/* ---- Rounded Logo ---- */
.wp-block-site-logo img {
  border-radius: 12px !important;
}

/* ---- Global overrides ---- */
body {
  font-family: 'Inter', sans-serif;
  color: #0F1729;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: 'Caveat', cursive;
}

/* ---- Container ---- */
.aiht-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ---- Hero Section ---- */
.hw-hero-wrap {
  font-family: 'Inter', sans-serif;
  color: #0F1729;
  margin-top: 0px;
  background-image: radial-gradient(800px circle at 20% 10%, rgba(79, 70, 229, 0.22), transparent 40%), radial-gradient(700px circle at 80% 30%, rgba(124, 58, 237, 0.18), transparent 45%), radial-gradient(900px circle at 50% 90%, rgba(6, 182, 212, 0.14), transparent 55%);
}
.hw-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 16px 48px;
  box-sizing: border-box;
}
.hw-hero-inner { max-width: 680px; }
.hw-hero h1 {
  font-family: 'Caveat', cursive;
  font-size: 55px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 60px;
  color: #0F1729;
  margin: 0 0 16px 0;
}
@media (max-width: 768px) {
  .hw-hero-wrap {
    background-image: radial-gradient(400px circle at 20% 10%, rgba(79, 70, 229, 0.22), transparent 40%), radial-gradient(350px circle at 80% 30%, rgba(124, 58, 237, 0.18), transparent 45%), radial-gradient(450px circle at 50% 90%, rgba(6, 182, 212, 0.14), transparent 55%);
  }
  .hw-hero h1 { font-size: 36px; line-height: 40px; }
}
.hw-hero h1 .hw-gradient-text {
  background-image: linear-gradient(90deg, rgb(79, 70, 229), rgb(124, 58, 237), rgb(6, 182, 212));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hw-hero-desc {
  font-size: 16px;
  color: #65758B;
  line-height: 1.625;
  margin: 0;
}
.hw-hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hw-hero-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: #5941F1;
  color: #fff !important;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none !important;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.hw-hero-btn-primary:hover { background: #4B35DC; }
.hw-hero-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: #fff;
  color: #0F1729 !important;
  border: 1px solid #DBDFE6;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none !important;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.hw-hero-btn-outline:hover { background: #ECF0F3; }
.hw-hero-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
  font-size: 14px;
  color: #65758B;
}
@media (max-width: 480px) {
  .hw-hero-badges { grid-template-columns: repeat(2, 1fr); }
}
.hw-hero-badge {
  border-radius: 12px;
  border: 1px solid #DBDFE6;
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 12px;
  box-sizing: border-box;
}

/* ---- Handwriting Tool (editor) ---- */
#hw-editor-section {
  max-width: 100%;
  overflow-x: hidden;
}
.hw-root {
  --background: 248 249 252;
  --foreground: 15 23 41;
  --card: 255 255 255;
  --border: 219 223 230;
  --primary: 89 65 241;
  --primary-fg: 255 255 255;
  --muted: 236 239 243;
  --muted-fg: 101 117 139;
  --paper: 255 255 255;
  --radius: 0.75rem;
  font-family: 'Inter', sans-serif;
  color: rgb(15, 23, 41);
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px;
  overflow-x: hidden;
}
.hw-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  min-width: 0;
}
.hw-grid > div {
  min-width: 0;
}
@media (min-width: 1024px) {
  .hw-grid {
    grid-template-columns: 1.8fr 1fr;
    align-items: start;
  }
}
.hw-card {
  border: 1px solid rgb(219, 223, 230);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  background: #fff;
  overflow: visible;
  max-width: 100%;
}
.hw-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgb(219, 223, 230);
  padding: 8px 12px;
  background: rgba(236, 239, 243, 0.3);
  border-radius: 12px 12px 0 0;
  overflow: visible;
  position: relative;
}
.hw-pop-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgb(219, 223, 230);
  border-radius: 10px;
  background: rgb(248, 249, 252);
  font-size: 14px;
  font-weight: 500;
  color: rgb(15, 23, 41);
  cursor: pointer;
  font-family: inherit;
  position: relative;
}
.hw-pop-btn:hover { background: rgb(236, 239, 243); }
.hw-pop-btn svg { width: 14px; height: 14px; }
.hw-popover {
  position: relative;
  display: inline-block;
}
.hw-popover-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 9999;
  width: 320px;
  max-height: 420px;
  overflow-y: auto;
  background: rgb(255, 255, 255);
  border: 1px solid rgb(219, 223, 230);
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  padding: 16px;
}
.hw-popover-panel.open { display: block; }
.hw-popover-panel h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgb(15, 23, 41);
  font-family: 'Inter', sans-serif;
}
.hw-pop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.hw-pop-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgb(219, 223, 230);
  border-radius: 10px;
  background: rgb(248, 249, 252);
  font-size: 14px;
  font-weight: 500;
  color: rgb(15, 23, 41);
  cursor: pointer;
  font-family: inherit;
}
.hw-pop-item:hover { background: rgb(236, 239, 243); }
.hw-pop-item.active {
  background: rgb(89, 65, 241);
  color: rgb(255, 255, 255);
  border-color: rgb(89, 65, 241);
}
.hw-slider-row { margin-bottom: 12px; }
.hw-slider-row label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: rgb(15, 23, 41);
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}
.hw-slider-row input[type=range] {
  width: 100%;
  accent-color: rgb(89, 65, 241);
  height: 6px;
}
.hw-ink-row { margin-bottom: 4px; }
.hw-ink-row label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: rgb(15, 23, 41);
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}
.hw-ink-colors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hw-ink-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgb(219, 223, 230);
  cursor: pointer;
  transition: all 0.15s;
}
.hw-ink-swatch:hover { transform: scale(1.05); }
.hw-ink-swatch.active {
  border-color: rgb(89, 65, 241);
  box-shadow: 0 0 0 2px rgba(89, 65, 241, 0.3);
  transform: scale(1.1);
}
.hw-divider {
  display: flex;
  align-items: center;
  gap: 2px;
  border-right: 1px solid rgb(219, 223, 230);
  padding-right: 8px;
  margin-right: 4px;
}
.hw-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgb(101, 117, 139);
  cursor: pointer;
  transition: all 0.15s;
}
.hw-icon-btn:hover {
  background: rgb(236, 239, 243);
  color: rgb(15, 23, 41);
}
.hw-icon-btn.active {
  background: rgba(89, 65, 241, 0.15);
  color: rgb(89, 65, 241);
}
.hw-icon-btn:disabled { opacity: 0.3; cursor: default; }
.hw-icon-btn:disabled:hover {
  background: transparent;
  color: rgb(101, 117, 139);
}
.hw-icon-btn svg { width: 16px; height: 16px; }
.hw-action-icons {
  flex-shrink: 0;
}
.hw-editor-area { padding: 0; }
.hw-editor {
  width: 100%;
  min-height: 420px;
  outline: none;
  border: none;
  border-radius: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  background-color: #fff;
  padding: 24px 28px;
  box-sizing: border-box;
}
.hw-editor span[contenteditable="false"] {
  max-width: 100%;
  width: auto !important;
}
.hw-editor img {
  max-width: 100%;
  height: auto;
}
.hw-editor table {
  max-width: 100%;
}
.hw-hint {
  font-size: 12px;
  color: rgb(101, 117, 139);
  margin-top: 8px;
}
.hw-gen-bar {
  padding: 16px;
  border-top: 1px solid rgb(219, 223, 230);
  text-align: center;
  border-radius: 0 0 12px 12px;
}
.hw-btn-generate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 12px 32px;
  background: rgb(89, 65, 241);
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.hw-btn-generate:hover { background: rgb(75, 53, 220); }
.hw-btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }
.hw-btn-generate:disabled:hover { background: rgb(89, 65, 241); }
.hw-btn-generate svg { width: 20px; height: 20px; }
.hw-preview {
  border: 1px solid rgb(219, 223, 230);
  border-radius: 12px;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(236, 239, 243, 0.3);
}
.hw-preview img {
  width: 100%;
  display: block;
  border-radius: 8px;
}
.hw-preview-table-wrap {
  border-radius: 12px;
  border: 1px solid rgb(219, 223, 230);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.hw-preview-table-wrap img {
  width: 100%;
  display: block;
  border-radius: 10px;
}
.hw-preview-table-wrap.has-texture { padding: 16px; }
.hw-preview-placeholder {
  text-align: center;
  padding: 24px;
  color: rgb(101, 117, 139);
}
.hw-preview-placeholder svg {
  margin: 0 auto 12px;
  opacity: 0.4;
  display: block;
}
.hw-preview-placeholder p {
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.hw-download-bar {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.hw-btn-dl {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgb(219, 223, 230);
  border-radius: 10px;
  background: rgb(255, 255, 255);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: rgb(15, 23, 41);
  font-family: inherit;
  transition: background 0.15s;
}
.hw-btn-dl:hover { background: rgb(248, 249, 252); }
.hw-btn-dl svg { width: 16px; height: 16px; }
.hw-table-input {
  width: 100%;
  border: 1px solid rgb(219, 223, 230);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  background: rgb(248, 249, 252);
  margin-bottom: 12px;
  outline: none;
}
.hw-table-input:focus {
  border-color: rgb(89, 65, 241);
  box-shadow: 0 0 0 2px rgba(89, 65, 241, 0.15);
}
.hw-pop-submit {
  width: 100%;
  height: 32px;
  background: rgb(89, 65, 241);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.hw-pop-submit:hover { background: rgb(75, 53, 220); }

/* ---- Steps Grid ---- */
.aiht-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 1024px) {
  .aiht-steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .aiht-steps-grid { grid-template-columns: 1fr; }
}

/* ---- Step Cards ---- */
.aiht-step-card {
  border: 1px solid #DBDFE6;
  border-radius: 16px;
  background: #fff;
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.aiht-step-icon-badge {
  position: absolute;
  top: -16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(36, 180, 83, 0.3);
}
.aiht-step-icon-badge svg {
  width: 20px;
  height: 20px;
}
.aiht-step-title {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  font-weight: 700;
  color: #0F1729;
  margin: 0 0 10px 0;
}
.aiht-step-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #65758B;
  line-height: 1.6;
  margin: 0;
}

/* ---- Feature Grid Cards ---- */
.aiht-feature-card {
  display: flex;
  gap: 16px;
  border: 1px solid #DBDFE6;
  border-radius: 12px;
  background: #fff;
  padding: 24px;
  transition: box-shadow 0.2s;
}
.aiht-feature-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.aiht-feature-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #24B453;
  color: #fff;
  border: 4px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ---- Section helpers ---- */
.aiht-section-secondary {
  background: rgba(241, 245, 249, 0.4);
}
.aiht-text-muted {
  color: #65758B;
}

/* ---- Blog cards ---- */
.aiht-blog-card {
  border: 1px solid #DBDFE6;
  border-radius: 12px;
  background: #fff;
  padding: 24px 32px;
  transition: box-shadow 0.2s;
}
.aiht-blog-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.aiht-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  background: rgba(36, 180, 83, 0.1);
  color: #24B453;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ---- FAQ cards ---- */
.aiht-faq-card {
  border: 1px solid #DBDFE6;
  border-radius: 12px;
  background: #fff;
  padding: 24px;
}

/* ---- Contact ---- */
.aiht-contact-form {
  border: 1px solid #DBDFE6;
  border-radius: 12px;
  background: #fff;
  padding: 32px;
}
.aiht-contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #0F1729;
  margin-bottom: 4px;
}
.aiht-contact-form input,
.aiht-contact-form textarea {
  width: 100%;
  border: 1px solid #DBDFE6;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  margin-bottom: 16px;
  outline: none;
  background: #F8F9FC;
}
.aiht-contact-form input:focus,
.aiht-contact-form textarea:focus {
  border-color: #5941F1;
  box-shadow: 0 0 0 2px rgba(89, 65, 241, 0.15);
}
.aiht-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: #5941F1;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  text-decoration: none;
}
.aiht-btn-primary:hover { background: #4B35DC; }

/* ---- Nav menu hover & active ---- */
.wp-block-navigation-item .wp-block-navigation-item__content {
  color: #65758B;
  text-decoration: none !important;
  transition: color 0.2s;
}
.wp-block-navigation-item .wp-block-navigation-item__content:hover {
  color: #5941F1;
}
.wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content,
.wp-block-navigation-item.current_page_item .wp-block-navigation-item__content,
.wp-block-navigation-item a[aria-current="page"],
.wp-block-navigation-item.is-active-nav .wp-block-navigation-item__content {
  color: #5941F1 !important;
  font-weight: 600;
}

/* ---- Header CTA nav link ---- */
.aiht-nav-cta a,
.wp-block-navigation-item.aiht-nav-cta .wp-block-navigation-item__content {
  background: #5941F1;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}
.aiht-nav-cta a:hover,
.wp-block-navigation-item.aiht-nav-cta .wp-block-navigation-item__content:hover {
  background: #4B35DC;
}

/* ---- Mobile Nav Overlay (all breakpoints, only active when open) ---- */

/* Hamburger button — touch-friendly */
.wp-block-navigation__responsive-container-open {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Full-screen overlay container */
.wp-block-navigation__responsive-container.is-menu-open {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 100000 !important;
  background-color: #ffffff !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 0 !important;
}

/* Inner wrappers — fill the overlay */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
  display: block !important;
  width: 100% !important;
  min-height: 100% !important;
  padding: 24px !important;
  position: relative !important;
}

/* Close button — top right, aligned with logo row */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
  display: flex !important;
  position: absolute !important;
  top: 24px !important;
  right: 24px !important;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #0F1729;
  z-index: 100001;
}

/* Content wrapper */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  display: block !important;
  padding-top: 0 !important;
  width: 100% !important;
}

/* Logo + title row inside overlay — hidden everywhere except mobile overlay */
.aiht-mobile-nav-header {
  display: none !important;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-right: 44px;
}
@media (max-width: 768px) {
  .wp-block-navigation__responsive-container.is-menu-open .aiht-mobile-nav-header {
    display: flex !important;
  }
}
.aiht-mobile-nav-header .wp-block-site-logo img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px;
}
.aiht-mobile-nav-header .wp-block-site-title {
  font-size: 20px !important;
  font-weight: 700;
}

/* The <ul> nav list — force vertical */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 100% !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-wrap: nowrap !important;
}

/* Each <li> nav item */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Each <a> link */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  display: block !important;
  width: 100% !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  padding: 16px 0 !important;
  color: #0F1729 !important;
  text-decoration: none !important;
  border-bottom: 1px solid #DBDFE6;
  font-family: 'Inter', sans-serif;
  outline: none;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child .wp-block-navigation-item__content {
  border-bottom: none;
}

/* CTA button in overlay */
.wp-block-navigation__responsive-container.is-menu-open .aiht-nav-cta .wp-block-navigation-item__content {
  display: block !important;
  text-align: center;
  margin-top: 16px;
  background: #5941F1;
  color: #fff !important;
  padding: 14px 24px !important;
  border-radius: 10px;
  border-bottom: none;
  font-weight: 600 !important;
}
.wp-block-navigation__responsive-container.is-menu-open .aiht-nav-cta .wp-block-navigation-item__content:hover {
  background: #4B35DC;
}

/* Lock body scroll when overlay is open */
html.has-modal-open,
html.has-modal-open body {
  overflow: hidden !important;
}

/* ---- Footer ---- */
footer.wp-block-template-part {
  font-family: 'Inter', sans-serif;
}
footer.wp-block-template-part .wp-block-site-logo img {
  border-radius: 12px !important;
}
footer.wp-block-template-part .wp-block-columns {
  gap: 40px;
}
footer.wp-block-template-part h4.wp-block-heading {
  font-family: 'Inter', sans-serif !important;
  font-size: 14px;
  font-weight: 600;
  color: #0F1729;
  margin-bottom: 12px;
}
footer.wp-block-template-part .is-style-no-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}
footer.wp-block-template-part .is-style-no-bullets li {
  margin-bottom: 8px;
}
footer.wp-block-template-part .is-style-no-bullets a {
  color: #65758B;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
footer.wp-block-template-part .is-style-no-bullets a:hover {
  color: #5941F1;
}
footer.wp-block-template-part .wp-block-separator {
  border-color: #DBDFE6 !important;
  opacity: 1;
}
footer.wp-block-template-part .wp-block-social-links .wp-social-link {
  color: #65758B !important;
  transition: color 0.2s;
}
footer.wp-block-template-part .wp-block-social-links .wp-social-link:hover {
  color: #5941F1 !important;
}
footer.wp-block-template-part p a {
  color: #5941F1;
  text-decoration: none;
}
footer.wp-block-template-part p a:hover {
  text-decoration: underline;
}

/* ============================================
   RESPONSIVE — Tablet (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

  /* ---- Section headings ---- */
  .wp-block-heading[style*="font-size:48px"],
  h1[style*="font-size:48px"],
  h2[style*="font-size:48px"] {
    font-size: 32px !important;
  }
  .wp-block-heading[style*="font-size:30px"],
  h2[style*="font-size:30px"] {
    font-size: 24px !important;
  }

  /* ---- Section padding ---- */
  .wp-block-group[style*="padding-top:80px"] {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
  .wp-block-group[style*="padding-top:64px"] {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
  .wp-block-group[style*="padding-top:56px"] {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  .wp-block-group[style*="padding-bottom:96px"] {
    padding-bottom: 56px !important;
  }

  /* ---- Header ---- */
  header.wp-block-template-part .wp-block-group.is-layout-flex {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 !important;
  }
  .wp-block-site-title {
    font-size: 18px !important;
  }
  .wp-block-site-logo img {
    width: 32px !important;
    height: auto !important;
  }
  /* ---- Mobile nav overlay ---- */

  /* ---- Hero ---- */
  .hw-hero {
    padding: 40px 16px 32px !important;
  }
  .hw-hero-inner {
    max-width: 100%;
  }
  .hw-hero-desc {
    font-size: 15px;
  }

  /* ---- WP Columns → stack ---- */
  .wp-block-columns {
    flex-direction: column !important;
    gap: 24px !important;
  }
  .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  /* ---- Tool editor ---- */
  .hw-root {
    padding: 16px 8px;
    max-width: 100%;
  }
  .hw-grid {
    max-width: 100%;
  }
  .hw-card {
    overflow: visible;
    max-width: 100%;
  }
  .hw-editor-area {
    overflow: hidden;
    max-width: 100%;
  }
  .hw-gen-bar {
    overflow: hidden;
    max-width: 100%;
  }
  .hw-toolbar {
    gap: 4px;
    padding: 8px;
    overflow: visible;
    flex-wrap: wrap;
    max-width: 100%;
    z-index: 100001;
  }
  .hw-pop-btn {
    font-size: 13px;
    padding: 0 10px;
    height: 36px;
    flex-shrink: 0;
  }
  .hw-icon-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 6px;
    flex-shrink: 0;
  }
  .hw-divider {
    flex-shrink: 0;
  }
  .hw-popover-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    bottom: auto;
    width: 260px;
    max-height: 70vh;
    border-radius: 10px;
    z-index: 100002;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }
  .hw-popover-panel h4 {
    font-size: 12px;
    margin-bottom: 6px;
  }
  .hw-pop-grid {
    gap: 6px;
    margin-bottom: 10px;
  }
  .hw-pop-item {
    height: 28px;
    font-size: 12px;
    padding: 0 8px;
    border-radius: 8px;
  }
  .hw-slider-row {
    margin-bottom: 8px;
  }
  .hw-slider-row label {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .hw-ink-swatch {
    width: 26px;
    height: 26px;
  }
  .hw-ink-row label {
    font-size: 12px;
  }
  .hw-editor {
    min-height: 280px;
    max-width: 100%;
    overflow-x: hidden;
  }
  .hw-preview {
    min-height: auto;
    max-width: 100%;
    overflow: hidden;
  }
  .hw-preview img {
    width: 100%;
    height: auto;
    display: block;
  }
  .hw-preview-table-wrap {
    max-width: 100%;
    overflow: hidden;
  }
  .hw-preview-table-wrap.has-texture {
    padding: 10px;
  }
  .hw-preview-placeholder {
    padding: 16px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .hw-btn-generate {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 10px 24px;
    height: 44px;
  }
  .hw-gen-bar {
    padding: 12px;
  }
  .hw-download-bar {
    flex-direction: column;
  }

  /* ---- Feature cards ---- */
  .aiht-feature-card {
    padding: 16px;
  }

  /* ---- Blog cards ---- */
  .aiht-blog-card {
    padding: 16px 20px;
  }

  /* ---- Contact form ---- */
  .aiht-contact-form {
    padding: 20px !important;
  }

  /* ---- Footer ---- */
  footer.wp-block-template-part .wp-block-columns {
    gap: 32px !important;
  }
  footer.wp-block-template-part .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }
  footer.wp-block-template-part .wp-block-group[style*="padding-top:48px"] {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
}

/* ============================================
   RESPONSIVE — Small Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {

  /* ---- Section headings smaller ---- */
  .wp-block-heading[style*="font-size:48px"],
  h1[style*="font-size:48px"],
  h2[style*="font-size:48px"] {
    font-size: 26px !important;
  }
  .wp-block-heading[style*="font-size:30px"],
  h2[style*="font-size:30px"] {
    font-size: 22px !important;
  }

  /* ---- Header ---- */
  .wp-block-site-title {
    font-size: 22px !important;
  }
  .wp-block-site-logo img {
    width: 35px !important;
  }

  /* ---- Hero ---- */
  .hw-hero-wrap {
    background-image: radial-gradient(250px circle at 20% 10%, rgba(79, 70, 229, 0.22), transparent 40%), radial-gradient(200px circle at 80% 30%, rgba(124, 58, 237, 0.18), transparent 45%), radial-gradient(300px circle at 50% 90%, rgba(6, 182, 212, 0.14), transparent 55%);
  }
  .hw-hero {
    padding: 28px 12px 24px !important;
  }
  .hw-hero h1 {
    font-size: 28px !important;
    line-height: 34px !important;
    letter-spacing: -0.5px;
  }
  .hw-hero-btns {
    flex-direction: column;
  }
  .hw-hero-btn-primary,
  .hw-hero-btn-outline {
    width: 100%;
    text-align: center;
    justify-content: center;
    min-height: 44px;
  }

  /* ---- Tool editor ---- */
  .hw-root {
    padding: 8px 4px;
    max-width: 100%;
  }
  .hw-card {
    overflow: visible;
  }
  .hw-editor-area {
    overflow: hidden;
  }
  .hw-toolbar {
    padding: 6px;
    gap: 4px;
    overflow: visible;
    flex-wrap: wrap;
    z-index: 100001;
  }
  .hw-pop-btn {
    font-size: 12px;
    padding: 0 8px;
    height: 32px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .hw-pop-btn svg {
    width: 12px;
    height: 12px;
  }
  .hw-icon-btn {
    min-width: 32px;
    min-height: 32px;
    padding: 4px;
    flex-shrink: 0;
  }
  .hw-icon-btn svg {
    width: 14px;
    height: 14px;
  }
  .hw-divider {
    padding-right: 4px;
    margin-right: 2px;
    flex-shrink: 0;
  }
  .hw-popover-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    bottom: auto;
    width: 240px;
    max-height: 60vh;
    border-radius: 10px;
    z-index: 100002;
    padding: 10px;
  }
  .hw-pop-item {
    height: 26px;
    font-size: 11px;
    padding: 0 6px;
  }
  .hw-ink-swatch {
    width: 24px;
    height: 24px;
  }
  .hw-editor {
    min-height: 220px;
    font-size: 14px;
    max-width: 100%;
    overflow-x: hidden;
  }
  .hw-preview {
    min-height: auto;
    overflow: hidden;
  }
  .hw-preview-table-wrap.has-texture {
    padding: 8px;
  }
  .hw-preview-placeholder {
    min-height: 160px;
  }
  .hw-gen-bar {
    padding: 12px;
  }
  .hw-btn-generate {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    min-height: 44px;
  }

  /* ---- Step cards ---- */
  .aiht-step-card {
    padding: 16px !important;
  }

  /* ---- FAQ cards ---- */
  .aiht-faq-card {
    padding: 16px !important;
  }

  /* ---- Contact ---- */
  .aiht-contact-form {
    padding: 16px !important;
  }
  .aiht-contact-form input,
  .aiht-contact-form textarea {
    font-size: 16px;
  }

  /* ---- Footer ---- */
  footer.wp-block-template-part .wp-block-columns {
    gap: 20px !important;
  }
  footer.wp-block-template-part .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  /* ---- WP global padding ---- */
  .has-global-padding {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
