/* ============================================================
   Master Your Photography — Main Stylesheet
   Clean, minimal, professional
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:         #ffffff;
  --clr-bg-soft:    #f8f8f6;
  --clr-bg-muted:   #f1f0ee;
  --clr-text:       #1d1d1f;
  --clr-text-mid:   #6e6e73;
  --clr-text-muted: #888882;
  --clr-accent:     #9b2d7f;      /* brand magenta */
  --clr-accent-dk:  #7a1f63;      /* darker magenta */
  --clr-teal:       #4a7c8e;      /* brand teal */
  --clr-teal-dk:    #3a6070;      /* darker teal */
  --clr-border:     #e4e4e0;
  --clr-success:    #2d7a4f;
  --clr-error:      #c0392b;

  --font-sans:      'Gill Sans', 'Gill Sans MT', 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
  --font-serif:     'Gill Sans', 'Gill Sans MT', 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);

  --max-w: 1140px;
  --gap: clamp(1rem, 3vw, 2rem);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--clr-text);
  background: var(--clr-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--clr-accent); }

h1, h2, h3, h4 { font-family: var(--font-sans); line-height: 1.1; font-weight: 600; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.8rem); margin-bottom: .75rem; font-weight: 600; }
h3 { font-size: 1.2rem; margin-bottom: .5rem; font-weight: 500; }

p { margin-bottom: 1.2rem; color: var(--clr-text-mid); }
p:last-child { margin-bottom: 0; }

/* --- Layout helpers --------------------------------------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap); }
.section    { padding: clamp(5rem, 10vw, 10rem) 0; }
.section--soft { background: var(--clr-bg-soft); }
.section--muted { background: var(--clr-bg-muted); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }

/* --- Header ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--clr-border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}

.logo { display: flex; align-items: center; gap: .6rem; }
.logo-img { height: 36px; width: auto; display: block; }
.logo-main {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--clr-text);
}

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  font-size: .875rem;
  font-weight: 400;
  color: var(--clr-text-mid);
  transition: color .2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--clr-text); }
.site-nav .nav-link-muted { color: var(--clr-text-muted); font-weight: 400; }

.nav-cta {
  background: var(--clr-teal);
  color: white !important;
  padding: .5rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .875rem !important;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--clr-teal-dk) !important; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--clr-text); border-radius: 2px; }

/* --- Buttons --------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--clr-text);
  color: white;
  border-color: var(--clr-text);
}
.btn-primary:hover {
  background: #333;
  color: white;
}
.btn-accent {
  background: var(--clr-accent);
  color: white;
  border-color: var(--clr-accent);
}
.btn-accent:hover {
  background: var(--clr-accent-dk);
  border-color: var(--clr-accent-dk);
  color: white;
}
.btn-outline {
  background: transparent;
  color: var(--clr-text);
  border-color: var(--clr-border);
}
.btn-outline:hover {
  border-color: var(--clr-text);
  color: var(--clr-text);
}
.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; }

/* --- Page hero ------------------------------------------- */
.page-hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--clr-border);
}
.page-hero h1 { margin-bottom: .75rem; font-weight: 600; letter-spacing: -.03em; }
.page-hero .subtitle {
  font-size: 1.15rem;
  color: var(--clr-text-mid);
  max-width: 600px;
}

/* --- Home hero ------------------------------------------- */
.hero {
  padding: clamp(4rem, 8vw, 8rem) 0;
  background: var(--clr-bg-soft);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero-text h1 { margin-bottom: 1.25rem; font-weight: 600; letter-spacing: -.03em; }
.hero-text p  { font-size: 1.1rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--clr-accent);
  margin-bottom: 1rem;
}
.hero-badge::before { content: ''; display: block; width: 24px; height: 2px; background: var(--clr-teal); }

/* --- Course cards ---------------------------------------- */
.course-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.course-card__image {
  aspect-ratio: 16/9;
  background: var(--clr-bg-muted);
  overflow: hidden;
  position: relative;
}
.course-card__coming-soon-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: rgba(0,0,0,.72);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .3rem .7rem;
  border-radius: 4px;
  z-index: 1;
  pointer-events: none;
}
.course-card__image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.course-card:hover .course-card__image img { transform: scale(1.03); }

