/* =========================================
   1. RESET & VARIABLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary-blue: #003366; /* Deep Corporate Blue */
  --accent-gold: #ffc107; /* Gold/Yellow from logo */
  --text-dark: #333;
  --text-light: #fff;
  --light-gray: #f4f4f4;
}

body {
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #fff;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.main-header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 5px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  height: 60px;
}

.site-name h1 {
  font-size: 1.5rem;
  color: var(--primary-blue);
  line-height: 1;
}

.site-name p {
  font-size: 0.8rem;
  color: #666;
}

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

.nav-links a {
  font-weight: 500;
  color: var(--primary-blue);
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-gold);
}

.btn-contact {
  background-color: var(--primary-blue);
  color: white !important;
  padding: 10px 20px;
  border-radius: 5px;
}

.btn-contact:hover {
  background-color: var(--accent-gold);
  color: var(--primary-blue) !important;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  top: 100%;
  left: 0;
  border-top: 3px solid var(--accent-gold);
  border-radius: 0 0 5px 5px;
}

.dropdown-content a {
  color: var(--text-dark);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-content a:hover {
  background-color: var(--light-gray);
  color: var(--primary-blue);
  padding-left: 20px;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn i {
  transform: rotate(180deg);
  transition: transform 0.3s;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-blue);
}

/* =========================================
   3. HERO & BANNERS
   ========================================= */
.hero {
  height: 80vh;
  background-image: url("images/hero-1.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  transition: background-image 1.5s ease-in-out;
}

.hero-overlay,
.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 51, 102, 0.7);
}

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

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* Current Programme Badge (Home) */
.current-prog-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid var(--accent-gold);
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 20px;
  color: var(--accent-gold);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(5px);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: 0 0 0 rgba(255, 0, 0, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
  }
}

.page-banner {
  height: 40vh;
  background-image: url("images/excos.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.banner-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 0 20px;
}

.banner-content h2 {
  font-size: 3rem;
  margin-bottom: 10px;
}

/* =========================================
   4. GENERAL SECTIONS & TEXT
   ========================================= */
.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-blue);
}

.underline {
  width: 60px;
  height: 4px;
  background-color: var(--accent-gold);
  margin: 10px auto;
}

.underline-left {
  width: 50px;
  height: 3px;
  background-color: var(--accent-gold);
  margin-bottom: 20px;
}

.text-justified {
  text-align: justify;
  line-height: 1.8;
}

.text-justified p {
  margin-bottom: 20px;
  color: #444;
}

.mission-section {
  padding: 60px 0;
  background-color: var(--light-gray);
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: bold;
  margin: 5px;
  transition: transform 0.2s;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-primary {
  background-color: var(--accent-gold);
  color: var(--primary-blue);
}

.btn-secondary {
  border: 2px solid white;
  color: white;
}

.btn-secondary:hover {
  background-color: white;
  color: var(--primary-blue);
}

.cta-section {
  background-color: var(--primary-blue);
  color: white;
  text-align: center;
  padding: 60px 0;
}

/* =========================================
   5. CARDS & GRIDS (Members, Training, Etc)
   ========================================= */
.members-section {
  padding: 80px 0;
  background-color: white;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  align-items: stretch;
}

/* --- PREMIUM CARD DESIGN (Training/Publication/Resources) --- */
.member-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.member-card.hover-lift {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
  position: relative; /* Essential for ::after pseudo-element */
}

/* Header (Icon Area) */
.card-header {
  background-color: var(--light-gray);
  padding: 15px;
  text-align: center;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.member-card.hover-lift .card-header {
  background: radial-gradient(
    circle at center,
    #f3f6f9 0%,
    #eef2f5 100%
  ) !important;
  border-bottom: none;
}

/* Floating Icon Effect */
.member-card.hover-lift .card-header i {
  font-size: 2.5rem !important;
  color: var(--primary-blue);
  background: white;
  width: 80px;
  height: 80px;
  line-height: 80px;
  text-align: center;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(0, 51, 102, 0.1);
  transition: all 0.4s ease;
}

/* Card Body */
.card-body {
  padding: 25px;
  flex-grow: 1;
  text-align: center;
}

.member-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #333;
}

.member-card.hover-lift h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-blue);
}

.card-link {
  color: var(--primary-blue);
  font-weight: bold;
  font-size: 0.9rem;
}

.card-link:hover {
  text-decoration: underline;
}

/* Hover Animations */
.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-gold);
}

.member-card.hover-lift:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0, 51, 102, 0.15);
}

/* Invert the Icon colors & Rotate */
.member-card.hover-lift:hover .card-header i {
  /* OPTION 1: Gold Background, Blue Icon (High Contrast) */
  background: var(--accent-gold) !important;
  color: var(--primary-blue) !important;

  /* OPTION 2: Use this if you prefer White Background, Blue Icon */
  /* background: white !important; */
  /* color: var(--primary-blue) !important; */

  transform: scale(1.1) rotate(10deg);

  /* Shadow matching the Gold color */
  box-shadow: 0 15px 30px rgba(255, 193, 7, 0.4) !important;
}

/* Gold Sweep Effect */
.member-card.hover-lift::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 5px;
  background: var(--accent-gold);
  transition: width 0.4s ease;
}

.member-card.hover-lift:hover::after {
  width: 100%;
}

/* --- OTHER CARD TYPES --- */
.mdi-logo {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}
.member-card:hover .mdi-logo {
  transform: scale(1.1);
}

.country-tag {
  background-color: var(--primary-blue);
  color: white;
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 10px;
}

.flag-icon {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  display: inline-block;
}

/* =========================================
   6. DASHBOARD / SPLIT VIEW (Members Page)
   ========================================= */
.dashboard-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  min-height: 500px;
}

.country-menu {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.country-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-size: 1rem;
  color: #555;
  font-weight: 600;
}

.country-btn.active,
.country-btn:hover {
  background-color: var(--primary-blue);
  color: white;
}

.country-btn img {
  width: 28px;
  height: 20px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 3. The Right Display Area (Centered) */
.display-header h3 {
  font-size: 1.8rem;
  color: var(--primary-blue);
  margin-bottom: 25px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  /* CENTERING FIXES: */
  text-align: center;
  width: 100%;
}

.members-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
}

/* Compact Card Style */
.compact-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.compact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-gold);
}

.compact-header {
  height: 80px;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.compact-logo {
  max-height: 100%;
  max-width: 80%;
  object-fit: contain;
}

.compact-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  /* CENTERING FIXES: */
  align-items: center; /* Centers flex items horizontally */
  text-align: center; /* Centers text paragraphs */
}

.compact-body h4 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #333;
  line-height: 1.4;
}

