/* Local font faces - remove external Google Fonts dependency */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn[wght].woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #667eea;
  --color-secondary: #764ba2;
  --transition: all 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: "Vazirmatn", "Raleway", sans-serif;
  direction: rtl;
  text-align: right;
  margin: 0;
  padding: 0;
  background: none; /* پس‌زمینه داخل mainHeading ست شده */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6,
p, span, a {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.about {
  position: fixed;
  z-index: 10;
  bottom: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  transition: all 0.2s ease;
}

.about .bg_links {
  width: 40px;
  height: 40px;
  border-radius: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: absolute;
}

.about .logo {
  width: 40px;
  height: 40px;
  z-index: 9;
  background-image: none; /* removed external dependency */
  background-size: 50%;
  background-repeat: no-repeat;
  background-position: 30px 7px;
  opacity: 0.9;
  transition: all 1s 0.2s ease;
  bottom: 0;
  left: 0;
}

.about .social {
  opacity: 0;
  left: 0;
  bottom: 0;
}

.about .social .icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.2s ease, background-color 0.4s ease;
  opacity: 0;
  border-radius: 100%;
  font-size: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px;
}

.icon-telegram { background-image: url('/icons/telegram.svg'); }
.icon-whatsapp { background-image: url('/icons/whatsapp.svg'); }
.icon-instagram { background-image: url('/icons/instagram.svg'); }

.about .social.portfolio {
  transition: all 0.8s ease;
}

.about .social.portfolio .icon {
  background-image: none;
}

.about .social.dribbble {
  transition: all 0.3s ease;
}

.about .social.dribbble .icon {
  background-image: none;
}

.about .social.linkedin {
  transition: all 0.8s ease;
}

.about .social.linkedin .icon {
  background-image: none;
}

.about:hover {
  width: 105px;
  height: 105px;
  transition: all 0.6s cubic-bezier(0.64, 0.01, 0.07, 1.65);
}

.about:hover .logo {
  opacity: 1;
  transition: all 0.6s ease;
}

.about:hover .social {
  opacity: 1;
}

.about:hover .social .icon {
  opacity: 0.9;
}

.about:hover .social:hover {
  background-size: 28px;
}

.about:hover .social:hover .icon {
  background-size: 65%;
  opacity: 1;
}

.about:hover .social.portfolio {
  left: 0;
  bottom: calc(100% - 40px);
  transition: all 0.3s 0s cubic-bezier(0.64, 0.01, 0.07, 1.65);
}

.about:hover .social.portfolio .icon:hover {
  background-color: #698fb7;
}

.about:hover .social.dribbble {
  bottom: 45%;
  left: 45%;
  transition: all 0.3s 0.15s cubic-bezier(0.64, 0.01, 0.07, 1.65);
}

.about:hover .social.dribbble .icon:hover {
  background-color: #ea4c89;
}

.about:hover .social.linkedin {
  bottom: 0;
  left: calc(100% - 40px);
  transition: all 0.3s 0.25s cubic-bezier(0.64, 0.01, 0.07, 1.65);
}

.about:hover .social.linkedin .icon:hover {
  background-color: #0077b5;
}

