:root {
  --primary: #1A3C6E;
  --primary-dark: #102647;
  --primary-light: #234d8d;
  --accent: #2E86C1;
  --accent-light: #5dade2;
  --accent-dark: #1b6da7;
  --white: #FFFFFF;
  --light: #F8FAFC;
  --dark: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
  --card-shadow: 0 10px 25px -5px rgba(26, 60, 110, 0.08), 0 8px 10px -6px rgba(26, 60, 110, 0.04);
  --hover-shadow: 0 20px 30px -10px rgba(26, 60, 110, 0.16);
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  background-color: #FFFFFF;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── Top Announcement Bar ─── */
.top-announcement-bar {
  background: linear-gradient(90deg, #102647 0%, #1A3C6E 100%);
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Modern Navbar (White Banner with Perfect Center Alignment) ─── */
.navbar-custom {
  background-color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(16, 38, 71, 0.08);
  border-bottom: 1px solid #E2E8F0;
  padding: 10px 0;
  transition: all 0.3s ease;
}

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

.navbar-custom .navbar-brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin: 0;
  line-height: 1;
}

.navbar-brand-logo {
  height: 40px;
  width: auto;
  max-width: 175px;
  object-fit: contain;
  display: block;
}

.brand-tagline-wrap {
  display: flex;
  align-items: center;
  height: 32px;
  padding-left: 10px;
  margin-left: 8px;
  border-left: 2px solid rgba(100, 116, 139, 0.25);
}

.brand-tagline {
  font-size: 0.72rem;
  letter-spacing: 0.4px;
  color: #64748B;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
}

.navbar-custom .navbar-toggler {
  color: #1A3C6E !important;
  border-color: #CBD5E1 !important;
  padding: 6px 10px;
}

@media (min-width: 992px) {
  .navbar-custom .navbar-collapse {
    display: flex !important;
    align-items: center;
  }

  .navbar-custom .navbar-nav {
    display: flex;
    align-items: center;
    margin: 0 0 0 auto;
    padding: 0;
    gap: 4px;
  }

  .navbar-custom .nav-item {
    display: flex;
    align-items: center;
    height: 42px;
  }

  .navbar-custom .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px !important;
    margin: 0;
    line-height: 1;
    color: #1A3C6E !important;
    font-weight: 600;
    font-size: 0.94rem;
    border-radius: 8px;
    transition: all 0.2s ease;
  }

  .navbar-custom .dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: middle;
  }

  .navbar-custom .nav-btn-wrap {
    display: flex;
    align-items: center;
    height: 42px;
  }

  .navbar-custom .btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 22px !important;
    line-height: 1;
    margin: 0;
  }
}

.footer-brand-logo-card {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  margin-bottom: 12px;
}

.footer-brand-logo {
  height: 34px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
}

.navbar-custom .dropdown-menu {
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(16, 38, 71, 0.2);
  border: 1px solid var(--border);
  padding: 10px 0;
  margin-top: 10px;
  min-width: 280px;
}

.navbar-custom .dropdown-item {
  color: var(--dark);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.navbar-custom .dropdown-item:hover {
  background-color: #F1F5F9;
  color: var(--primary);
  padding-left: 24px;
}

.navbar-custom .dropdown-divider {
  margin: 6px 0;
  border-color: var(--border);
}

/* ─── Buttons ─── */
.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #1e70a8 100%);
  color: var(--white) !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 9px 22px;
  border: none;
  box-shadow: 0 4px 12px rgba(46, 134, 193, 0.3);
  transition: all 0.25s ease;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(46, 134, 193, 0.45);
  color: var(--white) !important;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white) !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 24px;
  border: none;
  box-shadow: 0 4px 12px rgba(26, 60, 110, 0.25);
  transition: all 0.25s ease;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 60, 110, 0.35);
}

.btn-outline-white {
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: var(--white) !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 9px 22px;
  transition: all 0.25s ease;
}

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

