:root {
  /* MONOCHROME PALETTE */
  --bg-dark: #000000;          /* Pure Black */
  --bg-card: #0f0f0f;          /* Very Dark Grey */
  --bg-card-hover: #1a1a1a;    /* Dark Grey */
   
  /* Accents */
  --primary: #ffffff;          /* Pure White */
  --primary-gradient: linear-gradient(135deg, #ffffff 0%, #d4d4d4 100%);
  --accent-grey: #404040;      /* Mid Grey for borders/lines */
  
  /* Text */
  --text-main: #ffffff;
  --text-muted: #a3a3a3;       /* Light Grey */
  --text-dark: #000000;        /* For text inside white buttons */

  /* Effects */
  --border-subtle: rgba(255, 255, 255, 0.15);
  --glass-bg: rgba(0, 0, 0, 0.9);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.7;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; color: var(--text-main); letter-spacing: -0.5px; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
.highlight { 
  background: linear-gradient(to right, #fff, #999);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}



/* --- Header (Transparent by default) --- */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent; /* Clear background */
  border-bottom: none;     /* No border initially */
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.4s ease; /* Smooth transition when scrolling */
}

/* This class gets added by JS when you scroll down */
.header.scrolled {
  background: rgba(0, 0, 0, 0.95); /* Turns black */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.6rem 0; /* Shrinks slightly */
}



.navbar-content { display: flex; justify-content: space-between; align-items: center; }
.nav-logo { height: 35px; width: auto; filter: grayscale(100%) brightness(200%); } /* Forces logo to white */
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-link { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.nav-link:hover { color: var(--primary); }
/* --- Hero --- */
.hero {
  position: relative;
  padding: 220px 0 140px;
  /* Black/Grey Overlay on Image */
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), #000000), 
              url('./images/cme-hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  text-align: center;
}
.hero-title { font-size: 4.5rem; margin-bottom: 1.5rem; line-height: 1.1; }
.hero-subtitle { font-size: 1.25rem; margin-bottom: 3rem; max-width: 600px; margin-inline: auto; color: var(--text-muted); }

/* --- Monochrome Buttons --- */
.cta-button {
  display: inline-block; padding: 1rem 3rem; border-radius: 0px; /* Sharper edges for professional look */
  font-weight: 700; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 1px;
  font-size: 0.9rem;
}
.cta-button.primary {
  background: var(--primary); 
  color: var(--text-dark); /* Black text on White button */
  border: 1px solid var(--primary);
}
.cta-button.primary:hover {
  background: transparent;
  color: var(--primary); /* White text on Black bg */
}
.cta-button.outline {
  border: 1px solid var(--border-subtle); color: var(--text-main);
  background: transparent; margin-top: 2rem;
}
.cta-button.outline:hover { border-color: var(--primary); background: var(--bg-card-hover); }

/* --- About --- */
.about-section { padding: 100px 0; background: var(--bg-dark); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.about-image img { width: 100%; filter: grayscale(100%); border-radius: 0; }
.text-left { text-align: left; }
.stats-row { display: flex; gap: 3rem; margin-top: 3rem; border-top: 1px solid var(--border-subtle); padding-top: 2rem; }
.stat-number { display: block; font-size: 2.5rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
/* Styling for the About Section Video */


.about-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  
  /* Forces the video to be Black & White */
  filter: grayscale(100%) contrast(1.1); 
  
  border: 1px solid var(--border-subtle);
  display: block;
}
/* --- Courses --- */
.courses { padding: 100px 0; background: var(--bg-card); border-top: 1px solid var(--border-subtle); }
.section-title { font-size: 3rem; text-align: center; margin-bottom: 1rem; }
.section-subtitle { text-align: center; margin-bottom: 5rem; color: var(--text-muted); }

.courses-grid-4 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem;
}

.course-card-image {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}
.course-card-image:hover { transform: translateY(-5px); border-color: var(--primary); }
.card-img-wrapper img { width: 100%; height: 220px; object-fit: cover; filter: grayscale(100%); transition: 0.3s; }
.course-card-image:hover .card-img-wrapper img { filter: grayscale(0%); } /* Color returns on hover */
.card-body { padding: 2rem; }
.card-body h3 { margin-bottom: 0.5rem; font-size: 1.4rem; }
.card-body p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 2rem; }
.card-btn { 
  display: inline-block; color: var(--text-main); font-weight: 600; font-size: 0.8rem; 
  border-bottom: 1px solid var(--border-subtle); padding-bottom: 2px;
}
.card-btn:hover { border-color: var(--primary); }

/* Styling for the Text Header Boxes */
.card-header-box {
  height: 220px;
  background-color: #1a1a1a; /* Dark Grey Background */
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
}

/* This controls the Font Size - Consistent for ALL cards */
.card-header-box h3 {
  font-size: 2.5rem; /* Adjust this number to make them bigger/smaller */
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-transform: capitalize; /* Ensures neat casing */
}

/* Optional: Hover Effect */
.course-card-image:hover .card-header-box {
  background-color: #262626; /* Slightly lighter on hover */
  border-color: #ffffff;
}
/* Special override for long names */
.card-header-box h3.text-small {
  font-size: 1.8rem; /* Smaller than the default 2.5rem */
}
/* --- Gallery --- */
.gallery-section { padding: 100px 0; border-top: 1px solid var(--border-subtle); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.gallery-img {
  width: 100%; height: 300px; object-fit: cover;
  filter: grayscale(100%) contrast(1.2);
  transition: all 0.5s ease;
}
.gallery-img:hover { filter: grayscale(0%); cursor: crosshair; }
.gallery-footer { text-align: center; margin-top: 3rem; }

/* --- YouTube Section --- */
.youtube-section {
  padding: 100px 0;
  background: var(--bg-card); /* Slightly lighter than pure black */
  border-top: 1px solid var(--border-subtle);
}

/* Channel Bar (The strip with the Subscribe button) */
.channel-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000000;
  border: 1px solid var(--border-subtle);
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.channel-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.channel-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
}

.channel-info h3 { font-size: 1.2rem; margin: 0; }
.channel-info p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.subscribe-btn {
  background: #ffffff;
  color: #000000;
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.subscribe-btn:hover { background: #d4d4d4; }

/* Video Grid */
.youtube-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.video-card {
  display: block;
  background: transparent;
  transition: transform 0.3s ease;
  border: 1px solid transparent; /* Invisible border initially */
}

.video-card:hover {
  transform: translateY(-5px);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
  opacity: 0.8;
}

.video-card:hover .video-thumbnail img { opacity: 1; }

.duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-details {
  padding: 1rem 0;
}

.video-details h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #fff;
  line-height: 1.4;
}

.video-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Mobile Tweak */
@media (max-width: 768px) {
  .channel-bar {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  .channel-info { flex-direction: column; }
}

/* --- Contact & Footer --- */
.contact {
  padding-top: 100px;
  padding-bottom: 0; /* REMOVED the bottom space */
  background: var(--bg-dark);
  border-top: 1px solid var(--border-subtle);
}
.contact-wrapper { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; }
.inquiry-form { padding: 0; border: none; }
.form-group label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 1rem; background: var(--bg-card); 
  border: 1px solid var(--border-subtle); color: white; border-radius: 0;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); background: #000; }
.full-width { width: 100%; }

.info-card { 
  background: transparent; padding: 0; margin-bottom: 2rem; border: none; 
  padding-left: 1.5rem; border-left: 2px solid var(--border-subtle);
}
.info-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.info-card p { color: var(--text-muted); font-size: 0.95rem; }
/* --- Map Container Styling --- */
.map-container {
  width: 100%;
  height: 450px; /* Adjust height as needed */
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
}

/* THE MAGIC: Grayscale Filter for the Map */
.map-container iframe {
  width: 100%;
  height: 100%;
  filter: grayscale(100%) invert(90%) contrast(1.2); /* Makes map Dark Mode */
  opacity: 0.8;
  transition: all 0.5s ease;
}

/* Hover Effect: Bring back color slightly on interaction */
.map-container:hover iframe {
  filter: grayscale(0%) invert(0%); /* Returns to normal color on hover */
  opacity: 1;
}

/* Mobile Tweak */
@media (max-width: 768px) {
  .map-container {
    height: 300px; /* Smaller map on phone */
  }
}
.footer {
  padding: 1.5rem 0; /* Reduced from 3rem to 1.5rem */
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  background: #000;
}

/* Mobile */
@media (max-width: 768px) {
  .hero-title { font-size: 2.8rem; }
  .about-grid, .contact-wrapper { grid-template-columns: 1fr; }
  .nav-links { display: none; } 
  .mobile-menu-btn span { background: white; }
}


/* --- EXTERNAL GALLERY PAGE STYLES --- */
.gallery-header-section {
  padding: 40px 0;
  text-align: center;
  background: var(--bg-dark);
}

.page-title {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 3rem;
}

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

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-btn:hover, .filter-btn.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* The Masonry Grid */
.full-gallery-grid {
  column-count: 3;
  column-gap: 1.5rem;
  padding-bottom: 100px;
}

.gallery-item {
  position: relative;
  margin-bottom: 1.5rem;
  break-inside: avoid;
  cursor: pointer;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  display: block;
  filter: grayscale(100%);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .overlay span { color: #fff; font-weight: 600; font-size: 0.9rem; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed; z-index: 2000;
  left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.95);
  align-items: center; justify-content: center; flex-direction: column;
}
.lightbox-content { max-width: 90%; max-height: 80vh; border: 1px solid #333; }
.close-lightbox {
  position: absolute; top: 20px; right: 35px;
  color: #fff; font-size: 40px; cursor: pointer;
}
#caption { margin-top: 1rem; color: #ccc; }

@media (max-width: 768px) {
  .full-gallery-grid { column-count: 1; }
  .page-title { font-size: 2.5rem; }
}
/* --- NEW GALLERY SECTIONS --- */
.gallery-header-section {
  padding: 40px 0 20px;
  text-align: center;
  background: var(--bg-dark);
}

/* Category Sections */
.gallery-category {
  margin-bottom: 5rem; /* Space between sections */
}

.category-title {
  font-size: 1.8rem;
  color: var(--primary); /* White/Teal */
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid var(--primary); /* Cool accent line */
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Grid Layout (3-4 items per row) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Gallery Items (Images & Videos) */
.gallery-item {
  position: relative;
  height: 250px; /* Fixed height for uniformity */
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #000;
}

.gallery-item img, 
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: all 0.5s ease;
}

.gallery-item:hover img, 
.gallery-item:hover video {
  transform: scale(1.05);
  filter: grayscale(0%); /* Color comes back on hover */
}

/* Play Icon Overlay for Videos */
.play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: white;
  opacity: 0.7;
  pointer-events: none; /* Let clicks pass through to the item */
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.gallery-item:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Overlay Text */
.gallery-item .overlay {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  padding: 15px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .overlay span { color: #fff; font-weight: 600; font-size: 0.9rem; }

/* Lightbox Styling Updates */
.lightbox-content { 
  max-width: 90%; 
  max-height: 80vh; 
  border: 1px solid #333; 
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
}