/* Google Fonts Import */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Playfair+Display:wght@700&display=swap");

/* Variables & Reset */
:root {
  --primary-color: #003366; /* Deep Blue */
  --secondary-color: #d4af37; /* Gold */
  --accent-color: #f4f4f4; /* Light Grey */
  --text-dark: #333333;
  --text-light: #ffffff;
  --font-main: "Inter", sans-serif;
  --font-heading: "Playfair Display", serif;
  --max-width: 1200px;
  --header-height: 90px;
}

/* Response Column Span */
.col-span-2 {
  grid-column: span 2;
}
@media (max-width: 900px) {
  .col-span-2 {
    grid-column: auto;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: clamp(
    14px,
    1vw + 10px,
    18px
  ); /* Base font size scales from 14px to 18px */
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: #fff;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}
h3 {
  font-size: clamp(1.2rem, 3vw, 2rem);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: #fff;
  border: 2px solid var(--secondary-color);
  position: relative;
  overflow: hidden;
  animation: buttonFadeIn 0.8s ease-out 0.5s forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes buttonFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-secondary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-secondary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-secondary:hover {
  background-color: transparent;
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.section-padding {
  padding: 60px 0;
}

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

/* Header & Navigation */
header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-subtitle {
  font-size: 0.8rem;
  font-family: var(--font-main);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-dark);
  transition: color 0.3s;
  text-align: center;
  display: inline-block;
  line-height: 1.3;
}

.nav-links a span {
  display: block;
  font-size: 0.85em;
  font-weight: 400;
  margin-top: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: var(--text-dark);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    gap: 0;
    flex-direction: column;
    background-color: #fff;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 16px 0;
  }
}

/* Page Headers */
.about-hero {
  background:
    linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.7)),
    url("../images/church_sign.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
}

.tithing-hero {
  background:
    linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 51, 102, 0.6)),
    url("../images/tithing.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
}

.contact-hero {
  background:
    linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.7)),
    url("../images/church_sign.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
}

.ministry-hero {
  background:
    linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 51, 102, 0.6)),
    url("../images/church.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
}

.resources-hero {
  background:
    linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 51, 102, 0.6)),
    url("../images/resources.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
}

/* Hero Section */
.hero {
  background:
    linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 51, 102, 0.6)),
    url("../images/church.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(212, 175, 55, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(212, 175, 55, 0.4), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(212, 175, 55, 0.3), transparent);
  background-size: 200px 200px;
  animation: float 20s linear infinite;
  opacity: 0.6;
  pointer-events: none;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
  }
  100% {
    transform: translateY(-200px) translateX(20px);
  }
}

@keyframes heroGlow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(
    1.8rem,
    5vw,
    3rem
  ); /* Auto-adjusts between 1.8rem and 3rem */
  margin-bottom: 20px;
  opacity: 0;
  animation: heroTitleFadeIn 1s ease-out 0.3s forwards, subtleFloat 6s ease-in-out infinite 1.3s;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes heroTitleFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes subtleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-slogans {
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.hero-slogans::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
  z-index: -1;
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.8;
  }
}

