body {
    margin: 0;
    font-family: 'Libre Baskerville', serif;
}

header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: url('images/Header-Background.png') no-repeat center center;
  background-size: cover;
  padding: 10px 0;
  min-height: 100px;
  height: auto;
  border-bottom: 3px solid #bfa14c;
}

.header-container {
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.branding {
  display: flex;
  align-items: center;
}

.logo {
  height: auto;
  width: 50px;
  object-fit: contain;
}

.logo-title {
  font-size: 1.5rem;
  color: #7C6527;
  font-weight: bold;
  margin-left: 10px;
  position: relative;
}

/* Desktop navigation */
.nav-links {
  display: inline-flex;
  gap: 5px;
  padding: 20px;
  list-style: none;
  position: relative;
  margin-right: 20px;
}

.nav-links .nav-item {
  position: relative;
}

.nav-link {
  display: inline-block;
  font-size: 1.2rem;
  text-decoration: none;
  color: #7C6527;
  background-color: #FFF8E7;
  padding: 2px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
}

.nav-link:hover {
  color: #bfa14c;
}

.subnav-links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #FFF8E7;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: fit-content;
  min-width: 100px;
  z-index: 999;
}

.subnav-link {
  display: block;
  padding: 5px 10px;
  text-decoration: none;
  color: #7C6527;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links .nav-item:hover .subnav-links,
.nav-links .nav-item:focus-within .subnav-links {
  display: block;
}

.subnav-link:hover {
  color: #bfa14c;
}

footer {
  background: url('images/footer-background.png') no-repeat center center;
  background-size: cover;
  width: 100%;
  min-height: 450px;
  padding: 20px;
  margin-bottom: 0;
  position: relative;
  bottom: 0;
  box-sizing: border-box;
}

.footer-border {
  background: linear-gradient(
    to bottom,
    #e8d4a3,
    #c7a86d,
    #b8944e
  );
  height: 5px;
  width: 100%;
  position: relative;
}

.footer-container {
  margin: 0 auto;
  color: #5a4303;
}

.footer-left {
  position: relative;
  left: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  width: 270px;
}

.footer-middle {
  position: relative;
  left: 66%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  width: 270px;
}

.footer-right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.contact-links {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.contact-link {
  text-decoration: none;
  color: #5f4809;
  font-weight: bold;
}

.contact-link:hover, .contact-link:focus {
  color: #bfa14c;
  transition: color 0.3s ease;
}

.contact-link:active {
  color: #d4a82b;
  transition: color 0.3s ease;
}

#back-to-top-link { 
  text-decoration: none;
  color: #5f4809;
  font-weight: bold;
}

#back-to-top-link:hover, #back-to-top-link:focus {
  color: #bfa14c;
  transition: color 0.3s ease;
}

#top {
  color: #4e401a; /* gold ink */
  width: 100%;
  min-height: 100vh; /* fills the whole screen */
  background: url('images/portfolio-main-background.png') no-repeat center center;
  background-size: cover; /* fills the area, even if cropped */
  padding-top: 120px; /* pushes content below sticky header */
  padding-bottom: 60px; /* ensures no gap at the bottom */
  padding-left: 20px;
  box-sizing: border-box;
}

.title {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #7C6527
}

.content {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #7C6527;
}
.section-content {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4e401a;
}

.hero-content {
  text-align: center;
}

#royal-crest {
  width: 120px;
  height: 200px;
  background: url('images/Ariselle-royal-crest.png') no-repeat center center;
  background-size: contain;
  margin-top: 60px;
  margin-bottom: 20px;
  margin-left: 20px;
  filter: brightness(1.8), saturate(0.2);
  opacity: 0.7;
  box-shadow: inset 0 0 10px rgba(255,255,255,0.7), 0 4px 10px rgba(0,0,0,0.15);
  pointer-events: none;
  border-radius: 10px;
}

.store-link {
  display: inline-block;
  padding: 12px 18px;
  background-color: #bfa14c;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.store-link:hover, .store-link:focus {
  background-color: #FFF8E7;
  color: #4e401a;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  border: 1px solid #bfa14c;
}

.store-link:active {
  background-color: #d4a82b;
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  border: 1px solid #bfa14c;
  transform: translateY(2px);
}

