/* Combined practice: structure, box model, units, Flexbox, Grid, overflow,
   typography, backgrounds, pseudo-classes, positioning, and stacking. */

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 1.5rem 1.5rem 5rem;
  background: #f2f4f1;
  color: #1d2520;
  font-family: "Outfit", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 400;
}

a {
  color: #145c38;
}

a:visited {
  color: #65417a;
}

a:hover {
  color: #8a4215;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  box-shadow: 0 0 0 3px #f3b35b;
}

.page {
  width: 92vw;
  max-width: 72rem;
  min-width: 17.5rem;
  margin: 0 auto;
}

.site-nav {
  margin: 0 0 1.5rem;
  padding: 0.75rem;
  background: #dce7df;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid #aebdb2;
  border-radius: 0.75rem;
}

.site-nav a {
  padding: 0.6em 1em;
  background: #ffffff;
  border: 1px solid #8da193;
  border-radius: 999px;
  color: #173d29;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  background: #173d29;
  color: #ffffff;
}

.site-nav a[aria-current="page"] {
  background: #9a4f18;
  border-color: #76370c;
  color: #ffffff;
}

.page-header {
  min-height: 9rem;
  margin: 0 0 1.5rem;
  padding: 2rem;
  background: #173d29;
  border: 2px solid #0c2718;
  border-radius: 1rem;
  color: #ffffff;
  text-align: center;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.25rem;
}

.page-header p {
  max-width: 48rem;
  margin: 0 auto;
  color: #d8e8dc;
}

.lesson-note,
.content-panel,
.content-panel-alt {
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #c8d2ca;
  border-radius: 0.875rem;
}

.content-panel-alt {
  background: #e4ece6;
}

.page-footer {
  margin: 0;
  padding: 1rem 1.25rem;
  background: #dce7df;
  border: 1px solid #aebdb2;
  border-radius: 0.875rem;
  color: #34483b;
  font-size: 0.875rem;
  text-align: center;
}

.page-footer p {
  margin: 0;
}

.lesson-note h2,
.content-panel h2,
.content-panel-alt h2 {
  margin: 0 0 0.5rem;
  color: #173d29;
  font-size: 1.25rem;
}

.lesson-note p,
.content-panel p,
.content-panel-alt p {
  margin: 0 0 0.75rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem;
}

.tag {
  padding: 0.45em 0.8em;
  background: #dce7df;
  border: 1px solid #aebdb2;
  border-radius: 999px;
  color: #173d29;
  font-size: 0.8125rem;
  font-weight: 700;
}

