﻿/* CSS Variables & Reset */
:root {
  /* Color Palette - Vermilion Red & Gold (Tokyo Night Light White Base) */
  --primary-color: #c9242b;
  /* Vermilion Red */
  --secondary-color: #d69e6e;
  /* Gold */
  --bg-color: #f2f5f9;
  /* White Tokyo Night Light (Cool White) */
  --text-color: #2d2d2d;
  /* Dark Grey */
  --text-light: #666666;
  --card-bg: #ffffff;
  --line-green: #06c755;

  /* Spacing */
  --container-width: 1200px;
  --section-padding: 80px 0;

  /* Transitions */
  --transition: all 0.3s ease;
}

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

/* 
 * Font Strategy:
 * - All text (Thai & English): Bai Jamjuree
 */
body {
  font-family: "Bai Jamjuree", sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.7;
  font-size: 15px;
}

h1,
h2,
h3,
h4,
.logo-text {
  font-family: "Bai Jamjuree", sans-serif;
  font-weight: 600;
}

/* Legacy helper class - kept for compatibility */
.en-font {
  font-family: "Bai Jamjuree", sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.hide-desktop {
  display: none;
}

@media (max-width: 768px) {
  .hide-desktop {
    display: block;
  }
}

ul {
  list-style: none;
}

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

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

/* Header - Default (Non-homepage): Always Red */
.site-header {
  background: var(--primary-color);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header .logo-text {
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
}

/* Main Navigation */
.main-nav ul {
  display: flex;
  gap: 30px;
  align-items: center;
}

.main-nav a {
  font-size: 1rem;
  font-weight: 500;
}

.main-nav a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Homepage Specific Header Styles */
body.home .site-header {
  position: fixed;
  width: 100%;
}

/* Transparent at top (Homepage Only) */
body.home.at-top .site-header {
  background: transparent !important;
  box-shadow: none !important;
  padding: 20px 0 !important;
  backdrop-filter: none !important;
}

/* Red on scroll (Homepage Only) */
body.home:not(.at-top) .site-header {
  background: var(--primary-color) !important;
  padding: 0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.site-header .main-nav a {
  color: white;
}

.site-header .main-nav a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.site-header .main-nav a.active {
  color: white !important;
  font-weight: 700;
}

.site-header .nav-btn-line {
  background-color: white;
  color: var(--primary-color) !important;
}

.site-header .nav-btn-line:hover {
  background-color: var(--line-green);
  color: white !important;
}

.site-header .mobile-menu-toggle {
  color: white;
}

/* ==================== Hero Overlay (All Screens) ==================== */
.mobile-hero-overlay {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 1001;
  pointer-events: none;
}

.mobile-hero-logo {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.mobile-hero-logo img {
  height: 150px;
  width: auto;
}

.mobile-hero-menu-toggle {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
  pointer-events: auto;
  display: block;
}

/* Header Logic - Ensure visible */
body.at-top .site-header {
  display: block !important;
}

body:not(.at-top) .site-header {
  opacity: 1;
  transform: translateY(0);
}

/* Hide floating overlay when scrolled */
body:not(.at-top) .mobile-hero-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.at-top .mobile-hero-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Mobile: Smaller logo */
@media (max-width: 768px) {
  .mobile-hero-logo img {
    height: 100px;
  }

  .mobile-hero-menu-toggle {
    right: 20px;
    font-size: 1.5rem;
  }
}

/* ==================== Fullscreen Overlay Menu ==================== */
.fullscreen-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.fullscreen-menu-logo {
  margin-bottom: 40px;
  text-align: center;
}

.fullscreen-menu-logo img {
  height: 150px;
  width: auto;
}

@media (max-width: 768px) {
  .fullscreen-menu-logo {
    margin-bottom: 30px;
  }

  .fullscreen-menu-logo img {
    height: 100px;
  }
}

.fullscreen-menu-close {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.fullscreen-menu-close:hover {
  transform: rotate(90deg);
}

.fullscreen-menu-nav ul {
  list-style: none;
  text-align: center;
  padding: 0;
  margin: 0;
}

.fullscreen-menu-nav li {
  margin: 20px 0;
}

.fullscreen-menu-nav a {
  color: white;
  font-size: 1.8rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
  text-decoration: none;
}

.fullscreen-menu-nav a:hover {
  opacity: 0.7;
}

.fullscreen-menu-nav .menu-btn-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--primary-color);
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 1.2rem;
  margin-top: 20px;
}

.fullscreen-menu-nav .menu-btn-line:hover {
  background: var(--line-green);
  color: white;
  opacity: 1;
}

@media (max-width: 768px) {
  .fullscreen-menu-nav a {
    font-size: 1.4rem;
  }

  .fullscreen-menu-close {
    top: 20px;
    right: 20px;
    font-size: 1.6rem;
  }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  width: auto;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-text {
  font-size: 1.5rem;
  color: var(--text-color);
  letter-spacing: 1px;
}

.logo-text .highlight {
  color: var(--primary-color);
}

.main-nav ul {
  display: flex;
  gap: 30px;
  align-items: center;
}

.main-nav a {
  font-size: 1rem;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--primary-color);
}

.nav-btn-line {
  background-color: var(--primary-color);
  color: white !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: all 0.3s ease;
}

.nav-btn-line:hover {
  background-color: var(--line-green);
  transform: translateY(-2px);
}

.mobile-menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
/* Hero Slider Styles */
.hero-slider {
  position: relative;
  height: 100vh;
  height: 100svh;
  /* Prevents zoom jump on mobile when URL bar hides */
  /* Fullscreen */
  min-height: 600px;
  overflow: hidden;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 100%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  color: white;
  max-width: 1000px;
  /* Wider container for left align */
  z-index: 3;
  text-align: left;
  /* Strict Left Align */
  padding-left: 5%;
  /* Align with logo/menu visually */
  width: 100%;
}

/* Slider Navigation */
.slider-nav {
  position: absolute;
  bottom: 50px;
  /* Slightly higher */
  left: 50%;
  /* Center Align */
  transform: translateX(-50%);
  /* perfectly center */
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
}

.slider-arrow {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: white;
  transform: scale(1.1);
}

.slider-pagination {
  display: flex;
  gap: 12px;
}

.pagination-bar {
  width: 10px;
  /* Small dot by default */
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  /* Inactive: Light white */
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Smooth morph */
  border-radius: 50%;
  /* Circle */
}

.pagination-bar.active {
  background: var(--primary-color);
  /* CI Red active */
  width: 50px;
  /* Expand to bar */
  border-radius: 50px;
  /* Pill shape */
}

.pagination-bar:hover {
  background: rgba(255, 255, 255, 0.8);
}

.hero-subtitle {
  display: inline-block;
  font-family: "Bai Jamjuree", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.hero-above-title {
  font-size: 2.5rem;
  /* Larger "a house of heart" */
  font-weight: 400;
  margin-bottom: 0px;
  opacity: 1;
  letter-spacing: 0.5px;
  font-family: "Bai Jamjuree", sans-serif;
}

.hero h1 {
  font-size: 4rem;
  /* "full of art" - slightly smaller than before but bold */
  line-height: 1.2;
  margin-bottom: 25px;
  font-weight: 700;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 40px;
  font-weight: 300;
  max-width: 600px;
  /* Limit width for readability */
  opacity: 0.9;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-start;
  /* Left Align Buttons */
}

.hero-actions .btn {
  /* Inherit global .btn styles for consistency */
  border-radius: 50px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-search {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  /* Standardized small size */
  background: white;
  color: #444;
  /* Dark grey text like search placeholder */
  border-radius: 50px;
  font-size: 0.95rem;
  /* Standardized small font */
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
  /* Stronger shadow/glow */
}

.btn-hero-search i {
  font-size: 1rem;
  color: var(--primary-color);
}

.btn-hero-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  background: white;
  color: var(--primary-color);
}

/* Button Global Styles */
.btn {
  display: inline-block;
  padding: 10px 24px;
  /* Reduced from 12px 30px */
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  /* Slightly smaller text */
}

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

.btn-primary:hover {
  background-color: #b01f25;
  border-color: #b01f25;
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-outline:hover {
  background-color: white;
  border-color: white;
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Latest Post / Content Grid */
.section-padding {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: var(--primary-color);
  font-weight: 700;
}

.header-divider {
  display: none !important;
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 0 auto;
}

.tabs-container {
  text-align: center;
  margin-bottom: 50px;
}

.tab-btn {
  background: none;
  border: none;
  font-family: "Prompt", sans-serif;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-light);
  padding-bottom: 5px;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--text-color);
  border-color: var(--primary-color);
}

/* Category Tab Buttons */
/* Category Tiles Gallery */
.category-tiles-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.category-tile {
  position: relative;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.category-tile.active {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.category-tile .tile-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.category-tile:hover .tile-bg {
  transform: scale(1.1);
}

.category-tile .tile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
  transition: background 0.3s ease;
}

.category-tile.active .tile-overlay {
  background: linear-gradient(to top,
      rgba(201, 36, 43, 0.8),
      rgba(201, 36, 43, 0.3));
  /* Red tint */
}

.category-tile .tile-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px;
  z-index: 2;
  text-align: center;
}

.category-tile .tile-label {
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: block;
}

@media (max-width: 992px) {
  .category-tiles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .category-tiles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .category-tile {
    height: 100px;
  }
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 992px) {
  .grid-layout {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PREMIUM MINIMAL CARDS - Stories & Courses
   ============================================ */

.grid-item {
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.grid-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

/* Card Image */
.grid-item .card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.grid-item .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid-item:hover .card-image img {
  transform: scale(1.08);
}

/* Category Tag - Minimal Style */
.category-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.grid-item:hover .category-tag {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
}

/* Card Content */
.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-color);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.grid-item:hover .card-content h3 {
  color: var(--primary-color);
}

.card-content p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Category Label above Title - Red CI Color */
.card-category-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Read More Link */
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: auto;
}

.read-more i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.grid-item:hover .read-more {
  gap: 12px;
}

.grid-item:hover .read-more i {
  transform: translateX(4px);
}

/* Overlay on Hover - Subtle Gradient */
.grid-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.02), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: 16px;
}

.grid-item:hover::after {
  opacity: 1;
}

/* ============================================
   FEATURED STORY + 3-COLUMN GRID LAYOUT
   ============================================ */

.featured-story-container {
  margin-bottom: 32px;
}

.featured-story-card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
}

.featured-story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.featured-story-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 16px;
}

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

.featured-story-card:hover .featured-story-image img {
  transform: scale(1.05);
}

.featured-story-content {
  position: absolute;
  bottom: 0;
  right: 0;
  max-width: 50%;
  padding: 28px 32px;
  background: var(--primary-color);
  border-radius: 16px 0 16px 0;
}

.featured-category-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.featured-story-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin: 0;
}

