/* =========================================
   0. STICKY HEADER
   ========================================= */
.header.w-nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* =========================================
   1. VISIBILITY & LAYOUT FIXES
   ========================================= */
/* Force Webflow hidden elements to be visible */

.home-hero-left, 
.home-hero-right, 
.split-content, 
.image-wrapper, 
h1, h2, h3, p {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Force Accordions closed by default */
.brix---acordion-body {
  display: none;
}

/* Ensure accordion wrappers don't animate from Webflow */
.brix---accordion-item-wrapper {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* =========================================
   2. HERO SECTION & GENERAL TYPOGRAPHY
   ========================================= */

.home-hero-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-hero-right {
  max-width: 460px;
}

.subtitle {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
}

/* =========================================
   3. ATLAS SECTION / HERO LOGO
   ========================================= */

.section.home-features img.image-3 {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.atlas-row {
  align-items: center;
}

/* Logo sizing on desktop/tablet */
.atlas-section .image-3 {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Fade-in animation */
.atlas-fade-left,
.atlas-fade-right {
  opacity: 0;
}

.atlas-fade-left {
  animation: atlas-fade-up 0.7s ease-out 0.1s forwards;
}

.atlas-fade-right {
  animation: atlas-fade-up 0.7s ease-out 0.25s forwards;
}

@keyframes atlas-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .atlas-fade-left,
  .atlas-fade-right {
    animation: none;
    opacity: 1;
  }
}

/* =========================================
   4. CONDITIONS ACCORDION + PILLS
   ========================================= */

/* Accordion wrapper styling */
.brix---accordion-item-wrapper {
  border-radius: 24px;
  padding: 20px 24px;
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  display: flex !important;
  align-items: flex-start !important;
  margin-bottom: 18px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Hover effect */
.brix---accordion-item-wrapper:hover {
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

/* Circle button wrapper */
.brix---accordion-side {
  margin-right: 16px;
  margin-top: 4px !important;
  flex-shrink: 0;
}

/* Accordion title text */
.brix---accordion-title {
  font-size: 20px;
  line-height: 1.4;
}

/* Condition pills base */
.condition-pill,
.procedure-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 12px 24px;
  border: 1px solid #e2e8f0; /* The ONLY border */
  background-color: #f8fafc;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.4;
}

/* 2. Remove "Pill inside a Pill" Ghost Borders */
.condition-pill *, 
.procedure-pill * {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Condition/procedure pill hover effect */
.condition-pill:hover,
.procedure-pill:hover {
  border-color: #0f766e;
  background-color: #ffffff;
  color: #0f766e;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.1);
  transform: translateY(-1px);
}

/* Pill text */
.text-block-5 {
  font-size: 16px;
  line-height: 1.4;
}

/* =========================================
   5. ATLAS FLOATING WIDGET (BOTTOM-RIGHT ICON)
   ========================================= */

#atlasWidget {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 9998;
}

/* Reset the button/link and make it a circle */
#atlasWidget button,
#atlasWidget a {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
}

/* Circular chat bubble */
#atlasWidget .chat-bubble {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 9999px;
    background: radial-gradient(circle at 30% 30%, #4f46e5, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

#atlasWidget .chat-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.55);
}

/* Atlas logo inside the bubble */
#atlasWidget .atlas-logo-icon {
    width: 1.8rem;
    height: 1.8rem;
    display: block;
    object-fit: contain;
}

/* Small red "AI" pill badge */
#atlasWidget .atlas-ai-pill {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    transform: translate(25%, -25%);
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    line-height: 1;
}

/* Gentle floating animation */
.float-animation {
    animation: atlas-float 3s ease-in-out infinite;
}

@keyframes atlas-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* =========================================
   5b. SCROLL TO TOP BUTTON
   ========================================= */

#scrollToTopBtn {
    position: fixed;
    /* sits to the left of the Atlas bubble: 1.5rem right + 3.25rem bubble width + 0.75rem gap */
    right: 5.5rem;
    bottom: 1.5rem;
    z-index: 9997;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 9999px;
    background: rgba(0, 48, 135, 0.13);
    border: 1.5px solid rgba(0, 48, 135, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s ease, background 0.2s ease;
}

#scrollToTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
}

#scrollToTopBtn:hover {
    background: rgba(0, 48, 135, 0.26);
    transform: translateY(-2px);
}

#scrollToTopBtn svg {
    width: 1.2rem;
    height: 1.2rem;
}

@media (max-width: 640px) {
    /* atlas widget on mobile: right:16px + bubble ~52px + gap 12px = 80px */
    #scrollToTopBtn {
        right: 80px;
        bottom: 16px;
    }
}

/* =========================================
   6. CHAT WINDOW STYLING (REVISED)
   ========================================= */

#aiChatModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#aiChatModal.open {
    display: flex !important; /* Forces the box to show even if JS hid it*/
}

/* Inner Layout Panel */
.atlas-chat-panel {
    position: relative;
    width: 450px;
    max-height: 850px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 10001;
    overflow: hidden;
    animation: slideUpPublic 0.3s ease-out;
}

