/* ── ElixirBooks Custom Overrides ── */

/* Add 30px white border to content images */
.hero-image img,
.about-img img,
.service-image img,
.feature-image img,
.featured-img img,
.project-img img,
.blog-img img,
.integration-img img {
  border: 30px solid #ffffff !important;
  box-sizing: border-box !important;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Partner Logos Card Style */
.partner-section .swiper-slide {
  background: #ffffff !important;
  border-radius: 16px;
  padding: 20px; /* Reduced padding/border feel for logos */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.partner-section .swiper-slide img {
  border: none !important;
  max-width: 80% !important;
  height: auto !important;
  filter: grayscale(1);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.partner-section .swiper-slide:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* Ensure small group images (like avatars) don't get swallowed by the 30px border */
.imgs-group img {
  border: 4px solid #ffffff !important;
  box-sizing: border-box !important;
}

/* Exclude common utility/icon images */
.navbar-brand img,
.icon-img img,
.client-logo img,
.question-mark img {
  border: none !important;
}

/* Tighten spacing for about-list and dividers */
.about-list {
  gap: 0.8rem !important;
}
.about-list li {
  gap: 12px !important;
}
.divider-sm {
  height: 30px !important; /* Reduced from 40px */
}

.divider {
  height: 80px !important; /* Reduced from 124px */
}

@media (max-width: 768px) {
  .divider {
    height: 60px !important;
  }
}

/* Remove decorative 'empty boxes' (pseudo-elements) */

.about-img:after,
.featured-img:after,
.service-image:after,
.hero-image:after {
  display: none !important;
}

/* Legal pages - Enhanced Design */
html {
  scroll-behavior: smooth;
}

.legal-content-section {
  margin-top: 14px;
}

.legal-content-section .legal-shell {
  display: grid;
  gap: 24px;
}

.legal-content-section .legal-main {
  display: grid;
  gap: 18px;
}

.legal-content-section .legal-hero-card {
  background:
    radial-gradient(circle at top right, var(--SecondaryTwo), transparent 50%),
    #ffffff;
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: 24px;
  padding: 30px 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.legal-content-section .legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--Primary);
  margin-bottom: 14px;
}

.legal-content-section .legal-kicker::before {
  content: "";
  width: 24px;
  height: 2.5px;
  border-radius: 4px;
  background-color: var(--Primary);
}

.legal-content-section .legal-hero-card h3 {
  margin-bottom: 14px;
  font-size: 1.85rem;
  line-height: 1.25;
}

.legal-content-section .legal-hero-card p {
  font-size: 0.98rem;
  line-height: 1.58;
  color: var(--Text);
}

.legal-content-section .legal-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-content-section .legal-meta-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--Text);
  border: 1.5px solid rgba(15, 15, 15, 0.1);
  border-radius: 999px;
  padding: 8px 14px;
  background-color: #ffffff;
  transition: all 0.25s ease;
}

.legal-content-section .legal-meta-chip:hover {
  border-color: var(--Primary);
  background-color: var(--SecondaryTwo);
}

.legal-content-section .legal-toc {
  border: 1.5px solid rgba(15, 15, 15, 0.08);
  background-color: #ffffff;
  border-radius: 18px;
  padding: 20px;
  height: fit-content;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.legal-content-section .legal-toc h6 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  color: var(--Heading);
  font-weight: 800;
}

.legal-content-section .legal-toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.legal-content-section .legal-toc a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--Text);
  border-radius: 12px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.legal-content-section .legal-toc a:hover {
  color: var(--Primary);
  background-color: var(--SecondaryTwo);
  border-left-color: var(--Primary);
  transform: translateX(4px);
}

.legal-content-section .legal-toc a.active {
  color: var(--Primary);
  background-color: var(--SecondaryTwo);
  border-left-color: var(--Primary);
  font-weight: 800;
}

.legal-content-section .legal-card {
  background-color: #ffffff;
  border: 1.5px solid rgba(15, 15, 15, 0.08);
  border-radius: 18px;
  padding: 24px 22px;
  scroll-margin-top: 100px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.legal-content-section .legal-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.legal-content-section .legal-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.legal-content-section .legal-index {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--SecondaryTwo),
    rgba(188, 196, 255, 0.2)
  );
  color: var(--Primary);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.legal-content-section .legal-card-head h5 {
  margin-bottom: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.legal-content-section .legal-card p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--Text);
}