/* Mobile navigation adjustments */
@media (max-width: 768px) {
  header {
    padding: 12px 0;
    height: auto;
    background-position: top center;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    padding: 0 16px;
  }

  .branding {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .logo {
    width: 44px;
  }

  .logo-title {
    font-size: 1.25rem;
    margin-left: 10px;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    gap: 8px;
    margin-right: 0;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-item {
    width: auto;
    position: relative;
  }

  .nav-link {
    display: inline-flex;
    width: auto;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .subnav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FFF8E7;
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    min-width: 180px;
    z-index: 999;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }

  .subnav-link {
    display: block;
    padding: 10px 14px;
    color: #7C6527;
    background-color: transparent;
    border-radius: 0;
  }

  .nav-links .nav-item:hover .subnav-links,
  .nav-links .nav-item:focus-within .subnav-links {
    display: block;
  }

  .footer {
    min-height: auto;
    height: auto;
    background-size: cover;
    padding: 32px 16px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
  }

  .footer-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .footer-left,
  .footer-middle,
  .footer-right {
    width: 100%;
    left: 0;
    transform: none;
    align-items: flex-start;
  }

  .contact-links {
    flex-wrap: wrap;
    gap: 8px;
  }

  #top {
    min-height: 100vh;
    background-size: cover;
    box-sizing: border-box;
    padding-right: 16px;
    width: 100%;
  }

  .title {
    font-size: 2rem;
    margin-bottom: 18px;
  }

  .content,
  .section-content {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.6rem;
    margin-bottom: 16px;
  }

  .hero-content {
    text-align: left;
  }

  .projects-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .projects-container .project-card, .finished-projects .project-card, .work-in-progress-projects .project-card {
    max-width: 450px;
    width: 90%;
    margin: 0 auto;
    background-color: rgba(255, 248, 231, 0.8);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
  }

  .project-title {
    font-size: 1.15rem;
    margin-top: 12px;
  }

  .project-card .project-image {
    max-width: 400px;
    width: 95%;
    height: auto;
    border-radius: 14px;
    margin: 15px;
  }

  .project-summary {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .project-card .project-divider {
    margin: 16px 0;
    border: none;
    border-top: 2px solid #bfa14c;
    max-width: 400px;
    width: 95%;
  }

  .store-link,
  .contact-link {
    display: inline-block;
    padding: 12px 18px;
    margin-top: 12px;
  }

  #royal-crest {
    width: 100px;
    height: 170px;
    margin: 32px auto 0;
  }

  .back-to-top {
    width: fit-content;
    text-align: left;
    background-color: antiquewhite;
    padding: 12px;;
    border-radius: 12px;
    margin: 0 auto;
  }

  #facebook {
    background-color:#FFF8E7;
    border-radius: 12px;
  }
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.project-image {
  width: 500px;
  height: auto;
  border-radius: 14px;
  margin-top: 15px;
}

.project-card {
  width: 550px;
  margin: 20px auto;
  background-color: rgba(255, 248, 231, 0.8);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.project-title {
  font-size: 1.5rem;
  margin-top: 15px;
  color: #7C6527;
}

.project-summary {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4e401a;
  margin-top: 10px;
}

.project-divider {
  margin: 20px 0;
  border: none;
  border-top: 2px solid #bfa14c;
}

.template-screenshot, .template-card-screenshot {
  width: 500px;
  height: auto;
  border-radius: 14px;
  margin-top: 15px;
}

.template-card {
  background-color: #fdfaf2;
  margin: 30px auto;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.template-card-title {
  font-size: 1.5rem;
  margin-top: 15px;
  color: #7C6527;
}

.template-card-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4e401a;
  margin-top: 10px;
}

.template-card-link {
  display: inline-block;
  width: fit-content;
  margin-top: 15px;
  padding: 12px 18px;
  background-color: #bfa14c;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.template-card-link:hover, .template-card-link:focus {
  background-color: #FFF8E7;
  color: #4e401a;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.template-card-link:active {
  background-color: #d4a82b;
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  border: 1px solid #bfa14c;
  transform: translateY(2px);
}

.main-title {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #7C6527;
  text-align: center;
}

.main-description {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: #4e401a;
  text-align: center;
}

.template-section {
  margin-bottom: 40px;
}

.template-features {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4e401a;
  margin-top: 10px;
  list-style: circle;
  padding-left: 20px;
}

.price-card {
  background-color: #fdfaf2;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.price-card .features {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4e401a;
  margin-top: 10px;
  list-style: circle;
  padding-left: 20px;
}

.price-card .add-to-cart {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 18px;
  background-color: #bfa14c;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: none;
  cursor: pointer;
}

.price-card .add-to-cart:hover, .price-card .add-to-cart:focus {
  background-color: #FFF8E7;
  color: #4e401a;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  border: 1px solid #bfa14c;
}

.price-card .add-to-cart:active {
  background-color: #d4a82b;
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  border: 1px solid #bfa14c;
  transform: translateY(2px);
}

.remove-item {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  background-color: #daa412;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: none;
  cursor: pointer;
}

.remove-item:hover, .remove-item:focus {
  background-color: #FFF8E7;
  color: #4e401a;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  border: 1px solid #daa412;
}

.remove-item:active {
  background-color: #d4a82b;
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  border: 1px solid #daa412;
  transform: translateY(2px);
}

.checkout-button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 18px;
  background-color: #bfa14c;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: none;
}

.checkout-button:hover, .checkout-button:focus {
  background-color: #FFF8E7;
  color: #4e401a;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  border: 1px solid #bfa14c;
}

.checkout-button:active {
  background-color: #d4a82b;
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  border: 1px solid #bfa14c;
  transform: translateY(2px);
}

.checkout-link {
  color: inherit;
  text-decoration: none;
}

.cta-button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 18px;
  background-color: #bfa14c;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover, .cta-button:focus {
  background-color: #FFF8E7;
  color: #4e401a;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  border: 1px solid #bfa14c;
}

.cta-button:active {
  background-color: #d4a82b;
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  border: 1px solid #bfa14c;
  transform: translateY(2px);
}