.card-grid {
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.product-card {
  flex: 1 1 14rem;
  min-width: 14rem;
  max-width: 22rem;
  min-height: 27rem;
  padding: 1rem;
  background: #ffffff;
  position: relative;
  border: 1px solid #bcc9bf;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(25, 44, 31, 0.12);
}

.product-card:hover {
  border-color: #9a4f18;
  box-shadow: 0 7px 18px rgba(25, 44, 31, 0.2);
}

.product-card:first-child {
  border-width: 2px;
}

.product-card:nth-child(2) {
  background: #173d29;
  color: #ffffff;
}

.product-card:nth-child(2) h2,
.product-card:nth-child(2) p,
.product-card:nth-child(2) li {
  color: #ffffff;
}

.product-badge {
  padding: 0.45rem 0.7rem;
  background: #f3b35b;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  border: 1px solid #76370c;
  border-radius: 999px;
  color: #3b1d08;
  font-size: 0.8125rem;
  font-weight: 700;
}

.card-image {
  width: 100%;
  height: 11rem;
  margin: 0 0 1rem;
  display: block;
  border-radius: 0.75rem;
  object-fit: cover;
}

.product-card h2 {
  margin: 0 0 0.4rem;
  color: #173d29;
  font-size: 1.25rem;
}

.product-summary {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-card ul {
  min-height: 5rem;
  margin: 0 0 1rem;
  padding: 0 0 0 1.25rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-actions button {
  min-width: 10rem;
  flex: 1 1 12rem;
}

button {
  min-height: 2.75rem;
  padding: 0.65em 1.1em;
  background: #9a4f18;
  border: 1px solid #76370c;
  border-radius: 999px;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
}

button:hover {
  background: #76370c;
}

button:active {
  background: #512405;
}

button.secondary {
  background: #e3e9e4;
  border-color: #9eaea2;
  color: #173d29;
}

button.secondary:hover {
  background: #ccd8cf;
}

.form-card {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto 1.25rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #bcc9bf;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(25, 44, 31, 0.12);
}

.form-row {
  margin: 0 0 1rem;
}

label {
  margin: 0 0 0.4rem;
  display: block;
  color: #173d29;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.8rem;
  background: #f8faf8;
  border: 1px solid #8fa092;
  border-radius: 0.5rem;
  color: #1d2520;
  font: inherit;
}

input:focus {
  background: #fff8e9;
  border-color: #9a4f18;
}

.check-row {
  display: flex;
  justify-content: flex-start;
  gap: 0.6rem;
}

.check-row label {
  margin: 0;
}

.terms {
  height: 10rem;
  margin: 0 0 1rem;
  padding: 1rem;
  background: #f8faf8;
  overflow: auto;
  border: 1px solid #aebdb2;
  border-radius: 0.5rem;
}

.terms p {
  margin: 0 0 0.75rem;
}

.form-help {
  color: #546258;
  font-size: 0.875rem;
}

.hero {
  min-height: 42vh;
  min-height: 42dvh;
  margin: 0 0 1.5rem;
  background: #173d29 url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=80") center center no-repeat;
  background-size: cover;
  border-radius: 1rem;
  overflow: hidden;
}

.hero-overlay {
  min-height: 42vh;
  min-height: 42dvh;
  padding: 3rem 2rem;
  background: rgba(12, 27, 18, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.75rem;
  text-shadow: 0 2px 5px #000000;
}

.hero p {
  max-width: 42rem;
  margin: 0;
  color: #eef6f0;
  font-size: 1.125rem;
}

.article-layout {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
}

.article-body {
  flex: 2 1 32rem;
  min-width: 18rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #c8d2ca;
  border-radius: 0.875rem;
  font-family: Georgia, "Times New Roman", serif;
}

.article-body h2 {
  color: #173d29;
  font-family: "Outfit", Arial, Helvetica, sans-serif;
}

.article-body p {
  line-height: 1.6;
}

.article-aside {
  flex: 1 1 15rem;
  min-width: 14rem;
  padding: 1rem;
  background: #e4ece6;
  position: sticky;
  top: 5.5rem;
  align-self: flex-start;
  z-index: 5;
  border: 1px solid #b8c6bb;
  border-radius: 0.875rem;
}

.avatar {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 0.75rem;
  display: block;
  border: 3px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
}

.resource-list {
  margin: 1rem 0 0;
  padding: 0;
}

.resource-list li {
  padding: 0.75rem;
  list-style-position: inside;
}

.resource-list li:first-child {
  font-weight: 700;
}

.resource-list li:nth-child(odd) {
  background: #ffffff;
}

.resource-list li:nth-child(even) {
  background: #dce7df;
}

.accent {
  color: #b65b18;
  font-weight: 700;
}

.sticky-nav {
  position: sticky;
  top: 0.5rem;
  z-index: 10;
}

.fixed-utility {
  padding: 0.7rem 1rem;
  background: #9a4f18;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(25, 44, 31, 0.2);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.fixed-utility:visited {
  color: #ffffff;
}

.fixed-utility:hover {
  background: #76370c;
  color: #ffffff;
}

.event-hero {
  min-height: 24rem;
  margin: 0 0 1.5rem;
  background: #173d29 url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=80") center center no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.event-shape {
  width: 16rem;
  height: 16rem;
  background: #9a4f18;
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  z-index: 1;
  border-radius: 50%;
}

.event-overlay {
  min-height: 24rem;
  padding: 4rem 2rem;
  background: rgba(12, 27, 18, 0.72);
  position: relative;
  z-index: 2;
  color: #ffffff;
  text-align: center;
}

.event-overlay h1 {
  margin: 3rem 0 0.75rem;
  font-size: 2.75rem;
}

.event-overlay p {
  max-width: 42rem;
  margin: 0 auto;
}

.event-date {
  padding: 0.65rem 0.9rem;
  background: #f3b35b;
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 3;
  border: 2px solid #ffffff;
  border-radius: 0.75rem;
  color: #3b1d08;
  font-weight: 700;
}

.schedule-nav {
  margin: 0 0 1.25rem;
  padding: 0.75rem;
  background: #173d29;
  position: sticky;
  top: 0.5rem;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid #0c2718;
  border-radius: 0.75rem;
}

.schedule-nav a {
  padding: 0.55rem 0.8rem;
  flex: 1 1 9rem;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
}

.schedule {
  margin: 0 0 1.25rem;
}

.schedule-card {
  min-height: 12rem;
  margin: 0 0 1rem;
  padding: 2.5rem 1.25rem 1.25rem;
  background: #ffffff;
  position: relative;
  border: 1px solid #c8d2ca;
  border-radius: 0.875rem;
}

.schedule-card h2 {
  margin: 0 0 0.5rem;
  color: #173d29;
}

.time-badge {
  padding: 0.4rem 0.65rem;
  background: #dce7df;
  position: absolute;
  top: 0.75rem;
  left: 1.25rem;
  z-index: 2;
  border: 1px solid #8da193;
  border-radius: 999px;
  color: #173d29;
  font-weight: 700;
}

/* Projects 5–6: CSS Grid structure with Advanced Flexbox components */

.dashboard-grid {
  margin: 0 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  grid-template-rows: auto;
  gap: 1rem;
  align-items: stretch;
}

.dashboard-card {
  min-width: 0;
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #bcc9bf;
  border-radius: 0.875rem;
  box-shadow: 0 4px 12px rgba(25, 44, 31, 0.1);
}

.dashboard-card-wide {
  grid-column: 1 / -1;
}

.dashboard-card h2,
.dashboard-card h3 {
  margin: 0 0 0.75rem;
  color: #173d29;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.metric {
  min-width: 7rem;
  padding: 0.75rem;
  flex: 1 1 7rem;
  background: #e4ece6;
  border-radius: 0.65rem;
  text-align: center;
}

.metric strong {
  display: block;
  color: #9a4f18;
  font-size: 1.75rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: 5rem minmax(9rem, 1fr);
  grid-template-areas:
    "avatar name"
    "avatar role";
  gap: 0.35rem 1rem;
  align-items: center;
}

.profile-grid img {
  width: 5rem;
  height: 5rem;
  grid-area: avatar;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  grid-area: name;
  font-weight: 700;
}

.profile-role {
  grid-area: role;
  color: #546258;
}

.task-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.task-list li {
  padding: 0.75rem;
  background: #f3f7f4;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid #d3ddd5;
  border-radius: 0.5rem;
  list-style: none;
}

.library-toolbar {
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.library-toolbar a {
  padding: 0.55rem 0.9rem;
  flex: 1 1 8rem;
  background: #ffffff;
  border: 1px solid #8da193;
  border-radius: 999px;
  color: #173d29;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.library-grid {
  margin: 0 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.resource-card {
  min-width: 0;
  padding: 1.25rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  border: 1px solid #bcc9bf;
  border-radius: 0.875rem;
}

.resource-card-featured {
  grid-column: 1 / -1;
  background: #173d29;
  color: #ffffff;
}

.resource-card h2 {
  margin: 0 0 0.5rem;
  color: #173d29;
}

.resource-card-featured h2 {
  color: #ffffff;
}

.resource-card p {
  margin: 0 0 1rem;
}

.resource-meta {
  margin: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.resource-kind {
  padding: 0.35rem 0.65rem;
  background: #dce7df;
  border-radius: 999px;
  color: #173d29;
  font-size: 0.8125rem;
  font-weight: 700;
}

.resource-card-featured .resource-kind {
  background: #f3b35b;
  color: #3b1d08;
}

.dashboard-card,
.resource-card {
  position: relative;
  overflow: hidden;
}

.dashboard-card::before,
.resource-card::before {
  content: "";
  width: 100%;
  height: 0.35rem;
  background: #9a4f18;
  position: absolute;
  top: 0;
  left: 0;
}

.resource-card-featured::before {
  background: #f3b35b;
}

@media (max-width: 40rem) {
  .site-nav {
    flex-direction: column;
  }

  .site-nav a {
    width: 100%;
    text-align: center;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .library-toolbar a {
    flex-basis: 100%;
  }

  .profile-grid {
    grid-template-columns: 4rem minmax(8rem, 1fr);
  }

  .profile-grid img {
    width: 4rem;
    height: 4rem;
    max-width: 100%;
  }
}