* {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0;
  outline: 0;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

*:focus {
  outline: 0;
}

.mainNav {
  width: 100%;
  height: 90px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  text-transform: uppercase;
  padding: 0 40px;
  direction: rtl;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* Purple variant for homepage header */
.mainNav--purple {
  color: #6b46c1;
}
.mainNav--purple .mainNav__link { color: #6b46c1; }
.mainNav--purple .mainNav__link:hover { color: #7c3aed; }
.mainNav--purple .logo-text { -webkit-text-fill-color: initial; background: none; color: #6b46c1; }

.mainNav:hover {
  background: rgba(0, 0, 0, 0.2);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.mainNav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 20px;
}

.logo-icon {
  font-size: 28px;
  animation: rotate 4s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.logo-text {
  background: linear-gradient(135deg, #fff 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mainNav__links {
  display: flex;
  gap: 30px;
}

.mainNav__link {
  color: #ddd;
  letter-spacing: 1px;
  font-size: 18px;
  font-weight: 600;
  box-shadow: inset 0px 0px 0px rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease, transform 0.2s ease;
  padding: 8px 16px;
  transform: translateY(0px);
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  position: relative;
  overflow: hidden;
}

.mainNav__link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.mainNav__link:hover::before {
  left: 100%;
}

.mainNav__link:hover {
  transform: translateY(-3px);
  box-shadow: inset 0px -20px 0px rgba(255, 255, 255, 0.2);
  text-shadow: 1px 8px 3px rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.mainNav__social {
  display: flex;
  gap: 15px;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icon .icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffd166;
  cursor: pointer;
  transition: all .2s ease;
  margin-left: 8px;
}
.theme-toggle:hover { transform: translateY(-3px) scale(1.08); }
.theme-toggle:focus { outline: 2px solid #8b5cf6; outline-offset: 2px; }

/* Mobile-only theme toggle next to hamburger (hidden on desktop) */
.theme-toggle--mobile {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffd166;
  margin-left: 8px;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px) scale(1.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.mainNav__mobile-controls {
  display: none;
}

.mainNav__icon {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.18));
  border: 1px solid rgba(102, 126, 234, 0.25);
  box-shadow: 0 12px 30px rgba(118, 75, 162, 0.18);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, background 0.35s ease;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.mainNav__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.35), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.mainNav__icon-bars {
  position: relative;
  width: 22px;
  height: 16px;
  display: grid;
  align-content: space-between;
  pointer-events: none;
}

.mainNav__icon .bar {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a855f7 0%, #6366f1 100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease, width 0.3s ease;
  transform-origin: center;
}

.mainNav__icon .bar--top {
  width: 100%;
}

.mainNav__icon .bar--middle {
  width: 75%;
  justify-self: end;
}

.mainNav__icon .bar--bottom {
  width: 60%;
}

.mainNav__icon:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 36px rgba(118, 75, 162, 0.22);
}

.mainNav__icon:hover::after {
  opacity: 1;
}

.mainNav__icon:active {
  transform: scale(0.96);
  box-shadow: 0 8px 18px rgba(118, 75, 162, 0.2);
}

.mainNav__icon.active .bar--top {
  transform: translateY(7px) rotate(45deg);
  width: 100%;
}

.mainNav__icon.active .bar--middle {
  opacity: 0;
  transform: translateX(8px);
}

.mainNav__icon.active .bar--bottom {
  transform: translateY(-7px) rotate(-45deg);
  width: 100%;
}

.mainNav__icon.active {
  animation: navPulse 0.6s ease forwards;
}

.mainNav__icon.active::after {
  opacity: 1;
}

@keyframes navPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 12px 30px rgba(118, 75, 162, 0.18);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 20px 38px rgba(118, 75, 162, 0.28);
  }
  100% {
    transform: scale(1.02);
    box-shadow: 0 14px 32px rgba(118, 75, 162, 0.22);
  }
}

@media screen and (max-width: 799px) {
  .mainNav {
    padding: 0 20px;
    height: 80px;
  }
  
  .mainNav__links {
    position: fixed;
    top: 80px;
    right: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    display: flex !important;
    z-index: 999;
  }

  .mainNav__links.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mainNav__link {
    display: block;
    padding: 15px 20px;
    min-height: 44px;
    font-size: 18px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(12px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease;
  }

  .mainNav__link:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(-5px);
  }

  .mainNav__links.active .mainNav__link {
    transform: translateX(0);
    opacity: 1;
  }

  .mainNav__links.active .mainNav__link:nth-child(1) { transition-delay: 0.05s; }
  .mainNav__links.active .mainNav__link:nth-child(2) { transition-delay: 0.1s; }
  .mainNav__links.active .mainNav__link:nth-child(3) { transition-delay: 0.15s; }
  .mainNav__links.active .mainNav__link:nth-child(4) { transition-delay: 0.2s; }
  
  .mainNav__social {
    display: none;
  }
  
  /* Container for mobile buttons to keep them together */
  .mainNav__mobile-controls {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }
  
  /* Show the mobile dark-mode toggle and align it next to the hamburger */
  .theme-toggle--mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    color: #ffd166;
  }
  
  .mainNav__icon {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }
  
  .mainNav__icon:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }

  [data-theme="dark"] .mainNav__links {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
  }

  [data-theme="dark"] .mainNav__link {
    background: rgba(79, 70, 229, 0.15);
    color: #e0e7ff;
  }

  [data-theme="dark"] .mainNav__link:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
  }
  
  .logo-text {
    font-size: 14px;
  }

  .logo-icon {
    font-size: 20px;
  }
}

/* Additional mobile improvements */
@media screen and (max-width: 600px) {
  .mainHeading__text {
    padding: 25px 15px !important;
  }

  .badge {
    font-size: 12px;
    padding: 10px 16px;
    min-height: 44px;
  }

  .badge-icon {
    font-size: 16px;
  }
}

.mainHeading {
  position: relative;
  background-image: url('img/header_background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.mainHeading::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(140deg, rgba(4, 7, 29, 0.9) 0%, rgba(11, 18, 45, 0.78) 48%, rgba(16, 0, 43, 0.6) 100%);
  background-size: 220% 220%;
  animation: auroraShift 18s ease-in-out infinite alternate;
  opacity: 0.94;
  z-index: 1;
}

.mainHeading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 25%, rgba(99, 102, 241, 0.26) 0%, transparent 38%),
              radial-gradient(circle at 78% 32%, rgba(236, 72, 153, 0.18) 0%, transparent 45%),
              radial-gradient(circle at 52% 78%, rgba(56, 189, 248, 0.14) 0%, transparent 48%);
  mix-blend-mode: screen;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
  animation: starDrift 24s linear infinite;
}

.mainHeading__content {
  max-width: 1200px;
  width: 100%;
  min-height: 680px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  position: relative;
  z-index: 2;
  padding: 0 40px;
  box-sizing: border-box;
}

@media screen and (max-width: 799px) {
  /* Hide 'Scroll' text on mobile; keep arrow visible */
  .scroll-text { display: none !important; }
  .scroll-indicator { bottom: 24px; }

  .package-content {
    display: flex;
    flex-direction: column;
    gap: 36px;
    align-items: center;
    text-align: center;
  }

  .mainHeading {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 40px;
    /* avoid subtle horizontal jitter from animated backdrop on small screens */
    animation: none;
    position: relative;
    overflow: hidden;
  }

  .mainHeading__content {
    min-height: auto;
    flex-direction: column;
    text-align: center;
    padding: 0 16px;
    gap: 22px;
    align-items: center;
  }

  .mainHeading__image {
    order: -1;
    display: block;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  .package-text {
    max-width: 520px;
  }

  .package-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .package-text p {
    font-size: 18px;
    margin-bottom: 24px;
  }

  .package-features {
    margin-bottom: 24px;
    display: grid;
    gap: 16px;
    justify-items: center;
  }

  .package-features li {
    justify-content: center;
    font-size: 16px;
  }

  .package-image {
    order: -1;
    width: 100%;
    max-width: 420px;
    margin-bottom: 28px;
  }

  .package-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .package-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 36px auto 0;
    width: 100%;
    max-width: 320px;
  }

  .mainHeading::before,
  .mainHeading::after {
    content: "";
    animation: none !important;
    transform: none !important;
  }
  .mainHeading__text::after { animation: none !important; opacity: 0 !important; transform: none !important; }
  .mainHeading__text,
  .mainHeading__preTitle,
  .mainHeading__title,
  .mainHeading__description {
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
    transition: none !important;
    opacity: 1 !important;
  }
  .badge,
  .badge::after,
  .badge-icon {
    animation: none !important;
    transform: none !important;
  }
  .scroll-indicator,
  .scroll-text,
  .scroll-arrow {
    animation: none !important;
    transform: none !important;
  }

  /* Disable only About overlay animation to fix mobile jitter */
  .about-society::before {
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
  }

  /* Disable particle animation in package section to eliminate residual jitter */
  .package-section::before,
  .package-section::after {
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
  }
}

.mainHeading__text {
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  padding: 60px;
  max-width: 750px;
  width: 55%;
  flex-shrink: 0;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 2;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  height: 680px;
  box-sizing: border-box; /* include padding in height */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* spread content to fill space */
  gap: 24px;
  overflow: hidden; /* ensure inner strip follows rounded corners */
  opacity: 0;
  transform: translateY(40px);
  animation: heroReveal 1.1s cubic-bezier(0.25, 0.9, 0.3, 1.2) 0.35s forwards;
  will-change: transform, opacity;
}

@media screen and (max-width: 600px) {
  .mainHeading__text {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #667eea 0%, #7c4dff 100%);
  color: #fff;
  padding: 14px 22px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  animation: slideInLeft 0.7s ease 0.55s both, badgeGlow 6s ease-in-out 1.6s infinite;
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.32);
  min-height: 48px;
  min-width: 44px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge:active,
.badge:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 16px 32px rgba(102, 126, 234, 0.36);
}

.badge::after {
  content: "";
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.32) 0%, transparent 55%);
  opacity: 0;
  transform: scale(0.7);
  animation: badgeSpark 4.6s ease-in-out 2.2s infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.badge-icon {
  font-size: 16px;
  animation: pulse 2.4s ease-in-out infinite;
}

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

