html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  padding-top: 0;
  display: flex;
  flex-direction: column;
}

.promo-banner {
    height: 3rem;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
}

.heart {
    color: #d00;
}

/* link text styles moved to typography.css */

header {
    position: sticky; /* keep the header visible when it reaches the top */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* ensure it stays above content */
    /* make header semi-transparent so blurred content shows through */
    background: rgba(248, 250, 252, 0.65); /* was var(--body-bg) */
    /* hide shadow initially */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
    transition: box-shadow 240ms ease;
    /* blur the content that scrolls behind the header */
    -webkit-backdrop-filter: blur(8px); /* Safari */
    backdrop-filter: blur(8px);
    /* subtle divider to separate header from content */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 4rem;
}

/* show shadow once the user starts scrolling */
body.scrolled header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-inner {
    max-width: 1152px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand img {
    height: 2rem;
}

nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

nav a {
    margin-left: 16px;
    /* Ensure consistent vertical spacing regardless of font-weight (regular/bold) */
    display: inline-flex; /* prevent line-box metric changes from affecting layout */
    align-items: center;
}

/* hover text styles moved to typography.css */

main {
  max-width: 1152px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  flex: 1 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}


footer {
  flex-shrink: 0;
}

footer .footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

footer .footer-right {
    text-align: right;
}

.material-selector {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.search-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#material-search-input {
    display: inline-block;
    width: auto;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.material-list {
    overflow-y: auto;
}

.material-preview-container {
    flex: 1;
    height: 100%;
}

iframe.material-preview {
    border: 1px solid black;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

nav {

}

/* Active nav link highlight */
header nav a.active,
header nav .btn.active {
    position: relative;
}

header nav a.active::after,
header nav .btn.active::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: -6px; /* sits just under the header content */
    height: 3px;
    border-radius: 2px;
    background: var(--color-accent);
}
