/* ============================================
   KṬP Saikhamakawn — Page Styles
   Homepage & section-specific styles
   ============================================ */

/* ========================
   HOMEPAGE HERO
   ======================== */
.hero {
  position: relative;
  min-height: auto;
  padding-top: 4rem;
  padding-bottom: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: var(--color-bg);
  background-image: 
    linear-gradient(to bottom, rgba(248, 250, 252, 0.6), rgba(248, 250, 252, 0.95)),
    url('../images/hero-bg.jpeg');
  background-size: cover;
  background-position: top center;
}

@media (min-width: 768px) {
  .hero {
    min-height: 80vh;
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

[data-theme="dark"] .hero {
  background-image: 
    linear-gradient(to bottom, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.95)),
    url('../images/hero-bg.jpeg');
}

.hero-bg-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-decoration::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(135, 206, 235, 0.18), transparent 70%);
  animation: hero-orb-drift 8s ease-in-out infinite alternate;
}

.hero-bg-decoration::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.12), transparent 70%);
  animation: hero-orb-drift 10s ease-in-out infinite alternate-reverse;
}

@keyframes hero-orb-drift {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50%  { transform: translate(30px, -20px) scale(1.08); opacity: 1; }
  100% { transform: translate(-20px, 15px) scale(0.95); opacity: 0.8; }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--sp-8) var(--sp-4);
  max-width: 700px;
}

.hero-logo {
  height: 120px;
  width: auto;
  margin: 0 auto var(--sp-6);
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px rgba(135, 206, 235, 0.3));
}

@media (min-width: 768px) {
  .hero-logo {
    height: 160px;
    width: auto;
  }
}

.hero-title {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  margin-bottom: var(--sp-2);
  color: var(--color-text);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--brand-sky), var(--brand-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  background: linear-gradient(135deg, var(--brand-gold), var(--brand-sky));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--sp-3);
  letter-spacing: 1px;
}

.hero-description {
  font-size: var(--fs-md);
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto var(--sp-6);
  line-height: var(--lh-relaxed);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}

.hero-scroll-indicator {
  display: none;
}

@media (min-width: 768px) {
  .hero-scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    position: absolute;
    bottom: var(--sp-6);
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-bounce 2s ease-in-out infinite;
    color: var(--color-text-tertiary);
    font-size: var(--fs-xs);
    letter-spacing: 1px;
    text-transform: uppercase;
  }
}

.hero-scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--color-text-tertiary);
  border-bottom: 2px solid var(--color-text-tertiary);
  transform: rotate(45deg);
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50%      { transform: translateX(-50%) translateY(8px); opacity: 0.5; }
}

/* ========================
   STATISTICS HIGHLIGHT (Homepage)
   ======================== */
.stats-highlight-section {
  position: relative;
  background: transparent;
}

[data-theme="light"] .stats-highlight-section {
  background: transparent;
}

.stats-highlight-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-sky), var(--brand-gold), transparent);
  border-radius: 2px;
}

.stats-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .stats-highlight-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 900px) {
  .stats-highlight-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
  }
}

.stat-highlight-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
  /* Hardware acceleration for smooth scrolling */
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

[data-theme="light"] .stat-highlight-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

/* The Cosmic Glowing Orb */
.stat-highlight-card::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--brand-sky) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(20px);
  z-index: 0;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
}

.stat-highlight-card:nth-child(even)::before {
  background: radial-gradient(circle, var(--brand-gold) 0%, transparent 70%);
}

[data-theme="light"] .stat-highlight-card::before {
  opacity: 0.3;
}

.stat-highlight-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .stat-highlight-card:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 1);
}

.stat-highlight-card:hover::before {
  width: 200px; height: 200px;
  opacity: 0.35;
}

[data-theme="light"] .stat-highlight-card:hover::before {
  opacity: 0.5;
}

