/* ============================================
   LANDING PAGE STYLES
   Purpose: Styles specific to landing.ejs
   Mobile-first approach
   ============================================ */

/* ============================================
   HERO SECTION .hero::before
   ============================================ */

.hero {
  padding: 60px 20px;
  background: linear-gradient(135deg, #5B8DDB 0%, #7BA5E8 100%);
  color: var(--text-on-primary);
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 97.98px);
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .hero {
    padding: 100px 40px;
  }
}

.hero .btn-large{
  color: white;
}

.hero .container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
}

@media (min-width: 768px) {
  .hero .container {
    flex-direction: row;
    gap: 60px;
    align-items: center;
  }
}

.hero-content {
  flex: 1;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-content {
    text-align: left;
  }
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-on-primary);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 48px;
    margin-bottom: 24px;
  }
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.95);
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 22px;
    margin-bottom: 40px;
  }
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .hero-buttons {
    flex-direction: row;
    gap: 20px;
  }
}

.hero-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero-image {
    flex: 1;
  }
}

.hero-illustration {
  font-size: 120px;
  animation: float 3s ease-in-out infinite;
}

@media (min-width: 768px) {
  .hero-illustration {
    font-size: 180px;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ============================================
   HOW IT WORKS SECTION hero-background-image
   ============================================ */

.how-it-works {
  padding: 60px 20px;
  background-color: var(--bg-white);
}

@media (min-width: 768px) {
  .how-it-works {
    padding: 100px 40px;
  }
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .section-title {
    font-size: 42px;
    margin-bottom: 20px;
  }
}

.section-subtitle {
  font-size: 18px;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text-medium);
}

@media (min-width: 768px) {
  .section-subtitle {
    font-size: 20px;
    margin-bottom: 64px;
  }
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.feature-card {
  background-color: var(--card-bg);
  padding: 32px 24px;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all var(--transition-normal);
  opacity: 0;
  transform: translateY(30px);
}

@media (min-width: 768px) {
  .feature-card {
    padding: 40px 28px;
  }
}

.feature-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  animation: slideUp 0.6s ease forwards;
}

@media (min-width: 768px) {
  .feature-card.animate-in {
    animation: slideUp 0.6s ease forwards;
  }
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-8px);
}

@media (min-width: 768px) {
  .feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
  }
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .feature-icon {
    font-size: 56px;
    margin-bottom: 24px;
  }
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .feature-title {
    font-size: 22px;
    margin-bottom: 16px;
  }
}

.feature-text {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-medium);
}

@media (min-width: 768px) {
  .feature-text {
    font-size: 16px;
    margin-bottom: 24px;
  }
}

.feature-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

@media (min-width: 768px) {
  .feature-link {
    font-size: 16px;
  }
}

.feature-link:hover {
  color: var(--primary-blue-hover);
  text-decoration: none;
}

@media (min-width: 768px) {
  .feature-link:hover {
    color: var(--primary-blue-hover);
  }
}

/* ============================================
   FEATURED POSTS SECTION
   ============================================ */

.featured-posts {
  padding: 60px 20px;
  background-color: var(--bg-cream);
}

@media (min-width: 768px) {
  .featured-posts {
    padding: 100px 40px;
  }
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .section-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
  }
}

.view-all-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

@media (min-width: 768px) {
  .view-all-link {
    font-size: 18px;
  }
}

.view-all-link:hover {
  color: var(--primary-blue-hover);
  text-decoration: none;
}

@media (min-width: 768px) {
  .view-all-link:hover {
    color: var(--primary-blue-hover);
  }
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.post-placeholder {
  background-color: var(--card-bg);
  padding: 60px 32px;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-sm);
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
}

@media (min-width: 768px) {
  .post-placeholder {
    padding: 80px 40px;
  }
}

.post-placeholder.animate-in {
  opacity: 1;
  transform: translateY(0);
  animation: slideUp 0.6s ease forwards;
}

@media (min-width: 768px) {
  .post-placeholder.animate-in {
    animation: slideUp 0.6s ease forwards;
  }
}

.placeholder-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

@media (min-width: 768px) {
  .placeholder-icon {
    font-size: 80px;
    margin-bottom: 24px;
  }
}

.placeholder-text {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .placeholder-text {
    font-size: 18px;
    margin-bottom: 32px;
  }
}