/* 3-Column Stories Grid */
.stories-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Mobile Responsive - Stories Layout */
@media (max-width: 992px) {
  .stories-grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .featured-story-content {
    max-width: 70%;
    padding: 20px 24px;
  }

  .featured-story-content h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .featured-story-image {
    aspect-ratio: 16 / 9;
  }

  .featured-story-content {
    position: relative;
    max-width: 100%;
    border-radius: 0 0 16px 16px;
    padding: 20px;
  }

  .featured-story-content h3 {
    font-size: 1.2rem;
  }

  .stories-grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stories-grid-3col .grid-item:nth-child(odd) {
    margin-top: 0;
  }

  .stories-grid-3col .grid-item:nth-child(even) {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .stories-grid-3col {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stories-grid-3col .grid-item:nth-child(even) {
    margin-top: 0;
  }
}

/* ============================================
   COURSE GRID 2x2 LAYOUT - Tile Style
   ============================================ */

/* ============================================
   COURSE BENTO GRID LAYOUT
   ============================================ */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  /* Fixed height for consistency */
  gap: 20px;
}

.bento-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* Feature Card (Left - Spans 1 Col, 2 Rows) */
.bento-large-feature {
  grid-column: span 1;
  grid-row: span 2;
}

/* Info Box (Center Top - White Background) */
/* Info Box (Center Top - White Background) */
.bento-info-box {
  background: white;
  padding: 30px;
  /* Reduced from 40px for breathing room */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #333;
  border: none;
  /* Removed border for minimal look */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  /* Subtle shadow instead */
}

.bento-info-box h2 {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 700;
  /* Bold as requested */
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.bento-info-box h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.bento-info-box p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Overlay for Images */
.bento-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 25px;
  background: linear-gradient(0deg,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0) 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.bento-overlay h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  font-family: "Bai Jamjuree", sans-serif;
}

.bento-overlay i {
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.bento-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Hover Effects */
.bento-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.bento-item:hover img {
  transform: scale(1.05);
}

.bento-item:hover .bento-overlay i {
  opacity: 1;
  transform: translateX(0);
}

/* Responsive */
@media (max-width: 992px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 250px;
  }

  .bento-large-feature {
    grid-column: span 2;
    grid-row: span 1;
  }

  .bento-info-box {
    grid-column: span 2;
    order: -1;
  }
}

@media (max-width: 576px) {
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    grid-auto-rows: 220px;
  }

  .bento-large-feature,
  .bento-info-box {
    grid-column: span 1;
  }
}

/* ============================================
   STORIES SPLIT LAYOUT (Info + Strips)
   ============================================ */

.stories-split-layout {
  display: flex;
  gap: 40px;
  align-items: stretch;
  height: 500px;
  /* Fixed height for the strip effect */
  margin-bottom: 50px;
}

/* Left: Info Side */
.stories-info-side {
  flex: 0 0 35%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 20px;
}

.start-header {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.highlight-title {
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 20px;
  color: #333;
}

.desc-text {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 30px;
}

.custom-btn {
  align-self: flex-start;
  padding: 12px 30px;
}

/* Right: Strips Side */
.stories-strips-side {
  flex: 1;
  display: flex;
  gap: 10px;
  overflow: hidden;
  border-radius: 20px;
}

.story-strip {
  flex: 1;
  position: relative;
  overflow: hidden;
  transition: flex 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border-radius: 12px;
}

.story-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  filter: brightness(0.9);
}

.strip-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0) 50%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.strip-label {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transform: rotate(0deg);
  white-space: nowrap;
  transition: all 0.3s ease;
}

/* Hover Interaction: Accordion Effect */
.story-strip:hover {
  flex: 3;
  /* Expand significantly */
}

.story-strip:hover img {
  transform: scale(1.1);
  filter: brightness(1);
}

