/* ============================================
   MedLearn — Medical Courses Subscription
   Palette: soft blue-green atmosphere
   ============================================ */
:root{
  --bg:#f2f5fa;
  --bg-tint:#e9edf5;
  --surface:#ffffff;
  --ink:#0a1128;
  --ink-soft:#3d4a63;
  --muted:#7a869e;
  --accent:#2563eb;
  --accent-deep:#1e40af;
  --accent-soft:#dbe7fd;
  --navy:#0a1128;
  --navy-soft:#131c36;
  --line:rgba(10,17,40,.1);
  --radius:16px;
  --font-display:"Fraunces", Georgia, serif;
  --font-body:"Inter", "Helvetica Neue", Arial, sans-serif;
}
*{ -webkit-tap-highlight-color:transparent; }
html{ scroll-behavior:smooth; }
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--ink);
  letter-spacing:.01em;
  -webkit-font-smoothing:antialiased;
}
::selection{ background:var(--accent); color:#fff; }

/* ---------- Typography ---------- */
.display-font{ font-family:var(--font-display); font-weight:300; letter-spacing:-.02em; }
.eyebrow{
  font-size:.72rem; font-weight:600; letter-spacing:.22em;
  text-transform:uppercase; color:var(--ink-soft);
}
.eyebrow .num{ color:var(--accent); font-variant-numeric:tabular-nums; }
h1.display-font{ font-size:clamp(2.6rem,6vw,4.6rem); line-height:1.04; }
h2.display-font{ font-size:clamp(1.9rem,3.6vw,2.9rem); line-height:1.1; }
.lead-soft{ color:var(--ink-soft); font-size:1.06rem; line-height:1.75; }

/* ---------- Navbar ---------- */
.navbar-med{
  background:rgba(242,245,250,.85);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.navbar-med .navbar-brand{ font-family:var(--font-display); font-size:1.35rem; font-weight:400; color:var(--ink); }
.navbar-med .navbar-brand .plus{ color:var(--accent); }
.navbar-med .nav-link{ color:var(--ink-soft); font-weight:500; font-size:.92rem; margin:0 .35rem; }
.navbar-med .nav-link:hover{ color:var(--ink); }

/* ---------- Buttons ---------- */
.btn-ink{
  background:var(--ink); color:#fff; border:none;
  padding:.8rem 1.6rem; border-radius:999px; font-weight:600; font-size:.92rem;
  transition:background .25s ease, transform .25s ease;
}
.btn-ink:hover{ background:var(--accent-deep); color:#fff; transform:translateY(-2px); }
.btn-accent{
  background:var(--accent); color:#fff; border:none;
  padding:.8rem 1.6rem; border-radius:999px; font-weight:600; font-size:.92rem;
  transition:background .25s ease, transform .25s ease;
}
.btn-accent:hover{ background:var(--accent-deep); color:#fff; transform:translateY(-2px); }
.btn-ghost{
  background:transparent; color:var(--ink); border:1px solid var(--line);
  padding:.8rem 1.6rem; border-radius:999px; font-weight:600; font-size:.92rem;
  transition:all .25s ease;
}
.btn-ghost:hover{ background:var(--ink); color:#fff; border-color:var(--ink); }
.link-arrow{
  color:var(--ink); font-weight:600; font-size:.95rem; text-decoration:none;
  border-bottom:1px solid transparent; transition:border-color .2s;
}
.link-arrow:hover{ color:var(--accent); border-color:var(--accent); }
.link-arrow i{ transition:transform .25s ease; }
.link-arrow:hover i{ transform:translate(3px,-3px); }

/* ---------- Hero ---------- */
.hero{ padding:7rem 0 4.5rem; position:relative; overflow:hidden; }
.hero-word{
  position:absolute; top:2rem; left:50%; transform:translateX(-50%);
  font-family:var(--font-display); font-weight:300;
  font-size:clamp(6rem,18vw,15rem); line-height:1;
  color:rgba(255,255,255,.35); white-space:nowrap;
  pointer-events:none; user-select:none;
}
.hero-badge{
  display:inline-flex; align-items:center; gap:.5rem;
  background:rgba(255,255,255,.55); border:1px solid var(--line);
  border-radius:999px; padding:.45rem 1rem; font-size:.8rem; font-weight:600;
  color:var(--ink-soft);
}
.hero-badge .dot{ width:8px; height:8px; border-radius:50%; background:var(--accent); animation:pulse 1.8s ease infinite; }
@keyframes pulse{ 0%,100%{ opacity:1; transform:scale(1);} 50%{ opacity:.45; transform:scale(.75);} }
.hero-media{
  border-radius:var(--radius); overflow:hidden; position:relative;
  background:linear-gradient(145deg,#1e40af,#0a1128);
  min-height:420px; color:#e4ecfb;
}
.hero-media .mesh{
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 78% 18%, rgba(147,183,250,.35), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(10,17,40,.85), transparent 55%);
}
.hero-media .content{ position:relative; z-index:2; padding:2.2rem; height:100%; display:flex; flex-direction:column; justify-content:space-between; }
.vital-line{ stroke:#93b7fa; stroke-width:2.4; fill:none; stroke-dasharray:600; stroke-dashoffset:600; animation:ekg 3.2s ease-in-out infinite; }
@keyframes ekg{ 0%{stroke-dashoffset:600;} 55%{stroke-dashoffset:0;} 100%{stroke-dashoffset:-600;} }
.stat-chip{
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.22);
  backdrop-filter:blur(8px); border-radius:14px; padding:.7rem 1rem;
}
.stat-chip .v{ font-family:var(--font-display); font-size:1.4rem; }
.stat-chip .l{ font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; opacity:.75; }

/* ---------- Store badges ---------- */
.store-btn{
  display:inline-flex; align-items:center; gap:.7rem;
  background:var(--ink); color:#fff; border-radius:14px;
  padding:.65rem 1.15rem; text-decoration:none; line-height:1.15;
  transition:transform .25s ease, background .25s ease;
}
.store-btn:hover{ background:var(--accent-deep); color:#fff; transform:translateY(-2px); }
.store-btn i{ font-size:1.5rem; }
.store-btn small{ display:block; font-size:.62rem; letter-spacing:.12em; text-transform:uppercase; opacity:.7; }
.store-btn span{ font-weight:600; font-size:.95rem; }
.store-btn.light{ background:rgba(255,255,255,.85); color:var(--ink); border:1px solid var(--line); }
.store-btn.light:hover{ background:var(--ink); color:#fff; }

/* ---------- Sections ---------- */
.section-pad{ padding:5.5rem 0; }
.surface-section{ background:var(--bg-tint); }
.divider-top{ border-top:1px solid var(--line); }

/* ---------- Course cards ---------- */
.course-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; height:100%; display:flex; flex-direction:column;
  transition:transform .3s ease, box-shadow .3s ease;
}
.course-card:hover{ transform:translateY(-6px); box-shadow:0 24px 48px -24px rgba(30,64,175,.3); }
.course-thumb{
  aspect-ratio:16/9; position:relative; display:flex; align-items:flex-end; padding:1.1rem;
  color:#fff;
}
.course-thumb .code{
  font-size:.68rem; font-weight:700; letter-spacing:.18em; text-transform:uppercase;
  background:rgba(13,27,30,.5); backdrop-filter:blur(6px);
  padding:.3rem .7rem; border-radius:999px;
}
.course-thumb svg.art{ position:absolute; inset:0; width:100%; height:100%; }
.course-body{ padding:1.4rem 1.4rem 1.5rem; display:flex; flex-direction:column; flex:1; }
.course-body h5{ font-family:var(--font-display); font-weight:400; font-size:1.3rem; }
.course-meta{ display:flex; gap:1.1rem; color:var(--muted); font-size:.82rem; margin:.4rem 0 1rem; }
.course-meta i{ color:var(--accent); margin-right:.25rem; }
.course-foot{
  margin-top:auto; padding-top:1rem; border-top:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
}
.price{ font-family:var(--font-display); font-size:1.35rem; }
.price small{ font-family:var(--font-body); font-size:.72rem; color:var(--muted); font-weight:500; }

/* ---------- Steps ---------- */
.step-row{ border-top:1px solid var(--line); padding:2rem 0; }
.step-row:last-child{ border-bottom:1px solid var(--line); }
.step-num{ font-family:var(--font-display); font-size:2.6rem; color:var(--accent); font-weight:300; line-height:1; }
.step-row h5{ font-family:var(--font-display); font-weight:400; font-size:1.4rem; }

/* ---------- Lesson list ---------- */
.lesson-row{
  display:flex; align-items:center; gap:1.1rem;
  padding:1.15rem .4rem; border-bottom:1px solid var(--line);
  transition:background .2s ease;
}
.lesson-row:first-child{ border-top:1px solid var(--line); }
.lesson-row:hover{ background:rgba(255,255,255,.4); }
.lesson-idx{
  font-family:var(--font-display); font-size:1.15rem; color:var(--accent);
  width:2.2rem; flex-shrink:0; font-variant-numeric:tabular-nums;
}
.lesson-lock{
  width:38px; height:38px; border-radius:12px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background:var(--accent-soft); color:var(--accent-deep); font-size:.95rem;
}
.lesson-row h6{ margin:0; font-weight:600; font-size:.98rem; }
.lesson-row small{ color:var(--muted); }

/* ---------- Auth / OTP ---------- */
.auth-wrap{ min-height:100vh; min-height:100dvh; display:flex; }
.auth-visual{
  flex:1.1; background:linear-gradient(160deg,#131c36,#060a18);
  color:#e4ecfb; padding:3.5rem; display:none; position:relative; overflow:hidden;
}
@media (min-width:992px){ .auth-visual{ display:flex; flex-direction:column; justify-content:space-between; } }
.auth-panel{ flex:1; background:var(--bg); display:flex; align-items:center; justify-content:center; padding:2.5rem 1.5rem; min-height:100vh; min-height:100dvh; }
.auth-card{ width:100%; max-width:430px; }
.auth-mobile-header{ display:none; }
.form-control.med-input{
  background:var(--surface); border:1px solid var(--line); border-radius:14px;
  padding:.85rem 1.1rem; font-size:1rem;
}
.form-control.med-input:focus{
  background:#fff; border-color:var(--accent);
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}
.phone-group{
  display:flex !important;
  gap:.6rem;
  flex-wrap:nowrap !important;
  width:100%;
}
.phone-group .form-control.med-input{
  flex:1 1 auto !important;
  min-width:0 !important;
  width:auto !important;
}
.phone-group .invalid-feedback{ width:100%; }
.phone-code{
  flex:0 0 90px !important;
  width:90px !important;
  min-width:90px !important;
  max-width:90px !important;
  background:var(--surface); border:1px solid var(--line);
  border-radius:14px; padding:.85rem .6rem; text-align:center; font-weight:600;
  box-sizing:border-box;
}
.otp-row{ display:flex; gap:.55rem; justify-content:space-between; }
.otp-box{
  flex:1 1 0; max-width:52px; height:60px; text-align:center; font-size:1.45rem; font-weight:600;
  font-family:var(--font-display);
  background:var(--surface); border:1px solid var(--line); border-radius:14px;
  transition:border-color .2s, box-shadow .2s;
}
.otp-box:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 4px rgba(37,99,235,.12); background:#fff; }
.auth-step{ display:none; }
.auth-step.active{ display:block; animation:stepIn .45s cubic-bezier(.22,.9,.3,1); }
@keyframes stepIn{ from{ opacity:0; transform:translateY(16px);} to{ opacity:1; transform:none;} }
.step-dots{ display:flex; gap:.4rem; }
.step-dots span{ width:26px; height:4px; border-radius:99px; background:var(--line); transition:background .3s; }
.step-dots span.on{ background:var(--accent); }
@media (max-width: 991px){
  .auth-wrap{ flex-direction:column; background:#fff; }
  .auth-panel{
    background:#fff;
    align-items:flex-start;
    justify-content:center;
    padding:1.5rem 1.25rem 2.5rem;
  }
  .auth-card{
    max-width:420px;
    margin:0 auto;
    padding-top:0.5rem;
  }
  .auth-mobile-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    width:100%;
    margin-bottom:1.5rem;
    padding-bottom:.85rem;
    border-bottom:1px solid var(--line);
  }
  .auth-mobile-header .brand{
    font-family:var(--font-display);
    font-size:1.35rem;
    font-weight:600;
    color:var(--ink);
    text-decoration:none;
  }
  .auth-mobile-header .brand .plus{
    color:var(--accent);
  }
  .auth-mobile-header .back-link{
    color:var(--ink-soft);
    text-decoration:none;
    font-size:.85rem;
    font-weight:500;
    display:inline-flex;
    align-items:center;
    gap:.35rem;
    padding:.35rem .75rem;
    border-radius:999px;
    background:var(--surface);
    border:1px solid var(--line);
    transition:all .2s ease;
  }
  .auth-mobile-header .back-link:hover{
    color:var(--ink);
    border-color:var(--ink);
  }
}
@media (max-width: 480px){
  .auth-panel{ padding:1.25rem 1.15rem 2rem; }
  .auth-card h1{ font-size:1.85rem !important; }
  .phone-code{
    flex:0 0 80px !important;
    width:80px !important;
    min-width:80px !important;
    max-width:80px !important;
    padding:.85rem .4rem;
    font-size:.95rem;
  }
  .otp-row{ gap:.35rem; }
  .otp-box{ height:52px; font-size:1.25rem; }
}

/* ---------- Plans / checkout ---------- */
.plan-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:1.8rem; cursor:pointer; position:relative; 
  /* height:100%; */
  transition:border-color .25s, box-shadow .25s, transform .25s;
}
.plan-card:hover{ transform:translateY(-4px); }
.plan-card.selected{
  border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.16);
  background:#fff;
}
.plan-card .save-tag{
  position:absolute; top:-12px; right:1.4rem;
  background:var(--accent); color:#fff; font-size:.68rem; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; padding:.3rem .8rem; border-radius:999px;
}
.plan-check{
  width:24px; height:24px; border-radius:50%; border:2px solid var(--line);
  display:flex; align-items:center; justify-content:center; color:transparent;
  transition:all .25s;
}
.plan-card.selected .plan-check{ background:var(--accent); border-color:var(--accent); color:#fff; }
.summary-box{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:1.8rem;
}
.summary-line{ display:flex; justify-content:space-between; padding:.55rem 0; color:var(--ink-soft); font-size:.95rem; }
.summary-line.total{ border-top:1px solid var(--line); margin-top:.6rem; padding-top:1rem; color:var(--ink); font-weight:700; font-size:1.1rem; }

/* ---------- Footer ---------- */
.footer{ background:var(--ink); color:#aebadb; padding:4.5rem 0 2rem; }
.footer .navbar-brand{ font-family:var(--font-display); font-size:1.5rem; color:#fff; }
.footer a, .footer button{ color:#8b98b8; text-decoration:none; font-size:.9rem; }
.footer a:hover, .footer button:hover{ color:#fff; }
.footer .divider{ border-color:rgba(255,255,255,.12); }

/* ---------- Entrance animations ---------- */
[data-anim]{ opacity:0; transform:translateY(26px); transition:opacity .7s ease, transform .7s cubic-bezier(.22,.9,.3,1); }
[data-anim].in{ opacity:1; transform:none; }
@media (prefers-reduced-motion:reduce){
  [data-anim]{ opacity:1; transform:none; transition:none; }
  .vital-line{ animation:none; stroke-dashoffset:0; }
}

/* ---------- Misc ---------- */
.pill-tag{
  display:inline-block; background:var(--accent-soft); color:var(--accent-deep);
  font-size:.7rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  padding:.3rem .8rem; border-radius:999px;
}
.rounded-media{ border-radius:var(--radius); overflow:hidden; }
.text-soft{ color:var(--ink-soft); }
.text-muted-2{ color:var(--muted); }

/* ---------- Responsive Mobile Enhancements ---------- */
@media (max-width: 991px){
  .hero{ padding:5.5rem 0 3rem; }
  .hero-word{ display:none; }
  .hero-media{ min-height:240px; margin-top:1rem; }
  .hero-media .content{ padding:1.5rem 1.25rem; }
  .navbar-med .navbar-collapse{
    background:#fff;
    padding:1.25rem 1rem;
    border-radius:18px;
    margin-top:.75rem;
    box-shadow:0 12px 30px rgba(0,0,0,0.08);
    border:1px solid var(--line);
  }
}

@media (max-width: 767px){
  .section-pad{ padding:3rem 0; }
  h1.display-font{ font-size:2.1rem; line-height:1.15; }
  h2.display-font{ font-size:1.75rem; line-height:1.2; }
  .lead-soft{ font-size:.98rem; line-height:1.6; }
  .hero-media{ min-height:210px; }
  .hero-media .content{ padding:1.2rem 1rem; }
  .stat-chip{ padding:.5rem .6rem; border-radius:10px; }
  .stat-chip .v{ font-size:1.15rem; }
  .stat-chip .l{ font-size:.62rem; }
  .step-row{
    padding:1.5rem 0;
    position:relative;
  }
  .step-row .step-num{
    font-size:2.2rem;
    margin-bottom:.5rem;
    display:inline-block;
  }
  .step-row [class*="col-md-3"]{
    position:absolute;
    top:1.25rem;
    right:0.75rem;
    margin-top:0 !important;
    text-align:right;
    width:auto;
  }
  .step-row [class*="col-md-3"] i{
    font-size:1.85rem !important;
  }
  .step-row h5{
    font-size:1.25rem;
    padding-right:3.2rem;
  }
  .summary-box{ padding:1.35rem 1.15rem; }
  .plan-card{ padding:1.35rem 1.15rem; }
  .course-foot{ flex-wrap:wrap; gap:.5rem; }
  .course-body{ padding:1.15rem; }
  .footer{ padding:3rem 0 1.5rem; }
}

@media (max-width: 480px){
  .hero-badge{ font-size:.75rem; padding:.35rem .8rem; }
  .btn-accent, .btn-ink, .btn-ghost{ padding:.7rem 1.3rem; font-size:.88rem; }
  .store-btn{ padding:.55rem .95rem; }
}
