/* === LOADING STATE === */
body.loading {
    overflow: hidden;
}

body.loading main,
body.loading footer {
    opacity: 0;
    visibility: hidden;
}

body.loaded main,
body.loaded footer {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in;
}

/* Loading spinner - Centered */
body.loading::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin-left: -30px;
    margin-top: -30px;
    border: 6px solid var(--light-grey);
    border-top: 6px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 9999;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* General Body & Typography */
:root {
    --primary-red: #D20000;
    --dark-red: #A30000;
    --light-grey: #f4f4f4;
    --medium-grey: #ddd;
    --dark-text: #333;
    --white: #fff;
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-grey);
    position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;

  word-wrap: break-word;   /* Break long words if needed */
  overflow-wrap: break-word; /* Modern equivalent */
  white-space: normal;    /* Ensure text isn’t forced into one line */
}


h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 1rem;
}

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

a {
    text-decoration: none;
    color: var(--primary-red);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-red);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--dark-red);
}

/* === HEADER & NAVIGATION === */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    padding: 10px 20px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.logo {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-red);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links li a {
    color: var(--dark-text);
    font-weight: 600;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-red);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

/* Hamburger Menu - Hidden on Desktop */
.hamburger {
    display: none;
}

/* === GENERAL LAYOUTS === */
section {
    padding: 60px 0;
    text-align: center;
}

.about-grid,
.media-grid,
.programs-grid {
    display: grid;
    gap: 2rem;
    padding-top: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.media-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-button {
    padding: 8px 20px;
    border: 2px solid var(--primary-red);
    border-radius: 50px;
    color: var(--primary-red);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.filter-button:hover,
.filter-button.active {
    background-color: var(--primary-red);
    color: var(--white);
}

.media-post,
.about-card,
.program-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
}

.media-post .thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}


/* Add or modify these rules in your style.css file */

.media-post .thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer; /* Add cursor pointer to show it's clickable */
}

.media-post .thumbnail-wrapper img,
.media-post .thumbnail-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.5s ease;
}

.media-post .thumbnail-wrapper iframe {
    /* Initially hide the iframe below the thumbnail */
    opacity: 0;
    z-index: -1;
}

.media-post .thumbnail-wrapper .play-icon {
    transition: opacity 0.5s ease;
}



.media-post .thumbnail-wrapper img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-post .thumbnail-wrapper {
    cursor: pointer;
}

/* Add or modify these rules in your style.css file */

.media-post .thumbnail-wrapper .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-red) !important; /* Changed the color to red */
    font-size: 3rem;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: opacity 0.3s ease;
    z-index: 10;
}

.media-post .thumbnail-wrapper:hover .play-icon {
    opacity: 0.8;
}

.media-post iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.download-button {
    display: block;
    margin-top: 1rem;
    background-color: var(--primary-red);
    color: var(--white);
    padding: 10px;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.download-button:hover {
    background-color: var(--dark-red);
}

.media-section.hidden {
    display: none;
}

/* === HERO SECTION WITH SLIDESHOW === */
.hero-section {
    position: relative;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

/* This is the overlay that keeps text readable */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6));
    z-index: 2;
}

/* This is the animated slideshow container */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%; /* Default width, will be set dynamically by JS */
    display: flex;
}

.slide {
    width: 100%; /* Default width, will be set dynamically by JS */
    height: 100%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
    z-index: 3;
    position: relative;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin: 0 0 1rem 0;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    min-height: 1.2em; /* Ensure space even when empty */
}

.hero-content .motto {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    margin: 0.5rem 0 1.5rem;
    color: var(--white);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    min-height: 1.5em; /* Ensure space even when empty */
}

/* Typed.js cursor styling for motto */
.motto .typed-cursor {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--white);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    display: inline;
}

/* Blinking cursor next to Learn More button */
.cursor-blink {
    display: none;
    margin-left: 8px;
    font-weight: 400;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.cursor-blink::before {
    content: '|';
    font-size: 1.2em;
}

/* === PROGRAMS SECTION === */
.programs-section {
    background-color: var(--white);
}

.program-card {
    padding: 2rem;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;   /* or whatever width feels good */
    margin: 0 auto;     /* center it if it's the only one */
    position: relative; /* For TODAY badge positioning */
}

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

.program-card .schedule {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--light-grey);
    border-radius: 8px;
    border-left: 4px solid var(--primary-red);
}