.story-strip:hover .strip-label {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

/* Mobile Responsive for Stories Split */
@media (max-width: 992px) {
  .stories-split-layout {
    flex-direction: column;
    height: auto;
  }

  .stories-info-side {
    margin-bottom: 30px;
    padding-right: 0;
  }

  .highlight-title {
    font-size: 1.8rem;
  }

  .stories-strips-side {
    height: 60vh;
    /* Give vertical height on mobile */
    flex-direction: row;
    /* Keep flex row but stack vertically logic? No, keep accordion horizontal if possible */
    overflow-x: auto;
  }

  /* On very small screen, maybe stack strips vertically? */
}

@media (max-width: 576px) {
  .stories-strips-side {
    flex-direction: column;
    height: 500px;
    /* Vertical Stack */
  }

  .story-strip {
    width: 100%;
    height: auto;
    flex: 1;
  }

  .story-strip:hover {
    flex: 2;
    /* Expand vertically */
  }
}

/* CTA Register Section */
.cta-line-section {
  background-color: #c9242b;
  /* Use Primary branding color */
  color: white;
  overflow: hidden;
}

.cta-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 30px;
}

.cta-image {
  width: 45%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cta-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.cta-text {
  width: 45%;
  padding: 60px 20px;
}

.cta-label {
  letter-spacing: 1.5px;
  color: #f2d593;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.cta-text h2 {
  font-size: 1.8rem;
  margin: 12px 0 16px;
  line-height: 1.3;
  font-weight: 500;
}

.cta-text p {
  margin-bottom: 28px;
  font-size: 0.95rem;
  opacity: 0.9;
}

.btn-line-large {
  background-color: var(--line-green);
  color: white;
  padding: 10px 28px;
  font-size: 0.9rem;
  border-radius: 50px;
  transition: var(--transition);
}

.btn-line-large:hover {
  background-color: white;
  color: var(--line-green);
  transform: scale(1.03);
}

/* Footer */
.site-footer {
  background-color: #222;
  color: white;
  padding: 60px 0 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 20px;
}

.footer-logo h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.footer-desc {
  color: #aaa;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

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

.footer-links ul li a {
  color: #aaa;
}

.footer-links ul li a:hover {
  color: white;
}

/* Back Button Style */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  background-color: transparent;
  border: 2px solid var(--text-color);
  color: var(--text-color);
  border-radius: 50px;
  /* Pill shape */
  font-family: "Bai Jamjuree", sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 1rem;
}

.btn-back:hover {
  background-color: white;
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateX(-5px);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 10px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--primary-color);
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .main-nav.active {
    display: block;
    animation: slideDown 0.3s ease forwards;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .main-nav a {
    color: white !important;
  }

  .main-nav a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

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

  .mobile-menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .grid-layout {
    grid-template-columns: 1fr;
  }

  .cta-container {
    flex-direction: column;
    padding: 0;
  }

  .cta-image,
  .cta-text {
    width: 100%;
  }

  .cta-image {
    height: auto;
    padding: 0;
  }

  .cta-text {
    padding: 40px 20px;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }
}

/* Skeleton Loading Animation */
.skeleton {
  background: #f0f0f0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  height: 400px;
  display: flex;
  flex-direction: column;
}

.skeleton-img {
  width: 100%;
  height: 250px;
  background: #eee;
}

.skeleton-content {
  padding: 20px;
  flex: 1;
}

.skeleton-title {
  height: 24px;
  width: 80%;
  margin-bottom: 10px;
}

.skeleton-text {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-text-short {
  height: 16px;
  width: 60%;
}

/* ==================== Featured Activity Banner ==================== */
.featured-activity-banner {
  margin-bottom: 40px;
}

.featured-activity-card {
  position: relative;
  width: 100%;
  min-height: 450px;
  /* background: #222; Removed as per user request */
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.banner-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.6);
  opacity: 1;
  transition: transform 0.5s ease;
}

.featured-activity-card:hover .banner-bg-overlay {
  transform: scale(1.05);
}

.banner-content {
  position: relative;
  z-index: 2;
  padding: 60px;
  color: white;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 40px;
}

.banner-date-badge {
  background: white;
  color: var(--primary-color);
  width: 100px;
  height: 100px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.banner-date-badge .day {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.banner-date-badge .month {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
}

.banner-text {
  flex: 1;
}

.banner-tag {
  display: inline-block;
  padding: 5px 15px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.banner-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner-excerpt {
  font-size: 1.15rem;
  max-width: 600px;
  margin-bottom: 25px;
  opacity: 0.95;
  line-height: 1.6;
}

.banner-meta {
  display: flex;
  gap: 20px;
  font-size: 1rem;
  opacity: 0.9;
}

.banner-meta i {
  margin-right: 8px;
}

.banner-action .btn-register {
  background: white;
  color: var(--primary-color);
  padding: 15px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.featured-activity-card:hover .btn-register {
  background: var(--primary-color);
  color: white;
}

@media (max-width: 992px) {
  .banner-content {
    padding: 40px;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
  }

  .banner-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .featured-activity-card {
    min-height: auto;
  }

  .banner-content {
    padding: 30px 20px;
  }

  .banner-date-badge {
    width: 70px;
    height: 70px;
  }

  .banner-date-badge .day {
    font-size: 1.8rem;
  }

  .banner-title {
    font-size: 2rem;
  }

  .banner-excerpt {
    font-size: 1rem;
  }

  .banner-meta {
    flex-direction: column;
    gap: 5px;
  }
}

/* ==================== Activity Grid & Card Styles ==================== */
.activity-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.activity-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.activity-card-image {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
}

.activity-card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.activity-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.activity-card-date {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.activity-card-category {
  font-size: 0.75rem;
  background: var(--bg-color);
  padding: 4px 12px;
  border-radius: 15px;
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
}

.activity-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  line-height: 1.3;
  color: var(--text-color);
}

.activity-card-excerpt {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.activity-card-location {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.activity-card-location i {
  margin-right: 5px;
  color: var(--primary-color);
}

.activity-card-cta {
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .activity-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* ==================== Animated Stats Counter ==================== */
.stats-counter-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 30px auto 40px;
  padding: 30px 20px;
  max-width: 700px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.stat-number {
  font-family: "Bai Jamjuree", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.stat-label {
  font-family: "Bai Jamjuree", sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: #999;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 50px;
  background-color: #ddd;
  flex-shrink: 0;
  margin: 0 10px;
}

@media (max-width: 600px) {
  .stats-counter-row {
    gap: 0;
    padding: 20px 10px;
    margin: 20px auto 30px;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .stat-divider {
    height: 40px;
  }
}

.stats-disclaimer {
  text-align: center;
  font-size: 0.7rem;
  color: #999;
  margin-top: -25px;
  margin-bottom: 35px;
  font-family: "Bai Jamjuree", sans-serif;
  line-height: 1.5;
}

/* ==================== Student Gallery Styles ==================== */

/* Student Grid */
.student-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* Student Card */
.student-card {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

.student-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.student-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
  /* Filters removed so images display clearly consistently */
}

.student-card:hover img {
  transform: scale(1.1);
}

/* Disabled Student Card (without articleId) */
.student-card-disabled {
  cursor: default;
  /* Removed opacity and grayscale fading to keep consistent look */
}

.student-card-disabled:hover {
  transform: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.student-card-disabled:hover img {
  transform: none;
}

.student-card-disabled .student-overlay {
  transform: translateY(0);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 80%);
}

/* Student Overlay */
.student-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.85) 0%,
      rgba(0, 0, 0, 0.4) 70%,
      transparent 100%);
  color: white;
  padding: 15px 10px 10px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.student-card:hover .student-overlay {
  transform: translateY(0);
}

.student-overlay h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-overlay .student-school {
  font-size: 0.7rem;
  opacity: 0.85;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-overlay .student-university {
  font-size: 0.65rem;
  color: var(--secondary-color);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* View More Button */
.view-more-container {
  text-align: center;
  margin-top: 40px;
}

.btn-view-more {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-color);
  color: white;
  border-radius: 25px;
  font-weight: 500;
  font-size: 0.75rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-view-more:hover {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  transform: translateY(-3px);
}

.btn-view-more i {
  margin-left: 8px;
}

/* Student Portfolio Modal */
.student-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

.student-modal.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  max-width: 1000px;
  margin: 40px auto;
  padding: 30px;
  color: white;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-student-info h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: white;
}

.modal-student-info .modal-school {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 5px;
}

.modal-student-info .modal-university {
  font-size: 1.1rem;
  color: var(--secondary-color);
  font-weight: 500;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: white;
  color: #333;
}

/* Modal Portfolio Grid */
.modal-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.modal-portfolio-item {
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.modal-portfolio-item:hover {
  transform: scale(1.02);
}

.modal-portfolio-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

/* Responsive Styles for Student Gallery */
@media (max-width: 1200px) {
  .student-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .student-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal-portfolio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .student-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .student-overlay {
    transform: translateY(0);
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.85) 0%,
        transparent 100%);
    padding: 20px 15px 15px;
  }

  .student-overlay h3 {
    font-size: 1rem;
  }

  .student-overlay .student-school,
  .student-overlay .student-university {
    font-size: 0.75rem;
  }

  .modal-content {
    margin: 20px;
    padding: 20px;
  }

  .modal-header {
    flex-direction: column;
    gap: 20px;
  }

  .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
  }

  .modal-student-info h2 {
    font-size: 1.5rem;
  }

  .modal-portfolio-item img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .student-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .student-overlay h3 {
    font-size: 0.8rem;
  }

  .student-overlay .student-school,
  .student-overlay .student-university {
    font-size: 0.65rem;
  }
}

/* ==================== Minimal Footer Styles ==================== */
.site-footer.minimal-footer {
  padding: 35px 0;
  background-color: #f7f7f7;
  border-top: 1px solid #eee;
  color: var(--text-color);
}

.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 25px;
}

.footer-logo-img {
  height: 32px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.footer-logo-img:hover {
  opacity: 1;
}

.vertical-divider {
  height: 24px;
  width: 1px;
  background-color: #ddd;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-socials .label,
.contact-item .label {
  font-family: "Bai Jamjuree", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: #999;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-socials a.label:hover {
  color: var(--secondary-color);
}

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

.social-icons-mini a {
  color: #555;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
}

.social-icons-mini a:hover {
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: 0.85rem;
  color: #666;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 25px;
}

.copyright-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-item a {
  color: #555;
  font-weight: 500;
  font-family: "Bai Jamjuree", sans-serif;
  letter-spacing: 0.5px;
}

.contact-item a:hover {
  color: var(--primary-color);
}

.copyright {
  font-size: 0.75rem;
  color: #bbb;
  font-family: "Bai Jamjuree", sans-serif;
  letter-spacing: 0.5px;
}

@media (max-width: 900px) {
  .site-footer.minimal-footer {
    padding: 40px 0;
  }

  .footer-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }

  .footer-brand {
    flex-wrap: wrap;
    width: 100%;
    gap: 20px;
  }

  .vertical-divider {
    display: none;
  }

  .footer-socials {
    width: 100%;
  }

  .footer-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid #eee;
  }
}

/* ==================== Cookie Consent Banner ==================== */
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.1);
  padding: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: bottom 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  border-top: 4px solid var(--primary-color);
}

.cookie-banner.show {
  bottom: 0;
}

.cookie-content {
  max-width: 1200px;
  width: 90%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.cookie-text {
  flex: 1;
  min-width: 300px;
  font-size: 0.85rem;
  color: #333;
  line-height: 1.5;
  font-family: "Bai Jamjuree", sans-serif;
}

.cookie-buttons {
  display: flex;
  gap: 15px;
}

.cookie-btn {
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: "Bai Jamjuree", sans-serif;
  font-size: 0.8rem;
}

.cookie-btn.accept {
  background-color: var(--primary-color);
  color: white;
}

.cookie-btn.accept:hover {
  background-color: white;
  transform: translateY(-2px);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==================== Footer Legal Links ==================== */
.footer-legal {
  display: inline-flex;
  gap: 5px;
  font-size: 0.7rem;
}

.footer-legal a {
  color: #aaa;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: var(--primary-color);
}

.footer-legal span {
  color: #ccc;
}

/* ==================== Activity Section Redesign (Minimal) ==================== */

/* Activity Grid (Home & List) */
.activity-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

@media (max-width: 900px) {
  .activity-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Minimal Card Style */
.activity-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: row;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.activity-card-image {
  width: 40%;
  min-height: 200px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.activity-card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.activity-card-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #888;
}

.activity-card-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Mitr", sans-serif;
  font-weight: 500;
}

.activity-card-category {
  background: var(--bg-color);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary-color);
  text-transform: uppercase;
}

.activity-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
  line-height: 1.4;
}

.activity-card-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-card-location {
  font-size: 0.85rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 15px;
}

.activity-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.activity-card-cta:hover {
  gap: 12px;
}

@media (max-width: 600px) {
  .activity-card {
    flex-direction: column;
  }

  .activity-card-image {
    width: 100%;
    height: 180px;
  }
}

/* ==================== Activity Detail (Minimal) ==================== */
.activity-detail-wrapper {
  background: var(--bg-color);
  min-height: 100vh;
}

.activity-hero-minimal {
  background: white;
  padding: 60px 0;
  border-bottom: 1px solid #eee;
}

.activity-hero-minimal .container {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

.activity-hero-image {
  width: 45%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.activity-hero-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.activity-hero-info {
  flex: 1;
  padding-top: 10px;
}

.activity-hero-info .category-badge {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.activity-hero-info h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.activity-hero-info .excerpt {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.7;
}

.activity-quick-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
}

.activity-quick-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #555;
}

.activity-quick-item i {
  color: var(--primary-color);
  width: 18px;
}

.activity-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-color);
  color: white;
  padding: 14px 30px;
  border-radius: 50px;
  /* Match view-more radius */
  border: 2px solid var(--primary-color);
  /* Add border for consistency */
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(201, 36, 43, 0.3);
  /* Match shadow */
}

.activity-cta-button:hover {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 36, 43, 0.2);
}

.activity-detail-body {
  padding: 50px 0;
}

.activity-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
}

.activity-content-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.activity-content-card h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  margin-top: 30px;
}

