.btn {
  width: max-content;
  background: none;
  color: #4b2e05;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  z-index: 1;

  transition: color 0.35s ease-out, border-color 0.35s ease-out, transform 0.2s;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: #663399;
  transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-icon {
  display: block;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 900;
  margin-top: -1px;
  color: inherit;
  transition: color 0.35s ease-out;
}

.btn:hover {
  color: #fdf5e6 !important;
  border-color: #663399;
  transform: translateY(-1px);
}

.btn:hover::before {
  width: 100%;
}

.btn:focus {
  outline: 2px solid #663399;
  outline-offset: 2px;
}

.btn:hover .btn-content {
  transform: translateX(3px);
  color: #fdf5e6 !important;
}

.btn:hover .btn-icon {
  color: #fdf5e6 !important;
}

/* Default hidden state */
section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

/* Reveal when visible */
section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Optional variations */
section:nth-of-type(even) {
  transform: translateX(50px);
}
section:nth-of-type(odd) {
  transform: translateX(-50px);
}
section.visible:nth-of-type(even),
section.visible:nth-of-type(odd) {
  transform: translateX(0);
}

/* --- Fade + Slide Animation Keyframes --- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Hero Section Animation --- */
/* --- Logo and Text --- */
.hero-text {
  opacity: 0;
  animation: fadeSlideUp 1.5s ease-out forwards;
  animation-delay: 0.5s;
}

/* --- Navbar --- */
.navbar {
  opacity: 0;
  animation: fadeSlideUp 1.5s ease-out forwards;
  animation-delay: 1s;
}

/* Optional smooth fade for background overlay */
.overlay {
  /* background: rgba(0, 0, 0, 0.4); */
  opacity: 0;
  animation: fadeSlideUp 1.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* You can add subtle hover effects for interactivity */
.nav-links a {
  transition: color 0.3s ease, transform 0.3s ease;
}
.nav-links a:hover {
  transform: translateY(-2px);
  color: var(--accent-color);
}

/* .hero, */
.hero-text,
.navbar,
.overlay {
  opacity: 0;
}
.hero.animate,
.hero.animate .hero-text,
.hero.animate .navbar,
.hero.animate .overlay {
  animation-play-state: running;
}

/* Hero Section */
.hero {
  background: url("/assets/images/hero.jpg") no-repeat center center/cover;
  color: #fdf5e6;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero .overlay {
  width: 100%;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}
.hero .logo {
  font-size: 3rem;
  font-weight: bold;
  max-height: fit-content;
  cursor: auto;
  position: relative;
  color: #663399;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.hero .nav-links li a {
  position: relative;
  color: #fdf5e6;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 4px 0;
}

.hero .nav-links li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: rgb(102, 51, 153);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.hero .nav-links li a:hover::after,
.hero .nav-links li a:focus-visible::after {
  width: 100%;
}

.hero .nav-links li a:hover {
  font-weight: bolder;
  color: rgb(102, 51, 153);
}

.hero .nav-links li:not(:first-child):not(:last-child) {
  border-inline: 2px solid #fdf5e6;
  padding-inline: 1.5rem;
}
.nav-links a {
  color: #fdf5e6;
  text-decoration: none;
}
.hero-text {
  display: flex;
  max-width: 600px;
}
.hero-text h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  margin-left: 2rem;
  border-left: 2px solid #fdf5e6;
  padding-left: 2rem;
}

/* Laws Section */
#laws {
  padding: 4rem 10rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#laws .laws-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#laws .laws-text a {
  width: fit-content;
  background-color: #fdf5e6;
  color: #4b2e05;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 1rem;
}

.laws-text h4,
.compliance-text h4 {
  font-size: 35px;
}

.laws-text h2,
.compliance-text h2 {
  color: #663399;
  font-size: 20px;
}

/* Compliance Tools Section */
.compliance {
  padding: 4rem 0;
}
.compliance-container {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.compliance-container img {
  width: 50%;
}
.compliance-text {
  width: 50%;
  padding-inline: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.compliance-text h3 {
  margin-bottom: 1rem;
}

/* ✅ On mobile: put the right side on top */
@media (max-width: 768px) {
  .compliance .left {
    order: 2;
  }

  .compliance .right {
    order: 1;
  }

  .laws-text h4,
  .compliance-text h4 {
    font-size: 30px;
  }

  #laws .laws-text a {
    margin-inline: 0;
  }
}

/* Resources Section */
.resources {
  padding: 4rem 2rem;
}
.section-header {
  margin-bottom: 2rem;
  padding: 4rem 10rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  margin-bottom: 1rem;
}
.tabs li {
  padding: 0.5rem 2rem;
  border: 1px solid #4b2e05;
  cursor: pointer;
}
.tabs .active {
  background: #cf2528;
  color: #fdf5e6;
  border: none;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 4rem;
  padding: 5rem 5rem;
}

/* .articles-grid article:nth-child(2) {
  transform: translateY(-20%);
}

.articles-grid article:nth-child(5) {
  transform: translateY(20%);
} */

.articles-grid article img {
  width: 100%;
}
.articles-grid h4 {
  margin: 0.5rem 0;
}
.center {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* ============================
   Responsive Styles
=============================== */

/* Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
  .navbar {
    gap: 1rem;
  }

  .nav-links {
    justify-content: center;
    gap: 0.5rem;
  }

  #laws {
    padding: 3rem 4rem;
  }

  .compliance-container {
    flex-direction: column;
  }
  .compliance-container img,
  .compliance-text {
    width: 100%;
    padding-inline: 0;
  }

  .compliance-text {
    padding: 3rem 4rem;
  }

  .compliance-text .btn {
    margin-inline: auto;
  }

  .section-header {
    padding: 2rem 4rem;
  }

  .tabs li {
    padding: 0.5rem 0.5rem;
    text-align: center;
  }

  .resources {
    padding: 0;
  }

  .articles-grid {
    padding: 3rem 2rem;
    gap: 2rem;
  }
  .articles-grid article:nth-child(2),
  .articles-grid article:nth-child(5) {
    transform: none; /* remove staggered offset */
  }
}

/* Mobile (max-width: 600px) */
@media (max-width: 600px) {
  .hero {
    height: auto;
    padding: 2rem 1rem;
  }
  .hero .logo {
    font-size: 2rem;
  }
  .hero-text {
    max-width: 100%;
    margin-left: 0;
    padding-left: 0;
    gap: 1rem;
  }
  .hero-text h2 {
    font-size: 1.3rem;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .hero .overlay {
    padding: 0;
  }

  .hero .nav-links li:not(:first-child):not(:last-child) {
    padding-inline: 0.5rem;
  }

  #laws {
    padding: 2rem 2rem;
  }

  .compliance-text {
    padding: 2rem 2rem;
  }

  .compliance-text .btn {
    margin-inline: 0;
  }

  .section-header {
    padding: 2rem 2rem;
  }
  .tabs {
    align-items: center;
  }
  .tabs li {
    width: 100%;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    padding: 2rem 2rem;
    gap: 2rem;
  }
}