.program-card .schedule-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--medium-grey);
}

.program-card .schedule-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.program-card .schedule-day,
.program-card .schedule-time,
.program-card .schedule-venue {
    margin: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.program-card .schedule-day {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 1.05rem;
}

.program-card .schedule-day i {
    color: var(--primary-red);
}

.program-card .schedule-time {
    color: var(--dark-text);
    font-weight: 600;
}

.program-card .schedule-time i {
    color: #555;
}

.program-card .schedule-venue {
    color: #666;
    font-style: italic;
}

.program-card .schedule-venue i {
    color: var(--primary-red);
}

.program-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.event-card img.event-image {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.event-card img.event-image:hover {
    opacity: 0.9;
}

/* TODAY badge for current events */
.today-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary-red);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: blink-badge 1.5s infinite;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(210, 0, 0, 0.4);
}

@keyframes blink-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.program-card .event-details {
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.program-card .event-date,
.program-card .event-location {
    font-size: 0.95rem;
    color: var(--dark-text);
    margin: 0.3rem 0;
}

.program-card .event-date {
    font-weight: 600;
    color: var(--primary-red);
}

.no-events,
.no-media {
    text-align: center;
    padding: 3rem 2rem;
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}

/* === IMAGE LIGHTBOX === */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.7); }
    to { transform: scale(1); }
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--primary-red);
}

#lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}



/* Grid: equal height cards */
/* ============================================================
   ABOUT CARDS CAROUSEL (Homepage) - Professional Implementation
   ============================================================ */

#about-cards {
  width: 100%;
  margin: 0 auto;
  display: block !important;
  grid-template-columns: unset !important;
  padding: 0 !important;
}

/* Override about-section padding for carousel */
.about-section {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-bottom: 40px;
  margin-top: 42px; /* reduced by ~30% from 60px to bring section closer */
}

.about-section:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================
   MOBILE FIRST - COMPLETELY SEPARATE STYLES
   ============================================ */

/* ========== MOBILE (DEFAULT) ========== */
/* Mobile: 1 card at a time, perfectly centered */
#about-cards {
  padding: 1rem 0;
  max-width: 100%;
}

.about-carousel-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0; /* remove extra gap so card can truly span width */
  padding: 0; /* no side padding on mobile so card reaches edges */
  max-width: 100%;
}

.about-carousel-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.about-carousel-track {
  display: flex;
  gap: 0; /* no spacing between slides to maximize width */
  will-change: transform;
}

.about-carousel-track .about-card {
  flex: 0 0 auto;
  width: 100%; /* full viewport width on mobile */
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: white;
  border-radius: 12px;
  padding: 1.5rem; /* base vertical padding */
  padding-left: 3.25rem;  /* space for left arrow (40px btn + ~12px buffer) */
  padding-right: 3.25rem; /* space for right arrow */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.about-carousel-track .about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.about-carousel-track .about-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.about-carousel-track .about-card .card-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  width: 100%;
}