.stat-highlight-value {
  font-family: inherit;
  font-size: clamp(3rem, 7vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
  z-index: 1;
  position: relative;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .stat-highlight-value {
  background: linear-gradient(180deg, var(--brand-sky-dark) 0%, var(--brand-sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: none;
}

.stat-highlight-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-transform: capitalize;
  letter-spacing: 0.5px;
  z-index: 1;
  position: relative;
}

[data-theme="light"] .stat-highlight-label {
  color: var(--color-text-secondary);
}

[data-theme="light"] .stat-highlight-label {
  color: var(--color-text-secondary);
}

/* ========================
   ANNOUNCEMENTS SECTION
   ======================== */
.announcements-section {
  position: relative;
  background-color: var(--color-bg-alt);
  background-image: 
    radial-gradient(circle at top right, rgba(135, 206, 235, 0.08) 0%, transparent 60%),
    radial-gradient(circle at bottom left, rgba(255, 215, 0, 0.04) 0%, transparent 60%),
    linear-gradient(145deg, rgba(255,255,255,0.02) 0%, transparent 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.announcements-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-gold), var(--brand-sky), transparent);
  border-radius: 2px;
}

.carousel-container {
  position: relative;
  width: 100%;
}

.carousel-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: var(--sp-6);
  width: 60px;
  background: linear-gradient(to right, transparent, var(--color-bg-alt));
  pointer-events: none;
  z-index: 5;
}

@media (min-width: 768px) {
  .carousel-container::after {
    width: 100px;
  }
}

.announcements-scroll {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding: var(--sp-4) 0 var(--sp-6) 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-sky) transparent;
}

.announcements-scroll::-webkit-scrollbar {
  height: 6px;
  display: block !important;
}

.announcements-scroll::-webkit-scrollbar-track {
  background: rgba(128, 128, 128, 0.1);
  border-radius: 6px;
}

.announcements-scroll::-webkit-scrollbar-thumb {
  background: var(--brand-sky);
  border-radius: 6px;
}

.carousel-nav-buttons {
  display: flex;
  gap: var(--sp-2);
}

.carousel-btn {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.carousel-btn:hover {
  background: var(--brand-sky);
  color: #fff;
  border-color: var(--brand-sky);
}

@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
}

.announcement-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--card-shadow);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

.poster-card {
  height: 220px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
}

.poster-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
  padding: var(--sp-4);
  width: 100%;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

@media (min-width: 768px) {
  .announcement-card {
    flex: 0 0 280px;
  }
  .poster-card {
    height: 260px;
  }
}

.announcement-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow), 0 0 20px rgba(135, 206, 235, 0.15);
}

.announcement-date {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--brand-sky);
  font-weight: var(--fw-medium);
  margin-bottom: var(--sp-3);
}

.announcement-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
  color: var(--color-text);
}

.announcement-text {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================
   QUICK ACCESS SECTION
   ======================== */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 2vw, var(--sp-3));
  margin: clamp(1rem, 4vh, var(--sp-6)) auto 0;
  max-width: 600px;
  padding: 0 clamp(12px, 3vw, var(--sp-4));
}

@media (min-width: 640px) {
  .quick-access-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
  }
}

.quick-card {
  position: relative;
  padding: clamp(10px, 2vh, var(--sp-4)) clamp(8px, 2vw, var(--sp-2));
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .quick-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.quick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: skewX(-20deg);
  transition: all 0.6s ease;
}

.quick-card:hover::before {
  left: 150%;
}

.quick-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .quick-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.1);
}

.quick-card-icon {
  width: clamp(32px, 10vw, 48px);
  height: clamp(32px, 10vw, 48px);
  margin: 0 auto clamp(6px, 1.5vh, var(--sp-3));
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.quick-card-icon svg {
  width: clamp(20px, 5vw, 24px);
  height: clamp(20px, 5vw, 24px);
}

.quick-card:hover .quick-card-icon {
  transform: scale(1.15) rotate(-5deg);
}

.quick-card:nth-child(1) .quick-card-icon {
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.2), rgba(135, 206, 235, 0.05));
  color: var(--brand-sky);
  box-shadow: 0 4px 12px rgba(135, 206, 235, 0.2);
}

.quick-card:nth-child(2) .quick-card-icon {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
  color: var(--brand-gold-dark);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.15);
}

.quick-card:nth-child(3) .quick-card-icon {
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.15), rgba(220, 20, 60, 0.05));
  color: var(--brand-red);
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.15);
}