.about-text {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.slogan-item {
  font-size: clamp(
    1rem,
    3vw,
    1.5rem
  ); /* Auto-adjusts between 1rem and 1.5rem */
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: 1.5px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  position: relative;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
  cursor: default;
}

.slogan-item:hover {
  transform: scale(1.05) translateX(10px);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.slogan-item::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
  transition: transform 0.4s ease;
}

.slogan-item:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.slogan-item:nth-child(1) {
  animation-delay: 0.5s;
}
.slogan-item:nth-child(2) {
  animation-delay: 0.8s;
}
.slogan-item:nth-child(3) {
  animation-delay: 1.1s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px) rotateX(-10deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* About Icons */
.about-icons {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.about-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.about-icon-item i {
  font-size: 2.5rem;
  color: var(--primary-color);
  background-color: #f0f4f8;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.about-icon-item:hover i {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.about-icon-item p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  font-family: var(--font-heading);
}

/* Card Grid shared */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card-body {
  padding: 24px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* Footer */
footer {
  background-color: #0e4c63;
  color: #fff;
  padding: 40px 0 0;
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 15px;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-col h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #fff;
  font-weight: 500;
  font-family: var(--font-main);
}

.footer-col .separator {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.3);
  margin-bottom: 15px;
}

.footer-col p {
  line-height: 1.5;
  margin-bottom: 8px;
}

.footer-link {
  color: #fff;
  text-decoration: underline;
  word-break: break-all;
}

.footer-link:hover {
  text-decoration: none;
  opacity: 0.9;
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.8rem;
}

.address-social {
  display: flex;
  align-items: center;
  gap: 15px;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icon {
  background-color: #fff;
  color: #0e4c63;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 1rem;
  transition: opacity 0.3s;
}

.social-icon:hover {
  opacity: 0.8;
}

.slogan-list {
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 25px;
  }
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    padding-bottom: 30px;
  }
  .address-social {
    flex-direction: column;
    gap: 10px;
  }
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}
.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Team Section */
.team-section {
  text-align: center;
  padding: 60px 20px;
}

.team-group-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
}

.team-group-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: var(--secondary-color);
  margin: 10px auto 0;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0;
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.member-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-color);
  margin-bottom: 20px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.team-member:hover .member-photo {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--secondary-color);
}

