* {
  font-family: "Inter", sans-serif;
}


html {
  scroll-padding-top: 70px; /* height of fixed navbar */
  scroll-behavior: smooth; /* for smooth scrolling */
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  min-height: 100%;
  overscroll-behavior-y: none; /* optional but helpful */
  touch-action: pan-y; 
}

/* TEXT SIZES */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "EB Garamond", serif;
}

.name {
  font-family: "EB Garamond", serif;
}

body,
p,
a,
li {
  font-family: "Inter", sans-serif;
}

/* NAV BAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  /* Soft lifted paper shadow */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

  /* jagged bottom edge with clip-path */
  clip-path: polygon(
    0 0,
    100% 0,
    100% 85%,
    98% 88%,
    95% 84%,
    90% 88%,
    85% 83%,
    80% 88%,
    75% 85%,
    70% 88%,
    65% 84%,
    60% 88%,
    55% 83%,
    50% 88%,
    45% 85%,
    40% 88%,
    35% 83%,
    30% 88%,
    25% 85%,
    20% 88%,
    15% 83%,
    10% 88%,
    5% 85%,
    0 88%
  );
}

.nav-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

/* nav groups */
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: flex-end;
}

.nav-left {
  justify-content: flex-end;
}

.nav-right {
  justify-content: flex-start;
}

/* centered logo */
.nav-logo {
  display: flex;
  justify-content: center;
  margin-left: 2.5rem;
  margin-right: 2.5rem;
}

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

.logo:hover {
  transform: scale(1.05);
}

/* links */
.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0.5rem;
  transition: color 0.3s;
  cursor: pointer;
  transition: color 0.3s ease-in-out, font-weight 0.3s ease-in-out;
}

.nav-link:hover {
  color: #6b2aa5;
  font-weight: bolder;
}

.nav-link.current {
  color: #6b2aa5;
  border-bottom: 2px solid #6b2aa5;
  transition: all 0.3s ease;
}

/* contact button */
.contact-button {
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: bold;
  background: #6b2aa5;
  color: white;
  transition: background 0.3s;
}

.contact-button:hover {
  background: #541d82;
}

.contact-page {
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  background: #6b2aa5;
  color: white;
}
.contact-page-mobile {
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  background: #6b2aa5;
  color: white;
}

.contact-page:hover {
  background: #541d82;
}

.contact-page:hover .mobile-nav-btn,
.mobile-nav {
  display: none;
}

#message {
  font-family: "Inter", sans-serif;
}

/* ======= MOBILE NAV BUTTON ======= */
@media (max-width: 768px) {
  .navbar {
    display: none;
  }

  .mobile-nav-btn {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    z-index: 9987 !important;

    display: block;
    overflow: visible;
  }

  .mobile-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  }

  .mobile-nav-btn .bar {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    transform-origin: center;
    transform: translate(-50%, -10px); /* initial top/middle/bottom spacing */
  }

  /* Middle bar */
  .mobile-nav-btn .middle {
    transform: translate(-50%, -0px);
  }

  /* Bottom bar */
  .mobile-nav-btn .bottom {
    transform: translate(-50%, 10px);
  }

  /* Animate to X */
  .mobile-nav-btn.open .top {
    transform: translate(-50%, 0) rotate(45deg);
  }

  .mobile-nav-btn.open .middle {
    opacity: 0;
  }

  .mobile-nav-btn.open .bottom {
    transform: translate(-50%, 0) rotate(-45deg);
  }

  /* ======= MOBILE NAV MENU ======= */
  .mobile-nav {
    position: fixed;
    top: 0;
    right: -100%; /* start off-screen */
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    transition: right 0.5s ease;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-nav.open {
    right: 0; /* slide in */
  }

  .mobile-nav-content {
    text-align: center;
  }

  .mobile-logo img {
    width: 150px;
    height: auto;
    margin-bottom: 1rem;
  }
  .mobile-logo:hover {
    transform: scale(1.05);
  }
  .mobile-links .nav-link,
  .mobile-links .contact-button {
    display: block;
    margin: 1rem 0;
    font-size: 1.5rem;
  }

  .contact-page-mobile {
    display: block;
    margin: 1rem 0;
    font-size: 1.5rem;
  }

  .mobile-links .contact-button {
    background-color: #6b2aa5;
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 0.75rem;
  }

  .contact-page-mobile {
    background-color: #6b2aa5;
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 0.75rem;
  }

  .mobile-links .contact-button:hover {
    background-color: #fff;
    color: #6b2aa5;
    border: 2px solid #541d82;
    cursor: pointer;
  }

  .contact-page-mobile:hover {
    background-color: #fff;
    color: #6b2aa5;
    border: 2px solid #541d82;
    cursor: pointer;
  }

  /* Tap feedback for mobile */
  #mobile-nav .contact-button:active,
  .learn-more:active {
    transform: scale(0.98);
    opacity: 0.8;
    transition: 0.2s;
  }

  .contact-page-mobile:active {
    transform: scale(0.98);
    opacity: 0.8;
    transition: 0.2s;
  }

  /* Disable scroll when open */
  body.nav-open {
    overflow: hidden;
    height: 100%;
  }
}

