/* ==========================================================================
   1. GLOBAL SYSTEM VARIABLES & CORE ARCHITECTURE
   ========================================================================== */
:root {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #64748b;
  --success: #10b981;
  --dark: #0f172a;
  --light: #f8fafc;
  --accent: #fbbf24;
  --highlight: #ffde59;
  --card-border: rgba(226, 232, 240, 0.8);
  --premium-card-border: rgba(226, 232, 240, 0.9);
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  --bg-ice-gradient: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

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

body {
  font-family: "plus-jakarta-sans", sans-serif;
  line-height: 1.6;
  color: #334155;
  background-color: var(--light);
  overflow-x: hidden;
}

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

/* Custom Accessibility Helpers */
.text-primary-custom {
  background-color: rgba(59, 130, 246, 0.1);
  color: #1e40af !important;
  font-weight: 700;
}

/* ==========================================================================
   2. STYLISH SECTION ALTERNATION & VISUAL RHYTHM
   ========================================================================== */
.hero {
  min-height: calc(100vh);
  padding-top: 5rem; /* Matches your header height */
  padding-bottom: 1rem;
  background: radial-gradient(circle at top right, #1e3a8a 0%, #0f172a 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  font-family: plus-jakarta-sans, sans-serif;

  /* display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; */
}

/* Section 1: Soft Ice-Blue Gradient Backing for Courses */
.courses {
  padding: 6rem 2rem;
  background: var(--bg-ice-gradient);
  position: relative;
}

/* Section 2: High-Contrast Executive Dark Mode for Feature Highlights */
.features {
  padding: 6rem 2rem;
  background: #0f172a !important;
  position: relative;
}
.features .section-title h2 {
  color: #ffffff !important;
}
.features .section-title p {
  color: #94a3b8 !important;
}

/* Section 3: Clean Slate Layout for Portfolios */
.portfolios {
  padding: 6rem 2rem;
  background: #f1f5f9 !important;
}

/* Section 4: Deep Royal Textures for Testimonials */
.testimonials {
  padding: 6rem 2rem;
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%) !important;
  color: #ffffff;
}
.testimonials .section-title h2 {
  color: #ffffff !important;
}

.cta {
  padding: 6rem 2rem;
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: white;
  text-align: center;
}

/* Typography Title Styling */
.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.5px;
}

.section-title p {
  font-size: 1.1rem;
  color: #64748b;
  margin-top: 0.5rem;
}

/* ==========================================================================
   3. NAVIGATION BAR & HERO COMPONENT FIXES
   ========================================================================== */
.navbar {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    padding 0.3s ease,
    box-shadow 0.3s ease;
}

.navbar-brand {
  color: white !important;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand span {
  color: var(--highlight);
}

.navbar-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-item {
  list-style: none;
}

nav.navbar-dark .navbar-nav .nav-link {
  color: white !important;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  border-radius: 4px;
  padding: 8px 12px;
}

nav.navbar-dark .navbar-nav .nav-link:hover,
nav.navbar-dark .navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
}

nav.navbar-dark .navbar-nav .nav-link.highlighted {
  background-color: var(--highlight);
  color: #0f172a !important;
  font-weight: 600;
}
nav.navbar-dark .navbar-nav .nav-link.highlighted:hover {
  background-color: #ffd32a;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  z-index: 2;
  position: relative;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Base Buttons Framework */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  margin: 0.5rem;
}

.btn-primary {
  background-color: #ffde59 !important;
  border: 1px solid #ffde59 !important;
  color: #0f172a !important;
}

.btn-primary:hover {
  background-color: #ffd32a !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background-color: transparent !important;
  color: white !important;
  border: 2px solid white !important;
}

.btn-secondary:hover {
  background-color: white !important;
  color: #0f172a !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   4. PREMIUM COURSE PATHWAYS 
   ========================================================================== */
/* Update this block inside Section 4 of landing.css */
.premium-card-wrapper {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(15, 23, 42, 0.04);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1; /* Added to enforce equal height flex filling */
}

/* Update or add fallback restriction to the custom enhanced grid rule */
.courses-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-columns: max-content;
  gap: 2.5rem;
  padding: 1rem 0;
}

.premium-card-wrapper:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  border-color: var(--primary-light);
}

.course-img-header {
  height: 210px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  background-color: #cbd5e1;
}

.course-img-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0) 40%,
    rgba(15, 23, 42, 0.5) 100%
  );
}

.track-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: #2563eb;
  color: #ffffff;
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  z-index: 2;
}

.premium-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.premium-card-body h3 {
  font-size: 1.35rem;
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.premium-meta-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
}