.quick-card:nth-child(4) .quick-card-icon {
  background: linear-gradient(135deg, rgba(50, 205, 50, 0.15), rgba(50, 205, 50, 0.05));
  color: #32cd32;
  box-shadow: 0 4px 12px rgba(50, 205, 50, 0.15);
}

.quick-card-title {
  font-family: var(--font-heading);
  font-size: clamp(0.75rem, 3.5vw, 0.95rem);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: 0;
  letter-spacing: 0.5px;
}

/* ========================
   FEATURED CONTENT
   ======================== */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 640px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.featured-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-base);
  text-decoration: none;
  display: block;
}

.featured-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--brand-sky);
}

.featured-card-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.featured-card:hover .featured-card-image {
  transform: scale(1.05);
}

.featured-card-overlay {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
}

.featured-card-body {
  padding: var(--sp-4) var(--sp-5);
}

.featured-card-title {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: var(--sp-1);
}

.featured-card-meta {
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
}

/* ========================
   GALLERY SECTION
   ======================== */
.gallery-section {
  background: var(--color-bg-alt);
  position: relative;
}

.gallery-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-sky), var(--brand-gold), transparent);
  border-radius: 2px;
}

/* ========================
   FEATURED VIDEO SECTION
   ======================== */
.video-section {
  position: relative;
  background: transparent;
}

.video-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-sky), var(--brand-gold), transparent);
  border-radius: 2px;
}

/* ========================
   SOCIAL SECTION (Homepage)
   ======================== */
.social-section {
  text-align: center;
  position: relative;
  background: var(--color-bg-alt);
}

.social-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-sky), var(--brand-gold), transparent);
  border-radius: 2px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  justify-content: center;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-1);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  transition: all var(--transition-base);
  text-align: center;
}

.social-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.social-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  font-size: 1.25rem;
  transition: transform var(--transition-base);
}

@media (min-width: 640px) {
  .social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
  }
  .social-card {
    flex: 1;
    min-width: 240px;
    max-width: 320px;
    padding: var(--sp-6) var(--sp-8);
    gap: var(--sp-3);
    border-radius: var(--radius-2xl);
  }
  .social-card-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    border-radius: var(--radius-xl);
  }
}

.social-card:hover .social-card-icon {
  transform: scale(1.15) rotate(5deg);
}

.social-card.instagram .social-card-icon {
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.15), rgba(253, 29, 29, 0.15), rgba(252, 176, 69, 0.15));
  color: #e1306c;
}

.social-card.facebook .social-card-icon {
  background: rgba(24, 119, 242, 0.1);
  color: #1877f2;
}

.social-card.youtube .social-card-icon {
  background: rgba(255, 0, 0, 0.08);
  color: #ff0000;
}

.social-card-name {
  font-family: var(--font-heading);
  font-size: clamp(0.7rem, 2.5vw, var(--fs-sm));
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  line-height: 1.1;
}

.social-card-handle {
  display: none;
}

@media (min-width: 640px) {
  .social-card-name {
    font-size: var(--fs-sm);
  }
  .social-card-handle {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-text-tertiary);
  }
}

/* ========================
   PHOTO GALLERY PAGE
   ======================== */
.gallery-item {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg-card);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-base);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.gallery-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-4);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay-title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-1);
}

.gallery-overlay-meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-xs);
}

.gallery-overlay-actions {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  display: flex;
  gap: var(--sp-2);
}

.gallery-action-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.gallery-action-btn:hover {
  background: var(--brand-sky);
  transform: scale(1.1);
}

/* Photo placeholder (CSS gradient) */
.photo-placeholder {
  width: 100%;
  display: block;
}

/* ========================
   DOCUMENT / SERMON CARDS
   ======================== */
.doc-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-base);
}

.doc-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--brand-sky);
}

.doc-card-content {
  flex: 1;
  min-width: 0;
}

.doc-card-title {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: var(--sp-1);
}

.doc-card-desc {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--sp-2);
}

.doc-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
}

.doc-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.doc-card-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
  align-self: center;
}

/* ========================
   MODERN DOC CARDS (Ultra-Premium Redesign)
   ======================== */
.modern-doc-card {
  position: relative;
  padding: 16px;
  background: transparent;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  z-index: 1;
}

.modern-doc-card:hover {
  background: var(--color-bg-hover);
  border-color: rgba(135, 206, 235, 0.3);
}