@keyframes slideUpPublic {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Compact Header --- */
.atlas-header {
    background: #003b3f; /* Darker Brand Teal */
    color: #ffffff;
    padding: 8px 12px; /* Slimmer padding */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.atlas-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.atlas-header-icon {
    width: 28px; /* Smaller icon container */
    height: 28px;
    background: #ffffff;
    border-radius: 50%;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.atlas-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.atlas-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.atlas-header-title {
    font-weight: 600;
    font-size: 14px; /* Smaller title */
    margin: 0;
}

.atlas-header-subtitle {
    font-size: 11px;
    opacity: 0.8;
    margin: 0;
    font-weight: 400;
}

/* Close Button */
.atlas-close-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}
.atlas-close-btn:hover { color: #ffffff; }

/* --- Scrollable Message Area --- */
#chatMessages {
    flex: 1; /* Takes all available remaining height */
    overflow-y: auto; /* Enables scroll */
    padding: 16px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Input Area pinned to bottom */
.atlas-input-row textarea {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.4;
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0; /* Prevents it from shrinking */
}

/* =========================================
   7. CHAT MESSAGE BUBBLES & FORMATTING
   ========================================= */

.atlas-message {
    display: flex;
    width: 100%;
    margin-bottom: 4px;
}

.atlas-message-user { justify-content: flex-end; }
.atlas-message-ai { justify-content: flex-start; }

.atlas-bubble {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.atlas-bubble-user {
    background-color: #0f766e;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.atlas-bubble-ai {
    background-color: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* --- Formatting Restoration --- */
.atlas-bubble strong { font-weight: 700; color: inherit; }
.atlas-bubble ul, .atlas-bubble ol { 
    margin: 4px 0 4px 20px; 
    padding: 0; 
    list-style-position: outside;
}
.atlas-bubble li { margin-bottom: 4px; }
.atlas-bubble p { margin: 0 0 8px 0; }
.atlas-bubble p:last-child { margin-bottom: 0; }
.atlas-link { color: #0f766e; text-decoration: underline; }

/* New Message Structure (matching patient chat) */
.atlas-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.atlas-msg-ai {
    flex-direction: row;
}

.atlas-msg-user {
    flex-direction: row-reverse;
}

.atlas-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.atlas-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.atlas-msg-avatar i {
    color: white;
    font-size: 1rem;
}

.atlas-msg-user .atlas-msg-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.atlas-msg-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.atlas-msg-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    font-family: 'DM Sans', sans-serif;
}

.atlas-msg-text {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1e293b;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.atlas-msg-text .atlas-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #3b82f6;
    transition: all 0.2s ease;
}

.atlas-msg-text .atlas-link:hover {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
    background-color: rgba(59, 130, 246, 0.05);
}

.atlas-msg-user .atlas-msg-text {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.atlas-msg-user .atlas-msg-text .atlas-link {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.atlas-msg-user .atlas-msg-text .atlas-link:hover {
    border-bottom-color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.atlas-msg-time {
    font-size: 0.75rem;
    color: #94a3b8;
    padding: 0 4px;
}

/* Typing Indicator */
.atlas-typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.atlas-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    animation: typingBounce 1.4s infinite;
}

.atlas-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.atlas-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Feedback Icons */
.atlas-feedback {
    margin-top: 4px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #94a3b8;
}
.atlas-feedback-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s;
    font-size: 14px; /* Ensure icons are big enough to tap */
}
.atlas-feedback-btn:hover, .atlas-feedback-active {
    color: #0f766e;
    transform: scale(1.1);
}

/* =========================================
   FEEDBACK ICONS LOCKING
   ========================================= */

/* When feedback is submitted, reduce opacity of ALL buttons */
.atlas-feedback[data-submitted="true"] .atlas-feedback-btn {
    opacity: 0.3;
    pointer-events: none; /* Disable clicks */
    cursor: default;
}

/* But keep the SELECTED button fully visible */
.atlas-feedback[data-submitted="true"] .atlas-feedback-btn.atlas-feedback-active {
    opacity: 1;
    color: #0f766e; /* Brand color */
}

/* Ensure no hover effects happen after submission */
.atlas-feedback[data-submitted="true"] .atlas-feedback-btn:hover {
    transform: none;
    color: inherit;
}

/* ==========================================================================
   ATLAS CONCIERGE WIDGETS
   ========================================================================== */

/* Shared wrapper — indented to match message content */
.atlas-concierge-action {
  margin: 10px 0 6px 52px; /* 52px = avatar width + gap */
  animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Slot Picker --- */
.atlas-slot-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

.atlas-slot-dates {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px 6px;
}

.atlas-slot-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.atlas-slot-page-btn {
  padding: 2px 0;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.15s;
}

.atlas-slot-page-btn:hover {
  color: #0d9488;
}

.atlas-slot-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: none;
}

.atlas-slot-date-btn {
  padding: 3px 2px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #1e293b;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.atlas-slot-date-btn:hover {
  color: #0f766e;
  background: #f0fdfa;
}

.atlas-slot-date-btn.selected {
  background: #e6fffa;
  color: #0f766e;
  box-shadow: inset 0 -2px 0 #0f766e;
}

.atlas-slot-date-dow {
  display: block;
  font-size: 0.72rem;
  line-height: 1.1;
  font-weight: 500;
}

.atlas-slot-date-md {
  display: block;
  font-size: 0.8rem;
  line-height: 1.15;
  font-weight: 500;
}

.atlas-slot-time-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-direction: column;
}

.atlas-slot-time-label {
  font-size: 0.88rem;
  color: #64748b;
  white-space: normal;
  margin-bottom: 2px;
}

.atlas-time-chips {
  display: flex;
  gap: 6px 12px;
  flex-wrap: wrap;
  width: 100%;
}

.atlas-time-chip {
  padding: 4px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
}

.atlas-time-chip:hover {
  color: #0f766e;
  background: #f0fdfa;
}

.atlas-time-chip.selected {
  background: #e6fffa;
  color: #0f766e;
  box-shadow: inset 0 -2px 0 #0f766e;
}

.atlas-time-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.atlas-slot-no-dates {
  font-size: 0.875rem;
  color: #475569;
  margin: 0;
}

.atlas-slot-help-text {
  margin: -2px 0 4px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #475569;
}

.atlas-slot-exact-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* --- File Upload Area --- */
.atlas-upload-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.atlas-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px dashed #93c5fd;
  border-radius: 10px;
  background: #eff6ff;
  color: #3b82f6;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  width: fit-content;
}

.atlas-upload-label:hover {
  background: #dbeafe;
  border-color: #3b82f6;
}

.atlas-upload-status {
  font-size: 0.8rem;
  color: #64748b;
}

.atlas-upload-status.uploading { color: #3b82f6; }
.atlas-upload-status.success   { color: #10b981; font-weight: 600; }
.atlas-upload-status.error     { color: #ef4444; }

/* --- Confirm Buttons --- */
.atlas-confirm-buttons {
  display: flex;
  gap: 6px 12px;
  flex-wrap: wrap;
}

.atlas-choice-buttons {
  display: flex;
  gap: 6px 12px;
  flex-wrap: wrap;
}

.atlas-confirm-yes,
.atlas-confirm-change,
.atlas-choice-btn {
  padding: 4px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
  width: auto;
}

.atlas-confirm-yes:hover,
.atlas-confirm-change:hover,
.atlas-choice-btn:hover {
  color: #0f766e;
  background: #f0fdfa;
}

.atlas-option-icon {
  width: 0.9em;
  min-width: 0.9em;
  font-size: 0.82em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  vertical-align: middle;
}

.atlas-contact-edit {
  display: block;
}

.atlas-contact-edit-card {
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

.atlas-contact-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.atlas-contact-edit-input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.84rem;
  padding: 8px 10px;
  outline: none;
}

.atlas-contact-edit-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.atlas-contact-edit-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px 12px;
  flex-wrap: wrap;
}

/* --- Mobile adjustments --- */
@media (max-width: 480px) {
  .atlas-concierge-action {
    margin-left: 0;
  }
  .atlas-slot-nav,
  .atlas-slot-dates,
  .atlas-time-chips,
  .atlas-confirm-buttons {
    flex-direction: column;
  }
  .atlas-slot-dates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .atlas-slot-date-btn,
  .atlas-time-chip {
    background: #f8fafc;
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    padding: 8px 10px;
    text-decoration-thickness: 2px;
  }
  .atlas-slot-date-btn,
  .atlas-time-chip,
  .atlas-confirm-yes,
  .atlas-confirm-change,
  .atlas-choice-btn {
    width: 100%;
  }
  .atlas-slot-date-btn,
  .atlas-time-chip,
  .atlas-confirm-yes,
  .atlas-confirm-change,
  .atlas-choice-btn {
    text-align: left;
  }
  .atlas-confirm-yes,
  .atlas-confirm-change,
  .atlas-choice-btn {
    background: #f8fafc;
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    padding: 8px 10px;
    text-decoration-thickness: 2px;
  }
  .atlas-contact-edit-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   8. ACCORDION ICON (+ → X) OVERRIDE
   ========================================= */

/* Hide the original icon lines & any img */
.brix---btn-circle-accordion-btn img,
.brix---btn-circle-accordion-btn .brix---accordion-btn-vertical-line,
.brix---btn-circle-accordion-btn .brix---accordion-btn-horizontal-line {
  display: none;
}

/* Draw our own "+" sign */
.brix---btn-circle-accordion-btn {
  position: relative;
}

/* Horizontal bar */
.brix---btn-circle-accordion-btn::before,
.brix---btn-circle-accordion-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background-color: #0c2d2c; /* match your site’s dark green text */
  transform-origin: center;
  transition: transform 0.25s ease;
}

/* One bar horizontal */
.brix---btn-circle-accordion-btn::before {
  transform: translate(-50%, -50%) rotate(0deg);
}

/* One bar vertical → this makes it a "+" */
.brix---btn-circle-accordion-btn::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* When accordion is open → turn + into × */
.brix---accordion-item-wrapper.is-open
  .brix---btn-circle-accordion-btn::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.brix---accordion-item-wrapper.is-open
  .brix---btn-circle-accordion-btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Remove inner spacer pill inside condition/procedure pills */
.condition-pill .brix---accordion-spacer,
.procedure-pill .brix---accordion-spacer {
  display: none;
}

/* =========================================
   9. CREDENTIAL BADGES (TESTIMONIALS HEADER)
   ========================================= */

.cred-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background-color: #f9fafb;
    font-size: 13px;
    color: #1f2937;
    text-decoration: none !important;
    transition: all 0.18s ease-in-out;
    cursor: pointer;
    white-space: nowrap;
}

.cred-badge:hover {
    opacity: 1;
    transform: translateY(-1px); /* Slight lift effect */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #f9fafb;
    color: #1e40af
}

.cred-badge i {
    color: #eab308 !important; /* Gold color for stars */
}

/* 2. Desktop Testimonials Header Layout */

@media screen and (min-width: 992px) {
  .top-content.testimonials {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }

    .testimonials-left {
        max-width: 55%;
    }

    .testimonials-right {
        max-width: 45%;
        text-align: right;
    }

    .code-embed.w-embed a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
}

/* =========================================
   10. ATLAS SECTION RESPONSIVE TWEAKS
   (tablet + phone for that band only)
   ========================================= */

@media screen and (max-width: 991px) {

    .nav-link,
    .header-button-mobile .w-button {
        color: #004f53;            /* make text visible on white pills */
        font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    }

  .atlas-section {
    padding: 28px 0 36px;
  }

  .atlas-section .image-3 {
    max-width: 200px;
    margin-bottom: 16px;
  }
}

/* Mobile - Atlas section stacking / centering */
@media screen and (max-width: 767px) {
  /* Hide spacer column on small screens */
  .atlas-spacer {
    display: none;
  }

  /* Center content when stacked */
  .atlas-section .column,
  .atlas-section .column-2,
  .atlas-section .w-col {
    text-align: center;
  }

  .atlas-section .image-3 {
    max-width: 140px;
    margin: 0 auto 20px auto;
  }

  .atlas-section {
    padding: 24px 0 32px;
  }
}

/* =========================================
   11. CHATBOX RESPONSIVE (SMALL SCREENS)
   ========================================= */

@media (max-width: 640px) {
  #atlasWidget {
    bottom: 16px;
    right: 16px;
  }
}

/* =========================================
   12. TESTIMONIALS CARD TWEAKS DESKTOP
   ========================================= */

.card.testimonial {
  border-radius: 32px;
  padding: 32px 28px;
}

/* =========================================
   13. MOBILE NAVIGATION (FINAL POLISHED BOX)
   ========================================= */
@media screen and (max-width: 991px) {
    
    /* 1. The Menu Container (Fixed Width Calculation) */
    .nav-menu.w-nav-menu {
        position: fixed !important;
        top: 12px !important;
        left: 12px !important;
        /* MATH: 100% width minus 12px margin on left and 12px on right */
        width: calc(100% - 24px) !important; 
        right: auto !important; 
        bottom: auto !important;
        height: auto !important;
        max-height: 85vh !important;
        background-color: #ffffff !important;
        border-radius: 20px !important;
        /* Padding: Top clears X button, Sides give breathing room */
        padding: 60px 12px 12px 12px !important; 
        box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
        border: 1px solid #e2e8f0 !important;
        display: none;
        overflow-y: auto !important;
        z-index: 2147483600 !important; /* Extremely high to cover Logo */
    }

    .nav-menu.w-nav-menu.w--open {
        display: block !important;
    }

    /* 2. List Reset */
    .header-navigation {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .nav-item-wrapper {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 3. Link Styling (App-Like Buttons) */
    .nav-link {
        display: flex !important; /* Use Flex to align text and arrow */
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 16px !important; /* Comfortable tap area */
        font-size: 16px !important;
        font-weight: 500 !important;
        color: #334155 !important;
        text-align: left !important;
        background: transparent !important;
        border-bottom: none !important; /* No line dividers */
        border-radius: 12px !important; /* Rounded corners for items */
        margin-bottom: 4px !important; /* Tiny gap between items */
        transition: all 0.2s ease !important;
    }

    /* Add a Chevron (>) to the right */
    .nav-link::after {
        content: "›"; /* Chevron character */
        font-size: 22px;
        line-height: 1;
        color: #cbd5e1; /* Light grey by default */
        font-weight: 400;
        margin-left: 8px;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    /* Hover/Active State */
    .nav-link:hover,
    .nav-link:active,
    .nav-link.w--current {
        background-color: #f0fdfa !important; /* Light Teal BG */
        color: #0f766e !important; /* Dark Teal Text */
    }

    /* Animate Chevron on Hover */
    .nav-link:hover::after,
    .nav-link:active::after {
        color: #0f766e;
        transform: translateX(4px); /* Move arrow slightly right */
    }

    /* 4. The Hamburger/X Button */
    .menu-button.w-nav-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px; height: 44px;
        background: #0f766e;
        border-radius: 50%;
        padding: 0;
        z-index: 2147483601 !important; /* Higher than menu */
    }

    .menu-button.w-nav-button.w--open {
        position: fixed !important;
        top: 24px !important;
        right: 24px !important;
        background: #f1f5f9 !important;
        box-shadow: none !important;
    }
    
    .menu-button-icon { width: 18px; height: 14px; position: relative; }
    .menu-line-top, .menu-line-middle, .menu-line-bottom { 
        background: #fff !important; height: 2px; width: 100%; position: absolute; left: 0; transition: 0.3s; 
    }
    .menu-line-top { top: 0; } .menu-line-middle { top: 6px; } .menu-line-bottom { bottom: 0; }

    .menu-button.w-nav-button.w--open .menu-line-top,
    .menu-button.w-nav-button.w--open .menu-line-middle,
    .menu-button.w-nav-button.w--open .menu-line-bottom { background: #334155 !important; }
    
    .menu-button.w-nav-button.w--open .menu-line-top { top: 6px; transform: rotate(45deg); }
    .menu-button.w-nav-button.w--open .menu-line-middle { opacity: 0; }
    .menu-button.w-nav-button.w--open .menu-line-bottom { bottom: 6px; transform: rotate(-45deg); }

  /* 5. 'Ask Atlas' Mobile Button Fix */
    .header-button-mobile {
        margin-top: 20px !important; /* More space from links */
        padding: 0 12px !important; /* Breathing room on sides */
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .header-button-mobile .w-button {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        /* Force comfortable internal spacing */
        padding: 14px 24px !important; 
        height: auto !important;
        font-size: 16px !important;
        line-height: 1.2 !important;
    }
}

/* =========================================
   14. PHONE-ONLY LAYOUT POLISH (≤ 767px)
   ========================================= */

@media screen and (max-width: 767px) {

  /* Atlas stat cards – add spacing between boxes */
  .home-features .w-layout-grid.home-features-grid {
    row-gap: 24px !important;
  }

  .home-features .card.home-feature {
    margin-bottom: 16px !important;
  }

  /* Reduce white space before testimonials / Conditions section */
  .section.home-features {
    margin-bottom: 0 !important;
    padding-bottom: 12px !important;
  }

  /* Testimonials: tighten gap between cards and CTA button */
  .section.bg-neutral-200 .testimonials-grid {
    margin-bottom: 16px !important;
  }

  .conditions-procedures-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Condition / procedure pills – uniform full-width buttons */
  .condition-grid,
  .procedure-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .condition-pill,
  .procedure-pill {
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    min-height: 54px; /* Uniform height feel */
  }

  .condition-pill .text-block-5,
  .procedure-pill .text-block-5 {
    line-height: 1.3 !important;
    margin: 0 !important;
  }

  .brix---accordion-item-wrapper,
  .brix---btn-circle-accordion-btn {
    -webkit-tap-highlight-color: transparent;
  }

  .brix---accordion-item-wrapper:focus,
  .brix---btn-circle-accordion-btn:focus {
    outline: none;
  }

  /* Accordion toggle button in top-left */
  .brix---accordion-item-wrapper {
    align-items: flex-start !important;
  }

  .brix---accordion-side {
    align-self: flex-start !important;
    padding-top: 0 !important;     /* was 0.5rem – remove to stick it at the top */
  }

  /* Remove color flash on tap */
  .brix---accordion-item-wrapper,
  .brix---accordion-item-wrapper:hover,
  .brix---accordion-item-wrapper:active,
  .brix---accordion-item-wrapper:focus {
    background-color: #ffffff !important;
    transition: none !important;
  }

  .brix---btn-circle-accordion-btn,
  .brix---btn-circle-accordion-btn:hover,
  .brix---btn-circle-accordion-btn:active,
  .brix---btn-circle-accordion-btn:focus {
    background-color: #ffffff !important;
    transition: none !important;
  }

  /* Testimonials header – prevent left clipping and stack nicely */
  .top-content.testimonials {
    padding: 0 20px !important;
    text-align: center !important;
    box-sizing: border-box;
  }

  .title.testimonials {
    margin-left: 0 !important;
  }

  .testimonials-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================
   15. ATLAS CHATBOX LAYOUT FIX
   ========================================= */

#aiChatModal .atlas-chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #ffffff;
}

/* Header */
#aiChatModal .atlas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #003b3f;
  color: #ffffff;
  border-radius: 18px 18px 0 0;
}

/* Disclaimer Banners - Base Styles */
.atlas-disclaimer {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
}

.atlas-disclaimer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 100%;
}

.atlas-disclaimer-text {
  flex: 1;
}

.atlas-disclaimer-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-right: 4px;
}

.atlas-disclaimer-close {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

/* Legal Disclaimer (Yellow) */
.atlas-disclaimer-legal {
  background: #fef3c7;
  border-bottom: 1px solid #fbbf24;
}

.atlas-disclaimer-legal .atlas-disclaimer-text {
  color: #92400e;
}

.atlas-disclaimer-legal .atlas-disclaimer-text strong {
  color: #78350f;
  font-weight: 600;
}

.atlas-disclaimer-legal .atlas-disclaimer-close {
  color: #92400e;
}

.atlas-disclaimer-legal .atlas-disclaimer-close:hover {
  color: #78350f;
}

/* Confession/How I Work (Blue) */
.atlas-disclaimer-confession {
  background: #dbeafe;
  border-bottom: 1px solid #60a5fa;
}

.atlas-disclaimer-confession .atlas-disclaimer-text {
  color: #1e3a8a;
}

.atlas-disclaimer-confession .atlas-disclaimer-text strong {
  color: #1e40af;
  font-weight: 600;
}

.atlas-disclaimer-confession .atlas-disclaimer-close {
  color: #1e3a8a;
}

.atlas-disclaimer-confession .atlas-disclaimer-close:hover {
  color: #1e40af;
}

/* History Button for Patient Chat */
.atlas-history-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  font-size: 16px;
}

.atlas-history-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#aiChatModal .atlas-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#aiChatModal .atlas-logo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

#aiChatModal .atlas-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

#aiChatModal .atlas-subtitle {
  font-size: 12px;
  opacity: 0.8;
}

/* Close "X" button inside the chat header */
#aiChatModal #atlasCloseBtn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

/* Messages area */
#aiChatModal #chatMessages,
#patientAtlasModal #chatMessages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  background: #f9fafb;
}

/* Generic message row */
#aiChatModal .atlas-message,
#patientAtlasModal .atlas-message {
  display: flex;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}

/* User vs assistant alignment */
#aiChatModal .atlas-message.user,
#patientAtlasModal .atlas-message.user {
  justify-content: flex-end;
}

#aiChatModal .atlas-message.assistant,
#patientAtlasModal .atlas-message.assistant {
  justify-content: flex-start;
}