.meta-pill {
  background: #f1f5f9;
  color: #334155;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   5. ASYMMETRIC GLASSMORPHISM FEATURES GRID 
   ========================================================================== */
.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-light);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.feature-card p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Custom Portfolio Layout Explicit Overrides */
.portfolios .feature-card {
  background: #ffffff !important;
  border: 1px solid var(--premium-card-border) !important;
  color: #334155 !important;
}
.portfolios .feature-card h3 {
  color: var(--dark) !important;
}
.portfolios .feature-card p {
  color: #64748b !important;
}

/* ==========================================================================
   6. INTERACTION COMPONENT GRAPHICS
   ========================================================================== */
.carousel {
  position: relative;
  overflow: hidden;
  margin: 2rem 0;
  width: 100%;
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-item {
  min-width: 100%;
  flex-shrink: 0;
  width: 100%;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.carousel-control {
  background-color: var(--primary);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 0.5rem;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
}

.carousel-control:hover {
  background-color: var(--primary-light);
  transform: scale(1.05);
}

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

.carousel-indicator {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background-color: #ffffff;
  transform: scale(1.2);
}

.testimonial-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 3rem 2rem;
  margin: 1rem auto;
  max-width: 750px;
  text-align: center;
}

.testimonial-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  background-color: #cbd5e1;
  background-size: cover;
  background-position: center;
  border: 3px solid var(--primary-light);
}

.testimonial-text {
  font-style: italic;
  color: #e2e8f0;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.testimonial-role {
  font-size: 0.9rem;
  color: #94a3b8;
}

.count-container {
  display: flex;
  justify-content: space-around;
  margin: 2rem 0 0 0; /* Reduced top margin to keep it visible */
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.count-item {
  text-align: center;
  min-width: 150px;
}

.count-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--highlight);
  margin-bottom: 0.25rem;
}

.count-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.language-icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2.5rem 0;
  gap: 1.5rem;
}

.language-icon {
  width: 65px;
  height: 65px;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #ffffff;
  transition: transform 0.3s ease;
}

.language-icon:hover {
  transform: scale(1.15);
  background-color: rgba(255, 255, 255, 0.2);
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  animation: float 15s infinite linear;
}

.shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-duration: 25s;
}
.shape:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  left: 20%;
  animation-duration: 30s;
}
.shape:nth-child(3) {
  width: 100px;
  height: 100px;
  top: 30%;
  left: 80%;
  animation-duration: 20s;
}
.shape:nth-child(4) {
  width: 50px;
  height: 50px;
  top: 70%;
  left: 70%;
  animation-duration: 15s;
}
.shape:nth-child(5) {
  width: 150px;
  height: 150px;
  top: 40%;
  left: 40%;
  animation-duration: 35s;
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-500px) rotate(360deg);
    opacity: 0.3;
  }
}

/* Custom Production Action Button overrides */
.custom-btn-primary {
  display: inline-block;
  background: var(--primary-gradient);
  color: white !important;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  border: none;
}
.custom-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
   7. FOOTER STYLING
   ========================================================================== */
footer {
  background-color: var(--dark);
  color: #94a3b8;
  padding: 4rem 2rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
  margin: 0 1.25rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
}

.footer-links a:hover {
  color: var(--highlight);
}

.social-icons {
  margin-bottom: 2rem;
}

.social-icons a {
  color: #94a3b8;
  font-size: 1.6rem;
  margin: 0 0.75rem;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}

.social-icons a:hover {
  color: #ffffff;
  transform: translateY(-3px);
}

.copyright {
  font-size: 0.9rem;
  color: #64748b;
}

/* ==========================================================================
   8. RESPONSIVE MEDIA BREAKPOINTS 
   ========================================================================== */
@media (max-width: 1024px) and (min-width: 769px) {
  .container {
    max-width: 90%;
  }
  .hero h1 {
    font-size: 2.8rem;
  }
  .section-title h2 {
    font-size: 2.2rem;
  }
  .features,
  .courses,
  .portfolios,
  .testimonials,
  .cta {
    padding: 4rem 2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto; /* Allow natural height on very small screens */
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

  .hero h1 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .features,
  .courses,
  .portfolios,
  .testimonials,
  .cta {
    padding: 4.5rem 1.25rem !important;
  }

  .features .row {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
  }

  .feature-card {
    padding: 2rem 1.5rem;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0.01) 100%
    );
  }

  .count-container {
    gap: 1rem;
  }

  .count-item {
    width: 45%;
    min-width: auto;
    margin-bottom: 1rem;
  }

  .count-number {
    font-size: 2.5rem;
  }

  .navbar-collapse {
    background: #0f172a;
    padding: 1.25rem;
    border-radius: 12px;
    margin-top: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar-nav {
    align-items: stretch;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .footer-links a {
    margin: 0;
  }

  .testimonial-card {
    margin: 1rem 0.5rem;
    padding: 2rem 1rem;
  }
}
