/* -------------------------
   Global Page Layout
------------------------- */
:root {
  /* Animation Constants */
  --card-transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --icon-transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Light Mode Values */
  --card-bg: #ffffff;
  --text-main: #1a1a1a;
  --accent-gold: #b59d5c;
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
  --border-style: 1px solid #e2d1a8;
  --bg-color: #ffffff;
  --section-bg: #fcfbf7;
  --text-secondary: #555;
  --card-bg: #ffffff;
  --border-color: #e2d1a8;
  --primary-gold: #b59d5c;
  --footer-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #1a1a1a;
    --accent-gold: #d4af37;
    /* In dark mode, shadows must be darker and glows more subtle */
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.1);
    --border-style: 1px solid #333;
  }
}
.program-card {
  background: var(--card-bg);
  border: var(--border-style);
  color: var(--text-main);
  transition: var(--card-transition);
  position: relative;
  z-index: 1;
}

.program-card:hover {
  /* Physical Motion */
  transform: translateY(-10px) scale(1.02);
  
  /* Visual Depth */
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-gold);
}

/* -------------------------
   Inner Element Animations
------------------------- */

/* Icon "Pop" effect */
.card-icon {
  transition: var(--icon-transition);
  display: inline-block; /* Required for transform */
}

.program-card:hover .card-icon {
  transform: scale(1.2) translateY(-5px);
}

/* Button "Stretch" effect */
.card-btn {
  transition: var(--card-transition);
}

.program-card:hover .card-btn {
  padding: 12px 45px; /* Subtle widening on hover */
  letter-spacing: 1px;
}
body, .program-card, .card-btn, h3, p {
  transition: 
    background-color 0.4s ease, 
    color 0.4s ease, 
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}
:root {
  --primary-gold: #b59d5c;
  --secondary-gold: #d4af37;
  --hover-gold: #967e45;
  --bg-cream: #fffdf6;
  --text-dark: #1a1a1a;
  --text-gray: #555;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --hover-shadow: 0 12px 25px rgba(181, 157, 92, 0.2);
}

.programs-container {
  text-align: center;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.divider {
  width: 80px;
  height: 4px;
  background: var(--primary-gold);
  margin: 0 auto 20px;
  border-radius: 2px;
}

.subtitle {
  font-family: 'Inter', sans-serif;
  color: var(--text-gray);
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* -------------------------
   Grid Layout (Centered)
------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  padding: 20px;
  justify-items: center; /* Ensures cards are centered in their grid cells */
  justify-content: center; /* Centers the entire grid on the page */
}

/* -------------------------
   Enhanced Program Card
------------------------- */
.program-card {
  background: #ffffff;
  border: 1px solid #e2d1a8;
  padding: 40px 30px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers all content inside the card */
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--card-shadow);
  width: 100%;
  max-width: 380px;
  position: relative;
  overflow: hidden;
}

/* Hover Effect */
.program-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary-gold);
}

/* Icon Styling */
.card-icon {
  font-size: 2.5rem;
  color: var(--primary-gold);
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.program-card:hover .card-icon {
  transform: scale(1.1);
}

/* Typography */
.program-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #2c3e50;
}

.program-card p {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.7;
  margin-bottom: 30px;
  flex-grow: 1; /* Pushes the button to the bottom */
}

/* -------------------------
   Card Meta & Stats (Optional)
------------------------- */
.card-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  width: 100%;
}

.card-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 20px;
}

.skill-tag {
  background: #f9f6f0;
  color: var(--primary-gold);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #e2d1a8;
}

/* -------------------------
   Action Button
------------------------- */
.card-btn {
  text-decoration: none;
  background: var(--primary-gold);
  color: white;
  padding: 12px 35px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(181, 157, 92, 0.3);
}

.card-btn:hover {
  background: var(--hover-gold);
  box-shadow: 0 6px 15px rgba(181, 157, 92, 0.4);
  transform: scale(1.05);
}

/* -------------------------
   Responsive Design
------------------------- */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .program-card {
    max-width: 100%;
  }
}