/* ==== HOMEPAGE ====*/
/* Hero container */
.hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 1400px;
  margin: 2rem auto 1rem;
  padding: 0 2rem;
  flex-wrap: wrap;
  position: relative;
}

/* Image container */
.parallax-container {
  position: relative;
  width: 65%;
  max-width: 800px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-2rem);
}

/* Image layers */
.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.parallax-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Hero text */
.hero-text {
  width: 30%;
  color: #222;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  margin-left: -5rem;
  cursor: default;
}

/* Header and paragraph styling */
.hero-text h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  margin: 0;
}
.hero-text p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* CTA Buttons */
.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  align-items: center; 
}
.hero-cta a {
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  border-radius: 6px;
  transition: 0.3s ease;
}

.hero-cta .learn-more {
  background: none !important;
  color: #6b2aa5 !important;
  text-decoration: none !important;
  border: 2px solid transparent !important;
  transition: border-color 0.3s ease-in-out !important;
}

.hero-cta .learn-more:hover,
.hero-cta .learn-more:focus {
  color: #541d82 !important;
  border-color: #6b2aa5 !important;
  outline: none;
}


/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 6rem;
  font-size: 2rem;
  animation: bounce 2s infinite;
  color: #6b2aa5;
  z-index: 10;
  pointer-events: none;
}

/* Bounce animation */
@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/*  responsiveness */
@media (max-width: 1030px) {
  .hero {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    align-items: center;
  }
  .parallax-container,
  .hero-text {
    width: 100%;
    max-width: 80%;
    transform: none;
  }
  .hero-text {
    padding: -2rem 1rem;
    margin-bottom: 5rem;
    width: 80%;
    margin-left: 0;
    position: relative; /* ensure z-index works */
    z-index: 10;
  }
  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-cta {
    justify-content: center;
  }

  /* Move scroll indicator between image and text */
  .scroll-indicator {
    position: static;
    transform: none;
    margin: -8.5rem 0 0.5rem;
  }
}
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    align-items: center;
    margin-top: 0rem;
  }

  .parallax-container,
  .hero-text {
    width: 100%;
    max-width: 100%;
    transform: none;
  }

  .hero-text {
    padding: -2rem 1rem;
    margin-bottom: 3rem;
    width: 80%;
    margin-left: 0;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-cta {
    justify-content: center;
  }

  /* Move scroll indicator between image and text */
  .scroll-indicator {
    position: static;
    transform: none;
    margin: -8.5rem 0 0.5rem;
    pointer-events: none; /* allow clicks to pass through */
  }
}
@media (max-width: 666px) {
  .scroll-indicator {
    position: static;
    transform: none;
    margin: -4rem 0 0.5rem;
    pointer-events: none; /* allow clicks to pass through */
  }
}
/* ==== Features Section ==== */
.features-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Float-in animation */
@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Background-wrapped features only */
.features-and-blog-wrapper {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: -8rem;
  background-image: url("images/paper-background.png");
  background-repeat: repeat-x;
  background-position: top center;
  background-size: auto 100%;
  border-radius: 12px;

  padding: 5rem 2rem 5rem;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;

  z-index: 1;

  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.features-and-blog-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
  animation: floatIn 0.8s ease forwards;
}

/* Feature buttons layout */
.features {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 0;
  flex-wrap: nowrap;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  width: 100%;
  max-width: 1000px;
  box-sizing: border-box;
  z-index: 2;
}

.features.visible {
  opacity: 1;
  transform: translateY(0);
}