.about-carousel-track .about-card h3 {
  font-size: 1.35rem;
  color: var(--dark-text);
  margin-bottom: 1rem;
  font-weight: 600;
  text-align: center;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.about-carousel-track .about-card .card-content {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 1.25rem;
  text-align: center;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.about-carousel-track .about-card .card-content p {
  margin-bottom: 0.75rem;
  text-align: center;
  width: 100%;
}

.about-carousel-track .about-card .cta-button {
  align-self: center;
  margin-top: auto;
  text-align: center;
}

.carousel-nav {
  position: absolute; /* overlay on top of card */
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary-red);
  background: white;
  color: var(--primary-red);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 20; /* higher to be above card */
}

.carousel-nav:hover:not(:disabled) {
  background: var(--primary-red);
  color: white;
  transform: scale(1.05);
}

.carousel-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

/* Specific positions for previous/next on mobile */
.carousel-nav.prev {
  left: 6px; /* slight inset from extreme left */
}

.carousel-nav.next {
  right: 6px; /* slight inset from extreme right */
}

/* Fallback: position based on order if specific classes aren't present */
.about-carousel-container .carousel-nav:first-child {
  left: 6px; /* fallback inset */
}

.about-carousel-container .carousel-nav:last-child {
  right: 6px; /* fallback inset */
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0 0.5rem 0;
}

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

.carousel-indicators .indicator:hover {
  background-color: #bbb;
  transform: scale(1.2);
}

.carousel-indicators .indicator.active {
  background-color: var(--primary-red);
  transform: scale(1.3);
  box-shadow: 0 0 6px rgba(210, 0, 0, 0.5);
}

/* ========== TABLET (769px - 1024px) ========== */
/* Tablet: 2 cards at a time, perfectly centered */
@media (min-width: 769px) and (max-width: 1024px) {
  #about-cards {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }
  
  .about-carousel-container {
    gap: 0.75rem;
    padding: 0 2rem;
    max-width: 100%;
  }
  
  .about-carousel-viewport {
    max-width: 100%;
  }
  
  .about-carousel-track {
    gap: 2rem;
  }
  
  /* Force exactly 2 cards to show - use percentage */
  .about-carousel-track .about-card {
    width: calc((100% - 2rem) / 2);
    min-width: unset;
    max-width: unset;
    padding: 1.75rem;
    border-radius: 12px;
  }
  
  .about-carousel-track .about-card img {
    height: 200px;
  }
  
  .about-carousel-track .about-card .card-icon {
    font-size: 2.8rem;
  }
  
  .about-carousel-track .about-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }
  
  .about-carousel-track .about-card .card-content {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  
  .carousel-nav {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
  
  .carousel-nav:hover:not(:disabled) {
    transform: scale(1.08);
  }
  
  .carousel-indicators {
    gap: 0.8rem;
    padding: 1.5rem 0;
  }
  
  .carousel-indicators .indicator {
    width: 9px;
    height: 9px;
  }
}

/* ========== DESKTOP (1025px and above) ========== */
/* Desktop: 3 cards at a time, perfectly centered */
@media (min-width: 1025px) {
  #about-cards {
    padding: 2.5rem 2rem;
    max-width: 100%;
  }
  
  .about-carousel-container {
    gap: 1rem;
    padding: 0 2rem;
    max-width: 1600px;
  }
  
  .about-carousel-viewport {
    max-width: 100%;
  }
  
  .about-carousel-track {
    gap: 2rem;
  }
  
  /* Force exactly 3 cards to show - use percentage */
  .about-carousel-track .about-card {
    width: calc((100% - 4rem) / 3);
    min-width: unset;
    max-width: unset;
    padding: 2rem;
    border-radius: 12px;
  }
  
  .about-carousel-track .about-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  }
  
  .about-carousel-track .about-card img {
    height: 220px;
  }
  
  .about-carousel-track .about-card .card-icon {
    font-size: 3rem;
  }
  
  .about-carousel-track .about-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }
  
  .about-carousel-track .about-card .card-content {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
  }
  
  .carousel-nav {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    border: 2px solid var(--primary-red);
  }
  
  .carousel-nav:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(210, 0, 0, 0.3);
  }
  
  .carousel-indicators {
    gap: 0.9rem;
    padding: 1.75rem 0;
  }
  
  .carousel-indicators .indicator {
    width: 10px;
    height: 10px;
  }
  
  .carousel-indicators .indicator:hover {
    transform: scale(1.3);
  }
  
  .carousel-indicators .indicator.active {
    transform: scale(1.5);
  }
}

/* ========== LARGE DESKTOP (1400px and above) ========== */
/* Large Desktop: 3 larger cards */
@media (min-width: 1400px) {
  #about-cards {
    max-width: 100%;
    padding: 3rem 3rem;
  }
  
  .about-carousel-container {
    max-width: 1800px;
    padding: 0 3rem;
  }
  
  .about-carousel-track {
    gap: 2.5rem;
  }
  
  /* Force exactly 3 cards - use percentage with larger gap */
  .about-carousel-track .about-card {
    width: calc((100% - 5rem) / 3);
    padding: 2.25rem;
  }
  
  .about-carousel-track .about-card img {
    height: 240px;
  }
  
  .about-carousel-track .about-card h3 {
    font-size: 1.75rem;
  }
  
  .about-carousel-track .about-card .card-content {
    font-size: 1.05rem;
    line-height: 1.8;
  }
  
  .carousel-nav {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }
}

