/* Advertorial Page Styles */

/* Exit Intent Popup Styles */
.exit-intent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.exit-intent-overlay.active {
    opacity: 1;
    visibility: visible;
}

.exit-intent-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.exit-intent-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.exit-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
    z-index: 1;
}

.exit-popup-close:hover {
    color: #333;
}

.exit-popup-content {
    padding: 0;
    text-align: center;
}

.exit-popup-icon {
    margin-bottom: 24px;
}

/* Hotel-style room showcase */
.exit-popup-room-showcase {
    position: relative;
    width: 100%;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.exit-popup-room-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,0.1) 50%, 
        rgba(0,0,0,0.3) 100%);
    z-index: 1;
}


.exit-popup-room-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.exit-popup-availability-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: #10B981;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.exit-popup-room-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
    display: flex;
    gap: 24px;
    z-index: 3;
}

.room-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: white;
}

.exit-popup-text-content {
    padding: 20px 32px 16px;
}

.exit-popup-room-type {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: #10B981;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.exit-popup-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 6px;
    line-height: 1.2;
}

.exit-popup-message {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--body-color);
    margin-bottom: 8px;
    line-height: 1.4;
}

.exit-popup-message strong {
    color: #10B981;
    font-weight: 600;
}

.exit-popup-submessage {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--muted-color);
    margin-bottom: 28px;
    line-height: 1.5;
}

.exit-popup-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 24px;
    padding: 18px 20px;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 12px;
    text-align: left;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.exit-popup-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--body-color);
    line-height: 1.4;
}

.exit-popup-feature svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.exit-popup-cta {
    background: #10B981;
    color: white;
    border: none;
    padding: 14px 40px;
    margin: 0 32px 16px;
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    display: inline-block;
}

.exit-popup-cta:hover {
    background: #0ea968;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Email capture form */
.exit-popup-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 8px 24px 16px;
}

.exit-popup-input {
    flex: 1 1 auto;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--body-color);
    background: rgba(255,255,255,0.9);
}

.exit-popup-input:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

.exit-popup-submit {
    background: #10B981;
    color: white;
    border: none;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.exit-popup-submit:hover {
    background: #0ea968;
}

.exit-popup-disclaimer {
    margin: 0 32px 24px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--muted-color);
    font-style: italic;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .exit-intent-popup {
        width: 95%;
        padding: 0;
    }

    .exit-popup-room-image {
        height: 180px;
    }
    
    .exit-popup-availability-badge {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .exit-popup-room-info {
        padding: 12px 16px;
        gap: 16px;
    }
    
    .room-info-item {
        font-size: 12px;
        gap: 6px;
    }
    
    .room-info-item svg {
        width: 14px;
        height: 14px;
    }
    
    .exit-popup-text-content {
        padding: 20px 20px 16px;
    }

    .exit-popup-title {
        font-size: 22px;
    }
    
    .exit-popup-room-type {
        font-size: 12px;
    }

    .exit-popup-message {
        font-size: 16px;
    }

    .exit-popup-submessage {
        font-size: 14px;
    }
    
    .exit-popup-features {
        margin: 16px 20px;
        padding: 16px;
    }

    .exit-popup-feature {
        font-size: 13px;
    }

    .exit-popup-cta {
        padding: 14px 36px;
        font-size: 16px;
        margin: 0 20px 20px;
    }
    
    .exit-popup-disclaimer {
        margin: 0 20px 24px;
        font-size: 12px;
    }

    /* Responsive form adjustments */
    .exit-popup-form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 10px 20px 16px;
    }

    .exit-popup-submit {
        width: 100%;
    }
}

/* CSS Variables */
:root {
  /* Brand Colors */
  --primary-blue: #1a73e8;
  --primary-blue-hover: #1558b0;
  --secondary-blue: #1565c0;
  --accent-gold: #D4AF37;
  --success-green: #17b365;
  --warning-red: #e11b1b;
  --background-light: #f8f9fa;
  --border-light: #e0e0e0;
  --text-primary: #181818;
  --text-secondary: #555555;
  --text-muted: #888888;

  /* CTA Colors */
  --cta-bg: #fff;
  --cta-fg: var(--warning-red);
  --cta-grad: linear-gradient(90deg, var(--warning-red) 75%, #bf1414 100%);
  --cta-shadow: 0 -2px 24px rgba(0,0,0,0.14);
  --cta-radius: 19px;

  /* Typography */
  --font-primary: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --heading-color: #0f172a; /* slate-900 */
  --body-color: #232323; /* unify copy color */
  --muted-color: #5b6470; /* unify muted */

  /* Spacing */
  --section-padding-mobile: 1.75rem; /* slightly increased for breathing room */
  --section-padding-desktop: 2.5rem;
  --container-padding: 1rem;
  --container-padding-lg: 2rem;
  --block-gap-sm: 0.5rem;
  --block-gap: 1rem;
  --block-gap-lg: 1.5rem;

  /* Layout */
  --site-header: 5rem;
  --sidebar-width: 400px;
  --sidebar-gutter: 1.5rem;
  --bar-h: 2.4rem;
  --max-width-sm: 640px;
  --max-width-md: 768px;
  --max-width-lg: 1024px;
  --max-width-xl: 1280px;
  --max-width-4xl: 896px;
  --max-width-6xl: 1152px;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-radius: 0.5rem;
  --border-radius-lg: 0.75rem;

  /* Animations */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  --loop-time: 38s;
}

/* Reset overflow for scrolling testimonials */
html, body {
  overflow-x: hidden;
}

/* Baseline typography normalization */
body {
  font-family: var(--font-body);
  color: var(--body-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--heading-color);
  letter-spacing: -0.01em;
}

/* Heading rhythm tuning across sections */
.section-title-sm { margin-bottom: 0.75rem; }
.section-title   { margin-bottom: 1.1rem; }
.section-title-lg{ margin-bottom: 1.35rem; }

/* Unified section dividers for soft flow */
.section-divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(240,240,240,0), rgba(240,240,240,.9), rgba(240,240,240,0));
  opacity: .5;
}