.compact-role {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
}

.compact-link {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--primary-blue);
  margin-top: auto;
}

.slide-up {
  animation: slideUp 0.5s ease-out forwards;
}

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

/* =========================================
   7. MISSION & VISION (Home & About)
   ========================================= */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}

.mv-card {
  padding: 60px 40px;
  position: relative;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.mv-content {
  position: relative;
  z-index: 2;
}

.mv-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.mv-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.mv-card p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Theme 1: Mission */
.mission-style {
  background-color: white;
  color: var(--text-dark);
}
.mission-style .icon-box {
  background-color: rgba(0, 51, 102, 0.1);
  color: var(--primary-blue);
}
.mission-style h3 {
  color: var(--primary-blue);
}

/* Theme 2: Vision */
.vision-style {
  background-color: var(--primary-blue);
  color: white;
}
.vision-style .icon-box {
  background-color: rgba(255, 193, 7, 0.2);
  color: var(--accent-gold);
}
.vision-style h3 {
  color: white;
}
.vision-style p {
  color: #e0e0e0;
}

.bg-icon {
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-size: 10rem;
  opacity: 0.05;
  z-index: 1;
  transform: rotate(-15deg);
  transition: all 0.5s ease;
}

.mv-card:hover .bg-icon {
  transform: rotate(0deg) scale(1.1);
  opacity: 0.1;
}

/* =========================================
   8. ABOUT PAGE SECTIONS
   ========================================= */
.history-layout {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

.es-sidebar {
  flex: 0 0 280px;
}

.es-card {
  background: white;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
  border-top: 5px solid var(--accent-gold);
  position: sticky;
  top: 100px;
}

.es-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 0 0 2px var(--primary-blue);
  margin-bottom: 15px;
}

.es-card h4 {
  color: var(--primary-blue);
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.es-card span {
  font-size: 0.85rem;
  color: #777;
  font-weight: 600;
  text-transform: uppercase;
}

.es-line {
  height: 2px;
  width: 50px;
  background: var(--accent-gold);
  margin: 15px auto;
}

.es-quote {
  font-size: 0.9rem;
  font-style: italic;
  color: #555;
  line-height: 1.5;
}

.history-text {
  flex: 1;
  font-size: 1.05rem;
  color: #444;
}

/* ES Profile on History Page (Alternative inline style) */
.es-profile-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}
.es-profile-header img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 0 0 3px var(--accent-gold);
  margin-bottom: 10px;
}
.es-profile-header h4 {
  color: var(--primary-blue);
  font-size: 1.1rem;
  margin-bottom: 2px;
}
.es-profile-header span {
  color: #666;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
}

.objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.obj-card {
  background: white;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #eee;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centered Items */
  text-align: center; /* Centered Text */
}

.obj-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: var(--accent-gold);
}

.obj-card i {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 20px;
  background: rgba(0, 51, 102, 0.05);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.obj-card h4 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 10px;
}

.obj-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

/* =========================================
   9. TRAINING PAGE SECTIONS
   ========================================= */
.methodology-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-top: 30px;
  position: relative;
}

.method-step {
  background: white;
  padding: 40px 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  flex: 1;
  position: relative;
  border-top: 5px solid var(--primary-blue);
  z-index: 2;
}

.step-number {
  width: 60px;
  height: 60px;
  background-color: var(--primary-blue);
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -70px auto 20px auto;
  border: 5px solid #f9f9f9;
}

.step-number i {
  font-size: 1.2rem;
}

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent-gold);
  height: 150px;
  flex-shrink: 0;
  padding: 0 10px;
}

/* =========================================
   10. LEADERSHIP & EXCO (PREMIUM)
   ========================================= */
.exco-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
}

.exco-card {
  background: white;
  padding: 40px 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  border-top: 5px solid var(--primary-blue);
  position: relative;
  width: 280px;
  max-width: 100%;
  flex-grow: 0;
  overflow: hidden;
}

.exco-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 51, 102, 0.15);
}

.exco-image {
  width: 130px;
  height: 130px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 0 0 1px #e0e0e0;
  transition: all 0.4s;
}

.exco-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.exco-card:hover .exco-image {
  box-shadow: 0 0 0 4px var(--accent-gold);
  border-color: var(--primary-blue);
}

.exco-card:hover .exco-image img {
  transform: scale(1.1);
}

.exco-card h3 {
  color: var(--primary-blue);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 5px;
  line-height: 1.3;
}

.org-post {
  color: #555;
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 10px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.role {
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  background: rgba(255, 193, 7, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  display: inline-block;
}

.know-more-btn {
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 51, 102, 0.2);
  transition: all 0.3s ease;
  display: block;
  width: fit-content;
  margin: 0 auto 20px auto;
  clear: both;
}

.know-more-btn:hover {
  background: var(--accent-gold);
  color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 193, 7, 0.4);
}

.exco-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid #f0f0f0;
  padding-top: 20px;
}

.exco-socials a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: white;
  border: 1px solid #eee;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.exco-socials a:hover {
  background-color: var(--primary-blue);
  color: white;
}

/* =========================================
   11. EVENTS & METRICS
   ========================================= */
.metrics-section {
  background-color: var(--primary-blue);
  color: white;
  padding: 40px 0;
  text-align: center;
}

.metrics-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: white;
}

.metrics-header p {
  font-size: 1rem;
  color: #e0e0e0;
  max-width: 700px;
  margin: 0 auto 30px auto;
  line-height: 1.5;
}

.metrics-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 40px;
}

.metric-card {
  flex: 1;
  min-width: 200px;
}

.metric-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 5px;
  line-height: 1;
}

/* Event Images */
.event-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-card .card-header.event-header {
  padding: 0;
  height: 180px;
  background-color: #eee;
  overflow: hidden;
}

/* =========================================
   12. CONTACT PAGE
   ========================================= */
.contact-section {
  padding: 80px 0;
  background-color: #f4f4f4;
}

.contact-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: start;
}

.contact-info-box {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-top: 5px solid var(--primary-blue);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #eee;
}

.icon-circle {
  background-color: #f0f4f8;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.info-item h4 {
  font-size: 0.95rem;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.contact-form-box {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-top: 5px solid var(--accent-gold);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.required {
  color: red;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  background-color: #fafafa;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-blue);
  background-color: white;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.submit-btn {
  width: 100%;
  padding: 15px;
  border: none;
  background-color: var(--primary-blue);
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.3s;
}

.submit-btn:hover {
  background-color: var(--accent-gold);
  color: var(--primary-blue);
}

/* =========================================
   13. MODALS & TOASTS
   ========================================= */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 800px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: zoomIn 0.3s ease;
}

/* =========================================
   ENHANCED CLOSE BUTTON (VISIBLE 'X')
   ========================================= */
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.9); /* White circle background */
  border-radius: 50%; /* Make it round */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #333; /* Dark X for contrast */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Drop shadow to pop out */
  z-index: 100; /* Ensure it stays on top */
  cursor: pointer;
  transition: transform 0.2s ease;
}