/* Touch devices - enhance touch targets */
@media (hover: none) and (pointer: coarse) {
  .carousel-nav {
    min-width: 44px;
    min-height: 44px;
  }
  
  .carousel-indicators .indicator {
    width: 12px;
    height: 12px;
  }
}

/* ============================================================
   ABOUT PAGE - BEAUTIFUL VERTICAL LAYOUT WITH IMAGE POSITIONING
   ============================================================ */

.about-page {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 70vh;
  padding: 40px 0;
}

.about-page .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-section {
  background: var(--white);
  border-radius: 16px;
  padding: 50px 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  gap: 40px;
}

.about-section:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

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

/* Image Container */
.about-image {
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: #f5f5f5;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Content Container */
.about-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.about-content h2 {
  color: var(--primary-red);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.about-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), #ff4444);
  border-radius: 2px;
}

.about-text {
  line-height: 1.8;
  color: var(--text-dark);
  font-size: 1.05rem;
}

.about-text p {
  margin-bottom: 15px;
  text-align: justify;
}

.about-text ul,
.about-text ol {
  margin: 20px 0;
  padding-left: 30px;
}

.about-text li {
  margin-bottom: 10px;
}

.about-text strong {
  color: var(--primary-red);
  font-weight: 600;
}

/* ============================================
   LAYOUT VARIATIONS - Image Positioning
   ============================================ */

/* TOP Layout (Default - Vertical Stack) */
.layout-top {
  flex-direction: column;
  align-items: center;
}

.layout-top .about-image {
  width: 100%;
  max-width: 700px;
  height: 350px;
}

.layout-top .about-content {
  width: 100%;
  max-width: 800px;
}

.layout-top .about-content h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.layout-top .about-content h2 {
  text-align: center;
}

/* LEFT Layout (Image on Left, Text on Right) */
.layout-left {
  flex-direction: row;
    align-items: center;
}

.layout-left .about-image {
  width: 400px;
  height: 300px;
  max-height: 400px;
}

/* RIGHT Layout (Text on Left, Image on Right) */
.layout-right {
  flex-direction: row;
    align-items: center;
}

.layout-right .about-image {
  width: 400px;
  height: 300px;
  max-height: 400px;
}

/* Center the red underline under the heading for left/right layouts */
.layout-left .about-content h2::after,
.layout-right .about-content h2::after {
    left: 50%;
    transform: translateX(-50%);
}

/* BOTTOM Layout (Vertical Stack, Image at Bottom) */
.layout-bottom {
  flex-direction: column;
  align-items: center;
}

.layout-bottom .about-image {
  width: 100%;
  max-width: 700px;
  height: 350px;
}

.layout-bottom .about-content {
  width: 100%;
  max-width: 800px;
}

.layout-bottom .about-content h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.layout-bottom .about-content h2 {
  text-align: center;
}

/* ============================================
   RESPONSIVE - Mobile (All Layouts Stack)
   ============================================ */

@media (max-width: 768px) {
  .about-section {
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 12px;
    flex-direction: column !important;
    gap: 25px;
  }

  .about-content h2 {
    font-size: 1.6rem;
    text-align: center;
  }

  .about-content h2::after {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .about-text {
    font-size: 1rem;
  }

  /* All image layouts become full width on mobile */
  .about-image {
    width: 100% !important;
    max-width: 100% !important;
    height: 250px !important;
    max-height: 250px !important;
  }
  
  /* Ensure proper image display */
  .about-image img {
    object-fit: cover;
  }
  
  .about-content {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  .layout-left .about-image,
  .layout-right .about-image {
    width: 350px;
    height: 280px;
  }
  
  .about-section {
    gap: 30px;
  }
}

/* Divider between sections */
.about-page hr {
  display: none;
}

.about-section .about-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}


/* === FOOTER === */
footer {
    background-color: var(--dark-text);
    color: var(--white);
    padding: 40px 0 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


/* Subscribe Style */
.confirmation-message {
    /* Initially hide the message and remove it from the document flow */
    display: none; 
    opacity: 0;
    transition: opacity 2s ease-in-out;
    font-size: 0.9em;
    padding: 8px 15px;
    margin-top: 10px;
}

.confirmation-message.show {
    /* Show the message and make it visible */
    display: block;
    opacity: 1;
}



.social-icons a {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-red);
}

.bible-passage-slider {
    margin-bottom: 1.5rem;
    min-height: 80px;
}

#bible-passage {
    font-size: 1.2rem;
    font-style: italic;
    margin: 0 0 5px;
}