/* ─── Hero Section ─── */
.hero-section {
  background: linear-gradient(135deg, #102647 0%, #1A3C6E 50%, #2E86C1 100%);
  color: var(--white);
  padding: 90px 0 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-title {
  font-size: 2.9rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.text-gradient {
  background: linear-gradient(90deg, #FFFFFF 0%, #BEE3F8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.92;
  margin: 20px 0 25px 0;
  line-height: 1.7;
}

.badge-soft {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  padding: 7px 16px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.86rem;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-form-card {
  position: relative;
  z-index: 10;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-check-input,
.form-check-label {
  cursor: pointer;
}

.consent-check-label {
  text-align: justify;
  text-justify: inter-word;
}

.form-check-input {
  border-color: #94a3b8;
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.18em;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Page Hero (Inner Pages) ─── */
.page-hero {
  background: linear-gradient(135deg, #102647 0%, #1A3C6E 60%, #2E86C1 100%);
  color: var(--white);
  padding: 65px 0;
  position: relative;
  text-align: center;
}

.page-hero .container {
  text-align: center;
}
.page-hero h1,
.page-hero p {
  text-align: center;
}
#mainNavbar .navbar-brand {
  margin-left: auto;
  margin-right: auto;
  display: block;
  text-align: center;
}


.stat-number {
  color: var(--primary);
  font-weight: 700;
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 6px;
  margin-bottom: 0;
  font-weight: 500;
}

/* ─── Section Typography ─── */
.section-header {
  margin-bottom: 45px;
  text-align: center;
}

.section-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 2.1rem;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 65px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 12px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Cards & Services ─── */
.service-card,
.course-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: var(--card-shadow);
  height: 100%;
}

.service-card:hover,
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--hover-shadow);
  border-color: var(--accent-light);
}

.service-icon {
  width: 62px;
  height: 62px;
  background: #EBF5FB;
  color: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: var(--white);
}

.badge-category {
  background-color: #EBF5FB;
  color: var(--accent-dark);
  font-weight: 600;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.8rem;
  display: inline-block;
}

.course-price {
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
}

/* ─── Course Catalog Filter Buttons ─── */
.filter-btn {
  border: 1.5px solid #CBD5E1 !important;
  background-color: #FFFFFF !important;
  color: #1A3C6E !important;
  font-weight: 600 !important;
  padding: 8px 22px;
  border-radius: 30px;
  margin: 4px;
  transition: all 0.2s ease;
  font-size: 0.92rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.filter-btn:hover {
  background-color: #EFF6FF !important;
  color: #1A3C6E !important;
  border-color: #2E86C1 !important;
  transform: translateY(-1px);
}

/* Selected / Active State */
.filter-btn.active,
.filter-btn.btn-primary-custom,
.filter-btn.active:focus,
.filter-btn.btn-primary-custom:focus {
  background: linear-gradient(135deg, #1A3C6E 0%, #2E86C1 100%) !important;
  color: #FFFFFF !important;
  border-color: #1A3C6E !important;
  box-shadow: 0 4px 14px rgba(26, 60, 110, 0.3) !important;
  transform: translateY(-1px);
}

.filter-btn.active:hover,
.filter-btn.btn-primary-custom:hover {
  background: linear-gradient(135deg, #102647 0%, #1A3C6E 100%) !important;
  color: #FFFFFF !important;
}

.filter-btn:focus,
.filter-btn:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.3) !important;
}

/* ─── Footer ─── */
.footer-custom {
  background-color: #0F1D33;
  color: #CBD5E1;
  padding: 70px 0 25px 0;
  border-top: 3px solid var(--accent);
}

.footer-custom h5 {
  color: var(--white);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 22px;
  position: relative;
  padding-bottom: 8px;
}

.footer-custom h5::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background-color: var(--accent);
}

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

.footer-links a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--white);
  transform: translateX(4px);
}

.social-icon-link {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #CBD5E1;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-icon-link:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 45px;
  padding-top: 22px;
}

/* Global justification for page content */
body, .container, p, .service-card, .course-card, .footer-custom, .footer-custom p, .footer-custom .footer-links li {
  text-align: justify;
  text-justify: inter-word;
}
/* ═══════════════════════════════════════════════════════════════
   Mobile & Responsive Optimization (Tablets, Handsets & Small Screens)
   ═══════════════════════════════════════════════════════════════ */

/* Prevent accidental horizontal overflow on mobile */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

/* Hide brand tagline on screens under 1200px to keep navbar perfectly balanced */
@media (max-width: 1199.98px) {
  .brand-tagline-wrap {
    display: none !important;
  }
}

/* Mobile & Tablet Navigation (< 992px) */
@media (max-width: 991.98px) {
  .navbar-custom {
    padding: 8px 0;
  }

  .navbar-brand-logo {
    height: 35px;
    max-width: 145px;
  }

  .navbar-custom .navbar-toggler {
    padding: 6px 10px;
    font-size: 1.15rem;
    color: #1A3C6E !important;
    border: 1.5px solid #CBD5E1 !important;
    border-radius: 8px;
    background-color: #F8FAFC;
    transition: all 0.2s ease;
  }

  .navbar-custom .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.25);
    outline: none;
  }

  .navbar-custom .navbar-collapse {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 14px;
    margin-top: 10px;
    box-shadow: 0 14px 35px rgba(16, 38, 71, 0.12);
    border: 1px solid #E2E8F0;
  }

  .navbar-custom .navbar-nav {
    gap: 3px;
  }

  .navbar-custom .nav-item {
    width: 100%;
  }

  .navbar-custom .nav-link {
    color: #1A3C6E !important;
    font-weight: 600;
    font-size: 0.94rem;
    padding: 10px 14px !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
  }

  .navbar-custom .nav-link:hover,
  .navbar-custom .nav-link.active {
    background-color: #EFF6FF;
    color: #2E86C1 !important;
  }

  .navbar-custom .dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: 1px solid #E2E8F0;
    background-color: #F8FAFC;
    border-radius: 8px;
    margin: 4px 0 6px 0;
    padding: 6px 0;
    min-width: auto;
    width: 100%;
  }

  .navbar-custom .dropdown-item {
    padding: 8px 16px;
    font-size: 0.88rem;
    color: #334155;
    white-space: normal;
  }

  .navbar-custom .dropdown-item:hover {
    background-color: #E2E8F0;
    color: #1A3C6E;
  }

  .navbar-custom .nav-btn-wrap {
    width: 100%;
    margin-top: 10px !important;
    margin-left: 0 !important;
  }

  .navbar-custom .nav-btn-wrap .btn-accent {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px !important;
    border-radius: 8px;
    font-size: 0.95rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }
}