.features > * {
  max-width: 320px;
  flex: 1 1 280px;
  box-sizing: border-box;
  width: 100%;
}

.feature-heading {
  margin-top: 2rem;
  margin-bottom: -1rem;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.1em;
}

/* Individual Feature Box */
.feature-box {
  outline: none;
  border: none;
  text-decoration: none;
  padding: 1rem;
  position: relative;
  box-sizing: border-box;
  margin-top: 0;
}

.feature-box img {
  border: none;
  display: block;
  width: 100%;
  height: auto;
}

/* 3D Hover Styles */
.image-hover-wrapper {
  position: relative;
  perspective: 1000px;
  width: 300px;
  max-width: 100%;
  overflow: visible;
}

.image-hover-wrapper img {
  width: 300px;
  height: auto;
  display: block;
  max-width: 100%;
}

.shadow-img {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 100%;
  height: auto;
  z-index: 1;
  pointer-events: none;
  transition: transform 0.1s ease;
}

.base-img,
.hover-img {
  position: relative;
  width: 100%;
  height: auto;
  transition: transform 0.1s ease;
  z-index: 2;
}
.base-img,
.hover-img,
.shadow-img {
  transform-origin: top center;
}

.hover-img {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.1s ease;
}

.feature-box:hover .hover-img {
  opacity: 1;
}

.feature-box:hover .shadow-img {
  transform: translate(4px, 4px);
}

.feature-box:hover .base-img {
  transform: translate(-2px, -2px);
}

.feature-box:focus-visible {
  outline: 2px solid #00f;
  outline-offset: 4px;
}

/* Blog Button (separate section) */
.blog-button-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: center;
  margin: -3rem auto 2rem; /* space between features and button */
  padding: 0 0.5rem;
  box-sizing: border-box;
}

.blogs-button {
  width: 100%;
  max-width: 960px;
  height: auto;
  cursor: pointer;
  user-select: none;
  display: block;
  transition: transform 0.3s ease;
}

/* Responsive */
@media (max-width: 1030px) {
  .features-and-blog-wrapper {
    padding: 10rem 1rem 10rem;
    gap: 1.5rem;
  }
  .features {
    gap: 0.05rem;
  }
  
}
@media (max-width: 930px) {
  .features-and-blog-wrapper {
    padding: 10rem 1rem 10rem;
    gap: 1.5rem;
  }

  .features {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .features > * {
    max-width: 320px;
    flex: none;
  }

  .blog-button-wrapper {
    margin: -2rem auto 3rem;
  }

  .blogs-button {
    max-width: 1000px;
  }
  


}

/* CONTACT FORM */
.contact-section {
  position: relative;
  padding: 2rem;
  margin-top: -2rem;
  box-sizing: border-box;
  cursor: default;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: calc(-10rem + 5vh);
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  pointer-events: none;
  z-index: 1.5;
}

.background-contact-img {
  position: absolute;
  top: calc(-9rem + 5vh);
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  display: flex;
  justify-content: center;
  align-items: center;
}

.background-contact-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;    /* fills section without stretching */
  object-position: center center; /* center the image */
  display: block;
}

/* Grid row */
.contact-content {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 520px);
  gap: 1rem; /* tighten space between image & form */
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem; /* keep content from touching viewport edge */
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

/* Fade in triggered with JS */
.contact-section.fade-in::before {
  opacity: 1;
}

.contact-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-heading.visible,
.contact-image.visible,
.contact-right.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1s ease, transform 1s ease;
}

/* IMAGE */
.contact-image {
  position: relative; /* tooltip positions relative to this */
  display: flex;
  justify-content: center;
  align-items: center;
  left: -50px;
}

/* Make the image fill that left column and be able to get big */
.contact-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 900px; /* upper visual cap on very wide screens */
  object-fit: contain;
}

.contact-image:hover {
  cursor: help;
}

/* TOOLTIP (attached to the image) */
.contact-image .contact-tooltip,
#contactTooltip {
  position: absolute;
  bottom: calc(100% + 12px); /* 12px gap above the image */
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  background: #fff;
  color: #333;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  max-width: min(240px, 80vw);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 30;
}

#contactTooltip {
  margin-bottom: -2rem;
  font-family: "Inter", sans-serif;
}

#contactTooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 7px 0 7px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.06));
}

/* FORM COLUMN */
.contact-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
 
}