.mainHeading__text::before {
  content: "";
  position: absolute;
  width: 8px;
  top: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.65) 100%);
  animation: accentSlide 0.8s ease 0.45s both;
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;
}

.mainHeading__text::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12) 0%, rgba(99, 102, 241, 0.06) 55%, transparent 100%);
  opacity: 0;
  transform: translateX(-60%);
  animation: glassSweep 7s linear 1.2s infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

@media screen and (max-width: 799px) {
  .mainHeading__text {
    padding: 24px 18px;
    margin: 0;
    border-radius: 20px;
    width: 100%;
    height: auto;
    max-width: 540px;
    min-height: 0;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  }

  .mainHeading__title {
    font-size: clamp(20px, 4.5vw, 28px);
    line-height: 1.45;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
  }

  .mainHeading__description {
    font-size: clamp(14px, 3.5vw, 16px);
    line-height: 1.65;
    margin-bottom: 22px;
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 20px;
  }

  .stat-item {
    width: 100%;
    min-height: 110px;
  }

  .stat-number {
    font-size: 22px !important;
  }

  .stat-label {
    font-size: 12px;
  }
}

@keyframes heroReveal {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.96);
  }
  60% {
    opacity: 1;
    transform: translateY(-8px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.mainHeading__preTitle {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 16px;
  color: #667eea;
  font-size: 16px;
  opacity: 0;
  transform: translateY(25px);
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.mainHeading__title {
  text-transform: uppercase;
  font-weight: 200;
  letter-spacing: 1px;
  margin-bottom: 24px;
  font-size: clamp(24px, 3vw, 48px);
  color: #fff;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: translateY(35px);
  animation: fadeUp 0.9s cubic-bezier(0.22, 0.8, 0.36, 1.1) 0.62s forwards;
}

@media screen and (max-width: 799px) {
  .mainHeading__title {
    margin-bottom: 16px;
    font-size: 32px;
  }

  /* Keep stats on one row with horizontal scroll if needed */
  .stats {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 16px;
    padding-bottom: 0;
    width: 100%;
  }

  .stat-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 18px 16px;
  }
}

.mainHeading__description {
  letter-spacing: 0.25px;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.8;
  color: #e8ecf6;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(35px);
  animation: fadeUp 0.9s ease 0.74s forwards;
}

@media screen and (max-width: 799px) {
  .mainHeading__description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .stats::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
  }

  .stats {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.4) rgba(255, 255, 255, 0.08);
  }
}

