/* Hide site header */
.site-header {
  display: none !important;
}

/* Site footer */
.site-footer {
  display: block !important;
  position: static !important;
  width: 100% !important;
  margin-top: 4rem;
  padding: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.875rem;
  color: rgba(0,0,0,0.5);
  /* These are also set by JS but kept as fallback */
  bottom: unset !important;
  right: unset !important;
  z-index: unset !important;
}

.site-footer * {
  display: none !important;
}

.site-footer::before {
  content: "© 2026 Allan Dib. All rights reserved";
  display: block;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(0,0,0,0.08);
  text-align: left;
  box-sizing: border-box;
}

/* Remove the "copy link" icon in the article heading */
.publish-article-heading .clickable-icon {
  display: none !important;
}

/* Remove the horizontal divider under the article heading */
.publish-article-heading {
  border-bottom: none !important;
}

/* ================================
   Reading column + typography
   ================================ */
.markdown-preview-section {
  max-width: 42rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  font-family: ui-serif, Georgia, "Iowan Old Style", Charter, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
.markdown-preview-section h1,
.markdown-preview-section h2,
.markdown-preview-section h3,
.markdown-preview-section h4,
.markdown-preview-section h5,
.markdown-preview-section h6 {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.2;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
  clear: both; /* Moved here - stops float wrapping */
}

/* Horizontal rules also clear floats */
.markdown-preview-section hr {
  clear: both;
}

/* ================================
   Links
   ================================ */
.markdown-preview-section a {
  color: inherit !important;
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(0, 0, 0, 0.18);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.markdown-preview-section a:hover {
  color: #ff6d2c !important;
  text-decoration-color: #ff6d2c;
}

.markdown-preview-section a:focus {
  outline: 2px solid #ff6d2c;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Remove external link icon */
.markdown-preview-section a.external-link {
  background-image: none !important;
  padding-right: 0 !important;
}

.markdown-preview-section a.external-link::after,
.markdown-preview-section a.external-link svg {
  display: none !important;
}

/* ================================
   Hero image with text wrap
   ================================ */
.hero-float-img {
  float: right !important;
  width: 150px !important;
  max-width: none !important;
  height: auto !important;
  margin: 0.2rem 0 1rem 1.5rem;
  display: block !important;
}

/* ================================
   Mobile tweaks
   ================================ */
@media (max-width: 600px) {
  .markdown-preview-section {
    font-size: 1.25rem;
    line-height: 1.8;
  }
  
  .markdown-preview-section h1 {
    font-size: 2rem;
  }
  
  .markdown-preview-section h2 {
    font-size: 1.6rem;
  }
  
  .hero-float-img {
    width: 120px !important;
    margin: 0.15rem 0 0.75rem 1rem;
  }
  
  .site-footer::before {
    padding: 1.5rem 1.25rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
  }
}

/* Social icons */
img[src*="icon-"] {
  width: 20px !important;
  height: 20px !important;
  vertical-align: -4px;
  margin-right: 0.3rem;
}



/* ================================
   HubSpot Newsletter Form
   ================================ */
.newsletter-form {
  background-color: #f7f7f7;
  padding: 2rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 2rem 0;
  max-width: 42rem;
}

.newsletter-form .hs-form {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left !important;
  margin: 0 !important;
}

/* Force vertical layout */
.newsletter-form form,
.newsletter-form fieldset,
.newsletter-form .form-columns-1,
.newsletter-form .form-columns-2 {
  display: block !important;
  max-width: 100% !important;
  padding: 0;
  border: none;
  margin: 0 !important;
}

.newsletter-form .hs-form-field {
  display: block !important;
  width: 100% !important;
  float: none !important;
  margin-bottom: 1rem !important;
}

.newsletter-form .hs-form-field .input {
  margin-right: 0 !important;
}

/* Input fields */
.newsletter-form .hs-input {
  font-family: inherit !important;
  font-size: 1rem !important;
  padding: 0.8rem !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Labels */
.newsletter-form .hs-form label {
  font-size: 0.9rem !important;
  color: #444 !important;
  margin-bottom: 0.5rem !important;
}

.newsletter-form .hs-form-required {
  color: #e53e3e !important;
}

/* Error messages */
.newsletter-form .hs-error-msg {
  color: #e53e3e !important;
  font-size: 0.8rem !important;
  margin-top: 0.25rem !important;
}

/* Submit button */
.newsletter-form .hs-button.primary {
  font-family: inherit !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  padding: 0.8rem 1.5rem !important;
  background: #ff6d2c !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
  width: 100% !important;
  max-width: 200px !important;
}

.newsletter-form .hs-button.primary:hover {
  background: #e66027 !important;
}

@media (max-width: 600px) {
  .newsletter-form {
    padding: 1.5rem;
  }
}