.activity-content-card h3:first-child {
  margin-top: 0;
}

.activity-content-card p {
  color: #444;
  line-height: 1.8;
  margin-bottom: 15px;
}

.activity-content-card ul {
  padding-left: 20px;
  list-style: disc;
}

.activity-content-card li {
  color: #444;
  margin-bottom: 10px;
  line-height: 1.6;
}

.activity-sidebar-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  height: fit-content;
  position: sticky;
  top: 120px;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--bg-color);
}

.sidebar-info-item {
  margin-bottom: 20px;
}

.sidebar-info-label {
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.sidebar-info-value {
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 500;
}

.sidebar-info-value.highlight {
  color: var(--primary-color);
  font-size: 1.2rem;
}

@media (max-width: 900px) {
  .activity-hero-minimal .container {
    flex-direction: column;
  }

  .activity-hero-image {
    width: 100%;
  }

  .activity-detail-grid {
    grid-template-columns: 1fr;
  }

  .activity-sidebar-card {
    position: static;
  }
}

/* ==================== Stories Section New Design ==================== */
.story-card {
  position: relative;
  height: 450px;
  /* Taller portrait aspect ratio */
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s ease;
}

.story-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.story-card-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s ease;
}

.story-card:hover .story-card-bg {
  transform: scale(1.1);
}

