
/* ========================================
   CSS RESET & BASE STYLES
   ======================================== */

/* Performance: Ensure all fonts use font-display: swap to prevent FOIT */
@font-face {
  font-family: 'Roboto';
  font-display: swap;
  /* This ensures any Roboto font loaded gets font-display: swap */
}

/* Box sizing reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* CSS Variables */
:root {
  /* Typography - Use Google Fonts for Inter/Playfair, fallback to system fonts */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;

  /* Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #333333;
  --text-muted: #6b7280;
  --text-light: #9ca3af;

  --border-color: #e5e7eb;
  --background-light: #f9fafb;
  --background-accent: #faf8f5;

  --accent-color: #ef4444;
  --accent-light: #fef3f2;

  --link-color: #8b6f47;
  --link-hover: #6b5537;

  /* Spacing */
  --content-max-width: 780px;
  --page-padding: 2rem;

  /* Effects */
  --radius: 8px;
  --transition: 0.2s ease;
}

/* Base HTML & Body */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  line-height: 1.7;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
}

/* Page Container - Centers content with max-width */
.page-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--page-padding);
}

@media (max-width: 768px) {
  .page-container {
    padding: 1.5rem;
  }
}

/* Main Article Wrapper */
.post-main {
  background: #ffffff;
}

/* Drag & Drop Content Area */
.dnd-section--blog-post {
  width: 100%;
  margin: 0;
  padding: 0;
}

.dnd-section--blog-post .dnd-section {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.dnd-section--blog-post .dnd-column {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.dnd-section--blog-post .dnd-row {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Ensure sections inside drag-and-drop maintain proper spacing */
.dnd-section--blog-post .widget-type-cell {
  padding: 0 !important;
}

.dnd-section--blog-post .row-fluid {
  margin: 0 !important;
}

/* ========================================
   SITE HEADER & NAVIGATION
   ======================================== */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.375rem;
  transition: opacity var(--transition);
}

.logo-link:hover {
  opacity: 0.85;
}

.logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  font-weight: 600;
  color: #1a1a1a;
}

/* Desktop Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-left: auto;
  margin-right: auto;
}

.nav-link {
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.nav-link:hover {
  color: #1a1a1a;
}

.nav-link--dropdown {
  padding-right: 0.25rem;
}

.dropdown-arrow {
  opacity: 0.6;
  transition: opacity var(--transition), transform var(--transition);
}

.nav-link:hover .dropdown-arrow {
  opacity: 1;
  transform: translateY(1px);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn-text {
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition);
  white-space: nowrap;
}

.btn-text:hover {
  color: #1a1a1a;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  background: #fe7a36;
  color: #ffffff;
  padding: 0.625rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 3px rgba(255, 107, 53, 0.2);
  white-space: nowrap;
}

.btn-contact:hover {
  background-color: #ff5722;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  width: 40px;
  height: 40px;
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background var(--transition);
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: absolute;
  transition: transform var(--transition);
}

.hamburger-icon::before {
  top: -7px;
}

.hamburger-icon::after {
  bottom: -7px;
}

.mobile-menu-toggle--active .hamburger-icon {
  background: transparent;
}

.mobile-menu-toggle--active .hamburger-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-menu-toggle--active .hamburger-icon::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-nav--open {
  max-height: 400px;
}

.mobile-nav-link {
  display: block;
  padding: 1rem 2rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition), color var(--transition);
}

.mobile-nav-link:hover {
  background-color: var(--background-light);
  color: var(--accent-color);
}

.mobile-nav-link.mobile-contact {
  background: #fff3ed;
  color: #fe7a36;
  font-weight: 600;
}

/* Responsive Header */
@media (max-width: 768px) {
  .header-container {
    padding: 1rem 1.5rem;
  }

  .header-nav {
    display: none;
  }

  .btn-text,
  .btn-contact {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .mobile-nav {
    display: flex;
  }
}

/* ========================================
   BLOG INDEX / LISTING PAGE STYLES
   ======================================== */

/* Blog Hero Section */
.blog-hero {
  background: linear-gradient(135deg, #fef8f5 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 5rem 2rem 4rem 2rem;
  margin-bottom: 3rem;
}

.blog-hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.blog-hero-title {
  font-family: var(--font-sans);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.blog-hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 2.5rem 0;
  line-height: 1.6;
}

/* Search Bar */
.blog-search-wrapper {
  margin-top: 2rem;
}

.blog-search-form {
  width: 100%;
}

.blog-search-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 650px;
  margin: 0 auto;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 0.625rem 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.blog-search-container:focus-within {
  border-color: #fe7a36;
  box-shadow: 0 0 0 3px rgba(254, 122, 54, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.blog-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-left: 0.25rem;
}

.blog-search-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  padding: 0.75rem 0.5rem !important;
  font-size: 1rem !important;
  font-family: var(--font-sans) !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
  box-shadow: none !important;
  min-width: 0;
  line-height: 1.5 !important;
}

.blog-search-input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.blog-search-input:hover {
  border: none !important;
  background: transparent !important;
}

.blog-search-input::placeholder {
  color: var(--text-light);
  opacity: 1;
}

.blog-search-button {
  background: #fe7a36;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(254, 122, 54, 0.25);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.blog-search-button:hover {
  background-color: #ff5722;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 122, 54, 0.4);
}

.blog-search-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(254, 122, 54, 0.3);
}

/* Category Filters */
.blog-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 1.5rem 0;
}

.blog-category-btn {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition);
  cursor: pointer;
}