.modern-doc-header {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.modern-doc-badge {
  display: inline-flex;
  align-items: center;
  color: var(--brand-sky);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.modern-doc-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modern-doc-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--color-text);
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modern-doc-card:hover .modern-doc-title {
  color: var(--brand-sky);
}

/* Force strip massive inline styles if they sneak in */
.modern-doc-title * {
  font-size: 1.15rem !important;
  margin: 0 !important;
  line-height: inherit !important;
}

.modern-doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  margin-top: 4px;
}

.modern-doc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modern-doc-meta svg {
  color: var(--brand-sky);
  opacity: 0.7;
}

.modern-doc-desc {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: var(--sp-1);
}

.modern-doc-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--color-border);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.modern-doc-card:hover .modern-doc-footer {
  opacity: 1;
}

.modern-doc-readmore {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-sky);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-doc-readmore svg {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modern-doc-card:hover .modern-doc-readmore svg {
  transform: translateX(4px);
}
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(135, 206, 235, 0.3);
}

/* Featured items section on content pages */
.featured-section {
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--color-border-light);
}

.featured-section .section-header {
  text-align: left;
  margin-bottom: var(--sp-4);
}

.featured-scroll {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.featured-scroll>* {
  flex: 0 0 85%;
  max-width: 350px;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .featured-scroll>* {
    flex: 0 0 300px;
  }
}/* Modern Alphabet Filter */
.alphabet-filter-container {
  display: flex;
  gap: 4px;
  padding: 6px;
  padding-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.alphabet-filter-container::-webkit-scrollbar {
  height: 6px;
}
.alphabet-filter-container::-webkit-scrollbar-track {
  background: transparent;
}
.alphabet-filter-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}
.alphabet-filter-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}
.alphabet-modern-chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
}
.alphabet-modern-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
}
.alphabet-modern-chip.active {
  background: linear-gradient(135deg, var(--brand-sky), #3b82f6);
  color: #fff;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

/* Modern Selection Toolbar */
.modern-selection-toolbar {
  background: rgba(25, 30, 40, 0.6) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 8px 16px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}
  
/* ========================  
   GOOGLE DRIVE STYLE CARDS  
   ======================== */  
.gdrive-no-preview { width: 100%; aspect-ratio: 16 / 9; max-height: 120px; display: flex; align-items: center; justify-content: center; background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 4px; color: var(--color-text-tertiary); }
.gdrive-card { position: relative; display: flex; flex-direction: column; background: var(--color-bg-card); border: 1px solid var(--color-border-light); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }  
.gdrive-card:hover { background: var(--color-bg-hover); }  
.gdrive-header { display: flex; align-items: center; padding: 12px 14px; gap: 10px; border-bottom: 1px solid transparent; }  
.gdrive-icon-wrapper { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }  
.gdrive-pdf-badge { background-color: #ea4335; color: white; font-size: 8px; font-weight: 700; padding: 2px 4px; border-radius: 3px; line-height: 1; letter-spacing: 0.5px; }  
.gdrive-title { flex: 1; font-size: 0.85rem; font-weight: 500; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  
.gdrive-menu { color: var(--color-text-tertiary); display: flex; align-items: center; justify-content: center; border-radius: 50%; padding: 4px; margin-right: -4px; }  
.gdrive-menu:hover { background: rgba(0,0,0,0.05); color: var(--color-text); }  
[data-theme="dark"] .gdrive-menu:hover { background: rgba(255,255,255,0.1); }
.gdrive-preview-container { padding: 0 14px 14px 14px; flex: 1; display: flex; align-items: center; justify-content: center; background: transparent; }
.gdrive-thumbnail { width: 100%; aspect-ratio: 16 / 9; max-height: 120px; object-fit: cover; object-position: top; background: #fff; border: 1px solid rgba(0,0,0,0.1); border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
  
/* ========================  
   DOCUMENTS LIST GRID OVERRIDE  
   ======================== */  
#documents-list, .gdrive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }  
@media (min-width: 640px) { #documents-list, .gdrive-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { #documents-list, .gdrive-grid { grid-template-columns: repeat(4, 1fr); } }


.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
  }
}