.legal-content-section .legal-card p:last-child,
.legal-content-section .legal-card ul:last-child {
  margin-bottom: 0;
}

.legal-content-section .legal-card ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.legal-content-section .legal-card li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.legal-content-section .legal-card li:last-child {
  margin-bottom: 0;
}

.legal-content-section .legal-card a {
  color: var(--Primary);
  font-weight: 700;
  transition: all 0.25s ease;
}

.legal-content-section .legal-card a:hover {
  opacity: 0.75;
}

.legal-content-section .legal-toc,
.legal-content-section .legal-main,
.legal-content-section .legal-toc ul {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.legal-content-section .legal-toc::-webkit-scrollbar,
.legal-content-section .legal-main::-webkit-scrollbar,
.legal-content-section .legal-toc ul::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@media (min-width: 992px) {
  .legal-content-section {
    margin-top: 24px;
  }

  .legal-content-section .legal-shell {
    grid-template-columns: 20% 80%;
    align-items: stretch;
    gap: 28px;
    height: calc(100vh - 140px);
  }

  .legal-content-section .legal-toc {
    position: sticky;
    top: 100px;
    height: calc(100vh - 140px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .legal-content-section .legal-main {
    gap: 22px;
    height: calc(100vh - 140px);
    overflow-y: auto;
    padding-right: 8px;
    overscroll-behavior: contain;
  }

  .legal-content-section .legal-hero-card {
    padding: 36px 32px;
  }

  .legal-content-section .legal-card {
    padding: 26px 24px;
  }
}

@media (max-width: 991px) {
  .legal-content-section {
    margin-top: 10px;
  }

  .legal-content-section .legal-shell {
    grid-template-columns: 1fr;
  }

  .legal-content-section .legal-toc {
    margin-bottom: 4px;
    display: flex;
    flex-direction: column;
  }

  .legal-content-section .legal-toc h6 {
    margin-bottom: 10px;
  }

  .legal-content-section .legal-toc ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 6px;
  }

  .legal-content-section .legal-hero-card {
    border-radius: 20px;
    padding: 26px 20px;
  }

  .legal-content-section .legal-hero-card h3 {
    font-size: 1.55rem;
  }

  .legal-content-section .legal-toc,
  .legal-content-section .legal-card {
    border-radius: 16px;
  }

  .legal-content-section .legal-card {
    padding: 20px 18px;
  }

  .legal-content-section .legal-card-head {
    margin-bottom: 14px;
  }

  .legal-content-section .legal-index {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }
}

/* Footer style-five alignment and spacing improvements */
.header-section.style-five .navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  margin-right: clamp(1rem, 2.6vw, 2.75rem);
  padding: 0;
}

.header-section.style-five .navbar .navbar-brand img {
  /* width: clamp(230px, 16.5vw, 340px); */
  max-height: 78px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.footer-section.style-five > .container {
  max-width: 1260px;
}

.footer-section.style-five .footer-layout {
  --bs-gutter-x: clamp(1.25rem, 2vw, 2.5rem);
  --bs-gutter-y: 2rem;
  align-items: flex-start;
}

.footer-section.style-five .footer-col {
  display: flex;
}

.footer-section.style-five .footer-card {
  width: 100%;
}

.footer-section.style-five .footer-col-main > .footer-card {
  display: grid;
  gap: 1.35rem;
}

.footer-section.style-five .footer-links-row,
.footer-section.style-five .footer-info-row {
  --bs-gutter-x: clamp(1rem, 1.8vw, 2rem);
  --bs-gutter-y: 1.25rem;
  align-items: flex-start;
}

.footer-section.style-five .footer-links-row > div,
.footer-section.style-five .footer-info-row > div {
  display: flex;
}

.footer-section.style-five .footer-links-row > div > .footer-card,
.footer-section.style-five .footer-info-row > div > .footer-card {
  width: 100%;
}

.footer-section.style-five .footer-info-row {
  margin-top: 0 !important;
}

.footer-section.style-five .footer-card h5 {
  margin-bottom: 1.1rem !important;
}

.footer-section.style-five .footer-col-brand .footer-card p {
  max-width: 34ch;
  line-height: 1.58;
}

.footer-section.style-five .footer-logo {
  display: inline-flex;
  align-items: center;
}

.footer-section.style-five .footer-logo img {
  width: clamp(240px, 18vw, 360px);
  max-height: 90px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.footer-section.style-five .footer-col-brand .social-nav {
  margin-bottom: 0.25rem;
}

.footer-section.style-five .footer-nav {
  gap: 0.9rem;
}

.footer-section.style-five .footer-contact-info p {
  line-height: 1.5;
  margin-bottom: 0.75rem !important;
}

.footer-section.style-five .footer-location-list p {
  line-height: 1.5;
  margin-bottom: 0.75rem !important;
}

.footer-section.style-five .copyright-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 26px;
  padding-bottom: 34px;
}

@media (max-width: 991px) {
  .header-section.style-five .navbar .navbar-brand img {
    width: clamp(185px, 48vw, 250px);
    max-height: 70px;
  }

  .footer-section.style-five .footer-logo img {
    width: clamp(210px, 60vw, 290px);
    max-height: 86px;
  }

  .footer-section.style-five .footer-col-brand .footer-card p {
    max-width: 100%;
  }
}

/* HubSpot Form Styling */
.hs-form-container {
  background: #ffffff;
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  margin-top: 20px;
}

@media (min-width: 992px) {
  .hs-form-container {
    padding: 40px;
  }
}

/* 
   HubSpot forms often inject their own styles. 
   These selectors attempt to override common HubSpot form elements 
   to match the ElixirBooks design system.
*/
.hs-form-container .hs-input:not([type="checkbox"]):not([type="radio"]) {
  background-color: var(--Secondary) !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  height: 60px !important;
  padding: 10px 20px !important;
  font-family: var(--Font-Secondary) !important;
  color: var(--Text) !important;
}

.hs-form-container .hs-input:focus {
  border-color: var(--Primary) !important;
  background-color: #ffffff !important;
}

.hs-form-container .hs-button {
  background-color: var(--Primary) !important;
  border: none !important;
  border-radius: 5rem !important;
  padding: 16px 32px !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-family: var(--Font-Primary) !important;
  font-size: 16px !important;
  transition: all 0.35s ease !important;
  width: 100% !important;
  cursor: pointer !important;
  /* margin-top: 10px !important; */
}

.hs-form-container .hs-button:hover {
  background-color: var(--Heading) !important;
  transform: translateY(-2px);
}

.hs-form-container label {
  font-weight: 600 !important;
  color: var(--Heading) !important;
  margin-bottom: 8px !important;
  font-size: 14px !important;
}

/* HubSpot Form Styling */
.hs-form-container {
  background: #ffffff;
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: 24px;
  padding: 0px 30px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  /* margin-top: 20px; */
}

@media (min-width: 992px) {
  .hs-form-container {
    padding: 0px 40px;
  }
}

/* Override HubSpot fixed banner height without breaking form visibility */
.hs-form-container .hsfc-Step--layoutTemplate-top .hsfc-Step__Banner {
  height: auto !important;
  min-height: 0 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

/* Ensure HubSpot containers don't have their own internal backgrounds that clash with our card */
.hs-form-container .hs-form-frame,
.hs-form-container .hs-form-iframe,
.hs-form-container .hs-form {
  background: transparent !important;
}

/* 
   HubSpot forms often inject their own styles. 
   These selectors attempt to override common HubSpot form elements 
   to match the ElixirBooks design system.
*/
.hs-form-container .hs-input:not([type="checkbox"]):not([type="radio"]) {
  background-color: var(--Secondary) !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  height: 60px !important;
  padding: 10px 20px !important;
  font-family: var(--Font-Secondary) !important;
  color: var(--Text) !important;
}

.hs-form-container .hs-input:focus {
  border-color: var(--Primary) !important;
  background-color: #ffffff !important;
}

.hs-form-container .hs-button {
  background-color: var(--Primary) !important;
  border: none !important;
  border-radius: 5rem !important;
  padding: 16px 32px !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-family: var(--Font-Primary) !important;
  font-size: 16px !important;
  transition: all 0.35s ease !important;
  width: 100% !important;
  cursor: pointer !important;
  margin-top: 10px !important;
}

.hs-form-container .hs-button:hover {
  background-color: var(--Heading) !important;
  transform: translateY(-2px);
}

.hs-form-container label {
  font-weight: 600 !important;
  color: var(--Heading) !important;
  margin-bottom: 8px !important;
  font-size: 14px !important;
}