/* Bubbles */
#aiChatModal .atlas-bubble,
#patientAtlasModal .atlas-bubble {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: 16px;
  box-sizing: border-box;
}

#aiChatModal .atlas-message.user .atlas-bubble,
#patientAtlasModal .atlas-message.user .atlas-bubble {
  background: #0f766e;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

#aiChatModal .atlas-message.assistant .atlas-bubble,
#patientAtlasModal .atlas-message.assistant .atlas-bubble {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}

/* Feedback row under assistant messages */
#aiChatModal .atlas-feedback,
#patientAtlasModal .atlas-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

#aiChatModal .atlas-feedback button,
#patientAtlasModal .atlas-feedback button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Input container wrapper */
#aiChatModal .atlas-input-container,
#patientAtlasModal .atlas-input-container {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 0 0 18px 18px;
  padding: 8px 10px 6px 10px;
}

/* Input row */
#aiChatModal .atlas-input-row,
#patientAtlasModal .atlas-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Character counter - positioned below input */
#aiChatModal .atlas-char-counter,
#patientAtlasModal .atlas-char-counter {
  font-size: 11px;
  color: #94a3b8;
  text-align: right;
  padding: 4px 8px 0 0;
  user-select: none;
  transition: color 0.2s ease;
}

#aiChatModal .atlas-char-counter-warning,
#patientAtlasModal .atlas-char-counter-warning {
  color: #f59e0b !important;
  font-weight: 500;
}

