/*
Theme Name: Hornik Solutions
Theme URI: https://hornik.solutions
Author: Dalton Hornik
Author URI: https://hornik.solutions
Description: Custom theme for Hornik Solutions
Version: 1.0
Requires at least: 6.5
Tested up to: 6.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hornikSolutions
*/

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

body {
  font-size: 16px;
  line-height: 1.6;
  background-color: #0f0f0f;
  color: #f0f0f0;
  overflow-x: visible;
}

@media (max-width: 1024px) {
  body {
    padding-top: 60px;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.875rem;
}

p {
  color: #ccc;
  margin-bottom: 1.2em;
}

a {
  padding: 14px 32px;
  font-size: 1rem;
  background-color: #c9aa71;
  color: #1a1a1a;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

a:hover {
  background-color: #e6c487;
}

/* ========== Header ========== */
.site-header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 999999 !important;
  background-color: #111;
  padding: 15px 0;
  color: #fff;
}

.header-container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Site title */
.site-title a {
  color: #fff;
  padding: 0px;
  background: none;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  z-index: 999999;
}

/* Desktop nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
}

.desktop-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav a {
  color: #fff;
  background: none;
  text-decoration: none;
  padding: 0px;
  font-size: 1rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: #aaa;
}

/* ========== Custom Dropdowns & CTA ========== */
.nav-dropdown-container {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  background: #111;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 999998;
  margin-top: 15px;
  min-width: 200px;
}

.nav-dropdown-container:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown ul {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

.nav-dropdown li {
  margin: 0 !important;
  padding: 0 !important;
}

.nav-dropdown li a {
  display: block;
  padding: 6px 20px !important;
  margin: 0 !important;
  color: #bbb;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-dropdown li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* CTA Button */
.nav-link.cta-button,
.desktop-nav a.cta-button {
  background: #c9aa71 !important;
  color: #111 !important;
  padding: 10px 24px !important;
  font-weight: 700 !important;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.nav-link.cta-button:hover,
.desktop-nav a.cta-button:hover {
  background: #e6c487 !important;
  color: #111 !important;
}

/* Phone Link */
.phone-link {
  color: #c9aa71 !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  border: 1px solid #c9aa71;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-right: 12px;
}

.phone-link:hover {
  background: #c9aa71 !important;
  color: #111 !important;
}

/* Mobile nav - fullscreen */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: #111;
  padding: 100px 30px 30px 30px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 999998;
  overflow-y: auto;
  border-top: 1px solid #333;
}

body.menu-open .mobile-nav {
  display: flex !important;
  visibility: visible !important;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.mobile-nav ul li {
  width: 100%;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav ul li a {
  color: #fff;
  font-size: 1.2rem;
  padding: 15px 20px;
  background: none;
  display: block;
  width: 100%;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.mobile-nav ul li a:hover {
  color: #c9aa71;
  padding-left: 20px;
}

/* Toggle button */
.menu-toggle {
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  display: none;
  margin: 0;
  padding: 0 15px 0 0;
  z-index: 999999;
  position: relative;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

body.menu-open .menu-toggle {
  color: transparent;
}

body.menu-open .menu-toggle::before {
  content: '\00D7';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 2.5rem;
}

/* ========== Services Dropdown ========== */
.services-dropdown {
  position: relative;
  display: inline-block;
}

.desktop-nav .services-dropdown {
  position: relative;
  display: inline-block;
}

.desktop-nav li .services-dropdown {
  position: relative;
  display: inline-block;
}

/* Services button - matches .desktop-nav a exactly */
.desktop-nav .services-button {
  color: #fff;
  background: none;
  text-decoration: none;
  padding: 0px;
  font-size: 1rem;
  font-weight: 700;
  transition: color 0.2s ease;
  display: inline-block;
  cursor: pointer;
}

.desktop-nav .services-button:hover {
  color: #aaa;
}

.services-dropdown-menu {
  position: absolute;
  top: 100%;
  left: auto !important;
  right: 0 !important;
  background: #111;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  list-style: none;
  margin: 15px 0 0 0;
  padding: 8px 0;
  width: 320px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border-radius: 6px;
  border: 1px solid #333;
  overflow: visible;
  max-height: none;
  text-align: left;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
}

.services-dropdown:hover .services-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.services-dropdown-menu li {
  margin: 0;
  padding: 0;
  display: block;
  width: 100%;
}

.services-dropdown-menu li:first-child {
  margin-top: 0;
}

.services-dropdown-menu li:last-child {
  margin-bottom: 0;
}

.services-dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 1rem;
  background: none;
  border-radius: 0;
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.services-dropdown-menu a:hover {
  color: #aaa;
}

/* Mobile About Dropdown */
.mobile-nav .mobile-about-dropdown {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav .mobile-about-dropdown .about-button {
  width: 100%;
  text-align: left;
  font-size: 1.2rem;
  padding: 15px 20px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.mobile-nav .mobile-about-dropdown .about-button:hover {
  color: #c9aa71;
  padding-left: 15px;
}

.mobile-nav .mobile-about-dropdown .about-button::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #fff;
  transition: transform 0.3s ease;
  margin-left: 10px;
}

.mobile-nav .mobile-about-dropdown.active .about-button::after {
  transform: rotate(180deg);
}

.mobile-nav .mobile-about-dropdown .about-dropdown-menu {
  position: static;
  width: 100%;
  box-shadow: none;
  border: none;
  border-top: 1px solid #333;
  margin: 10px 0 0 0;
  padding: 0;
  transform: none;
  background: #111;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
  display: flex;
  flex-direction: column;
  list-style: none;
}

.mobile-nav .mobile-about-dropdown.active .about-dropdown-menu {
  opacity: 1;
  visibility: visible;
  max-height: 500px;
  margin: 10px 0 0 0;
}

.mobile-nav .mobile-about-dropdown .about-dropdown-menu li {
  border-bottom: 1px solid #333;
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
}

.mobile-nav .mobile-about-dropdown .about-dropdown-menu li:first-child {
  border-top: 1px solid #333;
}

.mobile-nav .mobile-about-dropdown .about-dropdown-menu li:last-child {
  border-bottom: none;
}

.mobile-nav .mobile-about-dropdown .about-dropdown-menu a {
  font-size: 1.15rem;
  padding: 18px 25px;
  color: rgba(255, 255, 255, 0.75);
  display: block;
  width: 100%;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-nav .mobile-about-dropdown .about-dropdown-menu a:hover {
  color: #c9aa71;
  background: rgba(201, 170, 113, 0.08);
  padding-left: 35px;
}

/* Mobile Services Dropdown - with chevron */
.mobile-nav .mobile-services-dropdown {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav .mobile-services-dropdown .services-button {
  width: 100%;
  text-align: left;
  font-size: 1.2rem;
  padding: 15px 20px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.mobile-nav .mobile-services-dropdown .services-button:hover {
  color: #c9aa71;
  padding-left: 15px;
}

.mobile-nav .mobile-services-dropdown .services-button::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #fff;
  transition: transform 0.3s ease;
  margin-left: 10px;
}

.mobile-nav .mobile-services-dropdown.active .services-button::after {
  transform: rotate(180deg);
}

.mobile-nav .mobile-services-dropdown .services-dropdown-menu {
  position: static;
  width: 100%;
  box-shadow: none;
  border: none;
  border-top: 1px solid #333;
  margin: 10px 0 0 0;
  padding: 0;
  transform: none;
  background: #111;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
  display: flex;
  flex-direction: column;
  list-style: none;
}

.mobile-nav .mobile-services-dropdown.active .services-dropdown-menu {
  opacity: 1;
  visibility: visible;
  max-height: 500px;
  margin: 10px 0 0 0;
}

.mobile-nav .mobile-services-dropdown .services-dropdown-menu li {
  border-bottom: 1px solid #333;
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
}

.mobile-nav .mobile-services-dropdown .services-dropdown-menu li:first-child {
  border-top: 1px solid #333;
}

.mobile-nav .mobile-services-dropdown .services-dropdown-menu li:last-child {
  border-bottom: none;
}

.mobile-nav .mobile-services-dropdown .services-dropdown-menu a {
  font-size: 1.15rem;
  padding: 18px 25px;
  color: rgba(255, 255, 255, 0.75);
  display: block;
  width: 100%;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-nav .mobile-services-dropdown .services-dropdown-menu a:hover {
  color: #c9aa71;
  background: rgba(201, 170, 113, 0.08);
  padding-left: 35px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .desktop-nav {
    display: none !important;
  }

  .menu-toggle {
    display: block !important;
    z-index: 999999;
    position: relative;
  }

  .mobile-nav {
    display: none !important;
  }

  body.menu-open .mobile-nav {
    display: flex !important;
  }

  .header-container {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .site-title a {
    font-size: 1.2rem;
  }

  .site-header {
    position: fixed;
    width: 100%;
  }

  .mobile-contact-link,
  .mobile-phone-link {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 20px 10px;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
  }

  .mobile-contact-link:hover,
  .mobile-phone-link:hover {
    color: #c9aa71;
    padding-left: 15px;
  }

  .mobile-phone-link {
    color: #c9aa71;
    font-weight: 600;
  }
}

/* ========== Footer ========== */
.site-footer {
  width: 100%;
  background-color: #111;
  color: #fff;
  padding: 60px 40px;
  text-align: left;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-col-brand {
  flex: 1 1 300px;
}

.footer-branding {
  margin-bottom: 20px;
  color: #fff;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.footer-desc {
  margin-bottom: 20px;
  max-width: 320px;
  color: #aaa;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-col-links {
  flex: 1 1 150px;
}

.footer-heading {
  color: #fff;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  padding: 0;
  background: none;
  color: #ccc;
  font-weight: 400;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #c9aa71;
  background: none;
}

.footer-links-explore {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}

.footer-links-explore li {
  flex: 0 0 auto;
}

.footer-copyright {
  width: 100%;
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #666;
  font-size: 0.875rem;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-col-brand {
  flex: 1 1 300px;
}

.footer-branding {
  margin-bottom: 20px;
  color: #fff;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.footer-desc {
  margin-bottom: 20px;
  max-width: 320px;
  color: #aaa;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-col-links {
  flex: 1 1 150px;
}

.footer-heading {
  color: #fff;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  padding: 0;
  background: none;
  color: #ccc;
  font-weight: 400;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #c9aa71;
  background: none;
}

.footer-links-explore {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}

.footer-links-explore li {
  flex: 0 0 auto;
}

/* Services column - single column */
.footer-col-links:not(:first-of-type) .footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-copyright {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #666;
  font-size: 0.875rem;
}

.footer-legal-links {
  display: flex;
  gap: 20px;
}

.footer-legal-links a {
  color: #fff !important;
  text-decoration: underline !important;
  font-size: 0.875rem;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  display: inline;
  transition: color 0.2s;
}

.footer-legal-links a:hover {
  color: #c9aa71;
}

/* ========== Global Header Offset (apply to ALL pages) ========== */
:root {
  --header-h-mobile: 72px;
  --header-h-desktop: 96px;
  --adminbar-offset: 0px;
}

body.admin-bar .site-header {
  top: 32px;
}

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

  body.admin-bar {
    --adminbar-offset: 46px;
  }
}

@media (min-width: 783px) {
  body.admin-bar {
    --adminbar-offset: 32px;
  }
}

/* ========== Custom Dropdowns & CTA ========== */
.nav-dropdown-container {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  background: #111;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 999998;
  margin-top: 15px;
  min-width: 200px;
}

.nav-dropdown-container:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown ul {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

.nav-dropdown li {
  margin: 0 !important;
  padding: 0 !important;
}

.nav-dropdown li a {
  display: block;
  padding: 6px 20px !important;
  margin: 0 !important;
  color: #bbb;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-dropdown li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* CTA Button for Contact */
.nav-link.cta-button,
.desktop-nav a.cta-button {
  background: #c9aa71 !important;
  color: #111 !important;
  padding: 10px 24px !important;
  font-weight: 700 !important;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.nav-link.cta-button:hover,
.desktop-nav a.cta-button:hover {
  background: #e6c487 !important;
  color: #111 !important;
}

@media (max-width: 1024px) {
  body {
    padding-top: calc(var(--header-h-mobile) + var(--adminbar-offset));
  }
}

@media (min-width: 1025px) {
  body {
    padding-top: calc(var(--header-h-desktop) + var(--adminbar-offset));
  }
}

body.home .hs-hero {
  margin-top: 0 !important;
}

@media (max-width: 1024px) {

  :target,
  h1,
  h2,
  h3,
  [id] {
    scroll-margin-top: calc(var(--header-h-mobile) + var(--adminbar-offset));
  }
}

@media (min-width: 1025px) {

  :target,
  h1,
  h2,
  h3,
  [id] {
    scroll-margin-top: calc(var(--header-h-desktop) + var(--adminbar-offset));
  }
}

/* ============================================================
   Carousel – layout, cards, controls
   ============================================================ */

/* Header */
.hs-section-title {
  text-align: center;
}

/* Wrapper */
.hs-carousel-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 50px 0;
}

/* Track */
.hs-carousel-track {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: stretch;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Cards */
.hs-project-card,
.hs-project-card-empty,
.hs-project-card.hs-project-card--placeholder {
  flex: 0 0 calc((100% - 32px*4)/5);
  width: 260px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 16px;
  padding: 20px;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto var(--title-h, 64px) var(--excerpt-h, 220px) auto;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(201, 170, 113, .25);
  opacity: .95;
  transition: box-shadow .3s ease, opacity .3s ease;
}

.hs-project-card.active,
.hs-project-card-empty.active,
.hs-project-card--placeholder.active {
  box-shadow: 0 0 0 2px #c9aa71, 0 0 22px rgba(201, 170, 113, .35), 0 2px 8px rgba(201, 170, 113, .25);
  opacity: 1;
}

.hs-project-card--placeholder,
.hs-project-card-empty {
  border: 2px dashed #3a3a3a;
  filter: drop-shadow(0 2px 8px rgba(201, 170, 113, .25));
}

/* Media box */
.hs-project-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #121212;
}

.hs-project-thumb {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.hs-thumb--placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 2px;
  background: #1b1b1b;
}

.hs-thumb--placeholder span {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
  font-size: .95rem;
}

/* Title + Excerpt */
.hs-project-card h3,
.hs-project-card-empty h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
  color: #c9aa71;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: var(--title-h, 64px);
}

.hs-project-card .hs-project-excerpt,
.hs-project-card-empty p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.45;
  color: #ccc;
  text-align: center;
  height: var(--excerpt-h, 220px);
  overflow: hidden;
  position: relative;
}

:root {
  --excerpt-fade: 120px;
}

.hs-project-card:not(.hs-project-card--placeholder) .hs-project-excerpt {
  display: block !important;
  -webkit-line-clamp: initial !important;
  line-clamp: initial !important;
  -webkit-box-orient: initial !important;
  white-space: normal !important;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - var(--excerpt-fade)), rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - var(--excerpt-fade)), rgba(0, 0, 0, 0) 100%);
}

.hs-project-card.hs-project-card--placeholder .hs-project-excerpt,
.hs-project-card[data-placeholder="true"] .hs-project-excerpt {
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

@supports not ((-webkit-mask-image: linear-gradient(#000, transparent)) or (mask-image: linear-gradient(#000, transparent))) {
  .hs-project-card:not(.hs-project-card--placeholder) .hs-project-excerpt::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--excerpt-fade);
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0) 0%, rgba(26, 26, 26, .65) 60%, #1a1a1a 100%);
    pointer-events: none;
  }
}

/* CTA */
.hs-project-readmore {
  justify-self: center;
  color: #111;
  background: #c9aa71;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: background .2s ease;
}

.hs-project-readmore:hover {
  background: #e6c487;
}

/* Controls */
.hs-carousel-prev,
.hs-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  border: none;
  font-size: 28px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s ease;
}

.hs-carousel-prev:hover,
.hs-carousel-next:hover {
  background: rgba(0, 0, 0, .8);
}

.hs-carousel-prev {
  left: 10px;
}

.hs-carousel-next {
  right: 10px;
}

/* Responsive */
@media (max-width: 1024px) {

  .hs-project-card,
  .hs-project-card-empty,
  .hs-project-card.hs-project-card--placeholder {
    flex: 0 0 calc((100% - 20px*2)/3);
    width: calc((100% - 20px*2)/3);
  }

  .hs-carousel-track {
    gap: 20px;
  }
}

.hs-project-card,
.hs-project-card-empty {
  --title-h: 60px;
  --excerpt-h: 200px;
}

@media (max-width: 768px) {

  .hs-project-card,
  .hs-project-card-empty,
  .hs-project-card.hs-project-card--placeholder {
    flex: 0 0 calc(100vw - 80px);
    width: calc(100vw - 80px);
  }

  .hs-carousel-track {
    gap: 16px;
  }

  .hs-carousel-prev {
    left: 5px;
    padding: 6px 10px;
    font-size: 24px;
  }

  .hs-carousel-next {
    right: 5px;
    padding: 6px 10px;
    font-size: 24px;
  }
}

/* Highlight active card */
.hs-project-card.active {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hs-project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ========== Math Blocks ========== */
.wp-block-math {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
  padding: 12px 0;
  margin: 1.5em 0;
  font-size: 1em;
}

/* math element: inline-block so scrollWidth is accurate for JS */
.wp-block-math math {
  transform-origin: center center;
  max-width: none;
}

/* Fix crowding around operators and equals signs */
.wp-block-math math mo {
  padding: 0 3px;
}

/* Fix tight vertical spacing inside fractions */
.wp-block-math math mfrac>* {
  padding: 3px 0;
}

/* Improve delimiter sizing and appearance */
.wp-block-math math>mo:first-child,
.wp-block-math math>mo:last-child {
  font-weight: 300;
  padding: 0 4px;
}

/* Ensure text elements within math don't clump */
.wp-block-math math mtext,
.wp-block-math math mi {
  padding: 0 2px;
}

/* Additional scaling for small screens */
@media (max-width: 480px) {
  .wp-block-math {
    font-size: clamp(0.5rem, 3.5vw, 0.85rem);
  }
}