/* KEEP HEADING & SUBHEADING centered in the form */
.contact-heading,
.contact-subheading {
  text-align: center;
}

.contact-heading {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: -1rem;
}
.contact-subheading {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1rem;
}

/* FORM STYLING (match the thank-you look) */
.contact-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  padding: 1.8rem;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: center;
}

.contact-form:hover,
.contact-form:focus-within {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  cursor: default;
}

/* Labels left aligned inside the centered box */
.contact-form label {
  text-align: left;
  font-weight: 600;
}

/* Inputs */
.contact-form input,
.contact-form textarea {
  padding: 0.65rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #d6d6d6;
  width: 100%;
  box-sizing: border-box;
}

/* Button */
.btn-send {
  align-self: center;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  border: none;
  background: #6b2aa5;
  color: #fff;
  cursor: pointer;
  transition: all 0.22s ease;
}

.btn-send:hover {
  background: #fff;
  color: #6b2aa5;
  border: 2px solid #541d82;
  font-weight: 600;
}

/* ========== Success Message ========== */
.thank-you {
  animation: fadeIn 0.5s ease forwards;
}

#thankYouMessage {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  text-align: center;
  animation: fadeIn 0.5s ease forwards;
  max-width: 500px;
  margin: 0 auto;
}

#thankYouMessage:hover,
#thankYouMessage:focus-within {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

#thankYouMessage h2 {
  margin-bottom: 0.5rem;
}

#thankYouMessage p {
  color: #555;
}

.hidden {
  display: none;
}

/* small fade animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll animation helper */
.contact-image,
.contact-right {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.55s ease;
}
.contact-image.visible,
.contact-right.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Desktop & large screens & Mobile */
@media (max-width: 1100px) {
  .contact-section::before {
    background-size: cover;
    background-position: center center;
    top: calc(-7rem + 5vh);
    height: 400px;
  }
  .background-contact-img {
  position: absolute;
  top: calc(-8rem + 5vh);
  left: 0;
  right: 0;
  width: 100%;
  height: 80%;
  z-index: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  display: flex;
  justify-content: center;
  align-items: center;
}

.background-contact-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;    /* fills section without stretching */
  object-position: center center; /* center the image */
  display: block;
}
}
@media (max-width: 930px) {
  .contact-section::before {
    background-size: cover;
    background-position: center center;
    top: calc(-13rem + 5vh);
    height: 400px;
  }
  .contact-content {
    grid-template-columns: 1fr; /* stack */
    gap: 1.25rem;
    margin-top: -5.5rem;
  }
  .contact-image {
    left: 0;
  }
  .contact-image img {
    max-width: 420px;
  }
  .contact-form {
    padding: 1.25rem;
  }
  #contactTooltip {
    font-size: 13px;
    padding: 8px 12px;
  }
  .background-contact-img {
  position: absolute;
  top: calc(-14rem + 5vh);
  left: 0;
  right: 0;
  width: 100%;
  height: 40%;
  z-index: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  display: flex;
  justify-content: center;
  align-items: center;
  }

  .background-contact-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* fills section without stretching */
    object-position: center center; /* center the image */
    display: block;
  }
}