#aiChatModal .atlas-char-counter-over,
#patientAtlasModal .atlas-char-counter-over {
  color: #ef4444 !important;
  font-weight: 600;
}

/* Input textarea */
#aiChatModal #chatInput,
#patientAtlasModal #chatInput {
  flex: 1;
  border-radius: 20px;
  border: 1px solid #d1d5db;
  padding: 10px 14px;
  font-size: 14px;
  font-family: "DM Sans", sans-serif;
  outline: none;
  background: #ffffff;

  /* CRITICAL FIXES: */
  resize: none !important; /* Removes the arrow handle */
  overflow: hidden !important; /* Hides the scrollbar */
  min-height: 44px; /* Default height */
  max-height: 120px; /* Limit expansion */
  line-height: 1.4;
}

#aiChatModal #chatInput:focus,
#patientAtlasModal #chatInput:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.2);
}

#aiChatModal #sendButton,
#patientAtlasModal #sendButton {
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: #0f766e;
  color: #ffffff;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important; /* Remove padding that pushes icon */
  width: 36px !important;
  height: 36px !important;
}

#patientAtlasModal #patientVoiceButton {
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  cursor: pointer;
  background: #ffffff;
  color: #0f172a;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 36px;
  height: 36px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#aiChatModal #atlasVoiceButton,
#patientAtlasModal #patientVoiceButton {
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  cursor: pointer;
  background: #ffffff;
  color: #0f172a;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 36px;
  height: 36px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#aiChatModal #atlasVoiceButton:hover:not(:disabled),
#patientAtlasModal #patientVoiceButton:hover:not(:disabled) {
  border-color: #0f766e;
  color: #0f766e;
}

#aiChatModal .atlas-voice-status,
#patientAtlasModal .atlas-voice-status {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

#aiChatModal .atlas-voice-status-active,
#patientAtlasModal .atlas-voice-status-active {
  color: #0f766e;
}

#aiChatModal .atlas-voice-status-success,
#patientAtlasModal .atlas-voice-status-success {
  color: #15803d;
}

#aiChatModal .atlas-voice-status-error,
#patientAtlasModal .atlas-voice-status-error {
  color: #b91c1c;
}

#aiChatModal #sendButton svg,
#patientAtlasModal #sendButton svg {
    margin-left: -2px; /* Visual optical adjustment for the paper plane */
    margin-top: 1px;
}

/* Chat Timestamp Styling */
#aiChatModal .atlas-timestamp,
#patientAtlasModal .atlas-timestamp {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
    text-align: left;
}
#aiChatModal .atlas-timestamp.user-time,
#patientAtlasModal .atlas-timestamp.user-time {
    text-align: right;
    color: rgba(255,255,255,0.8); /* Lighter on the teal user bubble */
}

/* Small screens – chat modal sizing */
@media screen and (max-width: 767px) {
  .atlas-chat-panel {
    width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
  }

  #aiChatModal #chatMessages,
  #patientAtlasModal #chatMessages {
    padding: 10px 10px;
  }
}

/* =========================================
   16. DESKTOP HEADER RESTORATION (Min-Width: 992px)
   ========================================= */

@media screen and (min-width: 992px) {
    
    /* 1. Force Horizontal Layout (Fix Alignment) */
    .nav-menu.w-nav-menu {
        display: flex !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        border: none !important;
    }

    /* 2. List & Items Layout */
    .header-navigation {
        display: flex !important;
        align-items: center;
        gap: 24px; /* Space between items */
        margin: 0 !important;
        padding: 0 !important;
    }

    .nav-item-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 3. Link Styling (Fix Color & Hover) */
    .nav-link {
        color: #ffffff !important; /* Force White Text on Teal Header */
        background: transparent !important;
        padding: 8px 0 !important;
        margin: 0 !important;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
        position: relative;
        border-radius: 0 !important;
    }

    /* Remove the mobile "slide" effect on desktop */
    .nav-link:hover {
        transform: none !important;
        opacity: 0.8;
    }

    /* Underline Animation */
    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: #ffffff;
        transition: width 0.3s ease;
    }

    .nav-link:hover::after {
        width: 100%;
    }

}

/* =========================================
   17. HEADER SPACING FIX (Logo vs Menu)
   ========================================= */

@media screen and (min-width: 992px) {
    
    /* 1. Constrain the Logo Container */
    .brand.w-nav-brand {
        flex: 0 0 auto !important; /* Prevent logo from growing */
        margin-right: 24px !important; /* Reduce excessive gap between Logo and Menu */
        max-width: 150px; /* Ensure it stays compact */
    }

    /* 2. Optimize Menu Item Spacing */
    .header-navigation {
        gap: 20px !important; /* Slightly tighter gap between links (was 24px) */
        justify-content: flex-start;
    }

    /* 3. Ensure the Header Container utilizes full width */
    .header-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* 4. Allow the Left section (Logo + Menu) to take available space */
    .split-content.header-right {
        flex: 1; /* Grow to fill space */
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    /* 5. Stabilize the Right section (Ask Atlas Button) */
    .split-content.header-left {
        flex: 0 0 auto; /* Don't shrink */
        margin-left: 20px;
    }
    
    /* Optional: Tweak link font size if it's still too crowded */
    .nav-link {
        font-size: 15px !important;
    }
}

/* =========================================
   18. FINAL POLISH (Accordion, Borders, Spacing)
   ========================================= */

@media screen and (min-width: 992px) {
    
    /* 1. Desktop Accordion Alignment */
    .brix---accordion-item-wrapper {
        align-items: flex-start !important; /* Keep icon at top */
    }

    /* Reset the icon position */
    .brix---accordion-side {
        margin-top: 0 !important; 
    }

    /* PUSH THE TEXT DOWN to align with the icon's center */
    .brix---accordion-content-wrapper {
        padding-top: 8px !important; /* The magic number */
    }

    /* Ensure Title has no extra margin interfering */
    .brix---accordion-title {
        margin-top: 0 !important;
        line-height: 1.3 !important; 
        display: block;
    }
}

/* ... keep the rest of Section 18 (Borders, Conditions Text) unchanged ... */
.paragraph.home-about, 
.text-block-6, .text-block-7, .text-block-8, .text-block-9,
.home-about p {
    border: none !important;
    border-style: none !important;
    outline: none !important;
}

@media screen and (min-width: 992px) {
    .brix---inner-container-574px---center {
        max-width: 800px !important; 
        width: 100% !important;
    }
}

/* =========================================
   19. MODERN SCROLL ANIMATIONS (The "Cool" Factor)
   ========================================= */

/* The starting state: invisible and slightly down */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); /* Smooth 'Apple-like' ease */
    will-change: opacity, transform;
}

/* The active state: visible and in place */
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

/* Staggered delay for cards (optional but looks nice) */
.reveal-delay-100 { transition-delay: 0.1s; }
.reveal-delay-200 { transition-delay: 0.2s; }
.reveal-delay-300 { transition-delay: 0.3s; }

/* Ensure content is visible if JS fails or user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* =========================================
   20. ANIMATED ATLAS WIDGET (Pulse & Glow)
   ========================================= */