.close-modal:hover {
  transform: scale(1.1);
  background-color: #fff;
  color: red; /* Turn red on hover */
}

.modal-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
}

.modal-image-col {
  background-color: #f4f4f4;
  height: 100%;
}
.modal-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-text-col {
  padding: 40px;
  overflow-y: auto;
  max-height: 80vh;
}

.modal-bio p {
  color: #444;
  line-height: 1.7;
  font-size: 0.95rem;
  text-align: justify;
  margin-bottom: 15px;
}

/* Toast */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 300px;
  background: white;
  padding: 15px 20px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 15px;
  animation: slideIn 0.3s ease-out forwards;
  border-left: 5px solid #333;
  opacity: 0;
  transform: translateX(100%);
}

.toast.success {
  border-left-color: #28a745;
}
.toast.success i {
  color: #28a745;
}
.toast.error {
  border-left-color: #dc3545;
}
.toast.error i {
  color: #dc3545;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}
@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 10000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.lightbox-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  text-align: center;
  position: relative;
  animation: zoomIn 0.3s;
}

#lightbox-img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

#lightbox-caption {
  margin-top: 15px;
  color: #ccc;
  font-size: 1.1rem;
}

#lightbox-counter {
  color: #777;
  font-size: 0.9rem;
  margin-top: 5px;
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  transition: 0.3s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.3);
}
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}
.prev {
  left: 0;
}

/* News Card Image (Passport Style Desktop) */
.news-card-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  object-position: top center;
  border-radius: 6px;
  margin-right: 20px;
  margin-bottom: 10px;
  float: left;
  border: 1px solid #ddd;
}

/* =========================================
   14. FOOTER
   ========================================= */
.main-footer {
  background-color: #1a1a1a;
  color: #b0b0b0;
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 20px;
  border-left: 3px solid var(--accent-gold);
  padding-left: 10px;
}

.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul li a {
  transition: color 0.3s;
}
.footer-col ul li a:hover {
  color: var(--accent-gold);
  padding-left: 5px;
}

.social-links {
  margin-top: 20px;
}
.social-links a {
  display: inline-block;
  width: 35px;
  height: 35px;
  background-color: #333;
  color: white;
  text-align: center;
  line-height: 35px;
  border-radius: 50%;
  margin-right: 10px;
  transition: background 0.3s;
}
.social-links a:hover {
  background-color: var(--accent-gold);
}

.contact-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.contact-list i {
  color: var(--accent-gold);
  margin-top: 5px;
}

.footer-bottom {
  background-color: #111;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  border-top: 1px solid #333;
}

/* =========================================
   RESOURCE PAGE GALLERY (Premium Style)
   ========================================= */

.gallery-grid {
  display: grid;
  /* CHANGED: Forces exactly 4 columns of equal width */
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; /* Reduced gap slightly to help them fit better */
  margin-top: 30px;
}

.gallery-item {
  position: relative;
  border-radius: 12px; /* Matches your other premium cards */
  overflow: hidden;
  height: 280px; /* Fixed height for uniformity */
  cursor: pointer; /* Shows hand icon to indicate clickability */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 4px solid white; /* Creates a nice photo-frame look */
}

/* The Image */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

/* Hover Effect: Zoom Image */
.gallery-item:hover img {
  transform: scale(1.15);
}

/* The Overlay Gradient (Always visible but subtle) */
.gallery-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 51, 102, 0.9) 0%,
    transparent 60%
  );
  opacity: 0.8;
  transition: opacity 0.3s;
}

.gallery-item:hover::after {
  opacity: 1; /* Darkens slightly on hover to make text pop */
}

/* The Caption Text */
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  z-index: 2; /* Sits on top of the gradient */
  color: white;
  font-weight: 600;
  font-size: 1rem;
  transform: translateY(20px); /* Pushed down slightly */
  transition: transform 0.4s ease, color 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hover Effect: Slide Caption Up */
.gallery-item:hover .gallery-caption {
  transform: translateY(0);
  color: var(--accent-gold); /* Text turns gold */
}

/* Icon Styling inside Caption */
.gallery-caption i {
  background: rgba(255, 255, 255, 0.2);
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem;
  backdrop-filter: blur(5px);
}

/* Find this section in style.css and update it */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  transition: 0.3s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.3);

  /* --- ADD THIS LINE --- */
  z-index: 11000; /* Ensures buttons are ALWAYS clickable above the image */
}

/* =========================================
   SCROLL TO TOP BUTTON
   ========================================= */
#scrollToTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999; /* Ensures it sits on top of everything */
  border: none;
  outline: none;
  background-color: var(--primary-blue);
  color: white;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%; /* Makes it a perfect circle */
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease-in-out;
}

/* Hover Effect */
#scrollToTopBtn:hover {
  background-color: var(--accent-gold);
  color: var(--primary-blue);
  transform: translateY(-5px); /* Little lift effect */
}

/* Class added by JavaScript to show the button */
#scrollToTopBtn.showBtn {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =========================================
   EVENT CARD STYLES (FIXED)
   ========================================= */

/* 1. Event Image Container */
.member-card .card-header.event-header {
  padding: 0 !important; /* Forces image to touch edges */
  height: 200px; /* Fixed height for uniformity */
  background-color: #eee; /* Fallback color */
  overflow: hidden; /* Clips image if it zooms */
  position: relative; /* Anchor for the status badge */
  border-bottom: 1px solid #f0f0f0;
}

/* 2. The Event Image */
.event-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image fills box without stretching */
  display: block;
  transition: transform 0.5s ease;
}

/* Hover Effect: Gentle Zoom on Image */
.member-card:hover .event-banner-img {
  transform: scale(1.1);
}

/* 3. Status Badges (Top Right Corner) */
.status-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800; /* Extra bold */
  color: white;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Drop shadow for readability */
  z-index: 10; /* sits on top of image */
  text-transform: uppercase;
}

/* Green Pulse for Ongoing */
.status-badge.ongoing {
  background-color: #28a745;
  animation: pulse-green 2s infinite;
}

/* Grey for Completed */
.status-badge.completed {
  background-color: #6c757d;
}

/* 4. Card Content Alignment */
.member-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Pushes buttons to bottom */
  padding: 25px;
  height: 100%;
}