.course-card__body { padding: 1.5rem; }
.course-card__meta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--clr-text-muted); margin-bottom: .75rem;
}
.course-card__title { font-size: 1.2rem; margin-bottom: .5rem; }
.course-card__desc  { font-size: .9rem; color: var(--clr-text-mid); margin-bottom: 1.25rem; }
.course-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--clr-border);
}
.course-card__price {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--clr-text);
}
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-level-beginner    { background: #e8f4ec; color: #2d7a4f; }
.badge-level-intermediate { background: #fef3e2; color: #a86820; }
.badge-level-advanced    { background: #fde8e8; color: #c0392b; }

/* --- Blog cards ------------------------------------------ */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }

.post-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.post-card__image {
  aspect-ratio: 16/9;
  background: var(--clr-bg-muted);
  overflow: hidden;
}
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card__image img { transform: scale(1.03); }

.post-card__body    { padding: 1.25rem 1.5rem 1.5rem; }
.post-card__tags    { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.tag {
  font-size: .72rem; font-weight: 600;
  background: var(--clr-bg-muted);
  color: var(--clr-text-muted);
  padding: .15rem .5rem;
  border-radius: 4px;
  text-transform: capitalize;
}
.tag:hover { background: var(--clr-accent); color: white; }
.post-card__title { font-size: 1.1rem; margin-bottom: .5rem; line-height: 1.35; }
.post-card__title a:hover { color: var(--clr-accent); }
.post-card__excerpt { font-size: .88rem; color: var(--clr-text-mid); margin-bottom: 1rem; }
.post-card__meta    { font-size: .78rem; color: var(--clr-text-muted); }

/* --- Single blog post ------------------------------------ */
.post-header  { padding: clamp(2.5rem, 5vw, 4.5rem) 0 2rem; }
.post-header__meta { font-size: .85rem; color: var(--clr-text-muted); margin-bottom: .75rem; }
.post-header__title { margin-bottom: 1rem; max-width: 820px; }
.post-hero-image {
  width: 100%; max-height: 520px; object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 2.5rem;
}

.post-content { max-width: 720px; margin: 0 auto; padding-bottom: 4rem; }
.post-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-weight: 600; }
.post-content h3 { margin-top: 2rem; margin-bottom: .75rem; }
.post-content p  { font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.4rem; }
.post-content strong { color: var(--clr-text); font-weight: 600; }

.blog-figure { margin: 2rem 0; }
.blog-figure img { border-radius: var(--radius-md); width: 100%; }

/* --- Course single page ---------------------------------- */
.course-hero {
  background: var(--clr-bg-soft);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.course-hero-inner {
  display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start;
}
.course-hero__badge { margin-bottom: 1rem; }
.course-hero__title { margin-bottom: 1rem; font-weight: 600; letter-spacing: -.03em; }
.course-hero__meta  { display: flex; gap: 0; flex-wrap: wrap; font-size: .875rem; color: var(--clr-text-muted); margin-bottom: 1.5rem; }
.course-hero__meta span { padding-right: 1.5rem; margin-right: 1.5rem; border-right: 1px solid var(--clr-border); line-height: 1; }
.course-hero__meta span:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.course-hero__desc  { font-size: 1.05rem; margin-bottom: 0; }

.course-buy-box {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  position: sticky; top: 88px;
  overflow: hidden;
}
.buy-box__body { padding: 1.5rem; }
.buy-box__body p { margin-bottom: 0; color: var(--clr-text-mid); }
.buy-box__price { font-size: 2.4rem; font-weight: 600; font-family: var(--font-sans); margin-bottom: .5rem; letter-spacing: -.025em; color: var(--clr-text); }
.buy-box__includes { margin: .75rem 0 1rem; }
.buy-box__includes li { font-size: .875rem; color: var(--clr-text-mid); margin-bottom: .35rem; list-style: none; padding-left: 1.4rem; position: relative; }
.buy-box__includes li::before { content: '✓'; position: absolute; left: 0; color: var(--clr-success); font-weight: 700; }
.buy-box__guarantee { font-size: .78rem; color: var(--clr-text-muted); text-align: center; margin-top: .75rem; }
.buy-box__thumb { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }

.lesson-list { list-style: none; }
.lesson-item {
  display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.lesson-item:last-child { border-bottom: 0; }
.lesson-num   { font-size: .78rem; color: var(--clr-text-muted); min-width: 28px; }
.lesson-title { flex: 1; font-size: .95rem; }
.lesson-dur   { font-size: .8rem; color: var(--clr-text-muted); }
.lesson-lock  { font-size: .8rem; color: var(--clr-text-muted); }
.lesson-free  { font-size: .72rem; background: #e8f4ec; color: #2d7a4f; padding: .1rem .5rem; border-radius: 4px; font-weight: 600; }
.lesson-desc  { display: block; width: 100%; font-size: .82rem; color: var(--clr-text-muted); margin-top: .25rem; line-height: 1.5; }

/* --- Video player ---------------------------------------- */
.video-embed {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  border-radius: var(--radius-md);
  background: #000;
}
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* --- Forms ----------------------------------------------- */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .875rem; font-weight: 600;
  margin-bottom: .4rem;
  color: var(--clr-text);
}
.form-control {
  width: 100%;
  padding: .75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background: var(--clr-bg);
  color: var(--clr-text);
  transition: border-color .2s;
  outline: none;
}
.form-control:focus { border-color: var(--clr-text); }
.form-hint { font-size: .8rem; color: var(--clr-text-muted); margin-top: .3rem; }
.form-error { font-size: .85rem; color: var(--clr-error); margin-top: .3rem; }

.auth-box {
  max-width: 440px; margin: 4rem auto;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
}
.auth-box h1 { font-size: 1.8rem; margin-bottom: .5rem; }
.auth-box .subtitle { color: var(--clr-text-muted); margin-bottom: 2rem; }

/* --- Flash messages -------------------------------------- */
.flash {
  padding: .9rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: .9rem;
  font-weight: 500;
}
.flash--success { background: #e8f4ec; color: var(--clr-success); border: 1px solid #b8ddc5; }
.flash--error   { background: #fde8e8; color: var(--clr-error);   border: 1px solid #f5c0bc; }
.flash--info    { background: #e8f0fe; color: #1a56db;            border: 1px solid #b4c8f8; }

/* --- Dashboard ------------------------------------------- */
.dashboard-grid {
  display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem;
  padding: 3rem 0;
}
.dashboard-sidebar h3 { font-size: 1rem; margin-bottom: 1rem; }
.dashboard-sidebar a  { display: block; padding: .5rem 0; font-size: .9rem; color: var(--clr-text-mid); border-bottom: 1px solid var(--clr-border); }
.dashboard-sidebar a:hover { color: var(--clr-text); }

.empty-state { text-align: center; padding: 3rem; color: var(--clr-text-muted); }
.empty-state h3 { margin-bottom: .5rem; }

/* --- Footer ---------------------------------------------- */
.site-footer {
  background: var(--clr-text);
  color: #ccc;
  padding: 4rem 0 0;
}
.footer-inner {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand strong { color: white; font-size: 1.1rem; display: block; margin-bottom: .75rem; }
.footer-brand p { font-size: .875rem; color: #999; line-height: 1.7; }

.footer-links { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.footer-links h4 { color: white; font-size: .875rem; margin-bottom: .75rem; }
.footer-links a  { display: block; font-size: .85rem; color: #999; margin-bottom: .4rem; }
.footer-links a:hover { color: var(--clr-accent); }

.footer-bottom { border-top: 1px solid #333; padding: 1.25rem 0; }
.footer-bottom p { font-size: .8rem; color: #666; margin: 0; }

/* --- Misc ------------------------------------------------ */
.divider { border: 0; border-top: 1px solid var(--clr-border); margin: 2rem 0; }
.text-muted { color: var(--clr-text-muted); }
.text-center { text-align: center; }

/* Section title block */
.section-label {
  font-size: .78rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--clr-accent);
  margin-bottom: .75rem;
}
.section-heading { margin-bottom: .75rem; }
.section-sub { font-size: 1.05rem; color: var(--clr-text-mid); max-width: 600px; margin-bottom: 2.5rem; }

/* Download item */
.download-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem; border: 1px solid var(--clr-border); border-radius: var(--radius-sm);
  margin-bottom: .75rem;
}
.download-item__icon { font-size: 1.5rem; }
.download-item__name { flex: 1; font-weight: 500; font-size: .95rem; }
.download-item__size { font-size: .8rem; color: var(--clr-text-muted); }

/* Testimonial */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.testimonial {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}
.testimonial__stars { color: var(--clr-accent); font-size: .9rem; margin-bottom: .75rem; }
.testimonial__text  { font-size: .95rem; font-style: italic; color: var(--clr-text-mid); margin-bottom: 1rem; }
.testimonial__name  { font-size: .85rem; font-weight: 600; color: var(--clr-text); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner         { grid-template-columns: 1fr; }
  .hero-image         { display: none; }
  .course-hero-inner  { grid-template-columns: 1fr; }
  .course-buy-box     { position: static; }
  .footer-inner       { grid-template-columns: 1fr; }
  .dashboard-grid     { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-nav {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 68px; left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--clr-border);
    padding: .5rem var(--gap) .75rem;
    box-shadow: var(--shadow-md);
    align-items: flex-start;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: .55rem 0;
    border-bottom: 1px solid var(--clr-border);
    width: 100%;
    font-size: .95rem;
    text-align: left;
  }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav .nav-cta {
    margin-top: .5rem;
    padding: .5rem 1.25rem;
    align-self: flex-start;
  }
  .nav-toggle    { display: flex; }
  .site-header   { position: relative; }
}

/* --- Pagination ------------------------------------------- */
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .75rem;
  border: 1.5px solid var(--clr-border);
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--clr-text);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.pagination__btn:hover {
  border-color: var(--clr-text);
  background: var(--clr-bg-soft);
}
.pagination__btn--active {
  background: var(--clr-text);
  border-color: var(--clr-text);
  color: #fff;
  pointer-events: none;
}

/* ============================================================
   Mobile — tablet (max 860px)
   ============================================================ */
@media (max-width: 860px) {

  /* Blog listing & search — stack sidebar below content */
  .container [style*="grid-template-columns:1fr 220px"] {
    display: block !important;
  }
  .container [style*="grid-template-columns:1fr 220px"] aside {
    margin-top: 3rem;
  }
  .container [style*="grid-template-columns:1fr 220px"] aside > div {
    position: static !important;
  }

  /* Blog grid — single column */
  .blog-grid {
    grid-template-columns: 1fr !important;
  }

  /* Course grid — single column */
  .courses-grid {
    grid-template-columns: 1fr !important;
  }

  /* Stats grid on admin page */
  .stats {
    grid-template-columns: 1fr !important;
  }

  /* Admin table — make scrollable */
  .admin-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================================
   Mobile — phone (max 600px)
   ============================================================ */
@media (max-width: 600px) {

  /* Tighten section padding */
  .section { padding: 3rem 0 !important; }

  /* Page hero */
  .page-hero { padding: 2.5rem 0; }
  .page-hero h1 { font-size: 2rem; }

  /* Hero CTA buttons — stack vertically */
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }

  /* Auth box — full width with less padding */
  .auth-box {
    padding: 1.75rem 1.25rem;
    border-radius: 8px;
  }

  /* Prev/next nav on blog posts — stack vertically */
  .post-content nav[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Buy box — reduce padding */
  .buy-box { padding: 1.5rem; }

  /* Course hero meta — wrap more aggressively */
  .course-hero__meta { gap: .75rem; }

  /* Lesson list */
  .lesson-item { padding: .75rem 1rem; }

  /* Footer links — single column */
  .footer-links {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  /* Pagination — smaller buttons */
  .pagination__btn {
    min-width: 2rem;
    height: 2rem;
    font-size: .8rem;
    padding: 0 .5rem;
  }

  /* Blog post header — tighten */
  .post-header__title { font-size: 1.8rem; }

  /* Forms — full width buttons */
  .form-group + .btn,
  form .btn-primary[style*="width:100%"] {
    width: 100%;
  }

  /* Search form on sidebar — stack */
  form[action="/blog/search"] {
    flex-direction: column;
  }
  form[action="/blog/search"] input,
  form[action="/blog/search"] button {
    width: 100%;
  }

  /* Course card image — keep aspect ratio on mobile */
  .course-card__image { aspect-ratio: 16/9; height: auto; }

  /* Headings scale down */
  h1 { font-size: clamp(1.7rem, 6vw, 2.5rem); }
  h2 { font-size: clamp(1.3rem, 4vw, 2rem); }
}

/* ============================================================
   Two-column layout utility (blog sidebar pages)
   ============================================================ */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) {
  .layout-with-sidebar {
    display: flex;
    flex-direction: column;
  }
  .layout-with-sidebar aside {
    order: -1;
    width: 100%;
    margin-bottom: 2rem;
  }
  .layout-with-sidebar aside > div {
    position: static !important;
  }
}