/* 1. The Pulse Ring (Sonar Effect) */
/* This creates a ring that sits behind the button */
#atlasWidget .chat-bubble::before {
    content: '';
    position: absolute;
    /* Start slightly outside the main border */
    top: -2px; left: -2px; right: -2px; bottom: -2px; 
    border-radius: 50%;
    /* Cyan color to match your AI branding */
    background: rgba(6, 182, 212, 0.4); 
    z-index: -1; /* Place it behind the button */
    opacity: 0;
    transform: scale(1);
    /* The animation definition */
    animation: atlas-sonar-wave 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* 2. The Main Bubble "Breathing" Effect */
#atlasWidget .chat-bubble {
    /* Ensure the transform origin is center for scaling */
    transform-origin: center;
    /* The breathing animation */
    animation: atlas-breathe 3s ease-in-out infinite;
    /* Smooth transition for when user hovers */
    transition: all 0.3s ease;
}

/* 3. Keyframes Definitions */

/* The Ring expanding outward and fading */
@keyframes atlas-sonar-wave {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.6); /* Expands to 1.6x size */
        opacity: 0; /* Fades to invisible */
    }
}

/* The Bubble gently lifting and glowing */
@keyframes atlas-breathe {
    0% {
        transform: scale(1);
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45); /* Default Shadow */
    }
    50% {
        transform: scale(1.05); /* Slight grow */
        /* Add a Cyan Glow + Maintain Shadow */
        box-shadow: 0 0 15px rgba(6, 182, 212, 0.6), 0 12px 30px rgba(15, 23, 42, 0.45);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
    }
}

/* 4. Interactive State (Hover) */
/* When user hovers, stop breathing and "Lock" the active state */
#atlasWidget .chat-bubble:hover {
    animation: none; /* Stop the loop */
    transform: scale(1.1); /* Grow larger */
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.8), 0 15px 40px rgba(15, 23, 42, 0.3); /* Strong Glow */
    cursor: pointer;
}

/* Pause the pulse ring on hover too, if desired */
#atlasWidget .chat-bubble:hover::before {
    animation: none;
    opacity: 0;
}

/* =========================================
   21. MODERN MODAL STYLING (Pop & Contrast)
   ========================================= */

/* 1. The Overlay (Background) */
.condition-modal-overlay, 
.procedure-modal-overlay,
.honors-modal-overlay {
    background-color: rgba(15, 23, 42, 0.75) !important; /* Much Darker */
    -webkit-backdrop-filter: blur(5px); /* Safari 9+ and iOS 9+ support */
    backdrop-filter: blur(5px); /* Blurs the website behind it */
}

/* 2. The Modal Box (The Card) */
.condition-modal-box, 
.procedure-modal-box,
.honors-modal-box {
    border-radius: 24px !important;
    /* Deep Shadow for "Lift" */
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.6) !important; 
    border: 1px solid rgba(255, 255, 255, 0.9); /* Bright border */
    /* Light Blue/Teal Tint Background */
    background: linear-gradient(to bottom, #f0fdfa, #ffffff) !important; 
    overflow: hidden;
    max-width: 600px;
    width: 90%;
    position: relative;
    padding: 0 !important;
}

/* The Content Area */
.condition-modal-content, 
.procedure-modal-content,
.honors-modal-content {
    padding: 32px !important;
    font-family: "DM Sans", sans-serif !important; /* Enforce Font */
    font-size: 15px !important; /* Slightly reduced (was likely 16px) */
    line-height: 1.6 !important;
    color: #334155;
    
    /* Modern Scrollbar Hiding */
    overflow-y: auto;
    max-height: 70vh; /* Keep it from hitting screen edges */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #cbd5e1 transparent;
}

/* Webkit Scrollbar Styling (Chrome/Safari) */
.condition-modal-content::-webkit-scrollbar, 
.procedure-modal-content::-webkit-scrollbar,
.honors-modal-content::-webkit-scrollbar {
    width: 6px;
}

.condition-modal-content::-webkit-scrollbar-track, 
.procedure-modal-content::-webkit-scrollbar-track,
.honors-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.condition-modal-content::-webkit-scrollbar-thumb, 
.procedure-modal-content::-webkit-scrollbar-thumb,
.honors-modal-content::-webkit-scrollbar-thumb {
    background-color: #e2e8f0;
    border-radius: 20px;
}

/* Modal Headers */
.div-block-condition-modal h2, 
.div-block-procedure-modal h2 {
    font-size: 22px !important;
    font-weight: 700;
    color: #0f766e; /* Brand Teal */
    margin-top: 0;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

/* Modal Close Button (Floating Circle) */
.condition-modal-close, 
.procedure-modal-close,
.honors-modal-close {
    top: 16px !important;
    right: 16px !important;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.condition-modal-close:hover, 
.procedure-modal-close:hover,
.honors-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* =========================================
   22. FOOTER VISIBILITY FIX (ICONS & TEXT)
   ========================================= */

/* 1. Policy Links Visibility */
.footer-policy-links {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 16px;
}

.footer-link-small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8) !important; /* Light White (High Visibility) */
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-link-small:hover {
    color: #ffffff !important; /* Pure White on hover */
    text-decoration: underline;
}

.policy-divider {
    color: rgba(255, 255, 255, 0.4) !important; /* Dimmed White */
    font-size: 12px;
}

/* 1b. Footer Location Readability */
.footer .footer-nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.footer .footer-nav-link strong {
    color: #ffffff !important;
    font-weight: 600;
}

/* 2. Social Icons Visibility */
.footer-social-media-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px; 
    height: 44px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

/* Force the icon to be WHITE by default */
.footer-social-media-link i {
    color: #ffffff !important; 
    font-size: 20px !important;
    opacity: 1 !important; /* Ensure it's not hidden */
    display: block;
}

/* Hover Effect (Scale up only, keep color white) */
.footer-social-media-link:hover {
    transform: scale(1.15);
    background: transparent !important;
}

/* Mobile Footer Layout */
@media screen and (max-width: 767px) {
    .footer-social-media-grid {
        display: flex !important;
        flex-direction: row !important; /* Keep icons horizontal */
        flex-wrap: wrap !important;     /* Allow wrapping */
        justify-content: center !important;
        gap: 20px !important; /* Space between icons */
        align-items: center !important;
    }
    
    /* Force the policy text to break to a new line */
    .footer-policy-links {
        flex-basis: 100% !important; /* Force full width */
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 8px !important; /* Space between icons and text */
        justify-content: center !important;
        order: 3; /* Ensures it sits below icons */
    }
}

/* =========================================
   PATIENT MODAL CONTAINER
   ========================================= */
#patientAtlasModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Patient chat panel - match public chat height behavior */
#patientAtlasModal .atlas-chat-panel {
    width: 480px;
    max-height: calc(100vh - 40px);
    height: calc(100vh - 40px);
}
/* =========================================
   23. 2026 COMPACT BLUE HOMEPAGE REDESIGN
   ========================================= */
:root {
  --hss-blue-900: #003a70;
  --hss-blue-800: #004b8d;
  --hss-blue-700: #005fae;
  --hss-blue-050: #f1f7fd;
  --slate-700: #334155;
}

.compact-site-header {
  background: linear-gradient(120deg, var(--hss-blue-900) 0%, var(--hss-blue-700) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.24s ease, opacity 0.2s ease;
}

.compact-header-shell {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.compact-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.compact-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.compact-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--hss-blue-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.compact-brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}

.compact-brand-title {
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.compact-brand-subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  letter-spacing: 0.02em;
}


.compact-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 9px 12px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.compact-contact-link:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.55);
}

.compact-inline-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 34px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  white-space: nowrap;
  vertical-align: middle;
}

.compact-inline-action i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.section.home-hero .button-primary,
.section.home-about .button-primary,
.section.home-features .button-primary,
.section.bg-neutral-200 .button-primary {
  background: #eef2f7 !important;
  border: 1px solid #cfd8e3 !important;
  color: #1f2937 !important;
  border-radius: 999px !important;
  padding: 10px 14px !important;
  min-height: 40px !important;
  line-height: 1.1 !important;
  font-family: "DM Sans", sans-serif;
  font-size: 13px !important;
  font-weight: 700;
}

.section.home-hero .button-primary:hover,
.section.home-about .button-primary:hover,
.section.home-features .button-primary:hover,
.section.bg-neutral-200 .button-primary:hover {
  background: #e2e8f0 !important;
  border-color: #b8c5d6 !important;
  color: #0f172a !important;
}

.ask-atlas-button {
  display: inline-flex !important;
  width: auto !important;
  max-width: fit-content !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  justify-content: center !important;
  align-items: center !important;
  white-space: nowrap !important;
}

.w-layout-blockcontainer.container:has(.ask-atlas-button) {
  text-align: center;
}

.section.home-features,
.section.home-about,
.section.bg-neutral-200,
.condition-pills-section,
.procedure-pills-section {
  padding-top: 44px !important;
  padding-bottom: 44px !important;
}

.atlas-section {
  padding-top: 18px;
  padding-bottom: 22px;
}