.story-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Gradient specifically tuned for text readability at bottom */
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.6) 35%,
      rgba(0, 0, 0, 0.2) 60%,
      transparent 100%);
  pointer-events: none;
}

.story-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 25px;
  z-index: 2;
  box-sizing: border-box;
}

.story-title {
  font-family: "Noto Sans Thai", sans-serif;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin-top: 0;
}

.story-excerpt {
  font-family: "Sarabun", sans-serif;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
}

.story-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 15px;
}

.story-category {
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.story-meta-loc {
  font-family: "Outfit", sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
}

/* View More Button (Red Pill Style) */
.btn-view-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--primary-color);
  color: white !important;
  padding: 6px 14px;
  border-radius: 25px;
  border: 2px solid var(--primary-color);
  /* Add border to prevent layout shift */
  font-family: "Bai Jamjuree", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: none;
}

.btn-view-more:hover {
  background-color: white;
  color: var(--primary-color) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 36, 43, 0.2);
}

.btn-view-more i {
  transition: transform 0.3s ease;
}

.btn-view-more:hover i {
  transform: translateX(5px);
}

/* Back Button Style (Pill Outline) */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 2px solid #555;
  color: #333;
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.btn-back:hover {
  background: #555;
  color: white;
  transform: translateY(-2px);
}

/* Cookie Consent Popup */
/* Cookie consent disabled site-wide */
#cookie-consent {
  display: none !important;
}

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2d3436;
  color: #fff;
  z-index: 9999;
  padding: 20px 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-consent.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 300px;
}

.cookie-text h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.cookie-text p {
  font-size: 0.9rem;
  color: #b2bec3;
  line-height: 1.5;
  margin: 0;
}

.cookie-text a {
  color: #74b9ff;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cookie-text a:hover {
  color: #a8d8ff;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.cookie-link {
  color: #fff;
  text-decoration: underline;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.cookie-link:hover {
  color: #74b9ff;
}

.cookie-accept-btn {
  background: #636e72;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.cookie-accept-btn:hover {
  background: #74b9ff;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .cookie-actions {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   COURSE GRID & CARDS
   ========================================== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Homepage: 5 columns in single row */
#courses .course-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.course-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.course-card.coming-soon {
  cursor: default;
  opacity: 0.85;
}

.course-card.coming-soon:hover {
  transform: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.course-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
  transform: scale(1.05);
}

.course-card.coming-soon:hover .course-image img {
  transform: none;
}

.coming-soon-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(4px);
}

.course-info {
  padding: 24px;
}

.course-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.course-info p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================
   COURSE DETAIL PAGE
   ========================================== */
.course-detail {
  padding-top: 120px;
  min-height: 100vh;
  background: #fafafa;
}

.course-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 60px;
}

.course-hero-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.course-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.course-hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-color);
}

.course-hero-content .course-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 30px;
  line-height: 1.7;
}

.course-cta-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-course-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-color);
  color: #fff;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-course-primary:hover {
  background: #c0392b;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.btn-course-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text-color);
  padding: 14px 32px;
  border: 2px solid var(--text-color);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-course-secondary:hover {
  background: var(--text-color);
  color: #fff;
  transform: translateY(-3px);
}

/* Course Details Sections */
.course-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.course-section-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
}

.course-section-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.course-section-card h2 i {
  font-size: 1.2rem;
}

.course-curriculum {
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-curriculum li {
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.course-curriculum li:last-child {
  border-bottom: none;
}

.course-curriculum .class-number {
  background: var(--primary-color);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.course-curriculum .class-title {
  font-size: 1rem;
  color: var(--text-color);
}

.course-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-benefits li {
  padding: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  color: var(--text-color);
}

.course-benefits li i {
  color: #27ae60;
  margin-top: 4px;
}

@media (max-width: 992px) {
  .course-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .course-hero-content h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .course-grid {
    grid-template-columns: 1fr;
  }

  .course-sections {
    grid-template-columns: 1fr;
  }

  .course-section-card {
    padding: 30px;
  }

  .course-cta-buttons {
    flex-direction: column;
  }

  .btn-course-primary,
  .btn-course-secondary {
    justify-content: center;
  }

  /* Homepage: 3 columns on tablet */
  #courses .course-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {

  /* Homepage: 2 columns on mobile */
  #courses .course-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  #courses .course-info {
    padding: 12px;
  }

  #courses .course-info h3 {
    font-size: 1rem;
  }

  #courses .course-info p {
    font-size: 0.75rem;
    line-height: 1.4;
  }
}

/* ==========================================
   COURSE FAQ SECTION
   ========================================== */
.course-faq {
  margin: 60px 0;
  padding: 60px 0;
  background: #f9f9f9;
  border-radius: 20px;
}

.course-faq .section-header {
  text-align: center;
  margin-bottom: 40px;
}

.course-faq .section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 10px;
}

.course-faq .faq-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #f39c12, #e74c3c);
  margin: 0 auto;
  border-radius: 2px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  padding: 0 40px;
}

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

.faq-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 12px;
}

.faq-item p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 992px) {
  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 0 20px;
  }
}

@media (max-width: 576px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .course-faq {
    padding: 40px 0;
    margin: 40px 0;
  }

  .course-faq .section-header h2 {
    font-size: 2rem;
  }
}

/* ==========================================
   PAGE HERO BANNER
   ========================================== */
.page-hero {
  position: relative;
  width: 100%;
  height: 35vh;
  min-height: 250px;
  max-height: 350px;
  background-size: cover;
  background-position: center;
  margin-top: 80px;
}

.page-hero-overlay {
  display: none;
}

.page-hero-content {
  display: none;
}

@media (max-width: 768px) {
  .page-hero {
    height: 30vh;
    min-height: 200px;
  }
}

/* ==========================================
   MOBILE GRID OVERRIDES (Force 2 Columns)
   ========================================== */