.blog-category-btn:hover {
  border-color: #fe7a36;
  color: #fe7a36;
  background: #fff3ed;
}

.blog-category-btn-active {
  background: #fe7a36;
  border-color: #fe7a36;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(255, 107, 53, 0.2);
}

.blog-category-btn-active:hover {
  background: #ff5722;
  border-color: #ff5722;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Blog Grid */
.blog-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .blog-grid-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Empty State */
.blog-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  margin: 2rem 0;
  background: #fef8f5;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.empty-state-title {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.empty-state-text {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 0 0 2rem 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-button {
  display: inline-block;
  background: #fe7a36;
  color: #ffffff;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 3px rgba(255, 107, 53, 0.2);
}

.empty-state-button:hover {
  background-color: #ff5722;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.empty-state-button:active {
  transform: translateY(0);
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  padding: 2rem 0 4rem 0;
}

.blog-pagination .hs-pagination {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-pagination .hs-pagination li a,
.blog-pagination .hs-pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition);
}

.blog-pagination .hs-pagination li a:hover {
  border-color: #fe7a36;
  color: #fe7a36;
  background: #fff3ed;
}

.blog-pagination .hs-pagination li.active span {
  background: #fe7a36;
  border-color: #fe7a36;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(255, 107, 53, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-hero {
    padding: 3rem 1.5rem;
    margin-bottom: 2rem;
  }

  .blog-hero-title {
    font-size: 2rem;
  }

  .blog-hero-subtitle {
    font-size: 1rem;
  }

  .blog-search-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .blog-search-icon {
    order: 1;
    margin-left: 0;
  }

  .blog-search-input {
    order: 2;
    flex: 1;
    min-width: calc(100% - 40px);
    padding: 0.625rem 0.5rem !important;
    margin-bottom: 0.5rem;
  }

  .blog-search-button {
    order: 3;
    width: 100%;
    padding: 0.875rem 1.5rem;
  }

  .blog-category-filters {
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .blog-category-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
  }
}

/* ========================================
   RELATED POSTS SECTION STYLING
   ======================================== */

.related-posts-section {
  padding: 4rem 0;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
}

.related-posts-heading {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2rem 0;
  text-align: center;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.related-post-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.related-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-post-image-link {
  display: block;
  overflow: hidden;
  /* Prevent CLS by reserving space with aspect ratio */
  aspect-ratio: 3 / 2;
  background-color: #f3f4f6;
}

.related-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.related-post-card:hover .related-post-image {
  transform: scale(1.05);
}

.related-post-content {
  padding: 1.5rem;
}

.related-post-title {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.related-post-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

.related-post-title a:hover {
  color: #fe7a36;
}

.related-post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.related-post-author,
.related-post-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.related-post-date::before {
  content: '•';
  margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .related-posts-section {
    padding: 3rem 0;
    margin-top: 3rem;
  }

  .related-posts-heading {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ========================================
   GLOBAL FORM STYLING
   ======================================== */

/* Universal Form Container */
.hs-form,
.hs-form-private,
.hs-form.stacked,
form {
  max-width: 100%;
  font-family: var(--font-sans);
}

/* Form Field Groups */
.hs-form-field,
.hs_error_rollup,
.field,
.input {
  margin-bottom: 1.5rem;
}

/* Form Labels */
.hs-form-field label,
.field label,
form label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.625rem;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}

.hs-form-field label span {
  color: var(--text-primary);
}

/* Required Indicator */
.hs-form-required {
  color: #dc2626;
  margin-left: 0.25rem;
  font-weight: 600;
}

/* Input Fields - Text, Email, URL, Tel, Number */
.hs-form-field input.hs-input[type="text"],
.hs-form-field input.hs-input[type="email"],
.hs-form-field input.hs-input[type="url"],
.hs-form-field input.hs-input[type="tel"],
.hs-form-field input.hs-input[type="number"],
.hs-form-field input.hs-input,
.hs-input,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"] {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  background: #ffffff;
  transition: all var(--transition);
  box-sizing: border-box;
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
}

/* Textarea Fields */
.hs-form-field textarea.hs-input,
textarea.hs-input,
textarea {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  background: #ffffff;
  transition: all var(--transition);
  box-sizing: border-box;
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
  -webkit-appearance: none;
  appearance: none;
}

/* Select Dropdowns */
.hs-form-field select.hs-input,
select.hs-input,
select {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  background: #ffffff;
  transition: all var(--transition);
  box-sizing: border-box;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 3rem;
}

/* Input Placeholder */
.hs-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-light);
  opacity: 1;
}