#bible-reference {
    font-size: 1rem;
    font-weight: 300;
    color: #ccc;
}

/* New Subscription Form in Footer */
.subscribe-form {
    background-color: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    max-width: 400px;
    width: 100%;
}

.subscribe-form h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--white);
}

.subscribe-form form {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.subscribe-form input[type="email"] {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: rgba(255,255,255,0.2);
    color: var(--white);
}

.subscribe-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.7);
}

.subscribe-form button[type="submit"] {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.subscribe-form button[type="submit"]:hover {
    background-color: var(--dark-red);
}

.copyright-text {
    margin-top: 20px;
}

/* === Contact Page Specifics === */
.contact-layout {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
}

.contact-form .form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--medium-grey);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form textarea {
    resize: vertical;
}

.map-placeholder {
    display: none;
}

.contact-message {
    opacity: 0;
    transition: opacity 2s ease-in-out;
    margin-top: 20px;
    padding: 10px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 5px;
    text-align: center;
}

.contact-message-hidden {
    display: none;
}

.contact-message-visible {
    opacity: 1;
}

/* === LATEST MEDIA SECTION === */
.latest-media-section {
    background-color: var(--white);
}

/* === ABOUT CARDS HOVER ANIMATION === */
@keyframes expand {
    from {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    to {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }
}

.about-card {
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}



/* === MOBILE & TABLET RESPONSIVENESS === */
@media (max-width: 768px) {
    /* Hamburger Menu Button */
    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 1002;
        position: relative;
        width: 35px;
        height: 35px;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        padding: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
    }

    .hamburger:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        background-color: #fff;
    }

    /* The three horizontal bars */
    .hamburger .bar {
        width: 100%;
        height: 3px;
        background-color: var(--primary-red);
        margin: 4px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    /* First bar - move to center and rotate 45deg */
    .hamburger.toggle .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    /* Second bar - hide it */
    .hamburger.toggle .bar:nth-child(2) {
        opacity: 0;
    }

    /* Third bar - move to center and rotate -45deg */
    .hamburger.toggle .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    /* Keep hamburger icon white when menu is open */
    .hamburger.toggle {
        position: fixed;
        right: 20px;
        top: 20px;
        z-index: 1002;
    }

    /* Modern slide-in navigation */
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        background: linear-gradient(135deg, #C50000 0%, #8B0000 100%);
        width: 80%;
        max-width: 320px;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 80px;
        padding-left: 2rem;
        padding-right: 1rem;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: -5px 0 25px rgba(0,0,0,0.5);
        z-index: 1001;
        overflow-y: auto;
    }

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

    .nav-links li {
        opacity: 0;
        margin: 1.2rem 0;
        width: 100%;
        transform: translateX(50px);
    }

    .nav-links.nav-active li {
        opacity: 1;
        transform: translateX(0);
        animation: navLinkFade 0.5s ease forwards;
    }

    .nav-links.nav-active li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .nav-links.nav-active li:nth-child(2) {
        animation-delay: 0.2s;
    }

    .nav-links.nav-active li:nth-child(3) {
        animation-delay: 0.3s;
    }

    .nav-links.nav-active li:nth-child(4) {
        animation-delay: 0.4s;
    }

    .nav-links.nav-active li:nth-child(5) {
        animation-delay: 0.5s;
    }

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

    .nav-links li a {
        color: var(--white);
        font-weight: 600;
        font-size: 1.25rem;
        padding: 1rem 1.25rem;
        display: block;
        border-radius: 10px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

    .nav-links li a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 0;
        background-color: rgba(255, 255, 255, 0.1);
        transition: width 0.3s ease;
        border-radius: 8px;
    }

    .nav-links li a:hover::before,
    .nav-links li a.active::before {
        width: 100%;
    }

    .nav-links li a::after {
        display: none; /* Remove the bottom line effect on mobile */
    }

    .nav-links li a:hover,
    .nav-links li a.active {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateX(10px);
        color: var(--white);
        font-weight: 600;
    }

    /* Overlay when menu is open */
    .nav-links.nav-active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: -1;
        animation: fadeIn 0.4s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}