@media (max-width: 576px) {

  /* Force 2 columns for all main grids on mobile */
  .course-grid,
  .grid-layout,
  .student-grid,
  .activity-grid-layout,
  #courses .course-grid,
  #student-grid-home,
  #student-grid-all,
  #all-activities-grid,
  #blog-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Adjust Card Content for small 2-col layout */
  .course-info,
  .story-card-content,
  .student-profile-card,
  .activity-card-content {
    padding: 12px !important;
  }

  .course-info h3,
  .story-title,
  .student-profile-name h3,
  .activity-card h3 {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
  }

  .course-info p,
  .story-excerpt,
  .student-full-name,
  .activity-card-excerpt {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Stories specific adjustments */
  .story-card {
    height: 280px !important;
    /* Reduce height for mobile */
  }

  .story-card-content {
    padding: 15px !important;
  }

  .story-category {
    font-size: 0.7rem !important;
  }

  .story-meta-loc {
    font-size: 0.6rem !important;
  }

  /* Activities specific adjustments */
  .activity-card {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .activity-card-image {
    height: 140px !important;
    width: 100% !important;
  }

  .activity-card-meta {
    font-size: 0.7rem !important;
    flex-wrap: wrap;
    gap: 8px !important;
  }

  /* Students specific adjustments */
  .student-profile-image {
    width: 80px !important;
    height: 80px !important;
  }

  .student-badge {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
  }
}

/* ==========================================
   SCROLL REVEAL ANIMATIONS - REMOVED PER USER REQUEST
   ========================================== */

/* ==========================================
   REFACTORED UTILITIES & COMPONENTS
   ========================================== */

.hero-title {
  text-transform: lowercase;
  font-size: 2.8rem;
  line-height: 1.3;
  margin-bottom: 15px;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 0.9rem;
  margin-bottom: 30px;
  max-width: 800px;
  color: white;
}

.bg-white {
  background-color: #fff;
}

.bg-light {
  background-color: var(--bg-color);
}

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

.inherit-link {
  text-decoration: none;
  color: inherit;
}

.section-desc {
  margin-top: 15px;
  color: var(--text-light);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.loading-text {
  text-align: center;
  grid-column: 1/-1;
}

.hidden-default {
  display: none;
}

.margin-top-40 {
  margin-top: 40px;
}

.margin-bottom-20 {
  margin-bottom: 20px;
}

.margin-top-30 {
  margin-top: 30px;
}

.margin-top-10 {
  margin-top: 10px;
}

.margin-right-5 {
  margin-right: 5px;
}

.font-weight-500 {
  font-weight: 500;
}

.post-detail-container {
  display: none;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.about-layout {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: center;
}

.about-img-col,
.about-text-col {
  flex: 1;
  min-width: 300px;
}

.rounded-img {
  border-radius: 0;
}

.full-width {
  width: 100%;
}

.about-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.contact-btn-group {
  margin-top: 15px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 25px;
  color: var(--text-color);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.category-tiles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  margin-bottom: 50px;
}

.category-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-tile .tile-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.6) grayscale(0.5);
  transition: transform 0.5s ease, filter 0.3s ease;
}

.category-tile .tile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease;
}

.category-tile .tile-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  z-index: 2;
  padding: 10px;
}

.category-tile .tile-initial {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
  opacity: 0.9;
  transition: transform 0.3s ease;
}

.category-tile .tile-label {
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  padding: 0 10px;
  transition: transform 0.3s ease;
}

.category-tile:hover .tile-bg {
  transform: scale(1.1);
  filter: brightness(0.7) grayscale(0);
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.category-tile.active .tile-bg {
  filter: brightness(0.8) grayscale(0);
}

.category-tile.active .tile-overlay {
  background: rgba(212, 45, 45, 0.6);
  /* Brand color tint */
}

.category-tile.active .tile-label {
  transform: scale(1.05);
  font-weight: 700;
}

@media (max-width: 992px) {
  .category-tiles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .category-tiles-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .category-tile .tile-label {
    font-size: 0.7rem;
    padding: 0 4px;
  }
}

.primary-color {
  color: var(--primary-color);
}

/* About Contact & Map Layout */
.contact-map-layout {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  align-items: flex-start;
}

.contact-info-wrapper {
  flex: 1;
}

.map-wrapper {
  flex: 0 0 45%;
  max-width: 45%;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 768px) {
  .contact-map-layout {
    flex-direction: column;
  }

  .map-wrapper {
    flex: 0 0 200px;
    max-width: 100%;
    width: 100%;
  }
}

.team-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin: 0 auto;
}

.team-member {
  text-align: center;
  border: none;
  box-shadow: none;
  background: transparent;
}

.team-img-wrapper {
  width: 250px;
  height: 300px;
  margin: 0 auto 20px;
  border-radius: 0;
  overflow: hidden;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.team-role {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 10px;
}

.team-education {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ==========================================
   ATMOSPHERE GALLERY SECTION
   ========================================== */
.atmosphere-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.atmosphere-item {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.atmosphere-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.atmosphere-item:hover img {
  transform: scale(1.05);
}

.atmosphere-item img.fading {
  opacity: 0;
}

/* Responsive Atmosphere Grid */
@media (max-width: 992px) {
  .atmosphere-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (max-width: 576px) {
  .atmosphere-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .atmosphere-item {
    border-radius: 8px;
  }
}

/* ==========================================
   TESTIMONIAL CAROUSEL SECTION
   ========================================== */
.atmosphere-testimonial-section {
  padding: var(--section-padding);
  background: var(--bg-color);
}

.atmosphere-testimonial-row {
  display: flex;
  gap: 40px;
  align-items: stretch;
}

.atmosphere-column {
  flex: 0 0 calc(60% - 20px);
  max-width: calc(60% - 20px);
  min-width: 0;
}

.testimonial-column {
  flex: 0 0 calc(40% - 20px);
  max-width: calc(40% - 20px);
  display: flex;
  flex-direction: column;
}

.testimonial-header {
  text-align: center;
  margin-bottom: 25px;
}

.testimonial-header h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 12px;
  font-weight: 700;
}

.testimonial-header .header-divider {
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 0 auto 15px;
}

.testimonial-header p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.5;
}

.testimonial-carousel {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.testimonial-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.testimonial-slides {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.testimonial-card {
  flex: 0 0 100%;
  background: white;
  border-radius: 12px;
  padding: 24px;
  height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.testimonial-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.testimonial-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.testimonial-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 3px;
}

.testimonial-accepted {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 500;
}

.testimonial-accepted i {
  margin-right: 5px;
}

.testimonial-quote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  font-style: italic;
  position: relative;
  flex: 1;
  overflow-y: auto;
}

.quote-content {
  padding-left: 20px;
  border-left: none;
  display: block;
}

.testimonial-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.testimonial-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--text-light);
  background: white;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.testimonial-nav-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: scale(1.1);
}

.testimonial-dots {
  display: flex;
  gap: 8px;
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

/* Responsive */
@media (max-width: 992px) {
  .atmosphere-testimonial-row {
    flex-direction: column;
    gap: 40px;
  }

  .atmosphere-column,
  .testimonial-column {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .testimonial-card {
    padding: 20px;
    min-height: 240px;
  }

  .testimonial-quote {
    font-size: 0.9rem;
  }
}

/* ============================================
   LATEST STORIES 1+4 GRID
   ============================================ */

.home-stories-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

/* Main Story (Left) */
.story-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.story-main-image {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
}

.story-main-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.story-main-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #666;
}

.story-main-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
  color: #333;
}

.story-main-excerpt {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sub Stories Grid (Right) */
.story-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
}

.story-sub-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.story-sub-card:hover {
  transform: translateY(-3px);
}

.story-sub-image {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
}

.story-sub-content {
  padding: 15px;
  flex: 1;
}

.story-sub-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-sub-date {
  font-size: 0.8rem;
  color: #888;
}

/* Mobile Responsive for 1+4 Grid */
@media (max-width: 992px) {
  .home-stories-grid {
    grid-template-columns: 1fr;
  }

  .story-sub-grid {
    grid-template-columns: 1fr;
    /* Stack on mobile/tablet if needed, or keep 2x2. Let's keep 2x2 for tablet but stack mobile */
  }
}

@media (max-width: 576px) {
  .story-sub-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UPCOMING ACTIVITY BANNER (Premium)
   ============================================ */

.home-activity-banner {
  margin-top: 50px;
  width: 100%;
}

.premium-activity-card {
  position: relative;
  width: 100%;
  min-height: 450px;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background-color: #000;
}

.premium-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.premium-dark-filter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0.4) 100%);
  z-index: 2;
}

.premium-content {
  position: relative;
  z-index: 3;
  padding: 60px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.premium-info-left {
  display: flex;
  gap: 40px;
  align-items: center;
  flex: 1;
}

.premium-date-box {
  background: #fff;
  border-radius: 16px;
  width: 120px;
  height: 120px;
  /* Slightly larger */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.premium-date-day {
  font-size: 3rem;
  /* Larger */
  font-weight: 700;
  line-height: 1;
  color: #c9242b;
  /* Brand Red */
}

.premium-date-month {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
}

.premium-text-group {
  color: #fff;
  max-width: 600px;
}

.premium-tag-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  color: #eee;
}

.premium-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.premium-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  line-height: 1.6;
}

