/* ============================================================================
   HEADER CENTERING FIX & HERO STANDARDIZATION
   Version: 2.2.0
   
   Ensures all marketing page headers are properly centered and have consistent heights
   Added blog post header spacing improvements
   Updated blog header spacing to match accounts dashboard consistency
   ============================================================================ */

/* Hero Section Standardization - CSS Custom Properties */
:root {
  --hero-height-desktop: 500px;
  --hero-height-mobile: 400px;
  --hero-content-max-width: 800px;
  --hero-headline-margin: 24px;
  --hero-subheadline-margin: 32px;
  --hero-button-gap: 16px;
  --hero-padding-desktop: 100px 0 80px;
  --hero-padding-mobile: 80px 0 60px;
}

/* Standardized Hero Base Class */
.mk-hero--standardized {
  min-height: var(--hero-height-desktop);
  padding: var(--hero-padding-desktop);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%);
}

.mk-hero--standardized::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(38, 166, 154, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 152, 0, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(41, 182, 246, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

/* Standardized Hero Content Structure */
.mk-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--hero-content-max-width);
  margin: 0 auto;
  text-align: center !important;
}

.mk-hero__headline {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: white;
  margin-bottom: var(--hero-headline-margin) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.mk-hero__subheadline {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--hero-subheadline-margin) !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Standardized Button Container */
.mk-hero__actions {
  display: flex !important;
  gap: var(--hero-button-gap) !important;
  justify-content: center !important;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0 !important;
}

/* Apply standardized heights to existing hero classes */
.mk-hero--home,
.mk-hero--about,
.mk-hero--features,
.mk-hero--pricing,
.mk-hero--detail {
  min-height: var(--hero-height-desktop);
  display: flex;
  align-items: center;
}

/* Override home page to use consistent height instead of 100vh */
.mk-hero--home {
  min-height: var(--hero-height-desktop) !important;
}

/* Update startup quiz to use consistent height */
.mk-hero--detail {
  min-height: var(--hero-height-desktop) !important;
}

/* Hero Section Header Centering */
.mk-hero .mk-hero__content {
    text-align: center !important;
}

.mk-hero .mk-hero__headline {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.mk-hero .mk-hero__subheadline {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Section Headers Centering */
.ds-section-header {
    text-align: center !important;
}

.ds-section-header__eyebrow {
    text-align: center !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.ds-section-header__title {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.ds-section-header__subtitle {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Quiz Section Headers */
.quiz-card h2,
.quiz-card .ds-heading-3 {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Marketing page specific header centering */
.mk-hero--pricing .mk-hero__headline,
.mk-hero--features .mk-hero__headline,
.mk-hero--about .mk-hero__headline,
.mk-hero--detail .mk-hero__headline,
.mk-hero--home .mk-hero__headline {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.mk-hero--pricing .mk-hero__subheadline,
.mk-hero--features .mk-hero__subheadline,
.mk-hero--about .mk-hero__subheadline,
.mk-hero--detail .mk-hero__subheadline,
.mk-hero--home .mk-hero__subheadline {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Bootstrap Grid Centering Override */
.text-center {
    text-align: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* Ensure container centering for marketing pages */
.mk-hero .container .row.justify-content-center {
    justify-content: center !important;
}

.mk-hero .container .row.justify-content-center .col-lg-8,
.mk-hero .container .row.justify-content-center .col-lg-10 {
    text-align: center !important;
}

/* Force centering on all marketing page hero content */
.mk-hero .container .row .col-lg-8 .mk-hero__content,
.mk-hero .container .row .col-lg-10 .mk-hero__content {
    text-align: center !important;
}

/* Specific page fixes based on screenshots */

/* Startup Quiz Page */
.mk-hero--detail .mk-hero__content {
    text-align: center !important;
}

/* Pricing Page */
.mk-hero--pricing .mk-hero__content {
    text-align: center !important;
}

/* Features Page */
.mk-hero--features .mk-hero__content {
    text-align: center !important;
}

/* About Page */
.mk-hero--about .mk-hero__content {
    text-align: center !important;
}

/* Home Page */
.mk-hero--home .mk-hero__content {
    text-align: center !important;
}

/* Blog Post Header Spacing Improvements - Match Dashboard Spacing */
.blog-content {
    padding-top: 0 !important; /* Match dashboard pt-0 */
}

.blog-page-header-compact {
    margin-top: 0;
    margin-bottom: 1.5rem !important; /* Match dashboard mb-4 */
}

/* Ensure proper spacing between navigation and blog content - match dashboard */
.container.blog-content.pt-4 {
    padding-top: 0 !important; /* Match dashboard pt-0 */
}

/* Align Quick Overview with sidebar top - remove top margin when it's first element */
.quick-overview-card:first-child {
    margin-top: 0 !important;
}

/* Ensure sidebar alignment - remove top margin from first sidebar card */
.sticky-sidebar > .card:first-child {
    margin-top: 0 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    :root {
        --hero-height-desktop: var(--hero-height-mobile);
        --hero-padding-desktop: var(--hero-padding-mobile);
    }
    
    .mk-hero--home,
    .mk-hero--about,
    .mk-hero--features,
    .mk-hero--pricing,
    .mk-hero--detail {
        min-height: var(--hero-height-mobile);
        padding: var(--hero-padding-mobile);
    }
    
    .mk-hero__headline {
        font-size: 2.5rem;
    }
    
    .mk-hero__subheadline {
        font-size: 1.1rem;
    }
    
    .mk-hero__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .mk-hero__headline,
    .mk-hero__subheadline,
    .ds-section-header__title,
    .ds-section-header__subtitle,
    .ds-section-header__eyebrow {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .mk-hero .mk-hero__content {
        text-align: center !important;
    }
    
    /* Mobile blog header spacing */
    .blog-content {
        padding-top: 1.5rem !important;
    }
    
    .blog-page-header-compact {
        margin-top: 0.75rem;
        margin-bottom: 1.5rem !important;
    }
    
    .container.blog-content.pt-4 {
        padding-top: 2rem !important;
    }
}