/* ============================================================
   MEDIA PAGE STYLES
   ============================================================ */

.media-page {
    padding: 60px 0;
    min-height: 70vh;
}

.media-page h1 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-red);
}

/* Tabs */
.media-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    padding: 15px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn i {
    font-size: 1.2rem;
}

.tab-btn:hover {
    color: var(--primary-red);
    background: rgba(213, 0, 0, 0.05);
}

.tab-btn.active {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
    background: rgba(213, 0, 0, 0.08);
}

/* Filter Controls */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.filter-select {
    padding: 12px 40px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-red);
}

.btn-clear, .btn-refresh {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-clear:hover, .btn-refresh:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.btn-refresh {
    padding: 12px 15px;
}

.btn-refresh i.fa-spin {
    animation: spin 1s linear infinite;
}

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

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.no-media {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* === MEDIA PAGE GRID (YouTube-like, per section) === */
.media-section {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.media-section.active {
    display: grid;
}

/* Media Card Styling */
.media-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Thumbnail Styling */
.media-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.media-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.media-thumbnail:hover img {
    opacity: 0.8;
}

/* YouTube iframe styling - maintains aspect ratio */
.media-thumbnail iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video play overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--white);
    opacity: 0.9;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    pointer-events: none;
}

.media-thumbnail:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    color: var(--primary-red);
}

/* Duration badge for videos */
.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Audio and PDF icons */
.audio-icon,
.pdf-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--white);
    opacity: 0.7;
    pointer-events: none;
}

/* Media Info Section */
.media-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.media-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark-text);
    line-height: 1.4;
}

.category-badge {
    display: inline-block;
    background-color: var(--light-grey);
    color: var(--primary-red);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.meta-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #666;
}

.meta-info span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.media-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Audio Player */
.audio-player-wrapper {
    margin: 1rem 0;
}

.audio-player-wrapper audio {
    width: 100%;
    height: 40px;
    outline: none;
}

/* Download Button */
.download-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
}

.download-btn:hover {
    background-color: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 0, 0, 0.3);
}

.download-btn i {
    font-size: 1rem;
}

.error-message {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Media Filter Buttons */
.media-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-button {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-red);
    border-radius: 50px;
    background-color: var(--white);
    color: var(--primary-red);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background-color: var(--light-grey);
    transform: translateY(-2px);
}

.filter-button.active {
    background-color: var(--primary-red);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(210, 0, 0, 0.3);
}

/* Responsive Design for Media Page */
@media (max-width: 768px) {
    .media-tabs {
        justify-content: flex-start;
        padding-bottom: 0;
    }
    
    .tab-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .tab-btn span {
        display: none;
    }
    
    .tab-btn i {
        font-size: 1.5rem;
    }
    
    .filter-controls {
        display: grid;
        grid-template-columns: 1fr 1fr auto auto;
        grid-template-rows: auto auto;
        gap: 10px;
        align-items: center;
    }
    
    .search-wrapper {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
        padding: 10px 30px 10px 10px;
        font-size: 0.85rem;
        background-position: right 8px center;
    }
    
    #category-filter {
        grid-column: 1;
        grid-row: 2;
    }
    
    #sort-order {
        grid-column: 2;
        grid-row: 2;
    }
    
    .btn-clear {
        grid-column: 3;
        grid-row: 2;
        padding: 10px 12px;
    }
    
    .btn-clear .btn-text {
        display: none;
    }
    
    .btn-refresh {
        grid-column: 4;
        grid-row: 2;
        padding: 10px 12px;
    }
    
    .media-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Thumbnail (16:9 aspect) */