.premium-meta {
  display: flex;
  gap: 25px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.premium-meta i {
  margin-right: 8px;
  color: #fff;
  /* Keep icons white for contrast on dark */
}

.premium-action-right {
  flex-shrink: 0;
}

.btn-premium {
  background: #fff;
  /* Changed to White */
  color: #c9242b;
  /* Changed to Red */
  padding: 18px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  /* Smoother transition */
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.btn-premium:hover {
  transform: scale(1.05);
  background: #c9242b;
  /* Changed to Red */
  color: #fff;
  /* Changed to White */
}

/* Responsive */
@media (max-width: 992px) {
  .premium-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px;
    gap: 30px;
  }

  .premium-info-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .premium-title {
    font-size: 2.5rem;
  }

  .premium-action-right {
    width: 100%;
    text-align: center;
  }

  .premium-date-box {
    width: 90px;
    height: 90px;
  }

  .premium-date-day {
    font-size: 2rem;
  }
}

/* ==================== Modern Stories Layout ==================== */
.stories-layout-modern {
  display: flex;
  gap: 40px;
}

.vertical-header-container {
  width: 60px;
  display: flex;
  justify-content: center;
  padding-top: 20px;
  flex-shrink: 0;
}

.vertical-section-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  white-space: nowrap;
  text-transform: uppercase;
  font-family: "Bai Jamjuree", sans-serif;
}

.vertical-section-text .text-primary {
  color: var(--primary-color);
}

.vertical-section-text .text-dark {
  color: #333;
}

.stories-grid-container {
  flex-grow: 1;
}

.modern-stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.story-card-modern {
  display: flex;
  flex-direction: column;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.story-card-modern:hover .modern-card-title {
  color: var(--primary-color);
}

.modern-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 20px;
  background-color: #eee;
}

.modern-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.story-card-modern:hover .modern-card-image img {
  transform: scale(1.05);
}

.modern-card-meta {
  margin-bottom: 12px;
}

.modern-card-category {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #333;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  display: block;
}

.modern-category-line {
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  display: block;
}

.modern-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 15px;
  color: #111;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
  min-height: 2.8em;
  /* Ensure uniform height */
}

.modern-card-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 300;
}

.modern-card-footer {
  margin-top: auto;
  font-size: 0.8rem;
}

.modern-card-author {
  color: var(--primary-color);
  font-weight: 500;
}

/* Author label prefix style */
.author-prefix {
  color: #999;
  margin-right: 5px;
}

.view-all-stories-container {
  text-align: right;
  margin-top: 20px;
}

.btn-view-all-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-view-all-text:hover {
  color: var(--primary-color);
  gap: 12px;
}

/* Responsive */
@media (max-width: 992px) {
  .modern-stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Layout Adjustment */
@media (max-width: 768px) {
  .stories-layout-modern {
    flex-direction: column;
    gap: 20px;
  }

  .vertical-header-container {
    width: 100%;
    padding-top: 0;
    justify-content: flex-start;
    margin-bottom: 10px;
  }

  .vertical-section-text {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 1.8rem;
    white-space: normal;
  }

  .vertical-section-text br {
    display: none;
  }

  .vertical-section-text .text-dark {
    margin-left: 10px;
  }

  .modern-stories-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .modern-card-image {
    aspect-ratio: 16/9;
  }
}

/* ============================================
   ACCORDION EXPANDING GALLERY - HOMEPAGE
   ============================================ */

.expanding-gallery {
  display: flex;
  gap: 10px;
  height: 350px;
  margin-bottom: 50px;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
}

.expanding-item {
  flex: 1;
  position: relative;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 12px;
  overflow: hidden;
  min-width: 120px;
  /* Default: All uniform 120px */
}

/* The Specific Item being Hovered */
.expanding-item:hover {
  flex: 2.5;
}

/* Active State */
.expanding-item.active {
  flex: 2.5;
}

.expanding-item .item-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.expanding-item:hover .item-bg {
  transform: scale(1.05);
}

.expanding-item .item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.85) 0%,
      rgba(0, 0, 0, 0.3) 50%,
      rgba(0, 0, 0, 0.1) 100%);
  transition: opacity 0.3s ease;
}

.expanding-item.active .item-overlay {
  background: linear-gradient(to top,
      rgba(201, 36, 43, 0.7) 0%,
      rgba(0, 0, 0, 0.2) 100%);
}

.expanding-item .item-content {
  position: absolute;
  bottom: 25px;
  left: 20px;
  right: 20px;
  z-index: 2;
  opacity: 0.8;
  transform: translateY(10px);
  transition: all 0.4s ease;
  white-space: nowrap;
  /* Prevent content break during animation */
}

/* Show content more fully on active/hover */
.expanding-item:hover .item-content,
.expanding-item.active .item-content {
  opacity: 1;
  transform: translateY(0);
}

.expanding-item .item-icon {
  font-size: 1.5rem;
  color: white;
  margin-bottom: 10px;
  display: block;
}

.expanding-item .item-label {
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  display: block;
  margin-bottom: 5px;
}

.expanding-item .item-desc {
  display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .expanding-gallery {
    flex-direction: column;
    height: 500px;
    /* Taller for vertical stack */
  }

  .expanding-item {
    width: 100%;
    min-height: 60px;
  }

  .expanding-item:hover,
  .expanding-item.active {
    flex: 3;
  }

  .expanding-item .item-content {
    bottom: 15px;
    left: 15px;
    transform: translateY(0);
    white-space: normal;
  }
}

/* ============================================
   SPLIT HEADER LAYOUT (Text Left / Gallery Right)
   ============================================ */
.stories-split-header-layout {
  display: flex;
  gap: 50px;
  align-items: center;
  margin-bottom: 40px;
}

.stories-split-header-layout .header-side {
  flex: 0 0 35%;
  /* Width for text side */
}

.stories-split-header-layout .gallery-side {
  flex: 1;
  /* Takes remaining space */
  min-width: 0;
  /* Prevent overflow */
}

.stories-split-header-layout .text-left {
  text-align: left;
  margin-left: 0;
}

.stories-split-header-layout .header-divider {
  margin-left: 0;
  /* Align divider to left */
}

/* Adjust Expanding Gallery inside Split Layout */
.stories-split-header-layout .expanding-gallery {
  margin-bottom: 0;
  height: 400px;
  /* Slightly taller to match text height */
}

/* Responsive */
@media (max-width: 992px) {
  .stories-split-header-layout {
    flex-direction: column;
    gap: 30px;
  }

  .stories-split-header-layout .header-side {
    width: 100%;
    text-align: center;
  }

  .stories-split-header-layout .text-left {
    text-align: center;
  }

  .stories-split-header-layout .header-divider {
    margin: 0 auto 15px;
  }

  .stories-split-header-layout .gallery-side {
    width: 100%;
  }
}

/* ============================================
   HOMEPAGE BENTO LAYOUT (2 Large + 3 Mini)
   ============================================ */
.bento-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* 2 Columns: Left (Large) | Right (List) */
  gap: 40px;
  margin-bottom: 40px;
}

/* Left Column: 2 Large Cards */
.bento-column-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Right Column: 5 Mini Vertical Cards in Grid */
.bento-column-right {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 Columns Grid */
  gap: 20px;
  /* Smaller gap for mini cards */
}