/* Mobile Handsets (< 768px) */
@media (max-width: 767.98px) {
  /* Normalize text justification to prevent unnatural spacing on small screens */
  body, .container, p, .service-card, .course-card, .footer-custom, .footer-custom p, .footer-links li, .consent-check-label {
    text-align: left !important;
    text-justify: auto !important;
  }

  .service-card.text-center,
  .text-center {
    text-align: center !important;
  }

  /* Spacing */
  .py-5 {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }

  /* Hero Section */
  .hero-section {
    padding: 45px 0 35px 0;
  }

  .hero-title {
    font-size: 1.85rem !important;
    line-height: 1.25;
    letter-spacing: -0.3px;
  }

  .hero-subtitle {
    font-size: 0.96rem;
    line-height: 1.55;
    margin: 14px 0 20px 0;
  }

  .hero-section .d-flex.flex-wrap.gap-3 {
    flex-direction: column;
    gap: 10px !important;
  }

  .hero-section .d-flex.flex-wrap.gap-3 .btn {
    width: 100%;
    text-align: center;
    padding: 11px 18px;
    font-size: 0.94rem;
  }

  /* Hero Form Card */
  .hero-form-card {
    margin-top: 28px;
    padding: 22px 18px !important;
    border-radius: 16px !important;
  }

  .hero-form-card h4 {
    font-size: 1.25rem;
  }

  /* Inner Page Hero */
  .page-hero {
    padding: 40px 0 35px 0;
  }

  .page-hero h1 {
    font-size: 1.75rem !important;
    line-height: 1.25;
  }

  .page-hero p.lead {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  /* Section Headers */
  .section-header {
    margin-bottom: 28px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .section-subtitle {
    font-size: 0.92rem;
  }

  /* Cards & Icons */
  .service-card, .course-card {
    border-radius: 12px;
  }

  .service-card .p-4, .course-card .p-4 {
    padding: 1.25rem !important;
  }

  .service-icon {
    width: 52px;
    height: 52px;
    font-size: 1.35rem;
    border-radius: 10px;
    margin-bottom: 14px;
  }

  /* Counters & Stats */
  .stat-number {
    font-size: 1.85rem;
  }

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

  /* Course Filters */
  .filter-btn {
    padding: 6px 14px;
    font-size: 0.82rem;
    margin: 3px 2px;
  }

  /* Forms & Inputs */
  .form-control, .form-select {
    font-size: 0.94rem;
    padding: 9px 12px;
  }

  .btn-lg {
    padding: 10px 18px;
    font-size: 0.98rem;
  }

  /* Footer */
  .footer-custom {
    padding: 45px 0 20px 0;
  }

  .footer-custom h5 {
    margin-top: 15px;
    margin-bottom: 16px;
    font-size: 1rem;
  }

  .footer-bottom {
    margin-top: 30px;
    padding-top: 18px;
    text-align: center !important;
  }

  .footer-bottom .text-md-start,
  .footer-bottom .text-md-end {
    text-align: center !important;
  }

  .footer-bottom p {
    text-align: center !important;
    font-size: 0.82rem;
    line-height: 1.55;
  }
}

/* Small Handsets (< 576px) */
@media (max-width: 575.98px) {
  .hero-title {
    font-size: 1.65rem !important;
  }

  .hero-section .row.mt-5.pt-3 {
    margin-top: 25px !important;
    padding-top: 15px !important;
  }

  .hero-section .row.mt-5.pt-3 > [class*="col-"] {
    width: 100%;
  }

  .hero-section .row.mt-5.pt-3 .d-flex.align-items-center {
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* ─── Center Section Headers & Specific Titles ─── */
.section-header,
.section-header .section-title,
.section-header .section-subtitle,
.section-title,
.section-subtitle,
.center-heading,
.center-text {
  text-align: center !important;
}

.section-header {
  margin-bottom: 45px;
  text-align: center !important;
}

.section-header.text-start,
.section-header.text-start .section-title,
.section-header.text-start .section-subtitle {
  text-align: left !important;
}

/* ─── Override global justification for inner page hero ─── */
.page-hero .container,
.page-hero h1,
.page-hero p {
  text-align: center !important;
}