/* Health Alert Banner Responsive */
@media (max-width: 899px) {
  .health-alert-banner {
    font-size: clamp(1rem, 4vw, 1.11rem) !important;
  }
}

/* Mobile CTA Bar Animations */
@keyframes pulse {
  0%, 100% { 
    box-shadow: 0 2px 14px rgba(225,27,27,0.13); 
    transform: scale(1);
  }
  54% { 
    box-shadow: 0 2px 31px rgba(225,27,27,0.15); 
    transform: scale(1.055);
  }
}

.animate-pulse-cta {
  animation: pulse 2.3s infinite cubic-bezier(.7,0,.29,1);
}

/* Ingredients Animation */
@keyframes fadeInUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s forwards;
}

.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-700 { animation-delay: 0.7s; }
.animation-delay-800 { animation-delay: 0.8s; }
.animation-delay-900 { animation-delay: 0.9s; }
.animation-delay-1000 { animation-delay: 1s; }

/* Made in USA Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out both;
}

/* Highlight Underline Effect */
.highlight-underline {
  --underline-scale: 0;
}

.highlight-underline::after {
  content: '';
  position: absolute;
  left: 0; 
  right: 0; 
  bottom: -0.12em;
  height: 0.32em;
  background: #FFEB3B;
  transform-origin: left center;
  transform: scaleX(var(--underline-scale));
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulse Button Animation */
@keyframes pulse-button {
  0%   { 
    transform: scale(1); 
    box-shadow: 0 0 0 0 rgba(255,193,7, 0.5); 
  }
  50%  { 
    transform: scale(1.07); 
    box-shadow: 0 0 0 15px rgba(255,193,7, 0); 
  }
  100% { 
    transform: scale(1); 
    box-shadow: 0 0 0 0 rgba(255,193,7, 0); 
  }
}

.animate-pulse-button {
  animation: pulse-button 1.5s ease-in-out infinite;
}

/* Hero Pulse Animation */
@keyframes pulse-hero {
  0% { 
    transform: scale(1); 
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.6); 
  }
  50% { 
    transform: scale(1.08); 
    box-shadow: 0 0 0 15px rgba(255, 193, 7, 0); 
  }
  100% { 
    transform: scale(1); 
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); 
  }
}

.animate-pulse-hero {
  animation: pulse-hero 1.3s ease-in-out infinite;
}

/* Scrolling Testimonials Animation */
@keyframes scrollInfinite {
  0%   { transform: translateY(0) }
  100% { transform: translateY(-50%) }
}

.animate-scrollInfinite {
  animation: scrollInfinite var(--loop-time) linear infinite;
}

/* Writing Mode Support */
.writing-mode-vertical-lr {
  writing-mode: vertical-lr;
}

.text-orientation-mixed {
  text-orientation: mixed;
}

/* Fix health alert banner responsive width */
@media (max-width: 899px) {
  .health-alert-banner {
    font-size: clamp(1rem, 4vw, 1.11rem);
  }
}

/* Ingredient & Card Hover Fix */
.ingredient-card {
  animation-fill-mode: forwards;
}

/* Testimonial & general cards */
.testimonial-card {
  animation-fill-mode: forwards;
}

.card-base {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .zen-copy h1 {
    font-size: 20px !important;
    line-height: 1.4;
  }
  
  .zen-copy > div:first-of-type {
    font-size: 30px !important;
    line-height: 36px !important;
  }
}

/* Fix for section spacing */
section {
  position: relative;
  z-index: 1;
  padding-top: var(--section-padding-mobile);
  padding-bottom: var(--section-padding-mobile);
}

/* Message Styles */
.advertorial-message {
  padding: 15px;
  margin: 20px auto;
  max-width: 800px;
  border-radius: 8px;
  text-align: center;
  font-size: 1.1rem;
}