/* Input Focus States */
.hs-form-field input.hs-input:focus,
.hs-form-field textarea.hs-input:focus,
.hs-form-field select.hs-input:focus,
.hs-input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #fe7a36;
  box-shadow: 0 0 0 3px rgba(254, 122, 54, 0.1);
  background: #ffffff;
}

/* Input Hover States */
.hs-form-field input.hs-input:hover,
.hs-form-field textarea.hs-input:hover,
.hs-form-field select.hs-input:hover,
.hs-input:hover,
input:hover,
textarea:hover,
select:hover {
  border-color: #d1d5db;
}

/* Disabled Input States */
.hs-input:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--background-light);
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Checkbox and Radio Styling */
.hs-form-field input[type="checkbox"],
.hs-form-field input[type="radio"],
input[type="checkbox"],
input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  margin-right: 0.625rem;
  vertical-align: middle;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: #fe7a36;
  border-color: #fe7a36;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(254, 122, 54, 0.1);
}

/* Checkbox/Radio Labels */
.hs-form-booleancheckbox label,
.hs-form-radio label {
  display: inline-flex;
  align-items: center;
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

/* Submit Button Wrapper */
.hs-submit,
.hs-form-field .actions,
.form-actions {
  margin-top: 2rem;
}

/* Submit Buttons - Primary Style */
.hs-button.primary,
.hs-button,
input[type="submit"].hs-button,
input[type="submit"],
button[type="submit"],
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #fe7a36;
  color: #ffffff;
  padding: 0.875rem 2.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 4px rgba(254, 122, 54, 0.2);
  letter-spacing: -0.01em;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.hs-button.primary:hover,
.hs-button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background-color: #ff5722;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 122, 54, 0.35);
}

.hs-button.primary:active,
.hs-button:active,
input[type="submit"]:active,
button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(254, 122, 54, 0.25);
}

.hs-button.primary:disabled,
.hs-button:disabled,
input[type="submit"]:disabled,
button[type="submit"]:disabled {
  background-color: var(--border-color);
  color: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Secondary Button Style */
.hs-button.secondary,
.btn-secondary {
  background-color: #ffffff;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hs-button.secondary:hover,
.btn-secondary:hover {
  background-color: var(--background-light);
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Form Validation - Error States */
.hs-error-msgs,
.hs-error-msg,
.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  list-style: none;
  padding: 0;
  font-weight: 500;
}

.hs-error-msgs li {
  margin-bottom: 0.375rem;
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
}

.hs-error-msgs li::before {
  content: '⚠';
  flex-shrink: 0;
  font-size: 0.875rem;
}

/* Error Input Styling */
.hs-form-field.error input,
.hs-form-field.error textarea,
.hs-form-field.error select,
input.error,
textarea.error,
select.error {
  border-color: #dc2626;
  background-color: #fef2f2;
}

.hs-form-field.error input:focus,
.hs-form-field.error textarea:focus,
.hs-form-field.error select:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Success States */
.hs-form-field.success input,
.hs-form-field.success textarea,
input.success,
textarea.success {
  border-color: #10b981;
  background-color: #f0fdf4;
}

.submitted-message,
.hs-success-message {
  background-color: #f0fdf4;
  border: 1.5px solid #10b981;
  color: #047857;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  margin-top: 1.5rem;
}

/* Field Descriptions/Help Text */
.hs-field-desc,
.field-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
  line-height: 1.5;
}

/* reCAPTCHA Styling */
.hs-recaptcha {
  margin: 1.5rem 0;
}

.grecaptcha-badge {
  margin: 1rem 0;
}

.g-recaptcha-response {
  display: none !important;
}

/* Form Loading State */
.hs-form.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Responsive Form Styling */
@media (max-width: 768px) {
  .hs-form-field input.hs-input,
  .hs-form-field textarea.hs-input,
  .hs-form-field select.hs-input,
  input,
  textarea,
  select {
    font-size: 1rem; /* Prevent zoom on iOS */
  }

  .hs-button.primary,
  .hs-button,
  input[type="submit"],
  button[type="submit"] {
    width: 100%;
    padding: 1rem 2rem;
  }
}

/* ========================================
   HUBSPOT COMMENTS SECTION STYLING
   ======================================== */

/* Main section wrapper */
.section.post-footer {
  padding: 3rem 0;
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
}

/* Comments listing container */
#comments-listing.new-comments {
  margin-bottom: 3rem;
}