.compact-site-footer {
  background: linear-gradient(160deg, var(--hss-blue-900) 0%, #022a50 100%);
  color: #ffffff;
  padding-top: 26px !important;
  padding-bottom: 18px !important;
}

.compact-footer-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compact-footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.compact-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.compact-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  text-decoration: none;
  padding: 8px 12px;
  font-size: 13px;
}

.compact-footer-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.compact-footer-legal {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 10px;
}

.compact-footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.compact-footer-social-top {
  margin-left: auto;
}

.compact-footer-social-link {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.compact-footer-social-link:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.65);
}

.compact-footer-legal .footer-link-small {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 12px;
  text-decoration: none;
}

.compact-footer-legal .footer-link-small:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.compact-footer-locations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.compact-location-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1.35;
  background: rgba(255, 255, 255, 0.05);
}

.compact-location-card:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.1);
}

.compact-location-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

@media screen and (max-width: 991px) {
  .compact-header-shell {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .compact-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .compact-brand-title {
    font-size: 16px;
  }

  .compact-footer-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .compact-footer-social-top {
    margin-left: 0;
    justify-self: end;
  }

  .compact-footer-locations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section.home-features,
  .section.home-about,
  .section.bg-neutral-200,
  .condition-pills-section,
  .procedure-pills-section {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }

  /* Tighten testimonials vertical padding on mobile */
  .section.bg-neutral-200 {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }
}

@media screen and (max-width: 640px) {
  .compact-contact-link,
  .compact-footer-link {
    width: 100%;
    justify-content: flex-start;
  }

  .compact-footer-legal {
    gap: 10px;
  }

  .compact-footer-social-top {
    margin-left: auto;
  }

  .compact-footer-locations {
    grid-template-columns: 1fr;
  }

  /* Reduce top padding so footer brand logo sits closer to top edge;
     add bottom padding so legal links clear the fixed floating buttons */
  .compact-site-footer {
    padding-top: 14px !important;
    padding-bottom: 80px !important;
  }
}

@media screen and (max-width: 767px) {
  .compact-header-shell {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  .compact-header-row {
    gap: 6px;
    align-items: stretch;
  }

  .compact-brand {
    gap: 8px;
  }

  .compact-brand-mark {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .compact-brand-title {
    font-size: 14px;
    line-height: 1.05;
  }

  .compact-brand-subtitle {
    font-size: 10px;
    line-height: 1.05;
  }

  .compact-contact-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* =========================================
   24. HERO TYPOGRAPHY + VIDEO LAYOUT
   ========================================= */

/* gap/align-items — section 27 wins for padding, these survive */
.home-hero-wrapper {
  gap: 22px;
  align-items: center;
}

.home-hero-left {
  max-width: 540px;
}

.title.home-hero {
  font-size: 38px;
  line-height: 1.1;
  margin-top: 8px;
  margin-bottom: 14px;
}

.paragraph.home-hero {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.home-hero-right .image.home-hero {
  width: min(100%, 410px);
  max-width: 410px;
  margin: 0 auto;
}

.section.home-about {
  padding-top: 34px !important;
  padding-bottom: 34px !important;
}

.about-video-shell {
  max-width: 760px;
  margin: 0 auto 20px auto;
}

.about-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #d9e3ef;
  box-shadow: 0 14px 40px rgba(9, 32, 61, 0.12);
  background: #000000;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.about-video-frame:hover {
  box-shadow: 0 18px 46px rgba(9, 32, 61, 0.18);
}

.about-video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000000;
}

.about-video-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  display: none;
}

.honors-modal-wrapper {
    z-index: 9999;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    display: none;
    position: fixed;
    inset: 0 auto auto 0;
}

.honors-data {
    display: none;
}

.about-honors-open {
    margin-top: 11px;
    display: inline-block;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 700;
    color: #f8d86a;
    text-decoration: none;
    border-bottom: 1px solid rgba(248, 216, 106, 0.55);
    line-height: 1.2;
    transition: color .15s ease, border-color .15s ease, opacity .15s ease;
}

.about-honors-open:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
    opacity: .95;
}

.about-awards-modal h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.2;
    color: #0f172a;
}

.about-awards-subtitle {
    margin: 0 0 16px;
    color: #475569;
    font-size: 14px;
    letter-spacing: .02em;
}

.about-awards-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.about-awards-list li {
    color: #1e293b;
    line-height: 1.45;
    font-size: 14px;
}

.about-video-frame.is-floating {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: min(360px, 42vw);
  aspect-ratio: 16 / 9;
  z-index: 9997;
  border-radius: 14px;
  border-color: #c7d6ea;
  box-shadow: 0 22px 58px rgba(2, 18, 41, 0.34);
  transform: translateY(0);
}