/* ============================================
   ST. JUDE SECTION
   ============================================ */

.stjude-section {
  padding: 60px 20px;
  background: linear-gradient(135deg, #FF6B9D 0%, #FF5288 100%);
  color: var(--text-on-primary);
}

@media (min-width: 768px) {
  .stjude-section {
    padding: 100px 40px;
  }
}

.stjude-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 768px) {
  .stjude-content {
    max-width: 900px;
  }
}

.stjude-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-on-primary);
}

@media (min-width: 768px) {
  .stjude-title {
    font-size: 38px;
    margin-bottom: 24px;
  }
}

.stjude-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.95);
}

@media (min-width: 768px) {
  .stjude-text {
    font-size: 18px;
    margin-bottom: 48px;
  }
}

.stjude-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .stjude-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    margin-bottom: 48px;
  }
}

.stat-item {
  text-align: center;
}

@media (min-width: 768px) {
  .stat-item {
    text-align: center;
  }
}

.stat-number {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--text-on-primary);
}

@media (min-width: 768px) {
  .stat-number {
    font-size: 72px;
    margin-bottom: 16px;
  }
}

.stat-label {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 768px) {
  .stat-label {
    font-size: 18px;
  }
}

.stjude-disclaimer {
  font-size: 14px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
}

@media (min-width: 768px) {
  .stjude-disclaimer {
    font-size: 16px;
    margin-bottom: 40px;
  }
}

.stjude-btn {
  background-color: var(--bg-white);
  color: var(--accent-pink);
  border: 2px solid var(--bg-white);
}

@media (min-width: 768px) {
  .stjude-btn {
    background-color: var(--bg-white);
  }
}

.stjude-btn:hover {
  background-color: transparent;
  color: var(--text-on-primary);
  border-color: var(--bg-white);
  text-decoration: none;
}

@media (min-width: 768px) {
  .stjude-btn:hover {
    background-color: transparent;
  }
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
  padding: 60px 20px;
  background-color: var(--bg-light);
}

@media (min-width: 768px) {
  .cta-section {
    padding: 100px 40px;
  }
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 768px) {
  .cta-content {
    max-width: 800px;
  }
}

.cta-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .cta-title {
    font-size: 38px;
    margin-bottom: 20px;
  }
}

.cta-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
  color: var(--text-medium);
}

@media (min-width: 768px) {
  .cta-text {
    font-size: 18px;
    margin-bottom: 40px;
  }
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

@media (min-width: 768px) {
  .cta-buttons {
    flex-direction: row;
    gap: 20px;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================
   POST CARDS (FOR FEATURED POSTS)
   ============================================ */

.post-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  opacity: 0;
  transform: translateY(30px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 768px) {
  .post-card {
    display: flex;
  }
}

.post-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  animation: slideUp 0.6s ease forwards;
}

@media (min-width: 768px) {
  .post-card.animate-in {
    animation: slideUp 0.6s ease forwards;
  }
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-8px);
}

@media (min-width: 768px) {
  .post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
  }
}

.post-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .post-content {
    padding: 28px;
  }
}

.post-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
  line-height: 1.3;
}

@media (min-width: 768px) {
  .post-title {
    font-size: 20px;
    margin-bottom: 16px;
  }
}

.post-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

@media (min-width: 768px) {
  .post-title a {
    color: var(--text-dark);
  }
}

.post-title a:hover {
  color: var(--primary-blue);
  text-decoration: none;
}

@media (min-width: 768px) {
  .post-title a:hover {
    color: var(--primary-blue);
  }
}

.post-excerpt {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--text-medium);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .post-excerpt {
    font-size: 15px;
    margin-bottom: 20px;
  }
}

.post-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-light);
}

@media (min-width: 768px) {
  .post-meta {
    flex-direction: row;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
  }
}

.post-author {
  font-weight: 600;
}

@media (min-width: 768px) {
  .post-author {
    font-weight: 600;
  }
}

.post-date {
  color: var(--text-light);
}

@media (min-width: 768px) {
  .post-date {
    color: var(--text-light);
  }
}

.post-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .post-stats {
    gap: 20px;
    margin-bottom: 20px;
  }
}

.post-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-medium);
}

@media (min-width: 768px) {
  .post-stats .stat-item {
    gap: 8px;
    font-size: 15px;
  }
}