/* ==========================
   Dark Mode Overrides
========================== */

.dark-mode {
  --bg-cream: #0f172a;
  --text-dark: #f8fafc;
  --text-gray: #9ca3af;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  --hover-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
}

/* Program Cards Dark Mode */
.dark-mode .program-card {
  background: #111827;
  border-color: #1f2933;
}

.dark-mode .program-card h3 {
  color: #f9fafb;
}

.dark-mode .program-card p {
  color: #d1d5db;
}

.dark-mode .skill-tag {
  background: #1f2937;
  color: #fbbf24;
  border-color: #374151;
}

/* =========================================
   PROGRAMS PAGE – HEADING DARK MODE FIX
========================================= */

/* Base heading styling (Programs page only) */
.programs-heading {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 4.5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

/* Light mode */
.programs-heading {
  color: var(--text-dark);
}

/* Dark mode enhancement */
body.dark-mode .programs-heading {
  background: linear-gradient(
    135deg,
    var(--primary-gold),
    var(--secondary-gold)
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px 0 60px;
}

/* Wrapper REQUIRED for custom arrow */
.filter-wrapper {
  position: relative;
  display: inline-block;
}

/* Select Styling */
.filter-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;

  padding: 12px 45px 12px 20px;
  border-radius: 30px;
  border: 1px solid rgba(181, 157, 92, 0.35);

  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;

  background: linear-gradient(145deg, #ffffff, #f9f6f0);
  color: #2c3e50;

  box-shadow: 0 6px 15px rgba(0,0,0,0.05);
  cursor: pointer;

  transition: all 0.3s ease;
}

/* Hover */
.filter-wrapper select:hover {
  border-color: var(--primary-gold);
  box-shadow: 0 8px 25px rgba(181, 157, 92, 0.25);
}

/* Focus */
.filter-wrapper select:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(181, 157, 92, 0.2);
}

/* Custom Gold Arrow */
.filter-wrapper::after {
  content: "▾";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: bold;
  color: var(--primary-gold);
  pointer-events: none;
}

/* =========================
   DARK MODE FIX
 =========================================*/
body.dark-mode .filter-wrapper select {
  background: linear-gradient(145deg, #1f2937, #111827) !important;
  color: #f9fafb !important;
  border: 1px solid #374151 !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6) !important;
}

body.dark-mode .filter-wrapper select:hover {
  border-color: var(--primary-gold) !important;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 0 15px rgba(212, 175, 55, 0.2) !important;
}

/* Dark mode dropdown options */
body.dark-mode .filter-wrapper select option {
  background: #111827;
  color: #f9fafb;
}

/* =========================================
   PREMIUM LABEL BADGES
 =========================================*/
.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}

.label {
  padding: 5px 12px;
  font-size: 0.72rem;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

/* LIGHT MODE COLORS */
.label.paid {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.3);
}

.label.unpaid {
  background: rgba(107, 114, 128, 0.1);
  color: #4b5563;
  border-color: rgba(107, 114, 128, 0.3);
}

.label.global {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.3);
}

.label.india {
  background: rgba(249, 115, 22, 0.1);
  color: #ea580c;
  border-color: rgba(249, 115, 22, 0.3);
}

.label.beginner {
  background: rgba(251, 191, 36, 0.15);
  color: #b45309;
  border-color: rgba(251, 191, 36, 0.4);
}

.label.intermediate {
  background: rgba(147, 51, 234, 0.1);
  color: #7e22ce;
  border-color: rgba(147, 51, 234, 0.3);
}

.label.advanced {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.3);
}

/* Hover polish */
.label:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

body.dark-mode .label {
  backdrop-filter: blur(6px);
}

body.dark-mode .label.paid {
  background: rgba(22, 163, 74, 0.2);
  color: #4ade80;
}

body.dark-mode .label.global {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

body.dark-mode .label.beginner {
  background: rgba(251, 191, 36, 0.2);
  color: #facc15;
}

body.dark-mode .label.intermediate {
  background: rgba(147, 51, 234, 0.2);
  color: #c084fc;
}

body.dark-mode .label.advanced {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
}