.newsletter-section,
.footer {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.newsletter-section.visible,
.footer.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==== NEWSLETTER ==== */
.newsletter-section {
  width: 90vw;
  max-width: 900px;
  margin: 2rem auto 4rem;
  box-sizing: border-box;
  margin-bottom: 1rem;
}

/* Post-it style box */
.newsletter-box {
  position: relative;
  background-color: #ebd5c5;
  border-radius: 12px;
  padding: 2.5rem 3rem;
  box-sizing: border-box;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-box:hover,
.newsletter-box:focus-within {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  cursor: default;
}

/* Texture overlay */
.texture-overlay {
  position: absolute;
  inset: 0;
  background-image: url("images/paper-texture.jpg");
  background-repeat: repeat;
  background-size: auto;
  background-blend-mode: multiply;
  opacity: 0.3; /* Adjust texture opacity here */
  pointer-events: none;
  z-index: 1;
}

/* Content */
.newsletter-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: #4a3a2a;
  font-family: inherit;
}

/* Headings */
.newsletter-heading {
  font-size: clamp(1.8rem, 2.5vw + 1rem, 2.8rem);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.newsletter-subheading {
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

/* Form */
.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"],
.newsletter-form input[type="text"] {
  flex: 1 1 40%;
  min-width: 150px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #b68a68;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.newsletter-form input[type="email"]:focus,
.newsletter-form input[type="text"]:focus {
  border-color: #8e6b49;
  outline: none;
}

.newsletter-form button {
  flex: 0 0 auto;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  background-color: #b68a68;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.newsletter-form button:hover,
.newsletter-form button:focus {
  background-color: #8e6b49;
  outline: none;
}

/* Success message styling */
.newsletter-success {
  display: none; /* hide initially */
  padding: 1rem 0;
  color: #4a3a2a;
  font-family: inherit;
  text-align: center;
}

.newsletter-success.show-newsletter {
  display: block;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .newsletter-box {
    padding: 2rem 1.5rem;
  }
  .newsletter-form input[type="email"],
  .newsletter-form input[type="text"],
  .newsletter-form button {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* FOOTER */
.footer {
  position: relative;
  width: 100%;
  padding: 6rem 2rem 2rem;
  background-image: url("images/Universal/footer/footerbackground.png");
  background-repeat: repeat-x;
  background-position: top center;
  background-size: auto 100%;
  border-radius: 12px 12px 0 0;
  box-sizing: border-box;
  color: #333;
  overflow: hidden;
}

.footer {
  margin-top: auto;        /* pushes footer to the bottom */
}

.footer-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.footer-logo {
  position: absolute;
  left: 1rem; /* same as container padding */
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
}

/* Logo scaled down */
.footer-logo a img {
  width: 180px;
  height: auto;
  display: block;
}

.footer-logo a {
  display: inline-block; /* prevent inline element weirdness */
  transition: transform 0.3s ease;
  transform-origin: center center; /* scale from center */
}

.footer-logo a:hover,
.footer-logo a:focus {
  transform: scale(1.05);
}

.footer-nav-socials {
  max-width: 600px;
  margin: 0 auto; /* centers horizontally */
  padding: 0 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Navigation */
.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.footer-nav ul li a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.footer-nav ul li a:hover,
.footer-nav ul li a:focus {
  color: #6b2aa5;
  outline: none;
}

/* Social icons */
.footer-socials {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.footer-socials a img {
  width: 28px;
  height: 28px;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}
.footer-socials a:hover img,
.footer-socials a:focus img {
  filter: grayscale(0%);
  outline: none;
}
/* Footer copyright */
.footer-copy {
  font-size: 0.9rem;
  color: #555;
  text-align: center;
  margin-top: 1rem;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
  padding: 0 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .footer {
    margin-top: -4rem;
  }
  .footer-container {
    padding: 4rem 2rem 2rem;
    position: static; /* remove absolute context */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .footer-logo {
    position: static;
    transform: none;
    margin-bottom: 1rem;
  }

  .footer-nav-socials {
    max-width: 100%;
    margin: 0;
    padding: 0 1rem;
  }

  .footer-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Scroll to the Top Button */
#btnScrollToTop {
  position: fixed;
  right: 10px;
  bottom: 10px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #6b2aa5;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  color: white;
  border: none;
  outline: none;
  cursor: pointer;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

/* Bounce animation */
@keyframes bounceUp {
  0% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-8px);
  }
  50% {
    transform: translateY(0);
  }
  70% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Btn Scroll to Top */
#btnScrollToTop:hover {
  background: #541d82;
  animation: bounceUp 0.4s ease;
}

#btnScrollToTop:active {
  background: #4c1876;
}


/* CTA SECTION STYLING (For Science and Art Sections) */

.cta-newsletter, .cta-text h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.cta-newsletter .cta-text p {
  font-size: 1rem;
  color: #555;
  max-width: 600px;
}

.cta-newsletter .cta-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-newsletter .cta-buttons a {
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  background-color: #6fa8dc;  /* primary button color */
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-newsletter .cta-buttons a:hover {
  background-color: #541d82; /* darker hover */
  transform: scale(1.05);
}

.cta-btn {
  flex: 0 0 auto;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  background-color: #b68a68;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-btn:hover,
.cta-btn:focus {
  background-color: #8e6b49;
  outline: none;
  transform: scale(1.05);
}

#loader-overlay {
  position: fixed;
  inset: 0;              
  background-color: white;
  z-index: 9998;        
  pointer-events: all;    
  opacity: 1;
  transition: opacity 0.5s ease;
}

#loader-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;        
}
