/* ============================================================
   layout.css — Structural Layout Only
   Header, Footer, Main structure, Hero, Grids.
   All other components moved to modular CSS files.
   ============================================================ */

/* ===== 1. HEADER ===== */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border-light);
  height: 80px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
}

.logo img {
  height: 48px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 32px;
}

.site-nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.nav-active {
  color: var(--color-primary);
}

.site-nav a.nav-highlight {
  color: var(--color-accent);
  font-weight: 700;
}

.site-nav a.nav-highlight:hover,
.site-nav a.nav-highlight.nav-active {
  color: var(--color-accent-light);
}

.header-cta {
  display: inline-block;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  padding: 8px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 999;
    gap: 4px;
  }
  .site-nav.open a {
    padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--color-border-light);
  }
  .header-cta {
    display: none;
  }
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }
}


/* ===== 2. HERO ===== */

.hero {
  background: var(--hero-gradient);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  top: -120px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: var(--hero-glow-1);
}

.hero::after {
  bottom: -100px;
  left: 20%;
  width: 400px;
  height: 400px;
  background: var(--hero-glow-2);
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #faf9fc;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #ac328a, #805aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero--split .hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero--centered { text-align: center; }
.hero--compact { padding: 56px 0 48px; }

.hero__sub {
  font-size: 1.08rem;
  color: rgba(250, 249, 252, 0.65);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero__image img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .hero { padding: 3rem 0 2rem; }
  .hero--split .hero__inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; }
}


/* ===== 3. LAYOUT & GRIDS ===== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 40px 0; }
.section.alt { background: var(--color-bg-alt); }

.grid--2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Legacy grid aliases */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin-bottom: 0;
}

.section-sub {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0.6rem auto 0;
  line-height: 1.7;
  text-align: center;
}

/* Steps (Numbered vertical steps) */
.steps {
  max-width: 680px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 23px;
  top: 3.5rem;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.step__num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-teal);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(21, 148, 134, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step__content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.step__content p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .step { padding: 1rem 1.2rem; }
  .step__num { font-size: 1rem; width: 40px; height: 40px; }
  .step:not(:last-child)::after { left: 19px; top: 3rem; }
}

.see-all {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.see-all:hover {
  text-decoration: underline;
}

/* Blog Header (Archive pages) */
.blog-header {
  background: var(--hero-gradient);
  padding: 3rem 0 2.5rem;
  color: #fff;
}

.blog-header__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.5rem;
}

.blog-header__breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.blog-header__breadcrumbs a:hover {
  color: #fff;
}

.blog-header__title-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.blog-header__title {
  font-size: 2.2rem;
  color: #fff;
  margin: 0;
}

.blog-header__count {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

.blog-header__sub {
  margin-top: 0.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
}

/* Video Embed (Responsive Iframe) */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  max-width: 800px;
  margin: 0 auto;
}

.video-embed--wide {
  max-width: 900px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Horizontal scroll container (with fade hint on mobile) ── */
.hscroll-wrap {
  position: relative;
}

.hscroll-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--color-bg));
  pointer-events: none;
  z-index: 1;
  display: none;
}

@media (max-width: 768px) {
  .hscroll-wrap::after {
    display: block;
  }
}

.hscroll-wrap.alt::after {
  background: linear-gradient(to right, transparent, var(--color-bg-alt));
}

.hscroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 24px;
}

.hscroll::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .grid--2, .grid--3,
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 28px 0; }
  .container { padding: 0 16px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}


/* ===== 10. FOOTER ===== */

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-light);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 16px;
  max-width: 240px;
}

.footer-grid h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-grid a {
  display: block;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .site-footer { padding: 40px 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
  .footer-grid h4 { margin-bottom: 12px; font-size: 13px; }
  .footer-grid a { margin-bottom: 8px; font-size: 13px; }
  .footer-bottom { padding-top: 20px; font-size: 12px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}


/* ===== 11. SEARCH PAGE ===== */

.header-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--color-text-secondary);
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.header-search:hover {
  color: var(--color-primary);
  background: var(--color-bg-alt);
  text-decoration: none;
}

.search-hero-form {
  max-width: 600px;
  margin: 1.5rem auto 0;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 16px;
  gap: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.search-input-wrap:focus-within {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.search-input-icon {
  flex-shrink: 0;
  opacity: 0.6;
}

.search-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  font-family: var(--font-body);
  padding: 10px 0;
  min-width: 0;
}

.search-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-input-wrap .btn {
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  font-size: 14px;
}

.search-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border-light);
  margin-top: 2rem;
  margin-bottom: 0;
}

.search-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.search-tab:hover {
  color: var(--color-text);
  text-decoration: none;
}

.search-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.search-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--color-bg-alt);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.search-tab.active .search-tab-count {
  background: rgba(172, 50, 138, 0.1);
  color: var(--color-primary);
}

.search-result-count {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .search-hero-form { margin-top: 1rem; }
  .search-input-wrap { padding: 4px 4px 4px 12px; }
  .search-input-wrap .btn { padding: 8px 16px; font-size: 13px; }
  .search-tab { padding: 10px 14px; font-size: 13px; }
}

@media (max-width: 900px) {
  .header-search { display: flex; }
}