.member-card h3 {
  min-height: 50px; /* Ensures titles align even if one is longer */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 5. Button Group (at bottom of card) */
.card-body > div {
  margin-top: auto; /* Pushes the button container to the very bottom */
  width: 100%;
}

/* Pulse Animation */
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* =========================================
   MEMBERSHIP PAGE STYLES
   ========================================= */

/* The Benefits List */
.benefits-list {
  list-style: none;
  margin-top: 20px;
  padding: 0;
}

.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee; /* Light separator line */
}

.benefits-list li:last-child {
  border-bottom: none;
}

/* Gold Checkmark Icon */
.benefits-list li i {
  color: var(--accent-gold);
  font-size: 1.4rem;
  margin-top: 2px;
  flex-shrink: 0; /* Prevents icon from squashing */
}

/* Benefit Title */
.benefits-list li strong {
  color: var(--primary-blue);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 5px;
}

/* Benefit Description */
.benefits-list li p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* =========================================
   15. MOBILE RESPONSIVENESS (CONSOLIDATED)
   ========================================= */
@media (max-width: 768px) {
  /* --- NAVIGATION --- */
  /* 2. The Toggle Button (Hamburger / X) */
  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1002; /* Highest priority - stays visible on top of the white menu */
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-blue);
  }
  .nav-links {
    position: fixed; /* Changed from absolute to fixed */
    top: 0; /* Starts at the very top of the screen */
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Start from top */
    padding-top: 10px; /* Push links down so they aren't hidden by the X button */
    box-shadow: none;
    transform: translateY(-100%); /* Slide in from top */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 900; /* Higher than the header (1000) */
  }
  .nav-links.active {
    transform: translateY(0%);
  }
  .nav-links li {
    margin: 0px 0;
  }
  .nav-links a {
    font-size: 0.95rem;
  }
  .dropdown .dropbtn {
    padding: 8px 0;
  }

  .dropdown {
    width: 100%;
    text-align: center;
  }
  .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    border-top: none;
    background-color: #f9f9f9;
    width: 100%;
  }
  .dropdown:hover .dropdown-content {
    display: block;
  }
  .dropdown-content a {
    padding-left: 0;
    text-align: center;
    color: #555;
  }

  /* --- HERO & BANNERS --- */
  .hero-content h2 {
    font-size: 2rem;
  }
  .banner-content h2 {
    font-size: 2rem;
  }
  .page-banner {
    height: 30vh;
  }
  .banner-content p {
    font-size: 1rem;
    padding: 0 10px;
  }

  /* --- LAYOUTS (Stacking Grids) --- */
  .contact-grid-layout,
  .history-layout,
  .methodology-grid,
  .dashboard-container,
  .exco-grid,
  .mission-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 30px;
  }

  .mission-grid {
    border-radius: 12px;
  }

  .contact-form-box,
  .contact-info-box {
    padding: 25px 20px;
  }
  .map-container iframe {
    width: 100%;
    height: 250px;
  }

  .es-sidebar {
    width: 100%;
  }
  .es-card {
    position: static;
  }

  .metrics-section {
    padding: 30px 0;
  }

  /* --- MENUS & ARROWS --- */
  .country-menu {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px;
  }
  .country-btn {
    flex-shrink: 0;
    padding: 10px 15px;
  }
  .step-arrow {
    display: none;
  }
  .mission-section .contact-grid-layout img {
    margin-bottom: 40px;
  }

  /* Adjust Method Steps */
  .step-number {
    margin-top: 0;
    border-color: white;
  }
  .step-number i {
    font-size: 1.2rem;
  }

  /* --- FOOTER (Centered) --- */
  .footer-col {
    text-align: center;
    margin-bottom: 40px;
  }
  .footer-col > div {
    justify-content: center;
  }
  .social-links {
    display: flex;
    justify-content: center;
    margin-top: 15px;
  }
  .contact-list li {
    justify-content: center;
    text-align: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* --- MODALS & IMAGES --- */
  .modal-grid {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important; /* Forces it to fit inside modal-content */
        max-height: 85vh !important;
    }

  .modal-text-col {
    padding: 20px 25px;
  }
  .lightbox-content {
    width: 95%;
  }
  .prev,
  .next {
    font-size: 20px;
    padding: 10px;
  }

  /* =========================================
   LEADERSHIP MODAL LAYERING & MOBILE CARD
   ========================================= */

  /* 1. Force Modal to be ABOVE the Bottom Nav */
  .modal-overlay {
    z-index: 11000 !important; /* Bottom Nav is 10005, this must be higher */
  }

  /* 2. Make the Close 'X' Button Visible */
  .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: white; /* White circle background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    cursor: pointer;
    transition: transform 0.2s ease;
  }

  .close-modal:hover {
    transform: scale(1.1);
    color: red;
  }

  @media (max-width: 768px) {
    .modal-content {
      width: 95% !important; /* Cleaner width */
      max-height: 90vh !important; /* Safe height limit */
      height: 90vh;
      border-radius: 15px;
      margin: auto; /* Centers the card vertically */
      position: relative;
      overflow: hidden; /* Clips anything that tries to stick out */
      display: block !important;
    }

    .modal-image-col {
      /* CHANGED: Increased from 150px to 220px for a better view */
      height: 220px !important;
      flex-shrink: 0;
      width: 100%;
      position: relative;
    }

    .modal-image-col img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      /* Keeps the face in view, aligned to the top */
      object-position: top center;
    }

    /* 2. Scrollable Text Area */
    .modal-text-col {
      flex: 1;
      overflow-y: auto;
      padding: 20px 25px;
      background: white;
      padding-bottom: 50px !important;
    }

    /* 3. Text Readability */
    .modal-text-col h2 {
      font-size: 1.4rem;
      margin-bottom: 5px;
      color: var(--primary-blue);
    }

    .modal-role {
      font-size: 0.85rem;
      color: var(--accent-gold);
      font-weight: 700;
      margin-bottom: 10px;
      display: block;
    }

    .modal-bio p {
      font-size: 0.95rem;
      line-height: 1.6;
      text-align: justify;
    }

    /* 4. Ensure Close Button is Visible */
    .close-modal {
      top: 10px;
      right: 10px;
      width: 35px;
      height: 35px;
      font-size: 1.2rem;
      background-color: rgba(255, 255, 255, 0.9);
    }
  }

  /* Responsive adjustment: 2 per line on tablets */
  @media (max-width: 1024px) {
    .gallery-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* Responsive adjustment: 1 per line on phones */
  @media (max-width: 600px) {
    .gallery-grid {
      grid-template-columns: 1fr;
    }
  }
}