.cta-group {
  display: flex;
  gap: 20px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.cta {
  padding: 18px 36px;
  color: #fff;
  font-family: "Vazirmatn", "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  border: none;
  font-size: 16px;
}

.cta.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.cta.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cta:hover::before {
  left: 100%;
}

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

.cta.primary:hover {
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.cta.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.stats {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
  padding-top: 10px;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.9s ease 0.85s forwards;
}

  .stat-item {
    text-align: center;
    animation: statPop 0.9s ease forwards;
    opacity: 0;
    position: relative;
    padding: 20px 18px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(18, 26, 46, 0.7) 0%, rgba(26, 33, 55, 0.65) 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-width: 140px;
  }

.stat-item::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.35) 0%, transparent 55%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.stat-item:nth-child(1) { animation-delay: 1s; }
.stat-item:nth-child(2) { animation-delay: 1.2s; }
.stat-item:nth-child(3) { animation-delay: 1.4s; }

.stat-item:hover::before {
  opacity: 1;
  transform: scale(1);
}

.stat-item:hover,
.stat-item:focus-visible {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 36px rgba(99, 102, 241, 0.18);
  outline: none;
}

.stat-number {
  display: block;
  font-size: 38px;
  font-weight: 800;
  color: #e5e7ff;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(102, 126, 234, 0.35);
  animation: glowPulse 3.6s ease-in-out infinite;
}

.stat-label {
  font-size: 13px;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

@media screen and (max-width: 799px) {
  .cta-group {
    justify-content: center;
    margin-bottom: 40px;
  }
  
  .stats {
    justify-content: center;
    gap: 10px;
  }
  
  .stat-number {
    font-size: 26px;
  }
}

/* ===== IMPROVED HOMEPAGE SECTIONS ===== */

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===================== DARK THEME ===================== */
[data-theme="dark"] body {
  color: #e5e7eb;
  background: #0b1020;
}
[data-theme="dark"] .mainNav {
  background: rgba(11, 16, 32, 0.7);
  border-bottom-color: rgba(255,255,255,0.08);
  color: #c7d2fe;
}
[data-theme="dark"] .mainNav--purple .mainNav__link { color: #c7d2fe; }
[data-theme="dark"] .mainNav--purple .mainNav__link:hover { color: #a78bfa; }
[data-theme="dark"] .mainNav--purple .logo-text { color: #c7d2fe; }
[data-theme="dark"] .theme-toggle { background: rgba(99, 102, 241, 0.15); border-color: rgba(99, 102, 241, 0.35); color: #fde68a; }
[data-theme="dark"] .mainHeading::before {
  background: linear-gradient(140deg, rgba(4, 7, 29, 0.9) 0%, rgba(11, 18, 45, 0.78) 48%, rgba(16, 0, 43, 0.6) 100%);
  opacity: 0.94;
}
[data-theme="dark"] .mainHeading__text {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  border-color: rgba(255,255,255,0.12);
}
[data-theme="dark"] .mainHeading__title { background: linear-gradient(135deg, #e5e7eb 0%, #a5b4fc 100%); -webkit-text-fill-color: transparent; }
[data-theme="dark"] .mainHeading__description { color: #cbd5e1; }
[data-theme="dark"] .stat-number { color: #a5b4fc; }
[data-theme="dark"] .stat-label { color: #94a3b8; }

[data-theme="dark"] .about-society {
  background: linear-gradient(135deg, #0f172a 0%, #0b1020 100%);
}
[data-theme="dark"] .about-content h3 { 
  /* Ensure maximum readability on dark backgrounds */
  background: none;
  -webkit-text-fill-color: initial;
  color: #e5e7eb;
}
[data-theme="dark"] .about-item:hover .about-content h3 {
  color: #e5e7eb;
  background: none;
  -webkit-text-fill-color: initial;
}
[data-theme="dark"] .about-content p { color: #cbd5e1; }
[data-theme="dark"] .about-item:hover .about-content p { color: #cbd5e1; } /* prevent turning black on hover */
[data-theme="dark"] .about-content h3::after { background: linear-gradient(135deg, #a5b4fc 0%, #7c3aed 100%); }
[data-theme="dark"] .about-image::before { background: linear-gradient(135deg, rgba(99,102,241,0.18) 0%, rgba(124,58,237,0.18) 100%); }

[data-theme="dark"] .featured-articles { background: linear-gradient(135deg, #0b1020 0%, #0f172a 100%); }
[data-theme="dark"] .featured-articles::before,
[data-theme="dark"] .featured-articles::after { background: transparent; } /* remove white halos */
[data-theme="dark"] .article-card { background: #0f172a; border-color: rgba(255,255,255,0.06); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
[data-theme="dark"] .article-content h3 { color: #e5e7eb; }
[data-theme="dark"] .article-content p { color: #94a3b8; }
[data-theme="dark"] .read-more { color: #a5b4fc; }

[data-theme="dark"] .package-section {
  background: linear-gradient(135deg, #1d1b45 0%, #2b1b52 100%);
}
[data-theme="dark"] .package-image::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
}

[data-theme="dark"] .footer {
  background: linear-gradient(135deg, #0b1020 0%, #0a0f1f 100%);
}
[data-theme="dark"] .footer-section h3,
[data-theme="dark"] .footer-section h4 { background: linear-gradient(135deg, #e5e7eb 0%, #a5b4fc 100%); -webkit-text-fill-color: transparent; }
[data-theme="dark"] .footer-section p,
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .social-link { color: #cbd5e1; }
[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .social-link:hover { color: #a5b4fc; }

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 80px;
  position: relative;
}

.section-header::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.section-header h2 {
  font-size: 42px;
  font-weight: 300;
  color: #2c3e50;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #2c3e50 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.section-header p {
  font-size: 20px;
  color: #5a6c7d;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 400;
  animation: fadeInUp 0.8s 0.2s ease forwards;
  opacity: 0;
}

/* About Society Section */
.about-society {
  padding: 140px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.about-society::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(102,126,234,0.1)"/><circle cx="80" cy="40" r="0.5" fill="rgba(118,75,162,0.1)"/><circle cx="40" cy="80" r="0.8" fill="rgba(102,126,234,0.1)"/><circle cx="90" cy="90" r="0.3" fill="rgba(118,75,162,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23stars)"/></svg>');
  opacity: 0.4;
  animation: float 30s ease-in-out infinite;
}

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 120px;
  position: relative;
  z-index: 1;
}

.about-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start; /* align image and text by their top edges */
  opacity: 0;
  transform: translateY(80px);
  animation: fadeInUp 1s ease forwards;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure both columns start from the same baseline */
.about-image,
.about-content {
  align-self: start;
}

.about-item:nth-child(2) { animation-delay: 0.3s; }
.about-item:nth-child(3) { animation-delay: 0.6s; }
.about-item:nth-child(4) { animation-delay: 0.9s; }

.about-item::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
  border-radius: 30px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.about-item:hover::before {
  opacity: 1;
}

.about-item.reverse {
  direction: ltr;
}

.about-item.reverse .about-content {
  direction: rtl;
  text-align: right;
}

.about-image {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
  transition: all 0.6s ease;
  transform: perspective(1000px) rotateY(0deg);
  aspect-ratio: 16 / 9; /* make about images rectangular */
}

.about-image .about-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.about-image .about-slide.active {
  opacity: 1;
}

.about-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.about-image:hover::before {
  opacity: 1;
}

.about-image:hover {
  transform: perspective(1000px) rotateY(-5deg) translateY(-20px) scale(1.03);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}

.about-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.about-image:hover img {
  transform: scale(1.1);
}

.about-content {
  position: relative;
  z-index: 2;
}

.about-content h3 {
  font-size: 36px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 35px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  line-height: 1.3;
  background: linear-gradient(135deg, #2c3e50 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-content h3::after {
  content: '';
  position: absolute;
  bottom: -15px;
  right: 0;
  width: 100px;
  height: 5px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.about-item:hover .about-content h3::after {
  width: 150px;
}

.about-item.reverse .about-content h3::after {
  right: auto;
  left: 0;
}

.about-content p {
  font-size: 19px;
  line-height: 2;
  color: #34495e;
  margin-bottom: 28px;
  font-weight: 400;
  transition: color 0.3s ease;
}

.about-item:hover .about-content p {
  color: #2c3e50;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* Featured Articles Section */
.featured-articles {
  padding: 140px 0;
  background: linear-gradient(135deg, #fff 0%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
}

.featured-articles::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.9) 0%, transparent 100%);
}

.featured-articles::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(241, 245, 249, 0.9) 0%, transparent 100%);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 60px;
  margin-bottom: 100px;
  position: relative;
  z-index: 1;
}

.article-card {
  background: #fff;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  transition: all 0.5s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  transform: perspective(1000px) rotateX(0deg);
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.article-card:hover::before {
  transform: scaleX(1);
}

.article-card:hover {
  transform: perspective(1000px) rotateX(-5deg) translateY(-20px);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
}

.article-image {
  height: 320px;
  overflow: hidden;
  position: relative;
}

.article-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.article-card:hover .article-image::after {
  opacity: 1;
}

.article-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.15);
}

.article-content {
  padding: 40px;
  position: relative;
}

.article-content h3 {
  font-size: 26px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 25px;
  line-height: 1.4;
  transition: color 0.4s ease;
}

.article-card:hover .article-content h3 {
  color: #667eea;
}

.article-content p {
  font-size: 17px;
  color: #5a6c7d;
  line-height: 1.8;
  margin-bottom: 30px;
  font-weight: 400;
}

.read-more {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.4s ease;
  position: relative;
  padding: 10px 0;
  display: inline-block;
  font-size: 16px;
}

.read-more::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: width 0.4s ease;
  border-radius: 2px;
}

.read-more:hover::after {
  width: 100%;
}

.read-more:hover {
  color: #5a67d8;
  transform: translateX(-8px);
}

.view-all-container {
  text-align: center;
  position: relative;
  z-index: 1;
}

.view-all-btn {
  display: inline-block;
  padding: 25px 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 60px;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.5s ease;
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
  border: 3px solid transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: buttonPulse 5.2s ease-in-out infinite;
}

.view-all-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.8s ease;
}

.view-all-btn:hover::before {
  left: 100%;
}

.view-all-btn:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(102, 126, 234, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Package Section */
.package-section {
  padding: 140px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.package-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars2" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="0.5" fill="rgba(255,255,255,0.15)"/><circle cx="90" cy="20" r="0.3" fill="rgba(255,255,255,0.15)"/><circle cx="20" cy="90" r="0.7" fill="rgba(255,255,255,0.15)"/><circle cx="80" cy="80" r="0.4" fill="rgba(255,255,255,0.15)"/></pattern></defs><rect width="100" height="100" fill="url(%23stars2)"/></svg>');
  opacity: 0.2;
  animation: float 25s ease-in-out infinite;
}

.package-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
}

.package-text h2 {
  font-size: 44px;
  font-weight: 300;
  margin-bottom: 35px;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.2;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.package-text p {
  font-size: 20px;
  line-height: 1.9;
  margin-bottom: 40px;
  opacity: 0.95;
  font-weight: 400;
}

.package-features {
  list-style: none;
  margin-bottom: 50px;
}

.package-features li {
  font-size: 18px;
  margin-bottom: 20px;
  opacity: 0.95;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.3s ease;
}

.package-features li:hover {
  transform: translateX(10px);
}

.package-features li::before {
  content: '✨';
  font-size: 22px;
  opacity: 0.9;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { 
    transform: scale(1) rotate(0deg); 
  }
  50% { 
    transform: scale(1.2) rotate(180deg); 
  }
}

.package-btn {
  display: inline-block;
  padding: 25px 55px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 60px;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.5s ease;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.package-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.8s ease;
}

.package-btn:hover::before {
  left: 100%;
}

.package-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.package-image {
  text-align: center;
  position: relative;
}

.package-image::before {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  right: -30px;
  bottom: -30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 30px;
  z-index: -1;
}

.package-image img {
  width: 100%;
  max-width: 580px;
  height: auto;
  border-radius: 25px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transition: all 0.6s ease;
  transform: perspective(1000px) rotateY(0deg);
}

.package-image:hover img {
  transform: perspective(1000px) rotateY(-5deg) scale(1.05);
  box-shadow: 0 45px 100px rgba(0, 0, 0, 0.5);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.6), transparent);
}

.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars3" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="0.3" fill="rgba(102,126,234,0.1)"/><circle cx="85" cy="25" r="0.2" fill="rgba(118,75,162,0.1)"/><circle cx="25" cy="85" r="0.4" fill="rgba(102,126,234,0.1)"/><circle cx="75" cy="75" r="0.3" fill="rgba(118,75,162,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23stars3)"/></svg>');
  opacity: 0.1;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 60px;
  margin-bottom: 80px;
  position: relative;
  z-index: 1;
}

.footer-section h3,
.footer-section h4 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 30px;
  color: #fff;
  position: relative;
  background: linear-gradient(135deg, #fff 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section h3::after,
.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.footer-section:hover h3::after,
.footer-section:hover h4::after {
  width: 80px;
}

.footer-section p {
  color: #bdc3c7;
  line-height: 1.8;
  font-size: 17px;
  font-weight: 400;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 18px;
}

.footer-links a {
  color: #bdc3c7;
  text-decoration: none;
  transition: all 0.4s ease;
  position: relative;
  padding: 8px 0;
  display: inline-block;
  font-size: 16px;
}

.footer-links a::before {
  content: '→';
  position: absolute;
  right: -25px;
  opacity: 0;
  transition: all 0.4s ease;
  color: #667eea;
}

.footer-links a:hover {
  color: #667eea;
  transform: translateX(-12px);
}

.footer-links a:hover::before {
  opacity: 1;
  right: -30px;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.social-link {
  color: #bdc3c7;
  text-decoration: none;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  font-weight: 500;
  font-size: 16px;
}

.social-link .icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}

.social-link:hover {
  color: #667eea;
  transform: translateX(8px);
}

.footer-bottom {
  text-align: center;
  padding-top: 60px;
  border-top: 1px solid #3a3a3a;
  position: relative;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.6), transparent);
}

.footer-bottom p {
  color: #95a5a6;
  font-size: 16px;
  font-weight: 400;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  html {
    font-size: 100%; /* Keep 16px base */
  }

  /* Better layout for package button on tablets/mobiles */
  .package-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .container {
    padding: 0 15px;
  }

  .section-header {
    margin-bottom: 40px;
    padding-top: 60px;
  }

  .section-header h2 {
    font-size: 28px;
    letter-spacing: 2px;
    margin-bottom: 15px;
  }
  
  .section-header p {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .about-item {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }
  
  .about-item.reverse {
    direction: rtl;
  }
  
  .about-item.reverse .about-content {
    direction: rtl;
    text-align: right;
  }
  
  .about-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .about-content h3::after {
    right: 0;
    left: auto;
  }
  
  .about-item.reverse .about-content h3::after {
    right: 0;
    left: auto;
  }

  .about-content p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 15px;
  }
  
  .about-content,
  .package-content {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }
  
  .articles-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
    margin-bottom: 40px;
  }
  
  .about-society,
  .featured-articles,
  .package-section {
    padding: 60px 0;
  }
  
  .footer {
    padding: 60px 0 40px;
  }
  
  .footer-content {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 40px;
  }
  
  .about-grid {
    gap: 50px;
  }
  
  .package-text h2 {
    font-size: 28px;
    margin-bottom: 20px;
  }
  
  .package-text p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 25px;
  }
  
  .package-features li {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .view-all-btn {
    padding: 18px 40px;
    font-size: 15px;
    min-width: 200px;
    min-height: 44px;
  }
  
  .cta {
    padding: 16px 32px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .about-image {
    width: 100%;
  }
  
  .about-image {
    aspect-ratio: 16 / 9;
  }
  .about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .article-image {
    height: 200px;
  }
  
  .article-content {
    padding: 20px;
  }
  
  .article-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .article-content p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
  }
  
  .package-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 48px;
    font-size: 16px;
    min-width: 220px;
    min-height: 48px;
    width: auto;
    max-width: 320px;
    margin: 18px auto 0;
  }

  .package-image {
    width: 100%;
  }

  .package-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .footer-section h3,
  .footer-section h4 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .footer-section p {
    font-size: 14px;
    line-height: 1.6;
  }

  .footer-links a,
  .social-link {
    font-size: 15px;
    padding: 10px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .mainNav {
    padding: 0 12px;
    height: 65px;
  }

  .mainNav__links {
    top: 65px;
    padding: 15px 12px;
  }

  /* Better spacing for hero controls and package button on very small screens */
  .scroll-indicator { bottom: 16px; }
  .package-btn { min-width: 240px; padding: 16px 52px; font-size: 16px; }

  .package-content {
    gap: 20px;
  }

  .package-text h2 {
    font-size: 28px;
  }

  .package-text p {
    font-size: 16px;
  }

  .package-features li {
    font-size: 14px;
  }

  .package-btn {
    min-width: 0;
    padding: 16px 32px;
    font-size: 15px;
    margin: 24px auto 0;
    width: 100%;
    max-width: 260px;
  }

  .mainNav__link {
    padding: 12px 15px;
    font-size: 15px;
    min-height: 44px;
  }

  .mainNav__icon {
    width: 44px;
    height: 44px;
  }
  
  .section-header {
    margin-bottom: 30px;
    padding-top: 50px;
  }
  
  .section-header h2 {
    font-size: 24px;
    letter-spacing: 1px;
    margin-bottom: 12px;
  }
  
  .section-header p {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .about-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
  }
  
  .about-content p {
    font-size: 14px;
    line-height: 1.7;
  }
  
  .article-content {
    padding: 18px;
  }
  
  .article-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }
  
  .article-content p {
    font-size: 13px;
    line-height: 1.6;
  }
  
  .package-text h2 {
    font-size: 24px;
    margin-bottom: 15px;
  }
  
  .package-text p {
    font-size: 15px;
    line-height: 1.7;
  }

  .package-features li {
    font-size: 15px;
    margin-bottom: 12px;
  }
  
  .about-society,
  .featured-articles,
  .package-section {
    padding: 50px 0;
  }
  
  .about-grid {
    gap: 40px;
  }
  
  .articles-grid {
    gap: 25px;
  }
  
  .footer {
    padding: 50px 0 30px;
  }
  
  .footer-content {
    gap: 35px;
  }
  
  .about-image {
    aspect-ratio: 16 / 9;
  }
  .about-image img {
    height: 100%;
  }
  
  .article-image {
    height: 180px;
  }
  
  .view-all-btn {
    padding: 16px 35px;
    font-size: 14px;
    min-width: 180px;
  }
  
  .package-btn {
    padding: 16px 35px;
    font-size: 14px;
    min-width: 180px;
  }
  
  .cta-group {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .cta {
    width: 100%;
    max-width: 280px;
    min-height: 44px;
  }
  
  .stats {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding-bottom: 0;
    width: 100%;
  }
  
  .stat-item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 90px;
    padding: 16px 14px;
  }

  .image-container {
    height: 200px;
    max-height: 220px;
  }

  .stat-number {
    font-size: 19px;
  }

  .stat-label {
    font-size: 11px;
  }

  .mainHeading__text {
    padding: 25px 15px;
  }

  .mainHeading__title {
    font-size: 22px !important;
  }

  .mainHeading__description {
    font-size: 13px !important;
  }

  .mainHeading__preTitle {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .badge {
    padding: 10px 18px;
    font-size: 12px;
    margin-bottom: 15px;
    min-height: 44px;
  }
}

.mainHeading__image {
  position: relative;
  max-width: 850px;
  width: 65%;
  flex-shrink: 0;
  animation: heroImageEntry 1s cubic-bezier(0.22, 0.8, 0.36, 1.1) 0.55s forwards;
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  z-index: 1;
  will-change: transform, opacity;
}

.image-container {
  position: relative;
  width: 100%;
  height: 680px;
  overflow: hidden;
  border-radius: 25px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  animation: heroFloat 12s ease-in-out 1s infinite;
  transform-origin: center;
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: opacity 1s ease-in-out;
  opacity: 0;
}

.image-container img:nth-child(2) {
  object-position: center 75%;
}

.image-container img.hero-slide.active {
  opacity: 1;
}

.image-container::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 65% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 55%);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: orbDrift 18s ease-in-out infinite;
  pointer-events: none;
}

.image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 20, 0.6) 0%, rgba(6, 10, 20, 0.15) 100%);
  z-index: 1;
  pointer-events: none;
}

.image-container:hover img.active {
  transform: scale(1.05);
}

.floating-card {
  display: none;
}

.floating-card::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 30% 20%, rgba(102, 126, 234, 0.25) 0%, transparent 60%);
  opacity: 0;
  mix-blend-mode: multiply;
  animation: cardAura 5.5s ease-in-out 1.5s infinite;
  pointer-events: none;
}

@keyframes gentleFloat {
  0%, 100% { 
    transform: translateY(0px) scale(1); 
  }
  50% { 
    transform: translateY(-8px) scale(1.02); 
  }
}

.card-icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}

.card-content h4 {
  color: #2c3e50;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-content p {
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  z-index: 2;
  animation: fadeIn 1s 1.6s ease backwards;
  filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.45));
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateX(-50%) translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateX(-50%) translateY(0); 
  }
}

.scroll-text {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: scrollGlow 3.8s ease-in-out infinite;
}

.scroll-arrow {
  font-size: 24px;
  animation: scrollBounce 2.8s ease-in-out infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { 
    transform: translateY(0); 
  }
  40% { 
    transform: translateY(-10px); 
  }
  60% { 
    transform: translateY(-5px); 
  }
}

@media screen and (max-width: 799px) {
  .mainHeading__image {
    width: 100%;
    margin-top: 10px;
    display: block;
  }
  
  .image-container {
    aspect-ratio: auto;
    height: 220px;
    max-height: 240px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
  }
  
  .floating-card {
    top: 10px;
    right: 10px;
    padding: 12px;
    font-size: 12px;
  }
  
  .card-icon {
    font-size: 20px;
    margin-bottom: 8px;
  }
  
  .card-content h4 {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .card-content p {
    font-size: 11px;
    line-height: 1.4;
  }
  
  .scroll-indicator {
    bottom: 20px;
    font-size: 12px;
  }

  .scroll-text {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .scroll-arrow {
    font-size: 20px;
  }

  /* Hide decorative about section on mobile */
  .about {
    display: none;
  }

  /* Improve container padding on very small screens */
  .container {
    padding: 0 15px;
  }

  /* Better spacing for sections */
  section {
    padding: 50px 0;
  }
}

/* Extra small devices */
@media screen and (max-width: 360px) {
  .mainNav {
    padding: 0 10px;
    height: 60px;
  }

  .mainNav__logo {
    gap: 8px;
  }

  .logo-text {
    font-size: 12px;
  }

  .mainNav__links {
    top: 60px;
    padding: 12px 10px;
  }

  .mainHeading {
    padding-top: 70px;
    padding-bottom: 30px;
  }

  .mainHeading__text {
    padding: 20px 12px !important;
  }

  .mainHeading__title {
    font-size: 20px !important;
  }

  .mainHeading__description {
    font-size: 12px !important;
  }

  .section-header {
    padding-top: 40px;
    margin-bottom: 30px;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .section-header p {
    font-size: 13px;
  }

  .container {
    padding: 0 10px;
  }

  .about-society,
  .featured-articles,
  .package-section {
    padding: 40px 0;
  }
}

/* ===== NEW ANIMATIONS ===== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg); 
  }
  50% { 
    transform: translateY(-20px) rotate(180deg); 
  }
}

@keyframes sparkle {
  0%, 100% { 
    transform: scale(1) rotate(0deg); 
  }
  50% { 
    transform: scale(1.2) rotate(180deg); 
  }
}

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

@keyframes rotate {
  from { 
    transform: rotate(0deg); 
  }
  to { 
    transform: rotate(360deg); 
  }
}

@keyframes auroraShift {
  0% {
    background-position: 0% 40%;
  }
  50% {
    background-position: 100% 60%;
  }
  100% {
    background-position: 0% 45%;
  }
}

@keyframes starDrift {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.05) translate3d(12px, -10px, 0);
    opacity: 0.6;
  }
  100% {
    transform: scale(1) translate3d(-10px, 8px, 0);
    opacity: 0.5;
  }
}

@keyframes accentSlide {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes glassSweep {
  0% {
    opacity: 0;
    transform: translateX(-65%);
  }
  20%, 60% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translateX(65%);
  }
}

@keyframes statPop {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateY(-6px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes glowPulse {
  0%, 100% {
    text-shadow: 0 0 8px rgba(102, 126, 234, 0.4);
  }
  50% {
    text-shadow: 0 0 16px rgba(102, 126, 234, 0.8);
  }
}

@keyframes heroImageEntry {
  0% {
    opacity: 0;
    transform: translateY(80px) scale(0.9);
  }
  70% {
    opacity: 1;
    transform: translateY(-12px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes heroFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -18px, 0) scale(1.02);
  }
}

@keyframes orbDrift {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: rotate(12deg) scale(1.05);
    opacity: 0.55;
  }
  100% {
    transform: rotate(-8deg) scale(0.98);
    opacity: 0.35;
  }
}

@keyframes cardGlow {
  0%, 100% {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 26px 50px rgba(102, 126, 234, 0.25);
  }
}

@keyframes cardAura {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(1.08);
  }
}

@keyframes badgeGlow {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.35);
  }
  50% {
    box-shadow: 0 14px 36px rgba(118, 75, 162, 0.42);
  }
}

@keyframes badgeSpark {
  0%, 100% {
    opacity: 0;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes scrollGlow {
  0%, 100% {
    color: rgba(255, 255, 255, 0.7);
  }
  50% {
    color: rgba(255, 255, 255, 1);
  }
}

@keyframes scrollBounce {
  0%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-4px);
  }
}

@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 20px 52px rgba(102, 126, 234, 0.45);
    transform: translateY(-3px);
  }
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateX(-50%) translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateX(-50%) translateY(0); 
  }
}

[data-theme="dark"] .mainHeading__title {
  background: none;
  -webkit-text-fill-color: initial;
  color: #e5e7eb;
}

[data-theme="dark"] .footer-section h3,
[data-theme="dark"] .footer-section h4 {
  background: none;
  -webkit-text-fill-color: initial;
  color: #e5e7eb;
}

[data-theme="dark"] .section-header h2 {
  background: none;
  -webkit-text-fill-color: initial;
  color: #e5e7eb;
}

[data-theme="dark"] .section-header p {
  color: #94a3b8;
}