/* Form Wrapper */
.hs_cos_wrapper_type_blog_comments,
.widget-type-blog_comments {
  max-width: 100%;
}

/* Comments List */
#comments-listing .comment-thread,
#comments-listing .comments-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#comments-listing .comment-item,
#comments-listing .comment {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color);
}

#comments-listing .comment-item:last-child,
#comments-listing .comment:last-child {
  border-bottom: none;
}

/* Comment Avatar */
.comment-author-avatar,
.comment .avatar {
  flex-shrink: 0;
}

.comment-author-avatar img,
.comment .avatar img {
  border-radius: 50%;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* Comment Content */
.comment-content-wrapper,
.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-header,
.comment-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.comment-author-name,
.comment-author {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.comment-date,
.comment-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.comment-date::before,
.comment-time::before {
  content: '•';
  margin: 0 0.375rem;
  color: var(--border-color);
}

.comment-body,
.comment-text {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.9375rem;
  margin: 0;
}

.comment-body p,
.comment-text p {
  margin: 0 0 0.75rem 0;
}

.comment-body p:last-child,
.comment-text p:last-child {
  margin-bottom: 0;
}

/* Comment Actions */
.comment-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}

.comment-reply,
.comment-like {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition);
}

.comment-reply:hover,
.comment-like:hover {
  color: #fe7a36;
}

/* Nested/Reply Comments */
.comment-thread .comment-thread {
  margin-top: 1rem;
  margin-left: 2rem;
  padding-left: 1.5rem;
  border-left: 3px solid var(--border-color);
}

.comment-thread .comment-thread .comment-item {
  padding: 1.5rem;
}

/* Empty State */
.new-comments:empty::after {
  content: 'No comments yet. Be the first to comment!';
  display: block;
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .section.post-footer {
    padding: 2rem 0;
    margin-top: 2rem;
  }

  #comments-listing .comment-item,
  #comments-listing .comment {
    padding: 1.25rem 0;
    gap: 0.75rem;
  }

  .comment-author-avatar img,
  .comment .avatar img {
    width: 36px;
    height: 36px;
  }

  .comment-thread .comment-thread {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
  }

  .hs-button.primary,
  input[type="submit"].hs-button.primary {
    width: 100%;
  }
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */

.newsletter-section {
  background: linear-gradient(135deg, #fef8f5 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 3.5rem 2.5rem;
  margin: 4rem auto;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  max-width: 100%;
  width: 100%;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #fe7a36 0%, #ff5722 100%);
  z-index: 1;
}

.newsletter-container {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.newsletter-heading {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.875rem 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
}

.newsletter-description {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 2.25rem 0;
  text-align: center;
}

/* Newsletter Form Container */
#newsletter-form-container-post,
.newsletter-form-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 0.5rem;
}

/* HubSpot Form Frame - Embedded Forms */
.newsletter-section .hs-form-frame {
  border: none !important;
  width: 100% !important;
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-section .hs-form-frame iframe {
  border: none !important;
  width: 100% !important;
  min-height: 400px;
}

/* Newsletter Form Styling (for non-iframe forms) */
.newsletter-section .hs-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.newsletter-section .hs-form-field {
  margin-bottom: 1.25rem;
}

.newsletter-section .hs-form-field label {
  text-align: left;
}

/* Ensure newsletter inputs match global form style */
.newsletter-section .hs-input {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.newsletter-section .hs-input:focus {
  box-shadow: 0 0 0 3px rgba(254, 122, 54, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Newsletter Submit Button */
.newsletter-section .hs-button.primary {
  width: 100%;
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

/* Newsletter Success Message */
.newsletter-section .submitted-message,
.newsletter-section .hs-success-message {
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
}

/* Responsive Newsletter */
@media (max-width: 640px) {
  .newsletter-section {
    padding: 2.5rem 1.75rem;
    margin: 3rem 0;
  }

  .newsletter-heading {
    font-size: 1.625rem;
  }

  .newsletter-description {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
}