/* --- LEADERSHIP CARDS MOBILE FIX --- */
@media (max-width: 768px) {
  .exco-grid {
    display: flex;
    flex-direction: column; /* Stacks them one on top of another */
    align-items: center; /* CENTERS them horizontally */
    gap: 30px;
  }

  /* Optional: Ensure card doesn't overflow very small screens */
  .exco-card {
    width: 100%;
    max-width: 280px; /* Maintains the ideal card width */
  }
}

/* --- MOBILE DROPDOWN INTERACTION --- */
@media (max-width: 768px) {
  /* 1. Disable the default hover (so it doesn't flicker) */
  .dropdown:hover .dropdown-content {
    display: none;
  }

  /* 2. Enable the class-based toggle (Controlled by JS) */
  .dropdown.active .dropdown-content {
    display: block !important; /* Force show */
    animation: fadeIn 0.3s ease;
  }

  /* 3. Rotate the arrow when open */
  .dropdown.active .dropbtn i {
    transform: rotate(180deg);
  }
}

/* --- INFINITE PARTNER SLIDER --- */

.slider-container {
  height: 100px;
  margin: auto;
  overflow: hidden;
  position: relative;
  width: 100%;
}

/* Gradient Masks (Fades the edges so logos appear/disappear smoothly) */
.slider-container::before,
.slider-container::after {
  content: "";
  height: 100px;
  position: absolute;
  width: 100px;
  z-index: 2;
}

.slider-container::before {
  left: 0;
  top: 0;
  background: linear-gradient(to right, white 0%, transparent 100%);
}

.slider-container::after {
  right: 0;
  top: 0;
  background: linear-gradient(to left, white 0%, transparent 100%);
}

/* The Moving Track */
.slider-track {
  display: flex;
  width: calc(
    200px * 16
  ); /* Width of slide (200) * Number of slides (8 real + 8 duplicates) */
  animation: scroll 30s linear infinite;
}

.slide {
  height: 100px;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.slide img {
  width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(100%); /* Makes logos grey for a professional look */
  opacity: 0.6;
  transition: all 0.3s ease;
}

/* Color on Hover */
.slide img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* Keyframe Animation */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-200px * 8));
  } /* Move left by width of the 8 original slides */
}

/* Mobile Adjustment */
@media (max-width: 768px) {
  .slider-track {
    animation: scroll 20s linear infinite; /* Faster on mobile */
  }
}

/* --- PARTNERS SLIDER MOBILE FIX --- */
.slider-container {
  height: 80px; /* Shorter container on phone */
}

.slider-container::before,
.slider-container::after {
  width: 50px; /* Smaller fade area so logos are more visible */
}

.slide {
  width: 140px; /* Smaller logos */
  height: 80px;
}

.slide img {
  max-height: 50px; /* limit logo size */
}

/* --- INTRO BADGES (Training/Research/Consultancy) --- */
/* Fixes the "Floating Badge" being cut off on mobile */
.mission-section .contact-grid-layout div[style*="position: absolute"] {
  right: 0 !important; /* Bring it inside the screen */
  bottom: -15px !important;
  left: auto !important; /* Prevent conflicts */
  max-width: 200px; /* Smaller width */
  padding: 15px !important;
  font-size: 0.85rem;
}

/* Adjust the container to make room for the badge at the bottom */
.mission-section .contact-grid-layout div[style*="position: relative"] {
  margin-bottom: 30px;
}

/* =========================================
   16. ROBUST DARK MODE SYSTEM (Updated)
   ========================================= */

/* 1. The Toggle Button */
#theme-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10000;
  border: none;
  outline: none;
  background-color: var(--primary-blue);
  color: white;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle:hover {
  transform: scale(1.1);
  background-color: var(--accent-gold);
  color: var(--primary-blue);
}

/* 2. GLOBAL BACKGROUNDS */
body.dark-mode,
body.dark-mode .main-header,
body.dark-mode section,
body.dark-mode .mission-section,
body.dark-mode .members-section,
body.dark-mode .contact-section,
body.dark-mode .metrics-section,
body.dark-mode .cta-section,
body.dark-mode .footer-bottom,
body.dark-mode .accordion-body {
  background-color: #121212 !important;
  color: #e0e0e0 !important;
}

