/*
  StrategyHub (Kajabi) inspired light theme
  - Colors and sizing tuned to match the reference site at learn.strategybreakdowns.com
  - Efficient, minimal CSS applied to existing HTML structure
*/

:root {
  /* Core palette */
  --brand: #5b5cf6;           /* electric violet/blue */
  --brand-700: #4748e9;
  --brand-50: #eef0ff;        /* light tint for pills/sections */

  --bg: #ffffff;              /* page background */
  --surface: #fafbff;         /* very light surfaces */
  --border: #e6e8f0;          /* subtle borders */
  --shadow: 0 6px 16px rgba(25, 33, 60, 0.08);

  --fg: #1f2333;              /* primary text */
  --muted: #6b7280;           /* secondary text */

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --text-size: 18px;
  --text-line: 1.7;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); font: var(--text-size)/var(--text-line) var(--font-family); }
.container { width: min(1120px, 92%); margin: 0 auto; }

/* Navigation */
.nav { border-bottom: 1px solid var(--border); padding: 16px 0; background: var(--bg); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; letter-spacing: 0.2px; color: var(--fg); }

/* Hero */
.hero { padding: 48px 0 0; text-align: center; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.hero-icon { margin: 0 0 24px; }
.hero-icon img { display: block; margin: 0 auto; }
.hero h1 { font-size: 52px; line-height: 1.1; margin: 0 0 16px; color: #595959; letter-spacing: -0.5px; }
.subtitle { color: var(--muted); font-size: 16px; margin: 0 0 28px; }
.hero-image { margin: 30px 0 0; text-align: center; }
.hero-image img { max-width: 191.25%; height: auto; max-height: 76.5vh; object-fit: contain; margin-left: calc(50% - 5px); margin-right: auto; display: block; transform: translateX(-50%); }

/* Buttons */
.cta { display: inline-block; background: var(--brand); color: #ffffff; padding: 14px 22px; border-radius: 12px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); border: 1px solid transparent; transition: filter .15s ease, transform .15s ease, background-color .15s ease; }
.cta:hover { filter: brightness(1.15); transform: translateY(-3px); }
.cta:focus { outline: 3px solid var(--brand-50); outline-offset: 2px; }
.cta--outline { background: #ffffff; color: var(--brand); border-color: var(--brand); box-shadow: none; }
.cta--outline:hover { background: var(--brand-50); filter: brightness(1.1); transform: translateY(-3px); }

/* Sections */
.section { padding: 72px 0; }
.section:nth-of-type(odd) { background: var(--surface); }

/* Headings */
h2, h3, h4 { color: var(--brand); margin: 0 0 12px; letter-spacing: -0.2px; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
h4 { font-size: 22px; }

/* Text elements */
p { margin: 0 0 24px; }
ul { margin: 0 0 16px 20px; }
li::before { content: "" !important; }
code { background: var(--brand-50); padding: 2px 6px; border-radius: 6px; }

/* Cards & pills (for future reuse) */
.card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 32px 32px 7px 32px; max-width: 800px; margin: 0 auto; }
.intro-section .card { padding: 32px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-weight: 600; font-size: 14px; }

/* Grids */
.grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 820px) { .grid { grid-template-columns: 1fr 1fr; }
}

/* Intro section */
.section.intro-section { background: #EFE8F4 !important; }

/* Bio section */
.bio-section { background: white; }

/* Bonus section */
.bonuses-section { background: #efe8f4; }
.bonus-image { margin: 16px 0; text-align: center; }
.bonus-image img { max-width: 75%; height: auto; border-radius: 12px; }


/* Instructor photo */
.instructor-photo { margin: 16px 0; text-align: left; }
.instructor-photo img { width: 360px; height: 360px; border-radius: 50px; object-fit: cover; box-shadow: var(--shadow); }

/* Ensure testimonial avatars stay circular */
div[style*="border-radius: 50%"] { aspect-ratio: 1 / 1; flex-shrink: 0; }

/* FAQ collapsible */
.faq-item { margin: 16px 0; }
.faq-question { width: 100%; background: #ffffff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 600; color: var(--fg); transition: background-color 0.15s ease, border-radius 0.15s ease; }
.faq-question:hover { background: var(--brand-50); }
.faq-question.active { border-radius: 12px 12px 0 0; }
.faq-icon { font-size: 20px; color: var(--brand); font-weight: bold; }
.faq-answer { display: none; padding: 20px; background: #ffffff; border: 1px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; margin-top: -1px; font-size: 16px; }
.faq-answer.open { display: block; }
.faq-answer p { margin: 0 0 12px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* Dividers & footer */
hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); text-align: center; background: var(--bg); }

/* ============================================================================
   MOBILE & TABLET RESPONSIVE STYLES
   ============================================================================ */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .hero h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  h3 { font-size: 26px; }
  
  .section { padding: 56px 0; }
  
  /* Adjust card layouts */
  div[style*="flex"] { gap: 40px !important; }
  
  /* Module grid - reduce to 2 columns */
  div[style*="grid-template-columns: repeat(3"] { grid-template-columns: repeat(2, 1fr) !important; }
  
  /* Instructor photo slightly smaller on tablet */
  .instructor-photo img { width: 300px; height: 300px; }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  /* Base typography adjustments */
  html, body { font-size: 16px; }
  
  .container { width: min(1120px, 95%); }
  
  /* Headings scale down */
  .hero h1 { font-size: 32px; line-height: 1.2; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
  h4 { font-size: 18px; }
  
  /* Hero section */
  .hero { padding: 32px 0 0; min-height: auto; }
  .hero-icon img { width: 80px; height: 80px; }
  
  /* Fix hero image overflow */
  .hero-image img { 
    max-width: 100% !important; 
    margin-left: 0 !important; 
    margin-right: 0 !important;
    transform: none !important;
  }
  
  /* Button adjustments */
  .cta { padding: 12px 20px; font-size: 16px; }
  
  /* Section spacing */
  .section { padding: 48px 0; }
  
  /* Card padding reduced */
  .card { padding: 20px; }
  
  /* Two-column flex layouts → single column */
  div[style*="display: flex"] { 
    flex-direction: column !important; 
    gap: 24px !important; 
  }
  
  /* Bio section - stack photo and text */
  .instructor-photo { margin: 0 0 24px; text-align: center; }
  .instructor-photo img { 
    width: 240px; 
    height: 240px; 
    border-radius: 32px;
  }
  
  /* Module and tutorial grids → single column */
  div[style*="display: grid"] { 
    grid-template-columns: 1fr !important; 
    gap: 20px !important; 
  }
  
  /* Tutorial cards padding */
  div[style*="background: #f8f9fa"] { padding: 14px; }
  
  /* Bonus images */
  .bonus-image img { max-width: 100%; }
  
  /* Testimonial images fix */
  img[src*="benwilson"] { 
    width: 100% !important; 
    height: auto !important; 
    margin-left: 0 !important;
    object-fit: contain !important;
  }
  
  /* Fix the 150% width testimonial specifically */
  img[style*="width: 150%"] { 
    width: 100% !important; 
    height: auto !important; 
    margin-left: 0 !important;
  }
  
  /* Large screenshot/hero images */
  img[src*="Screenshot"], img[src*="hero"] { 
    width: 100% !important; 
    max-width: 100% !important;
    height: auto !important; 
  }
  
  /* Product card section padding */
  div[style*="background: #FFFAF3"] { 
    padding: 24px !important; 
    transform: translateY(0) !important;
  }
  
  /* Reduce gap in all layouts */
  div[style*="gap: 64px"], 
  div[style*="gap: 60px"], 
  div[style*="gap: 40px"] { 
    gap: 24px !important; 
  }
  
  /* Container spacing adjustments */
  div[style*="display: flex; gap: 24px"] { gap: 16px !important; }
  
  /* FAQ adjustments */
  .faq-question { font-size: 16px; padding: 14px 16px; }
  .faq-answer { padding: 16px; font-size: 15px; }
  
  /* Subtitle adjustments */
  .subtitle { font-size: 15px; }
  
  /* Specific intro section adjustments */
  div[style*="max-width: 800px"] { 
    margin: 0 auto !important; 
    padding: 0 !important;
  }
  
  /* Email links wrap better */
  a[href^="mailto:"] { 
    word-break: break-word; 
  }
  
  /* Nested flex containers */
  div[style*="flex: 1"] { flex: none !important; }
  
  /* Ensure CTA buttons are mobile-friendly */
  .cta { 
    display: block; 
    text-align: center; 
    min-height: 44px;
    box-sizing: border-box;
  }
  
  /* Center align text in flex containers on mobile */
  div[style*="display: flex"] { align-items: center !important; }
  
  /* Discovery feedback image */
  img[src*="discovery-feedback"] { 
    width: 100% !important; 
    max-width: 100% !important; 
    height: auto !important; 
  }
  
  /* Fix specific inline styles that need override */
  img[alt*="The High-Impact Strategist Bundle Course Preview"] { 
    width: 100% !important; 
    height: auto !important; 
  }
  
  /* Adjust code blocks for mobile */
  code { 
    font-size: 0.9em; 
    padding: 2px 4px;
    word-break: break-word;
  }
  
  /* Lists spacing */
  ul li { margin: 6px 0; }
  
  /* Fix any remaining overflow issues */
  body { overflow-x: hidden; }
  
  /* Header logo/icon adjustments */
  .hero-icon { margin: 0 0 16px; }
  
  /* Footer text size */
  .footer { font-size: 14px; padding: 24px 0; }
  
  /* Specific section containers that might overflow */
  div[style*="margin: 40px 0"] { margin: 24px 0 !important; }
  
  /* Ensure max-widths are respected on mobile */
  div[style*="max-width: 1000px"] { max-width: 100% !important; }
  div[style*="max-width: 800px"] { max-width: 100% !important; }
  
  /* Better spacing for intro section */
  .intro-section .card { margin: 0 auto; }
  
  /* Adjust text alignment in center-aligned divs */
  div[style*="text-align: center"] { text-align: center !important; }
  
  /* Testimonials section responsive */
  div[style*="grid-template-columns: repeat(3"] { 
    grid-template-columns: 1fr !important; 
  }
  div[style*="grid-template-columns: repeat(2"] { 
    grid-template-columns: 1fr !important; 
    max-width: 100% !important;
  }
  
  /* Testimonial photo circles - ensure they stay circular */
  div[style*="width: 60px; height: 60px; border-radius: 50%"] { 
    width: 50px !important; 
    height: 50px !important; 
    font-size: 20px !important;
    min-width: 50px;
    min-height: 50px;
    aspect-ratio: 1 / 1;
  }
  
  /* Fix padding for grey callout cards */
  div[style*="background: #f8f9fa"] { 
    padding: 20px !important; 
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Ensure Decision Point card has proper padding */
  div[style*="border-left: 4px solid #B19EF8"] { 
    padding: 20px !important; 
    margin: 24px auto !important;
  }
  
  /* Make sure all grey boxes have adequate mobile padding */
  div[style*="box-shadow: 0 4px 12px"] { 
    padding: 20px !important; 
  }
}