/* --- Large Card Style (Left) --- */
.bento-card-large {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  height: 100%;
  /* Fill space */
}

.bento-card-large .large-image-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  /* Widescreen for large impact */
  overflow: hidden;
  margin-bottom: 20px;
  background-color: #eee;
  border-radius: 2px;
}

.bento-card-large .large-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.bento-card-large:hover .large-image-wrapper img {
  transform: scale(1.05);
}

.bento-card-large .large-meta {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  /* Stack vertical */
  align-items: flex-start;
  gap: 8px;
}

.bento-card-large .large-category {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #333;
  /* Match right side dark text before hover? Or keep primary? User said "like the right side". Right side has #333 category. */
  letter-spacing: 1px;
}

.bento-card-large .large-line {
  width: 30px;
  height: 2px;
  background-color: #c9242b;
}

.bento-card-large .large-title {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
  color: #111;
  transition: color 0.3s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-card-large .large-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  color: #888;
}

.bento-card-large .large-author {
  color: var(--primary-color);
  font-weight: 500;
}

.bento-card-large:hover .large-title {
  color: var(--primary-color);
}

.bento-card-large .large-excerpt {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Mini Card Style (Right) -> Reduced Size Grid Items --- */
.bento-card-mini {
  display: flex;
  flex-direction: column;
  /* Vertical Stack */
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  border-bottom: none;
  /* Removed divider */
  padding-bottom: 0;
}

.bento-card-mini .mini-image-wrapper {
  width: 100%;
  /* Full Width */
  aspect-ratio: 16/9;
  /* Maintain standard aspect */
  border-radius: 2px;
  overflow: hidden;
  background-color: #eee;
}

.bento-card-mini .mini-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.bento-card-mini:hover .mini-image-wrapper img {
  transform: scale(1.05);
}

.bento-card-mini .mini-content {
  width: 100%;
}

.bento-card-mini .mini-category {
  font-size: 0.7rem;
  /* Smaller */
  font-weight: 700;
  text-transform: uppercase;
  color: #333;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  display: block;
}

.bento-card-mini .mini-line {
  width: 25px;
  /* Smaller */
  height: 2px;
  background-color: #c9242b;
  margin-bottom: 8px;
}

.bento-card-mini .mini-title {
  font-size: 1.1rem;
  /* Smaller title for mini grid */
  font-weight: 600;
  line-height: 1.3;
  color: #111;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s;
}

.bento-card-mini:hover .mini-title {
  color: var(--primary-color);
}

.bento-card-mini .mini-excerpt {
  font-size: 0.85rem;
  /* Smaller excerpt */
  color: #666;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Limit lines more */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-card-mini .mini-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  /* Smaller footer */
  color: #888;
}

.bento-card-mini .mini-author {
  color: var(--primary-color);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 992px) {
  .bento-grid-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .bento-column-right {
    grid-template-columns: 1fr;
    /* Stack on mobile */
    gap: 30px;
  }
}

/* ==================== Course CTA Section (Global) ==================== */
.course-cta-section {
  background: var(--primary-color);
  padding: 80px 0;
  color: white;
  text-align: left;
}

.cta-content-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
}

.cta-poster {
  width: 450px;
  border-radius: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.cta-poster:hover {
  transform: scale(1.02);
}

.cta-text-content {
  flex: 1;
}

.cta-text-content h2 {
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 20px;
  color: white;
  font-weight: 700;
}

.cta-text-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

.btn-cta-white {
  background: white;
  color: var(--primary-color);
  padding: 14px 35px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.btn-cta-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  background: #f8f8f8;
}

@media (max-width: 768px) {
  .course-cta-section {
    padding: 60px 0;
    text-align: center;
  }

  .cta-content-wrapper {
    flex-direction: column;
    gap: 40px;
    padding: 0 20px;
  }

  .cta-poster {
    width: 70%;
    max-width: 250px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  }

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

  .cta-text-content h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }
}

/* ==================== Category Tabs (Restored) ==================== */
.tabs-container {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

@media (max-width: 992px) {
  .tabs-container {
    justify-content: center;
    margin-top: 20px;
  }
}

.category-tab {
  padding: 8px 20px;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  font-size: 0.95rem;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  font-family: "Mitr", sans-serif;
  font-weight: 400;
}

.category-tab:hover {
  border-color: #c9242b;
  color: #c9242b;
  background: #fff5f5;
}

.category-tab.active {
  background-color: #c9242b;
  color: white;
  border-color: #c9242b;
  font-weight: 500;
}

/* ==================== Footer Mobile Optimization ==================== */
@media (max-width: 768px) {
  .site-footer {
    padding: 20px 0;
    /* Reduced padding */
  }

  .site-footer .footer-flex {
    flex-direction: column;
    gap: 15px;
    /* Reduced gap */
    width: 100%;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
    gap: 15px;
    padding: 0;
  }

  .footer-logo-img {
    height: 35px;
    width: auto;
  }

  .vertical-divider {
    display: none;
  }

  .footer-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
  }

  .social-icons-mini {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
  }

  .social-icons-mini a {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-info {
    width: 100% !important;
    text-align: center !important;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 5px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .copyright-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .copyright {
    font-size: 0.75rem;
    color: #999;
    text-align: center !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .footer-legal {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    font-size: 0.75rem;
    width: 100% !important;
    margin-top: 5px !important;
  }
}

/* ==================== Footer Styles (Base) ==================== */
.site-footer {
  background-color: #f9fafb;
  /* Light gray background */
  padding: 60px 0;
  border-top: 1px solid #e0e0e0;
  color: #4a4a4a;
  font-size: 0.95rem;
}

.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-logo-img {
  height: 60px;
  width: auto;
}

.vertical-divider {
  width: 1px;
  height: 40px;
  background-color: #ddd;
}

.footer-socials {
  display: flex;
  align-items: center;
}

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

.social-icons-mini a {
  color: #888;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.social-icons-mini a:hover {
  color: var(--primary-color);
}

.footer-info {
  text-align: right;
}

.copyright-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
}

.copyright {
  color: #888;
  font-size: 0.9rem;
}

.footer-legal {
  font-size: 0.85rem;
  color: #aaa;
}

.footer-legal a {
  color: #888;
  margin: 0 5px;
}

.footer-legal a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* ==================== Dynamic Hero Slide Styles (Standardized) ==================== */
.hero-dynamic-category {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-dynamic-title {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-dynamic-subtitle {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 600px;
  opacity: 0.9;
  line-height: 1.6;
}

/* Mobile Optimization for Dynamic Slides to match Main Hero */
@media (max-width: 768px) {
  .hero-dynamic-title {
    font-size: 2.2rem;
    /* Adjusted to match main hero text size (~35-40px) */
    margin-bottom: 15px;
    line-height: 1.3;
  }

  .hero-dynamic-subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
    max-width: 100%;
    padding-right: 10px;
    /* Prevent edge touching */
  }

  .hero-dynamic-category {
    font-size: 0.8rem;
    padding: 5px 12px;
    margin-bottom: 15px;
  }
}

/* ==================== Disabled Button Style ==================== */
.btn-disabled {
  background-color: #e0e0e0;
  color: #999;
  border: 2px solid #e0e0e0;
  cursor: not-allowed;
  pointer-events: none;
  /* Prevent clicks */
}

.btn-disabled:hover {
  background-color: #e0e0e0;
  border-color: #e0e0e0;
  color: #999;
  transform: none;
  /* No hover effect */
}