/* 3. CARDS & BOXES (General) */
body.dark-mode .member-card,
body.dark-mode .mv-card,
body.dark-mode .obj-card,
body.dark-mode .es-card,
body.dark-mode .method-step,
body.dark-mode .contact-info-box,
body.dark-mode .contact-form-box,
body.dark-mode .modal-content,
body.dark-mode .gallery-item,
body.dark-mode .accordion-item,
body.dark-mode .accordion-header,
body.dark-mode .compact-card,
body.dark-mode .country-menu,
body.dark-mode .dropdown-content,
body.dark-mode .nav-links,
body.dark-mode .exco-card {
  background-color: #1e1e1e !important;
  border-color: #333 !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}

/* 4. SPECIFIC FIX: Newsletter & Poll Cards */
/* Newsletter: Switch from Gold Gradient to Dark with Gold Border */
body.dark-mode .news-card-style {
  background: #1e1e1e !important;
  border: 2px solid var(--accent-gold) !important;
  box-shadow: 0 0 15px rgba(255, 193, 7, 0.1) !important;
}
body.dark-mode .news-card-style h3 {
  color: var(--accent-gold) !important;
}

/* Poll: Switch from White to Dark */
body.dark-mode .poll-card-style {
  background-color: #1e1e1e !important;
  border: 1px solid #333 !important;
}

/* 5. INPUTS & FORMS (Newsletter & Poll) */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode .enhanced-form,
body.dark-mode .poll-option-btn {
  background-color: #2d2d2d !important;
  border-color: #444 !important;
  color: white !important;
}

body.dark-mode .poll-option-btn:hover {
  background-color: #333 !important;
  border-color: var(--accent-gold) !important;
}

/* 6. TEXT COLORS */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode strong,
body.dark-mode .site-name h1,
body.dark-mode .country-title {
  color: #fff !important;
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode span,
body.dark-mode .site-name p,
body.dark-mode a {
  color: #ccc !important;
}

/* 7. ACCENTS & ICONS */
body.dark-mode .role,
body.dark-mode .accent-text,
body.dark-mode i,
body.dark-mode .live-badge {
  color: var(--accent-gold) !important;
}

/* Fix for Social Icons in Footer/Cards */
body.dark-mode .social-links a,
body.dark-mode .exco-socials a {
  background-color: #333 !important;
  color: #fff !important;
  border-color: #444 !important;
}

/* 8. CARD HEADERS */
body.dark-mode .card-header,
body.dark-mode .compact-header {
  background: #252525 !important;
  border-bottom: 1px solid #333 !important;
}

/* 6. SPECIFIC CARD HEADER FIXES */
body.dark-mode .card-header,
body.dark-mode .compact-header {
  background: #252525 !important; /* Darker header for cards */
  border-bottom: 1px solid #333 !important;
}

/* 7. DROPDOWN LINKS */
body.dark-mode .dropdown-content a:hover {
  background-color: #333 !important;
  color: var(--accent-gold) !important;
}

/* 8. ACCORDION BODY */
body.dark-mode .accordion-body {
  background-color: #121212 !important;
}

/* =========================================
   DARK MODE: LEADERSHIP CARDS FIX
   ========================================= */

/* 1. Card Background & Shadow */
body.dark-mode .exco-card {
  background-color: #1e1e1e !important; /* Dark Grey */
  border: 1px solid #333 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  /* Keep the blue top accent or switch to gold? Let's keep blue for identity */
  border-top: 5px solid var(--primary-blue) !important;
}

/* 2. Profile Image Border (Crucial Fix) */
/* In light mode, this is white. In dark mode, it must match the dark card. */
body.dark-mode .exco-image {
  border-color: #1e1e1e !important;
  box-shadow: 0 0 0 1px #444 !important; /* Subtle outer ring */
}

/* 3. Text Colors */
body.dark-mode .exco-card h3 {
  color: #ffffff !important; /* Bright White Name */
}

body.dark-mode .org-post {
  color: #bbbbbb !important; /* Light Grey Job Title */
}

/* 4. The Role Pill (President/VP etc.) */
body.dark-mode .role {
  background-color: rgba(
    255,
    193,
    7,
    0.15
  ) !important; /* Faint Gold background */
  color: var(--accent-gold) !important; /* Bright Gold Text */
}

/* 5. Social Icons */
body.dark-mode .exco-socials a {
  background-color: #2d2d2d !important;
  border-color: #444 !important;
  color: #ccc !important;
}

body.dark-mode .exco-socials a:hover {
  background-color: var(--accent-gold) !important;
  color: var(--primary-blue) !important;
  border-color: var(--accent-gold) !important;
}

/* 6. Know More Button High Contrast */
body.dark-mode .know-more-btn {
  background-color: #2d2d2d !important;
  border: 1px solid var(--accent-gold) !important;
  color: var(--accent-gold) !important;
}

body.dark-mode .know-more-btn:hover {
  background-color: var(--accent-gold) !important;
  color: #000 !important;
}

/* =========================================
   PREMIUM TESTIMONIAL CARDS
   ========================================= */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial-card {
  background: white;
  padding: 40px 30px;
  border-radius: 16px; /* Softer, modern curves */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden; /* Keeps the large icon inside */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Hover Effect: Lift & Gold Accent */
.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 51, 102, 0.1);
  border-color: rgba(255, 193, 7, 0.3);
}

/* The "Watermark" Quote Icon */
.quote-icon {
  font-size: 8rem; /* Huge size */
  color: rgba(0, 51, 102, 0.03); /* Very faint blue */
  position: absolute;
  top: -10px;
  right: 10px;
  z-index: 0; /* Sits behind the text */
  font-family: sans-serif;
  transition: transform 0.4s ease;
}

.testimonial-card:hover .quote-icon {
  transform: rotate(-10deg) scale(1.1); /* Moves slightly on hover */
  color: rgba(255, 193, 7, 0.1); /* Turns faint gold */
}

/* The Text */
.feedback-text {
  font-size: 1.05rem;
  color: #444;
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 30px;
  position: relative;
  z-index: 1; /* Sits on top of the watermark */
}

/* The Author Area */
.feedback-author {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 1;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0; /* Clean separator line */
}

.feedback-author img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--accent-gold); /* Gold ring around photo */
}

.feedback-author h4 {
  font-size: 1rem;
  color: var(--primary-blue);
  margin-bottom: 2px;
  font-weight: 700;
}