.media-post .thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    overflow: hidden;
    background: #000;
}

.media-post .thumbnail-wrapper img,
.media-post .thumbnail-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play icon overlay */
.media-post .thumbnail-wrapper .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--white);
    opacity: 0.9;
    text-shadow: 0 0 8px rgba(0,0,0,0.6);
    pointer-events: none;
}

/* Content below thumbnail */
.media-post-content {
    padding: 12px 15px;
    flex-grow: 1;
}

.media-post h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--dark-text);
    line-height: 1.4;
}

.media-post p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

/* Download button */
.download-button {
    margin-top: auto;
    font-size: 0.85rem;
    padding: 6px 12px;
    display: inline-block;
}

/* ========================================
   BOOK READING CHALLENGES STYLES
   ======================================== */

/* Extra Page Header */
.extra-header {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
}

.extra-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.extra-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Extra Section */
.extra-section {
    padding: 60px 0;
    min-height: 50vh;
}

.extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Extra Card */
.extra-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.extra-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-red), var(--dark-red));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.extra-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.extra-card-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.extra-card:hover .extra-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.extra-card-icon i {
    font-size: 3rem;
    color: var(--white);
}

.extra-card-content {
    flex-grow: 1;
}

.extra-card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 15px;
    line-height: 1.3;
}

.extra-card-content p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.extra-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--light-grey);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.extra-card:hover .extra-card-arrow {
    background: var(--primary-red);
    transform: translateX(5px);
}

.extra-card-arrow i {
    color: var(--dark-text);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.extra-card:hover .extra-card-arrow i {
    color: var(--white);
}

/* Books Page Header */
.books-header {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
}

.books-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.books-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    background: var(--white);
    padding: 30px 0;
    border-bottom: 2px solid var(--light-grey);
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-tabs {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    background: var(--light-grey);
    color: var(--dark-text);
    border: 2px solid transparent;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-tab:hover {
    background: var(--medium-grey);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--dark-red);
}

.filter-tab .count {
    background: rgba(0, 0, 0, 0.15);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.filter-tab.active .count {
    background: rgba(255, 255, 255, 0.25);
}

/* Books Section */
.books-section {
    padding: 60px 0;
    min-height: 400px;
    overflow-x: hidden;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

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

/* Book Card */
.book-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.book-card.locked {
    opacity: 0.75;
    cursor: not-allowed;
}

.book-card.locked:hover {
    transform: translateY(-2px);
}

/* Book Thumbnail */
.book-thumbnail {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: var(--light-grey);
}

.book-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-thumbnail img {
    transform: scale(1.05);
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-badge.unlocked {
    background: rgba(16, 185, 129, 0.95);
    color: var(--white);
}

.status-badge.locked-upcoming {
    background: rgba(59, 130, 246, 0.95);
    color: var(--white);
}

.status-badge.locked-future {
    background: rgba(239, 68, 68, 0.95);
    color: var(--white);
}

.status-badge.finished {
    background: rgba(107, 114, 128, 0.95);
    color: var(--white);
}

/* Book Content */
.book-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 12px;
    line-height: 1.3;
}

.book-content > p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Book Details */
.book-details {
    background: var(--light-grey);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--medium-grey);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.detail-row .value {
    font-size: 0.9rem;
    color: var(--dark-text);
    font-weight: 600;
}

/* Book Buttons */
.book-content .btn-primary,
.book-content .btn-secondary,
.book-content .btn-disabled {
    width: 100%;
    margin-top: auto;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.book-content .btn-primary::before,
.book-content .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.book-content .btn-primary:hover::before,
.book-content .btn-secondary:hover::before {
    left: 100%;
}

.book-content .btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--white);
}

.book-content .btn-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.book-content .btn-secondary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: var(--white);
}

.book-content .btn-secondary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.book-content .btn-disabled {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.book-content .btn-disabled:hover {
    transform: none;
}

.book-content .btn-primary i,
.book-content .btn-secondary i {
    font-size: 1.1rem;
}

/* Loading Container */
.loading-container {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 5px solid var(--light-grey);
    border-top: 5px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-container p {
    font-size: 1.1rem;
    color: #666;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: var(--medium-grey);
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 1.2rem;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--primary-red);
}

.error-state i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-state p {
    font-size: 1.2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin: auto;
}

.flyer-modal-content {
    max-width: 900px;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: var(--primary-red);
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--dark-text);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--medium-grey);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(210, 0, 0, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
    font-size: 0.95rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Flyer Preview */
.flyer-preview-container {
    margin: 25px 0;
    text-align: center;
    background: var(--light-grey);
    padding: 20px;
    border-radius: 12px;
    max-height: 70vh;
    overflow-y: auto;
}

#flyer-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 0 auto;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.modal-actions button {
    flex: 1;
    min-width: 150px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-actions button:active {
    transform: translateY(0);
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--white);
}

.modal-actions .btn-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.modal-actions .btn-secondary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: var(--white);
}