.post-stats .stat-icon {
  font-size: 16px;
}

@media (min-width: 768px) {
  .post-stats .stat-icon {
    font-size: 18px;
  }
}

.post-stats .stat-value {
  font-weight: 600;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .post-stats .stat-value {
    font-weight: 600;
  }
}

.post-link {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary-blue);
  color: var(--text-on-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  transition: background-color var(--transition-fast);
  border-radius: 0 0 var(--radius-large) var(--radius-large);
  margin-top: auto;
}

@media (min-width: 768px) {
  .post-link {
    padding: 14px 28px;
    font-size: 15px;
  }
}

.post-link:hover {
  background-color: var(--primary-blue-hover);
  color: var(--text-on-primary);
  text-decoration: none;
}

@media (min-width: 768px) {
  .post-link:hover {
    background-color: var(--primary-blue-hover);
  }
}


/* ============================================
   COSMIC GOLD STAR
   ============================================ */

.cosmic-star-container {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .cosmic-star-container {
    width: 220px;
    height: 220px;
  }
}

/* Canvas for particles (behind star) */
#starCanvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 768px) {
  #starCanvas {
    width: 300px;
    height: 300px;
  }
}

/* Main SVG star */
.cosmic-star {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
  animation: floatStar 4s ease-in-out infinite, rotateStar 30s linear infinite;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6)) 
          drop-shadow(0 0 30px rgba(255, 215, 0, 0.3));
  transition: transform 0.3s ease, filter 0.3s ease;
}

@media (min-width: 768px) {
  .cosmic-star {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7)) 
            drop-shadow(0 0 40px rgba(255, 215, 0, 0.4));
  }
}

/* Hover effect */
.cosmic-star-container:hover .cosmic-star {
  transform: scale(1.15);
  filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.9)) 
          drop-shadow(0 0 50px rgba(255, 215, 0, 0.6));
}

@media (min-width: 768px) {
  .cosmic-star-container:hover .cosmic-star {
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 1)) 
            drop-shadow(0 0 60px rgba(255, 215, 0, 0.7));
  }
}

/* Glow rings */
.glow-ring {
  animation: glowPulse 3s ease-in-out infinite;
}

.glow-ring-outer {
  animation-delay: 0s;
}

.glow-ring-middle {
  animation-delay: 0.5s;
}

.glow-ring-inner {
  animation-delay: 1s;
}

/* Light rays rotation */
.light-rays {
  transform-origin: center;
  animation: rotateRays 20s linear infinite;
}

/* Animations */
@keyframes floatStar {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-15px) translateX(5px);
  }
  50% {
    transform: translateY(0px) translateX(10px);
  }
  75% {
    transform: translateY(-10px) translateX(5px);
  }
}

@keyframes rotateStar {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateRays {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 0.6;
  }
}


/* ============================================
   HERO BACKGROUND IMAGES (AUTO-DETECTED)
   ============================================ */

.hero-backgrounds {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 0%;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

@media (min-width: 768px) {
  .hero-background-image {
    transition: opacity 2.5s ease-in-out;
  }
}

.hero-background-image.active {
  opacity: 0.25;
  animation: kenBurns 20s ease-in-out infinite alternate;
}

@media (min-width: 768px) {
  .hero-background-image.active {
    opacity: 0.3;
  }
}

/* Ken Burns effect (subtle zoom and pan) */
@keyframes kenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.1) translate(-2%, -2%);
  }
}

/* Ensure gradient overlay stays on top of images */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: linear-gradient(135deg, rgba(91, 141, 219, 0.6) 0%, rgba(123, 165, 232, 0.6) 100%); */
  z-index: 1;
  pointer-events: none;
}

@media (min-width: 768px) {
  .hero::before {
    /* background: linear-gradient(135deg, rgb(91 141 219 / 27%) 0%, rgb(123 165 232 / 33%) 100%); */
  }
}

/* Ensure hero content stays on top */
.hero .container {
  position: relative;
  z-index: 2;
}

/* Update existing hero position */
.hero {
  position: relative;
}



.hero-background-image.active {
  opacity: 0.4;
  animation: kenBurns 20s ease-in-out infinite alternate;
}

@media (min-width: 768px) {
  .hero-background-image.active {
    opacity: 0.5;
  }
}