.feedback-author span {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* --- DARK MODE SUPPORT --- */
body.dark-mode .testimonial-card {
  background-color: #1e1e1e !important;
  border: 1px solid #333 !important;
}

body.dark-mode .feedback-text {
  color: #ccc !important;
}

body.dark-mode .feedback-author {
  border-top-color: #333 !important;
}

body.dark-mode .quote-icon {
  color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .feedback-author img {
  border-color: #1e1e1e; /* Ring matches dark card background */
}

/* --- DID YOU KNOW TICKER (FIXED) --- */
.ticker-wrapper {
  background-color: var(--primary-blue);
  color: white;
  display: flex;
  height: 35px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  line-height: 35px;
  position: relative;
  width: 100%;
  z-index: 900; /* Ensures it sits below the dropdowns */
}

.ticker-label {
  background-color: var(--accent-gold);
  color: var(--primary-blue);
  font-weight: 800;
  padding: 0 15px;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  font-size: 0.75rem;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  flex-shrink: 0; /* Prevents the label from disappearing */
  z-index: 2; /* Sits on top of the scrolling text */
  position: relative;
}

.ticker-track {
  flex-grow: 1;
  position: relative; /* Essential for the scrolling text */
  overflow: hidden;
}

.ticker-content {
  position: absolute; /* Force it to float inside the track */
  white-space: nowrap;
  will-change: transform;
  /* Animation: Move from Right edge (100%) to Left edge (-100%) */
  animation: ticker-scroll 120s linear infinite;
  top: 0;
  left: 100%; /* Start completely off-screen to the right */
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-content span {
  display: inline-block;
  padding-right: 50px;
  color: white; /* Force text color to white */
}

.ticker-content i {
  color: var(--accent-gold);
  margin-right: 5px;
}

/* Pause animation when user hovers over the blue bar */
.ticker-track:hover .ticker-content {
  animation-play-state: paused;
}

/* --- KEYFRAMES --- */
@keyframes ticker-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  } /* Slide all the way left */
}

/* Mobile Adjustment */
@media (max-width: 768px) {
  .ticker-wrapper {
    height: 30px;
    line-height: 30px;
    font-size: 0.75rem;
  }
  .ticker-label {
    padding: 0 10px;
    font-size: 0.65rem;
  }
}

/* =========================================
   COMMUNITY HUB (Newsletter & Poll)
   ========================================= */

.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Base Card Style */
.comm-card {
  padding: 50px 40px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

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

.comm-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.comm-content {
  position: relative;
  z-index: 2;
}

/* --- THEME 1: NEWSLETTER (Gold) --- */
.news-card-style {
  background: linear-gradient(
    135deg,
    #ffc107 0%,
    #ffd54f 100%
  ); /* Gold Gradient */
  color: var(--primary-blue);
}

.news-card-style .icon-box {
  background: rgba(0, 51, 102, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary-blue);
}

.news-card-style h3 {
  color: var(--primary-blue);
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
}

/* Enhanced Newsletter Input */
.enhanced-form {
  display: flex;
  background: white;
  padding: 5px;
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-top: 25px;
}

.enhanced-form input {
  border: none;
  background: transparent;
  padding: 15px 20px;
  flex-grow: 1;
  outline: none;
  color: #333;
}

.btn-floating {
  background: var(--primary-blue);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-floating:hover {
  transform: scale(1.1);
}

/* --- THEME 2: POLL (White) --- */
.poll-card-style {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.poll-card-style .icon-box {
  background: rgba(0, 51, 102, 0.05);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-gold);
}

.poll-card-style h3 {
  color: var(--primary-blue);
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
}

.live-badge {
  background: #ff4757;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(255, 71, 87, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
  }
}

/* Poll Grid Layout */
.poll-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Custom Radio Buttons */
.poll-option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  background: #f4f6f8;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
}

.poll-option-btn:hover {
  background: white;
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

/* Hide the actual radio circle */
.poll-option-btn input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Style when selected (using :has selector or sibling logic) */
.poll-option-btn:has(input:checked) {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
  .community-grid {
    grid-template-columns: 1fr; /* Stack them */
  }
  .poll-form-grid {
    grid-template-columns: 1fr; /* Single column buttons on phone */
  }
  .btn-primary[style*="grid-column"] {
    grid-column: span 1 !important; /* Fix vote button width */
  }
}

/* =========================================
   VIDEO BANNER STYLES
   ========================================= */
.video-banner {
  position: relative;
  overflow: hidden;
  background-color: #003366;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.6;
}

.video-banner .banner-overlay {
  z-index: 1;
  background: rgba(0, 51, 102, 0.75);
}

.video-banner .banner-content {
  z-index: 2;
}

/* --- MOBILE ADJUSTMENTS FOR TICKER --- */
@media (max-width: 768px) {
  /* Target the ticker container */
  .ticker-wrapper,
  .ticker-container {
    /* Replace with your actual class name */
    height: 20px; /* Reduce height for mobile */
    font-size: 0.8rem; /* Smaller font size */
  }

  /* Target the ticker text/label specifically if needed */
  .ticker-label {
    font-size: 0.5rem;
    padding: 5px 5px; /* Reduce padding */
  }

  /* Adjust the scrolling text size */
  .ticker-content {
    font-size: 0.8rem;
    line-height: 15px; /* Match the new container height */
  }
}

/* =========================================
   MOBILE BOTTOM NAVIGATION (App-Style)
   ========================================= */

/* 1. Hide by default (Desktop) */
.bottom-nav {
  display: none;
}

/* 2. Mobile Styles */
@media (max-width: 768px) {
  /* Hide the TOP Hamburger Icon (We use bottom now) */
  .main-header .menu-toggle {
    display: none !important;
  }

  /* Add padding to body so content isn't hidden behind the bar */
  body {
    padding-bottom: 80px;
  }

  /* Move Scroll-Up Button higher so it doesn't overlap */
  #scrollToTopBtn {
    bottom: 80px;
  }

  #theme-toggle {
    bottom: 80px;
  }

  /* The Bottom Bar Container */
  .bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: white;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    z-index: 10005; /* Top priority */
    padding: 0 10px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }

  /* Navigation Items */
  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    font-size: 0.7rem;
    width: 20%;
    cursor: pointer;
    transition: color 0.3s;
  }

  .nav-item i {
    font-size: 1.3rem;
    margin-bottom: 4px;
    transition: transform 0.2s;
  }

  /* Active State */
  .nav-item.active,
  .nav-item:hover {
    color: var(--primary-blue);
  }

  .nav-item.active i {
    transform: translateY(-2px);
    color: var(--accent-gold);
  }

  /* 3. The Floating Action Button (Central Menu) */
  .center-fab {
    position: relative;
    top: -25px; /* Float above the bar */
  }

  .fab-circle {
    width: 55px;
    height: 55px;
    background-color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.4);
    border: 5px solid #fff; /* Creates the "cutout" look */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  /* Rotate animation when menu is open */
  .nav-links.active ~ .bottom-nav .fab-circle {
    background-color: var(--accent-gold);
    transform: rotate(90deg);
    color: var(--primary-blue);
  }

  /* Change icon to X when active via CSS trick */
  .nav-links.active ~ .bottom-nav .fab-circle i::before {
    content: "\f00d"; /* FontAwesome code for 'times' (X) */
  }
}

/* Dark Mode Support */
body.dark-mode .bottom-nav {
  background-color: #1e1e1e !important;
  border-top: 1px solid #333;
}
body.dark-mode .fab-circle {
  border-color: #121212 !important; /* Matches dark body background */
}

/* =========================================
   VERTICAL TIMELINE (About Page)
   ========================================= */

.timeline {
  position: relative;
  padding-left: 30px; /* Space for the line */
  border-left: 3px solid #e0e0e0; /* The vertical line */
  margin-left: 10px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* The Dot on the line */
.timeline-dot {
  position: absolute;
  left: -39px; /* Centers dot on the line */
  top: 0;
  width: 15px;
  height: 15px;
  background-color: var(--accent-gold);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--primary-blue); /* Blue ring around gold dot */
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #333;
}

.timeline-content p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* Hover Effect */
.timeline-item:hover .timeline-dot {
  background-color: var(--primary-blue);
  box-shadow: 0 0 0 3px var(--accent-gold);
  transform: scale(1.2);
  transition: all 0.3s ease;
}

/* Dark Mode Adjustment */
body.dark-mode .timeline {
  border-left-color: #333;
}
body.dark-mode .timeline-dot {
  box-shadow: 0 0 0 3px #fff;
}
body.dark-mode .timeline-content h3 {
  color: var(--accent-gold) !important;
}

/* =========================================
   WHATSAPP FLOATING BUTTON
   ========================================= */
.whatsapp-float {
  position: fixed;
  width: 40px;
  height: 40px;
  bottom: 60px; /* Sits above the Scroll-to-Top button (which is at 30px) */
  right: 15px;
  background-color: #25d366; /* Official WhatsApp Green */
  color: white;
  border-radius: 50px;
  text-align: center;
  font-size: 28px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  background-color: #128c7e; /* Darker green on hover */
  color: white;
  transform: scale(1.1);
}

.whatsapp-float i {
  margin-top: 2px; /* Fine-tuning icon center */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 30px;
    height: 30px;
    font-size: 24px;
    right: 20px;
    /* Calculation:
           Bottom Nav = 70px height
           Scroll Top = sits at 100px
           WhatsApp = needs to sit above Scroll Top
        */
    bottom: 115px;
  }
}