.advertorial-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Ensure Tailwind utilities work properly */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* Wrapper and content positioning */
.advertorial-wrapper {
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  background: #fff;
  overflow-x: hidden;
  padding-right: 10px; /* Prevent content from touching viewport edge */
}

.advertorial-container {
  display: flex;
  gap: 0;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

.advertorial-main-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

/* Ensure sections adjust properly */
.advertorial-main-content section {
  width: 100%;
  max-width: none;
}

/* Sidebar */
.advertorial-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 45px;
  flex-shrink: 0;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
  align-self: flex-start;
  z-index: 5; /* keep above main content so it doesn't get clipped */
}

/* Expanded sidebar state */
.advertorial-sidebar.expanded {
  width: 445px;
}

@media (min-width: 1024px) {
  .advertorial-sidebar.expanded + .advertorial-main-content {
    margin-right: 445px;
  }
}

/* Ensure content doesn't overflow when sidebar expands */
@media (min-width: 1024px) {
  .advertorial-container {
    max-width: calc(100vw - 20px); /* Leave some breathing room */
    align-items: flex-start; /* Ensure proper sticky behavior */
  }
  /* Make sidebar fixed on desktop to guarantee stickiness */
  .advertorial-sidebar {
    position: fixed;
    right: 0;
    top: 0;
  }
  /* Reserve space so main content never goes under the sidebar */
  .advertorial-main-content {
    padding-right: 45px;
    transition: padding-right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Testimonial Sidebar Wrapper */
.testimonial-sidebar-wrapper {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: flex-end;
}

.testimonial-sidebar-wrapper[data-sidebar-collapsed="false"] .testimonial-content {
  transform: translateX(0);
  opacity: 1;
}

.testimonial-sidebar-wrapper[data-sidebar-collapsed="true"] .testimonial-content {
  transform: translateX(100%);
  opacity: 0;
}

.testimonial-content {
  position: relative;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

/* Toggle Button */
.testimonial-toggle {
  position: absolute;
  left: 0;
  top: 60%;
  transform: translateY(-50%);
  writing-mode: vertical-lr;
  text-orientation: mixed;
  padding: 0.6rem 0.55rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  color: white;
  background: #1a73e8;
  border-radius: 0.5rem 0 0 0.5rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: opacity 0.3s;
  z-index: 10;
  border: none;
}

.testimonial-toggle:hover {
  background: #1558b0;
}

/* Testimonial Content */
.testimonial-content {
  width: 400px;
  background: #fafafa;
  box-shadow: -4px 0 16px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Testimonial Items */
.ts-item {
  cursor: default;
}

/* Scrolling List */
.ts-list {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
}

.ts-list::-webkit-scrollbar {
  width: 6px;
}

.ts-list::-webkit-scrollbar-track {
  background: #f7fafc;
}

.ts-list::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.ts-list::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Mobile responsiveness */
@media (max-width: 1023px) {
  .advertorial-sidebar {
    display: none !important;
  }
  
  .advertorial-main-content {
    margin-right: 0 !important;
  }
}

/* Ensure proper z-index layering */
.modal-overlay {
  z-index: 9999;
}

.cta-bar {
  z-index: 10020;
}


/* Font family fallbacks */
body {
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* Utility Classes */
.section-spacing {
  padding: var(--section-padding-mobile) 0;
}

@media (min-width: 1024px) {
  .section-spacing {
    padding: var(--section-padding-desktop) 0;
  }
}

.container-max-width {
  max-width: var(--max-width-4xl);
}

.container-max-width-lg {
  max-width: var(--max-width-6xl);
}

.text-shadow {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.card-hover {
  transition: var(--transition-normal);
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Subtle micro-interactions */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), filter var(--transition-normal);
}
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); filter: saturate(1.03); }

.fade-in-up { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.fade-in   { opacity: 0; transition: opacity .6s ease; }
.is-visible { opacity: 1 !important; transform: translateY(0) !important; }

/* Consistent card padding and gap utilities */
.card-padding { padding: 1.1rem 1.3rem; }
.stack-sm > * + * { margin-top: var(--block-gap-sm); }
.stack   > * + * { margin-top: var(--block-gap); }
.stack-lg> * + * { margin-top: var(--block-gap-lg); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-primary:hover {
  background: var(--primary-blue-hover);
}

/* Container max widths */
.advertorial-wrapper,
.advertorial-container {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Accessibility: Focus styles */
a:focus,
button:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

/* Muted text utility to align tones across sections */
.text-muted { color: var(--muted-color) !important; }

/* Soft separators between sections where not already present */
.has-divider { padding-bottom: calc(var(--section-padding-mobile) + 1.25rem); }
.has-divider .section-divider { bottom: 0; }

@media (min-width: 1024px) {
  .has-divider { padding-bottom: calc(var(--section-padding-desktop) + 1.5rem); }
}

/* Print styles */
@media print {
  .cta-bar,
  .testimonial-toggle,
  .testimonial-sidebar {
    display: none !important;
  }
}