.modal-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.modal-actions .btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--white);
}

.modal-actions .btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.modal-actions .btn-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: var(--white);
}

.modal-actions .btn-info:hover {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    box-shadow: 0 8px 16px rgba(6, 182, 212, 0.3);
}

.modal-actions button i {
    font-size: 1.1rem;
}

/* Form help text */
.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
}

/* Read-only input styling */
input[readonly] {
    background-color: #f3f4f6;
    cursor: not-allowed;
    color: #6b7280;
}

/* Flyer preview view */
#flyer-preview-view {
    text-align: center;
}

#flyer-preview-view h2 {
    margin-bottom: 20px;
    color: var(--primary-red);
}

#flyer-preview-view .modal-actions {
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .extra-header h1,
    .books-header h1 {
        font-size: 2rem;
    }

    .extra-header p,
    .books-header p {
        font-size: 1rem;
    }

    .extra-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .extra-card {
        padding: 30px;
    }

    .extra-card-icon {
        width: 80px;
        height: 80px;
    }

    .extra-card-icon i {
        font-size: 2.5rem;
    }

    .filter-section {
        top: 60px;
        padding: 20px 0;
    }

    .filter-tabs {
        gap: 8px;
        justify-content: space-between;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .filter-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
    }

    .filter-tab {
        padding: 12px 16px;
        font-size: 0.8rem;
        flex-shrink: 0;
        flex-direction: column;
        min-width: fit-content;
    }

    .filter-tab i {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }

    .filter-tab .filter-text {
        display: none;
    }

    .filter-tab .count {
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    .books-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .book-thumbnail {
        height: 350px;
    }

    .modal {
        padding: 20px 10px;
    }

    .modal.show {
        align-items: flex-start;
        padding: 20px 10px;
    }

    .modal-content {
        padding: 30px 20px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .flyer-modal-content {
        max-width: 100%;
    }

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

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .flyer-preview-container {
        max-height: 50vh;
        padding: 15px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .modal-actions button {
        width: 100%;
        min-width: unset;
    }

    .close-modal {
        font-size: 1.8rem;
        top: 10px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .extra-header,
    .books-header {
        padding: 60px 0 40px;
    }

    .extra-header h1,
    .books-header h1 {
        font-size: 1.6rem;
    }

    .extra-header p,
    .books-header p {
        font-size: 0.9rem;
    }

    .extra-card-content h3 {
        font-size: 1.3rem;
    }

    .filter-tab {
        padding: 10px 12px;
        font-size: 0.75rem;
    }

    .filter-tab i {
        font-size: 1.1rem;
    }

    .filter-tab .count {
        font-size: 0.7rem;
        padding: 1px 5px;
    }

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

    .book-thumbnail {
        height: 300px;
    }

    .modal {
        padding: 10px 5px;
    }

    .modal-content {
        padding: 25px 15px;
        border-radius: 12px;
    }

    .modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .flyer-preview-container {
        padding: 10px;
        max-height: 40vh;
    }

    .modal-actions {
        gap: 8px;
        margin-top: 20px;
    }

    .modal-actions button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .close-modal {
        font-size: 1.6rem;
    }
}