/* =========================================
   TABLET / IPAD NAVIGATION FIX
   ========================================= */
@media (min-width: 769px) and (max-width: 1250px) {
  /* 1. Use more screen width */
  .container {
    width: 95%; /* Expands content closer to the edges */
  }

  /* 2. Reduce gap between links */
  .nav-links {
    gap: 15px; /* Reduced from 25px to fit everything */
  }

  /* 3. Slightly smaller font size */
  .nav-links a,
  .dropbtn {
    font-size: 0.9rem; /* Reduced from default size */
  }

  /* 4. Adjust logo size if needed to save space */
  .logo {
    height: 50px; /* Slightly smaller logo */
  }

  /* 5. Shrink the 'Contact Us' button padding */
  .btn-contact {
    padding: 8px 15px;
  }
}

/* =========================================
   IPAD / TABLET MEMBER INSTITUTIONS ADJUSTMENTS
   ========================================= */
@media (min-width: 600px) and (max-width: 1024px) {
  /* Force 2 Columns for Member Grids */
  .members-grid,
  .members-grid-compact {
    grid-template-columns: repeat(2, 1fr); /* Strictly 2 columns */
    gap: 20px; /* Slightly reduced gap to ensure they fit */
  }

  /* Ensure the Dashboard Stacks on Portrait iPad (if not already) */
  /* This ensures the sidebar goes to top and grid gets full width */
  .dashboard-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Adjust the Country Menu to scroll horizontally like on mobile */
  .country-menu {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
  }

  .country-btn {
    flex-shrink: 0;
  }
}

/* =========================================
   HERO SECTION RESPONSIVENESS
   ========================================= */

/* 1. FOR MOBILE PHONES (Portrait) - Max Width 768px */
@media (max-width: 768px) {
  .hero {
    height: 50vh; /* Reduces height to 50% of screen */
    min-height: 400px; /* Ensures it's not too short */
    background-position: center; /* Keeps center of image visible */
    background-attachment: scroll; /* Prevents zooming issues on some phones */
  }

  .hero-content h2 {
    font-size: 2rem; /* Smaller text */
    margin-bottom: 15px;
  }

  .hero-content p {
    font-size: 1rem;
    line-height: 1.4;
    display: none; /* Optional: Hide paragraph on very small screens to focus on image */
  }

  /* Show paragraph only if screen is tall enough */
  @media (min-height: 600px) {
    .hero-content p {
      display: block;
    }
  }
}

/* 2. FOR IPADS & TABLETS - Width between 769px and 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero {
    height: 60vh; /* 60% of screen height (Standard Tablet Header) */
    min-height: 450px;
    background-position: center center;
  }

  .hero-content {
    max-width: 90%; /* Use more width on tablet */
  }

  .hero-content h2 {
    font-size: 2.5rem;
  }
}

/* =========================================
   DARK MODE: NEWS FEED MODAL FIX
   ========================================= */

/* 1. The Scrollable Container */
body.dark-mode #news-feed-container {
  background-color: #121212 !important; /* Overrides the light grey */
}

/* 2. The News Item Cards */
body.dark-mode #news-feed-container > div {
  background-color: #1e1e1e !important; /* Overrides white background */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
  border-left: 4px solid var(--accent-gold) !important;
  color: #e0e0e0 !important;
}

/* 3. News Title */
body.dark-mode #news-feed-container h3 {
  color: #fff !important; /* Bright white title */
}

/* 4. News Description Text */
body.dark-mode #news-feed-container p {
  color: #ccc !important; /* Light grey text */
}

/* 5. Category Badge (e.g., TRAINING) */
body.dark-mode #news-feed-container span:first-child {
  background-color: #333 !important;
  color: var(--accent-gold) !important;
}

/* 6. Date Text */
body.dark-mode #news-feed-container span:nth-child(2) {
  color: #999 !important;
}

/* 7. "Read Full Story" Link */
body.dark-mode #news-feed-container a {
  color: var(--accent-gold) !important;
  border-bottom-color: var(--accent-gold) !important;
}

/* 8. Modal Header (If not already covered) */
body.dark-mode .modal-content > div:first-child {
  background-color: #1e1e1e !important;
  border-bottom: 1px solid #333 !important;
}

/* =========================================
   AUTOMATIC POP-UP CARD (SCROLLABLE & JUSTIFIED)
   ========================================= */
#popup-overlay {
  z-index: 12000 !important;
  background: rgba(0, 0, 0, 0.85);
  /* Ensure it is hidden by default like other modals */
  display: none;
  align-items: center;
  justify-content: center;
}

/* When active class is added by JS, show it as flex */
#popup-overlay.active {
  display: flex;
}

.popup-card {
  background: white;
  width: 90%;
  max-width: 900px;
  max-height: 90vh; /* Standard height */
  display: flex;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* ... (Rest of your popup CSS remains the same) ... */
.popup-image {
  flex: 1;
  background-color: #f4f4f4;
  min-height: 200px;
  position: relative;
}

.popup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.popup-content {
  flex: 1.2;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.new-badge {
  background-color: var(--accent-gold);
  color: var(--primary-blue);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 50px;
  width: fit-content;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.popup-content h3 {
  font-size: 1.6rem;
  color: var(--primary-blue);
  margin-bottom: 15px;
  line-height: 1.3;
  text-align: left;
  flex-shrink: 0;
}

.popup-content p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.7;
  text-align: justify;
}

.popup-buttons {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
  margin-top: auto;
  align-items: center;
}

.close-popup {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
  z-index: 20;
  line-height: 1;
  transition: 0.3s;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  text-align: center;
  padding-top: 4px;
}

.close-popup:hover {
  color: red;
  transform: scale(1.1);
  background: white;
}

/* =========================================
   MOBILE ADJUSTMENTS (POP-UP)
   ========================================= */
@media (max-width: 768px) {
  .popup-card {
    flex-direction: column;
    max-width: 100%;
    max-height: 850vh !important;
    height: 90%;
    margin: auto;
  }

  .popup-image {
    height: 150px;
    flex: none;
  }

  .popup-content {
    padding: 20px;
    overflow-y: auto;
  }

  .popup-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .popup-buttons {
    justify-content: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .popup-buttons .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .close-popup {
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
    padding-top: 2px;
  }
}

/* Dark Mode Support */
body.dark-mode .popup-card {
  background-color: #1e1e1e;
  border: 1px solid #333;
}
body.dark-mode .popup-content h3 {
  color: white;
}
body.dark-mode .popup-content p {
  color: #ccc;
}
body.dark-mode .close-popup {
  color: white;
  background: rgba(0, 0, 0, 0.5);
}