.about-video-frame.is-floating .about-video-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media screen and (max-width: 991px) {
  .title.home-hero {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .paragraph.home-hero {
    font-size: 16px;
    line-height: 1.45;
  }

  .home-hero-right .image.home-hero {
    max-width: 350px;
  }

  .about-video-shell {
    max-width: 680px;
    margin-bottom: 16px;
  }
}

@media screen and (max-width: 767px) {
  .section.home-about {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }

  .about-video-frame {
    border-radius: 14px;
  }

  .about-video-frame.is-floating {
    width: min(248px, 68vw);
    right: 12px;
    bottom: 76px;
    border-radius: 12px;
  }
}

/* =========================================
   25. DESKTOP DENSITY TUNING
   ========================================= */
@media screen and (min-width: 992px) {
  .section.home-features {
    padding-top: 26px !important;
    padding-bottom: 26px !important;
  }

  .section.home-about {
    padding-top: 22px !important;
    padding-bottom: 24px !important;
  }

  .condition-pills-section,
  .procedure-pills-section,
  .section.bg-neutral-200 {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }

  .condition-pills-section .brix---mg-bottom-48px,
  .procedure-pills-section .brix---mg-bottom-48px {
    margin-bottom: 24px !important;
  }

  .brix---grid-1-column-gap-row-32px {
    row-gap: 18px !important;
  }

  .brix---accordion-item-wrapper {
    margin-bottom: 10px;
    padding: 16px 20px;
  }

  .title.testimonials {
    margin-bottom: 8px;
  }

  .paragraph.home-about {
    margin-bottom: 14px;
    line-height: 1.55;
  }

  .about-video-shell {
    max-width: 680px;
    margin-bottom: 14px;
  }
}

/* =========================================
   26. HERO FINAL TIGHTEN + HEADER HIDE
   ========================================= */
.compact-site-header.hide-on-footer {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

.bg.home-hero-right {
  display: none !important;
}

@media screen and (min-width: 992px) {
  .split-content.home-hero-left {
    margin-top: 0 !important;
    max-width: 54% !important;
  }

  .split-content.home-hero-right {
    max-width: 42% !important;
    justify-content: flex-end;
    align-items: flex-end !important;
  }

  .image-wrapper.home-hero {
    min-height: 0 !important;
    align-items: flex-end !important;
  }

  .home-hero-right .image.home-hero {
    max-width: 340px;
    height: auto !important;
    display: block;
  }

  .title.home-hero {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .paragraph.home-hero {
    margin-bottom: 10px;
  }
}

/* =========================================
   27. HERO WHITE BACKGROUND + IMAGE CONTAINMENT
   ========================================= */
.section.home-hero {
  background: #ffffff !important;
  padding-top: 12px !important;
  padding-bottom: 14px !important;
}

.bg.home-hero {
  display: none !important;
}

.subtitle,
.title.home-hero,
.paragraph.home-hero {
  color: #0f172a !important;
}

.subtitle {
  letter-spacing: 0.12em;
}

.home-hero-wrapper {
  align-items: center !important;
}

.split-content.home-hero-right,
.image-wrapper.home-hero {
  align-items: center !important;
  justify-content: center !important;
  min-height: 0 !important;
}

.home-hero-right .image.home-hero {
  max-width: 330px !important;
  width: 100%;
  height: auto !important;
  display: block;
}

.home-hero-right video.image.home-hero.hero-video {
  width: min(100%, 560px) !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}

@media screen and (max-width: 991px) {
  .section.home-hero {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .home-hero-wrapper {
    gap: 14px !important;
  }

  .split-content.home-hero-left {
    margin-top: 0 !important;
  }

  .home-hero-right .image.home-hero {
    max-width: 285px !important;
    margin: 0 auto !important;
  }
}

/* =========================================
   30. MOBILE HEADER RE-LAYOUT (STRUCTURAL)
   ========================================= */
.compact-header-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compact-header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.compact-header-contact-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.compact-header-cta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

@media screen and (max-width: 767px) {
  .compact-header-row {
    gap: 6px !important;
  }

  .compact-header-top-row {
    display: grid !important;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    gap: 6px 8px;
  }

  .compact-brand {
    min-width: 0 !important;
    gap: 8px !important;
  }

  .compact-brand-mark {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
    flex-shrink: 0;
  }

  .compact-brand-title {
    font-size: 14px !important;
    line-height: 1.02 !important;
    white-space: nowrap !important;
  }

  .compact-brand-subtitle {
    font-size: 10px !important;
    line-height: 1.02 !important;
    white-space: nowrap !important;
  }

  .compact-header-contact-row {
    gap: 6px !important;
    justify-content: flex-end !important;
    justify-self: end !important;
    margin-left: 8px;
    flex-wrap: nowrap !important;
  }

  .compact-contact-link {
    width: auto !important;
    min-height: 28px !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }

  .compact-phone-text {
    display: none !important;
  }

  .compact-phone-link,
  .compact-email-link {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    justify-content: center !important;
    padding: 6px !important;
  }

  .compact-email-text {
    display: none !important;
  }

  .compact-header-cta-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

}

@media screen and (max-width: 430px) {
  .compact-header-top-row {
    grid-template-columns: minmax(165px, 1fr) auto;
    gap: 6px;
  }

  .compact-contact-link {
    font-size: 9px !important;
    padding: 5px !important;
    min-height: 26px !important;
  }

  .compact-phone-link,
  .compact-email-link {
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 5px !important;
  }

  .compact-brand-title {
    font-size: 13px !important;
  }

  .compact-brand-subtitle {
    font-size: 9px !important;
  }
}

/* =========================================
   31. MOBILE CONTACT ICON-ONLY MODE
   ========================================= */
@media screen and (max-width: 767px) {
  .compact-header-top-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .compact-header-contact-row {
    justify-self: end !important;
    margin-left: 10px !important;
  }

  .compact-phone-text,
  .compact-email-text {
    display: none !important;
  }
}

/* =========================================
   32. MOBILE HEADER ACTION-BAR + HERO IDENTITY
   ========================================= */
.compact-header-mobile-actions,
.compact-header-mobile-stack,
.compact-header-mobile-contact,
.hero-mobile-identity {
  display: none;
}

@media screen and (max-width: 767px) {
  /* Hide desktop-style brand/contact rows in header on mobile */
  .compact-header-top-row,
  .compact-header-cta-row {
    display: none !important;
  }

  .compact-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    overflow: hidden;
  }

  .public-compact-header .compact-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0;
    flex: 1 1 44%;
    max-width: 44%;
    padding: 0 !important;
  }

  .public-compact-header .compact-brand-text {
    min-width: 0;
  }

  .public-compact-header .compact-header-right {
    display: none !important;
  }

  /* Mobile quick-action header aligned to the right */
  .compact-header-mobile-stack {
    display: grid !important;
    gap: 4px;
    align-items: end !important;
    justify-items: end !important;
    margin-left: auto;
    flex: 0 0 auto;
    min-width: 0;
  }

  .compact-header-mobile-contact {
    display: flex !important;
    gap: 4px;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  .compact-mobile-contact-link {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.26) !important;
    color: #ffffff !important;
  }

  .compact-mobile-contact-link i {
    font-size: 12px !important;
    line-height: 1 !important;
  }

  .compact-header-mobile-actions {
    display: flex !important;
    gap: 4px;
    align-items: center !important;
    justify-content: flex-end;
  }

  .compact-mobile-action {
    width: auto !important;
    min-height: 36px !important;
    padding: 6px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.26) !important;
    color: #ffffff !important;
    border-radius: 999px !important;
  }

  .compact-header-mobile-actions .compact-mobile-action:not(.compact-mobile-action-icon) {
    min-width: 72px;
    max-width: 92px;
  }

  .compact-mobile-action-request {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .compact-mobile-action-icon {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    min-height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .compact-mobile-action-icon i {
    font-size: 13px;
  }

  /* Show photo before text in hero on mobile */
  .home-hero-wrapper {
    flex-direction: column-reverse !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .split-content.home-hero-right,
  .image-wrapper.home-hero {
    justify-content: center !important;
    align-items: center !important;
  }

.home-hero-right .image.home-hero,
.home-hero-right .hero-video {
    max-width: 300px !important;
    margin: 0 auto !important;
  }
}

@media screen and (max-width: 767px) {
  .home-hero-right video.image.home-hero.hero-video {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* =========================================
   33. PORTAL MOBILE HEADER OVERRIDES
   ========================================= */
@media screen and (max-width: 767px) {
  .patient-compact-header .compact-header-row,
  .internal-compact-header .compact-header-row {
    display: flex !important;
    flex-direction: column;
    gap: 6px !important;
  }

  .patient-compact-header .compact-header-top-row,
  .internal-compact-header .compact-header-top-row {
    display: flex !important;
    align-items: center !important;
  }

  .patient-compact-header .compact-header-cta-row,
  .internal-compact-header .compact-header-cta-row {
    display: grid !important;
  }

  .patient-compact-header .compact-header-mobile-actions,
  .internal-compact-header .compact-header-mobile-actions {
    display: none !important;
  }

  .patient-compact-header .compact-header-contact-row,
  .internal-compact-header .compact-header-contact-row {
    gap: 6px !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }

  .patient-compact-header .compact-inline-action,
  .internal-compact-header .compact-inline-action {
    min-height: 30px !important;
    padding: 7px 9px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .patient-compact-header .compact-header-cta-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .internal-compact-header .compact-header-cta-row {
    grid-template-columns: 1fr !important;
    max-width: 170px;
    margin-left: auto;
  }
}

/* =========================================
   34. LOGO + ICON NAV IN PUBLIC HEADER
   ========================================= */

/* Strip shell vertical padding so icon buttons can bleed full height */
.public-compact-header .compact-header-shell {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Row: horizontal, all children stretch to fill the full header height */
.public-compact-header .compact-header-row {
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 0 !important;
}

/* Brand: logo icon + text, vertically centred with internal padding
   The padding here controls the overall header height */
.public-compact-header .compact-brand {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  flex-shrink: 0;
  padding: 14px 24px 14px 0;
  text-decoration: none;
}

/* Logo icon image — transparent PNG */
.compact-brand-logo {
  height: 54px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* Brand title — larger than base, no wrap */
.public-compact-header .compact-brand-title {
  font-size: 22px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

/* Brand subtitle */
.public-compact-header .compact-brand-subtitle {
  font-size: 12px !important;
  letter-spacing: 0.02em !important;
}

.compact-footer-brand .compact-brand-logo {
  height: 54px;
  width: auto;
}

.compact-footer-brand .compact-brand-title {
  font-size: 22px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

.compact-footer-brand .compact-brand-subtitle {
  font-size: 12px !important;
  line-height: 1.1 !important;
  letter-spacing: 0.02em !important;
}

/* Right section: single flex row — contact pills left, icon nav right */
.compact-header-right {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
}

/* Contact pills: vertically centred, spaced from the icons */
.compact-header-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 0 0;
}

/* Icon nav row: stretches flush to the right edge, no gap between icons */
.compact-header-nav-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

/* Tall icon button — fills full header height */
.header-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 76px;
  border-radius: 0;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 24px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.header-nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Tooltip appears below the icon */
.header-nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  font-family: "DM Sans", sans-serif;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 300;
}

.header-nav-link:hover::after,
.header-nav-link:focus-visible::after {
  opacity: 1;
}

/* Atlas SVG icon — white filter */
.header-nav-atlas-icon {
  width: 28px;
  height: 28px;
  display: block;
  filter: brightness(0) invert(1);
}

/* =========================================
   35. MOBILE ACTIONS — ICON + LABEL STACK
   ========================================= */

/* Stack icon above label for the 3 nav action buttons */
.compact-mobile-action {
  flex-direction: column !important;
  gap: 3px !important;
  padding: 6px 4px !important;
}

.compact-mobile-action i {
  font-size: 13px;
  line-height: 1;
}

.compact-mobile-label {
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  display: block;
  white-space: nowrap;
}

/* Atlas icon in mobile bar */
.compact-mobile-atlas-icon {
  width: 14px;
  height: 14px;
  display: block;
  filter: brightness(0) invert(1);
}

/* Icon-only buttons (phone/email) — keep centred, no label */
.compact-mobile-action-icon {
  flex-direction: column !important;
  gap: 0 !important;
  padding: 0 !important;
}

/* =========================================
   36. PUBLIC HEADER — MOBILE OVERRIDES
       (must come after section 34 global rules
        so these !important declarations win)
   ========================================= */
@media screen and (max-width: 767px) {
  .public-compact-header .compact-brand-title {
    font-size: 16px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
    max-width: 170px;
    display: block;
  }

  .public-compact-header .compact-brand-subtitle {
    font-size: 9px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
    max-width: 170px;
    display: block;
  }

  .public-compact-header .compact-brand-logo {
    height: 30px !important;
  }
}

@media screen and (max-width: 520px) {
  .public-compact-header .compact-brand {
    flex-basis: 42% !important;
    max-width: 42% !important;
  }

  .compact-header-mobile-actions .compact-mobile-action:not(.compact-mobile-action-icon) {
    min-width: 64px;
    max-width: 84px;
    padding: 6px 6px !important;
    font-size: 8px !important;
  }
}

@media screen and (max-width: 430px) {
  .public-compact-header .compact-brand {
    flex-basis: 40% !important;
    max-width: 40% !important;
  }

  .public-compact-header .compact-brand-title {
    font-size: 15px !important;
  }

  .public-compact-header .compact-brand-subtitle {
    font-size: 9px !important;
  }

  .compact-header-mobile-actions {
    gap: 3px !important;
  }

  .compact-header-mobile-actions .compact-mobile-action:not(.compact-mobile-action-icon) {
    min-width: 60px;
    max-width: 78px;
  }

  .compact-mobile-action-icon {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
  }
}

/* =========================================
   38. PUBLIC MOBILE HEADER — 2-ROW GRID
   Row 1: brand (left) + contact icons (right)
   Row 2: full-width action band
   ========================================= */
@media screen and (max-width: 767px) {
  /* Named-area grid: brand+contact share row 1, actions span full row 2 */
  .public-compact-header .compact-header-row {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas: "brand contact" "actions actions" !important;
    gap: 0 !important;
    align-items: center !important;
    overflow: visible !important;
  }

  /* Row 1 left: brand — pushed to top with minimal margin */
  .public-compact-header .compact-brand {
    grid-area: brand !important;
    max-width: none !important;
    flex: none !important;
    min-width: 0 !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-right: 8px !important;
    align-self: center !important;
  }

  .public-compact-header .compact-brand-title {
    white-space: nowrap !important;
    font-size: 15px !important;
    line-height: 1.05 !important;
  }

  /* Row 1 right: phone + email circles — transparent, matching header */
  .public-compact-header .compact-header-mobile-contact {
    grid-area: contact !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 8px 0 8px !important;
    align-self: center !important;
  }

  .public-compact-header .compact-mobile-contact-link {
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    min-height: 26px !important;
    background: transparent !important;
    border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    text-decoration: none !important;
  }

  .public-compact-header .compact-mobile-contact-link i {
    font-size: 11px !important;
    line-height: 1 !important;
  }

  /* Row 2: full-width action band — same blue as header */
  .public-compact-header .compact-header-mobile-actions {
    grid-area: actions !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-evenly !important;
    align-items: stretch !important;
    width: 100% !important;
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 3px 8px !important;
    margin: 0 !important;
    gap: 0 !important;
  }

  /* Each action button: icon above, label below — content vertically centred */
  .public-compact-header .compact-mobile-action {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 6px !important;
    min-height: 34px !important;
    padding: 3px 6px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease !important;
  }

  .public-compact-header .compact-mobile-action:active {
    background: rgba(255, 255, 255, 0.1) !important;
  }

  .public-compact-header .compact-mobile-action i {
    font-size: 20px !important;
    line-height: 1 !important;
  }

  .public-compact-header .compact-mobile-atlas-icon {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    filter: brightness(0) invert(1) !important;
  }

  /* Action label */
  .public-compact-header .compact-mobile-label {
    font-size: 7px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-align: center !important;
    display: block !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
  }
}

@media screen and (max-width: 430px) {
  .public-compact-header .compact-brand-title {
    font-size: 15px !important;
    white-space: nowrap !important;
  }

  .public-compact-header .compact-brand-subtitle {
    font-size: 8.5px !important;
  }

  .public-compact-header .compact-mobile-contact-link {
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    min-height: 26px !important;
  }

  .public-compact-header .compact-mobile-contact-link i {
    font-size: 11px !important;
  }

  .public-compact-header .compact-mobile-label {
    font-size: 7px !important;
  }
}

/* =========================================
   37. ABOUT PROFILE SECTION — 2-COLUMN LAYOUT
   ========================================= */

/* Section container — dark navy gradient matching the site header palette */
.section.about-profile {
  background: linear-gradient(150deg, var(--hss-blue-900) 0%, #001f45 100%);
  padding: 0 !important;
  overflow: hidden;
}

/* animations.js targets all <section> elements with reveal-on-scroll (opacity:0 + translateY).
   Override that here so the about section is always fully visible — the video must be
   interactable and the autoplay observer must fire reliably. */
#about-dr-iyer.reveal-on-scroll {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Inner wrapper — 2-column flex row */
.about-profile-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px;
  gap: 40px;
}

/* ---- Left: Credentials card ---- */
.about-creds-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Card header bar */
.about-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.about-card-name {
  color: #ffffff;
  font-family: "DM Serif Display", serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.about-hss-link {
  color: #f5c842;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease;
}

.about-hss-link:hover {
  opacity: 0.75;
  text-decoration: none;
}

/* Stats row — 3 equal cells */
.about-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: none;
}

.about-stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 12px;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.about-stat-cell:last-child {
  border-right: none;
}

.about-stat-label {
  color: rgba(255, 255, 255, 0.75);
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.about-stat-value {
  color: #ffffff;
  font-family: "DM Serif Display", serif;
  font-size: 38px;
  line-height: 1;
  margin-bottom: 7px;
}

.about-stat-value sup {
  font-size: 0.55em;
  vertical-align: super;
}

.about-stat-mis {
  font-size: 28px;
  letter-spacing: 0.06em;
}

.about-stat-desc {
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* Education grid — 4 equal cells (white bg) */
.about-edu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.about-edu-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 10px;
  background: #ffffff;
  text-align: center;
  gap: 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.about-edu-cell:last-child {
  border-right: none;
}

/* Institution logos — natural colors on white background */
.about-edu-logo {
  height: 36px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  display: block;
}

.about-edu-logo-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  outline: none;
}

.about-edu-logo-wrap::after {
  content: attr(data-inst-name);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%) translateY(-4px);
  opacity: 0;
  pointer-events: none;
  white-space: normal;
  width: max-content;
  max-width: 170px;
  text-align: center;
  z-index: 4;
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  border-radius: 6px;
  padding: 5px 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  transition: opacity .16s ease, transform .16s ease;
}

.about-edu-logo-wrap:hover::after,
.about-edu-logo-wrap:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.about-edu-logo-wrap-pair {
  gap: 3px;
}

.about-edu-inst-mobile {
  display: none;
  color: #334155;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  max-width: 120px;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.testimonial-body {
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card.testimonial {
  position: relative;
}

.testimonial-body.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.testimonial-read-more {
  border: none;
  background: none;
  padding: 0;
  margin: -12px 0 20px;
  color: #0f766e;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.testimonial-read-more:hover {
  color: #115e59;
}

.testimonial-meta-verified {
  position: absolute;
  top: 12px;
  right: 14px;
  margin-top: 0;
  color: #6b7280;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
}

@media screen and (min-width: 992px) {
  .testimonials-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-column-gap: 16px !important;
  }

  .card.testimonial {
    position: relative;
    border-radius: 24px;
    padding: 54px 22px 26px 20px;
  }

  .title.card-testimonial {
    font-size: 20px;
    line-height: 1.28;
    margin-bottom: 14px;
  }

  .paragraph.card-testimonial.testimonial-body {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  .testimonial-read-more {
    font-size: 11px;
    margin: -2px 0 16px;
  }

  .title.card-testimonial-about-name {
    font-size: 22px;
    line-height: 1.15;
  }

  .testimonial-meta-verified {
    top: 14px;
    right: 16px;
  }
}

/* HMS + MIT stacked pair */
.about-edu-logo-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.about-edu-logo-pair-img {
  height: 22px;
  max-width: 72px;
  object-fit: contain;
  display: block;
}

.about-edu-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.about-edu-stage {
  color: #6b7280;
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.5;
}

.about-edu-desc {
  color: #111827;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ---- Right: Video panel ---- */
/* Override existing global .about-video-shell rules for this section */
.about-profile .about-video-shell {
  flex: 0 0 42%;
  max-width: none !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
}

.about-profile .about-video-frame {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* ---- Responsive ---- */

/* Tablet: narrow edu grid to 2 cols */
@media screen and (max-width: 991px) {
  .about-profile-inner {
    gap: 28px;
    padding: 32px 28px;
  }

  .about-profile .about-video-shell {
    flex: 0 0 38%;
  }

  .about-edu-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-stat-value {
    font-size: 30px;
  }
}

/* Mobile: stack vertically */
@media screen and (max-width: 767px) {
  .about-profile-inner {
    flex-direction: column;
    gap: 24px;
    padding: 28px 16px;
  }

  .about-creds-card {
    width: 100%;
  }

  .about-profile .about-video-shell {
    flex: none;
    width: 100%;
    padding-bottom: 8px;
  }

  .about-edu-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-edu-logo-wrap::after {
    display: none;
  }

  .about-edu-inst-mobile {
    display: block;
  }

  .about-stat-value {
    font-size: 28px;
  }

  .about-card-name {
    font-size: 15px;
  }

  .about-hss-link {
    font-size: 10px;
  }
}