.member-name-cn {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.member-name-en {
  font-size: 1rem;
  color: #666;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Ministry New Layout */
.ministry-row {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-bottom: 100px;
}

.ministry-row:nth-child(even) {
  flex-direction: row-reverse;
}

.ministry-row:last-child {
  margin-bottom: 0;
}

.ministry-img-col {
  flex: 1;
  display: flex;
  justify-content: center;
}

.ministry-text-col {
  flex: 1;
}

.oval-vertical-image {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 0.8 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  /* Soft feather edge effect */
  -webkit-mask-image: radial-gradient(
    circle at center,
    white 60%,
    transparent 100%
  );
  mask-image: radial-gradient(circle at center, white 60%, transparent 100%);
  transition: transform 0.5s ease;
}

.oval-horizontal-image {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 0.8;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  /* Soft feather edge effect */
  -webkit-mask-image: radial-gradient(
    circle at center,
    white 60%,
    transparent 100%
  );
  mask-image: radial-gradient(circle at center, white 60%, transparent 100%);
  transition: transform 0.5s ease;
}

/* Contact Page New Layout */
.contact-container {
  display: flex;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  flex: 1;
}

.contact-form-section {
  flex: 1;
}

.contact-info-block {
  margin-bottom: 30px;
}

.contact-label {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-family: var(--font-heading);
}

.contact-details-text {
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.8;
}

.contact-details-text p {
  margin-bottom: 15px;
}

.btn-facebook {
  display: block;
  width: 100%;
  padding: 12px;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  text-align: center;
  font-size: 1.2rem;
  border-radius: 5px;
  background: transparent;
  margin-top: 30px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-facebook:hover {
  background: var(--primary-color);
  color: #fff;
}

.google-map-btn {
  background-color: #0e4c63; /* Teal color from footer/design */
  color: #fff;
  font-size: 2.5rem;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  margin-top: 40px;
  font-family: var(--font-main);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s;
}

.google-map-btn:hover {
  transform: translateY(-5px);
}

/* Form Styles Override */
.form-group-new {
  margin-bottom: 20px;
}

.form-label-new {
  display: block;
  font-weight: 700;
  color: #0e4c63; /* Use the teal color for labels */
  margin-bottom: 8px;
  font-size: 1rem;
}

.form-control-new {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #0e4c63; /* Teal border */
  border-radius: 5px;
  font-size: 1rem;
  background-color: #fff;
}

.form-control-new:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 76, 99, 0.2);
}

textarea.form-control-new {
  min-height: 120px;
  resize: vertical;
}

@media (max-width: 768px) {
  .contact-container {
    flex-direction: column;
    gap: 40px;
  }
}

/* Enhanced Contact Page Styles */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.contact-item i {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-top: 4px;
  width: 25px;
  text-align: center;
}

.contact-name {
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.btn-facebook {
  background-color: #3b5998; /* Facebook Blue */
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  box-shadow: 0 4px 6px rgba(59, 89, 152, 0.2);
}

.btn-facebook:hover {
  background-color: #2d4373;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(59, 89, 152, 0.3);
}

.map-container {
  margin-top: 25px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Polished Form Styles */
.contact-form-section {
  background-color: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.form-label-new {
  color: var(--primary-color);
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
}

.form-control-new {
  border: 1px solid #ddd;
  background-color: #f8f9fa;
  padding: 10px 15px;
  transition: all 0.3s;
  border-radius: 8px;
  font-size: 0.95rem;
}

.form-control-new:focus {
  background-color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(14, 76, 99, 0.1);
}

.contact-form-section .btn-primary {
  padding: 15px;
  font-size: 1.1rem;
  border-radius: 8px;
  background: var(--primary-color);
  transition: all 0.3s;
  margin-top: 10px;
}

.contact-form-section .btn-primary:hover {
  background: #093646;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(14, 76, 99, 0.3);
}

.ministry-text-col h2 {
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  font-weight: 400; /* Lighter weight as per design */
}

.ministry-time {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 25px;
  font-weight: 500;
  display: block;
  border-left: 3px solid var(--secondary-color);
  padding-left: 15px;
}

.ministry-desc {
  font-size: 1.05rem;
  color: #444;
  line-height: 1.8;
  margin-bottom: 20px;
}

.ministry-desc p {
  margin-bottom: 15px;
}

.ministry-desc p.lang-cn {
  font-family: var(--font-main);
  color: #666;
  font-style: italic;
}

@media (max-width: 900px) {
  .ministry-row {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .ministry-row,
  .ministry-row:nth-child(even) {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .ministry-time {
    border-left: none;
    border-top: 3px solid var(--secondary-color);
    padding-left: 0;
    padding-top: 10px;
    display: inline-block;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.modal-icon.success {
  color: #28a745;
}

.modal-icon.error {
  color: #dc3545;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.modal-message {
  color: #666;
  margin-bottom: 25px;
  font-size: 1rem;
  line-height: 1.5;
}

.modal-btn {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 10px 25px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.modal-btn:hover {
  background-color: #093646;
}

/* Resource Tiles Layout */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.resource-tile {
  background-color: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.resource-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.resource-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s;
}

.resource-tile:hover::before {
  opacity: 1;
}

.resource-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.resource-icon img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.resource-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-family: var(--font-heading);
}

.resource-subtitle {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

.resource-arrow {
  margin-top: auto;
  padding-top: 20px;
  color: var(--primary-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.resource-tile:hover .resource-arrow {
  opacity: 1;
  gap: 12px;
}

/* --- Back to Top Button --- */
#back-to-top-btn {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  font-size: 20px;
  border: none;
  outline: none;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  opacity: 0.6;
}

#back-to-top-btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
  opacity: 1;
}

@media (max-width: 768px) {
  #back-to-top-btn {
    bottom: 20px;
    right: 20px;
    padding: 10px 14px;
    font-size: 18px;
  }
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  width: 100%;
  margin: 40px 0;
  padding: 0 40px; /* Add padding for buttons */
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.carousel-item {
  flex: 0 0 33.333%; /* Default for desktop - will be overridden by JS */
  padding: 0 15px;
  box-sizing: border-box;
  min-width: 0; /* Prevent flex items from growing */
  transition: flex 0.3s ease;
}

.carousel-item .card {
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.carousel-item .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Carousel Controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
  background-color: #093646;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.carousel-btn-prev {
  left: 0;
}

.carousel-btn-next {
  right: 0;
}

/* Carousel Indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-indicator.active {
  background-color: var(--primary-color);
  transform: scale(1.2);
}

.carousel-indicator:hover {
  background-color: var(--primary-color);
  opacity: 0.7;
}

/* Responsive Carousel */
@media (max-width: 1024px) {
  .carousel-item {
    flex: 0 0 50%;
  }

  .carousel-container {
    padding: 0 35px;
  }
}

@media (max-width: 768px) {
  .carousel-item {
    flex: 0 0 100%;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .carousel-container {
    margin: 30px 0;
    padding: 0 30px;
  }

  .carousel-item {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .carousel-container {
    padding: 0 25px;
  }
}
