/* Updated Color palette */
:root {
  --primary-blue: #001F4D;
  --accent-red: #C62828;
  --accent-green: #4caf50;
  --background-light: #f8f9fa;
  --background-dark: #181a1b;
  --text-light: #ffffff;
  --text-dark: #1a1a1a;
  --navbar-bg: var(--primary-blue);
  --navbar-text: var(--text-light);
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: var(--background-light);
  color: var(--text-dark);
  transition: background 0.3s, color 0.3s;
}

body.dark-mode {
  background: var(--background-dark);
  color: var(--text-light);
}

.navbar {
  background: var(--navbar-bg) !important;
  transition: background 0.3s;
}

.navbar .navbar-brand span {
  font-family: 'League Spartan', 'Roboto', Arial, sans-serif;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: var(--text-light);
}

.navbar .nav-link {
  color: var(--navbar-text) !important;
  font-weight: 500;
  font-family: 'League Spartan', 'Roboto', Arial, sans-serif;
  transition: color 0.2s;
}

.navbar .nav-link.active, .navbar .nav-link:hover {
  color: var(--accent-red) !important;
}

#modeToggle {
  font-size: 1.2rem;
  border-radius: 50%;
  transition: background 0.2s;
}

.flash-news {
  font-size: 1rem;
  background: var(--accent-red) !important;
  color: var(--text-light);
  letter-spacing: 1px;
}

.hero-section .carousel-caption {
  background: rgba(0, 31, 77, 0.8);
  border-radius: 12px;
  padding: 1.5rem;
  animation: fadeInUp 1s;
}

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

section {
  scroll-margin-top: 80px;
}

h2, .fw-bold {
  color: var(--primary-blue);
  font-family: 'League Spartan', 'Roboto', Arial, sans-serif;
}

.card {
  border: none;
  border-radius: 16px;
  transition: box-shadow 0.3s, transform 0.3s;
  font-family: 'Roboto', Arial, sans-serif;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(0, 31, 77, 0.15);
  transform: translateY(-6px) scale(1.02);
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-red));
  border: none;
  font-weight: 600;
  letter-spacing: 1px;
  font-family: 'League Spartan', 'Roboto', Arial, sans-serif;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: linear-gradient(90deg, var(--accent-red), var(--primary-blue));
}


footer {
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--text-light);
  background-image: 
    linear-gradient(rgba(0, 51, 102, 0.85), rgba(0, 51, 102, 0.85)), 
    url('../image/aboutus/footer-bg.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}
.footer, img{
  border-radius: 20px;
}
/* Dark mode styles */
body.dark-mode .navbar, body.dark-mode footer {
  background: #11151a !important;
}
body.dark-mode .card {
  background: #23272f;
  color: var(--text-light);
}
body.dark-mode .btn-primary {
  background: linear-gradient(90deg, #23272f, var(--primary-blue));
}
body.dark-mode .bg-light {
  background: #23272f !important;
  color: var(--text-light) !important;
}
body.dark-mode h2, body.dark-mode .fw-bold {
  color: var(--accent-red);
}

/* Accessibility */
:focus {
  outline: none !important;
  outline-offset: 2px;
}

/* Responsive tweaks */
@media (max-width: 991px) {
  .navbar .navbar-nav {
    background: var(--primary-blue);
    padding: 1rem;
    border-radius: 12px;
  }
}

@media (max-width: 767px) {
  .hero-section .carousel-inner,
  .hero-section .carousel-item,
  .hero-section .carousel-item img {
    max-height: 200px;
    height: 200px;
  }
  .hero-section .carousel-caption {
    bottom: 10px;
    padding: 0.5rem;
  }
  h2 {
    font-size: 1.5rem;
  }
}

.hero-section .carousel-inner,
.hero-section .carousel-item,
.hero-section .carousel-item img {
  max-height: 500px;
  height: 500px;
  object-fit: cover;
} 


/* Top Logos Bar - Black Style */
.top-logos-bar-black {
  background: #fff;
  padding: 0.7rem 0 0.7rem 0;
  width: 100%;
  position: relative;
  z-index: 1020;
}
.top-logos-flex {
  gap: 0;
}
.logo-block-black {
  min-width: 0;
  flex: 1 1 0;
  justify-content: flex-start;
  padding: 0 1.5vw;
}
.logo-img-black {
  height: 64px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  background: transparent;
  border-radius: 0.5rem;
  box-shadow: none;
}
.logo-title-black {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.15rem;
  color: #000;
  letter-spacing: 1px;
  text-align: left;
  line-height: 1.1;
}
.logo-subtext-black {
  font-size: 0.75rem;
  color: #e53935;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-align: left;
  line-height: 1.1;
  margin-top: 0.1rem;
}
.logo-divider-vert {
  width: 2px;
  height: 64px;
  background: linear-gradient(180deg, #C62828 0%, #C62828 100%);
  opacity: 0.7;
  margin: 0 1vw;
}
/* Responsive: stack vertically and hide dividers on mobile */
@media (max-width: 991px) {
  .logo-img-black {
    height: 44px;
    max-width: 60px;
  }
  .logo-title-black {
    font-size: 1.05rem;
  }
  .logo-subtext-black {
    font-size: 0.85rem;
  }
  .logo-divider-vert {
    height: 44px;
    margin: 0 0.5vw;
  }
}
@media (max-width: 767px) {
  .top-logos-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
  .logo-block-black {
    width: 100%;
    padding: 0.3rem 0.5rem;
    margin-bottom: 0.2rem;
    justify-content: flex-start;
  }
  .logo-img-black {
    height: 36px;
    max-width: 40px;
  }
  .logo-divider-vert {
    display: none;
  }
  .logo-title-black, .logo-subtext-black {
    text-align: left;
  }
}

/* News and Events Card Flex Layout */
#news-events .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
#news-events .card .p-4 {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
#news-events .card .btn {
  margin-top: auto;
  align-self: flex-start;
}
@media (max-width: 767px) {
  #news-events .card .btn {
    width: 100%;
    align-self: stretch;
  }
}
/* Contact Page Styles */
.contact-hero {
  background: linear-gradient(90deg, #001F4D 60%, #C62828 100%);
  color: #fff;
  padding: 3rem 0 2rem 0;
  text-align: center;
}
.contact-info-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,31,77,0.08);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: box-shadow 0.3s, transform 0.3s;
}
.contact-info-box:hover {
  box-shadow: 0 8px 32px rgba(0,31,77,0.15);
  transform: translateY(-6px) scale(1.02);
}
.contact-form-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(198,40,40,0.08);
  padding: 2rem;
  transition: box-shadow 0.3s, transform 0.3s;
}
.contact-form-box:hover {
  box-shadow: 0 8px 32px rgba(198,40,40,0.15);
  transform: translateY(-6px) scale(1.02);
}
.map-responsive {
  overflow: hidden;
  padding-bottom: 56.25%;
  position: relative;
  height: 0;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,31,77,0.08);
}
.map-responsive iframe {
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  position: absolute;
  border:0;
}
@media (max-width: 767px) {
  .contact-hero { padding: 2rem 0 1rem 0; }
  .contact-info-box, .contact-form-box { padding: 1rem; }
}

@media (max-width: 991.98px) {
  .top-logos-flex{
    display: none !important;
  }
} 

.sticky-navbar {
  position: sticky;
  top: 0;
  z-index: 1030; /* Make sure it stays above other content */
}

#navbarNav .navbar-nav {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Side Toggle Button Styles */
.side-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  left: auto;
  transform: translateY(-50%);
  z-index: 1000;
  background: var(--accent-red);
  border: none;
  border-radius: 12px 0 0 12px;
  padding: 0;
  box-shadow: 0 8px 25px rgba(0, 31, 77, 0.15);
  transition: background 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  font-family: 'League Spartan', 'Roboto', Arial, sans-serif;
  letter-spacing: 1px;
  font-size: 1rem;
  min-width: 48px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-toggle a {
  color: var(--text-light) !important;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.side-toggle span {
  display: inline-block;
  writing-mode: sideways-lr;
  text-orientation: mixed;
  white-space: nowrap;
  font-size: 1rem;
  letter-spacing: 1px;
  padding: 12px 0;
}

.side-toggle:hover {
  background: #a81e1e;
  box-shadow: 0 12px 35px rgba(0, 31, 77, 0.25);
}

@media (max-width: 768px) {
  .side-toggle {
    min-height: 120px;
    border-radius: 10px 0 0 10px;
    top: 28%;
  }
  .side-toggle span {
    font-size: 0.9rem;
    padding: 8px 0;
  }
}

@media (max-width: 480px) {
  .side-toggle {
    min-height: 80px;
    border-radius: 8px 0 0 8px;
  }
  .side-toggle span {
    font-size: 0.8rem;
    padding: 6px 0;
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .side-toggle {
    top: 28%;
  }
}

@media (max-width: 767px) {
  .side-toggle {
    top: 38%;
  }
}

 .more-details{
  background-color: #fff;
  outline: 1px solid #001F4D;
 }

 .more-details:hover{
  background-color: #001F4D;
  color: #fff;
  
 }

/* Enhanced Multi-level dropdown styles - Updated for better responsive behavior */
.dropdown-submenu {
  position: relative;
}

/* Desktop styles */
@media (min-width: 992px) {
  .dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    border-radius: 0.5rem;
    min-width: 220px;
    display: none;
    position: absolute;
    z-index: 1001;
  }
  
  .dropdown-submenu > .dropdown-item:after {
    content: "›";
    float: right;
    margin-left: 8px;
    font-size: 1.2em;
    line-height: 1;
    transition: transform 0.2s ease;
  }
  
  .dropdown-submenu > .dropdown-item[aria-expanded="true"]:after {
    transform: rotate(90deg);
  }
}

/* Mobile styles */
@media (max-width: 991px) {
  .dropdown-submenu > .dropdown-menu {
    left: 0 !important;
    top: auto !important;
    margin-left: 1.5rem !important;
    margin-top: 0 !important;
    position: static !important;
    display: none !important;
    border-left: 2px solid rgba(255, 255, 255, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-radius: 0 !important;
    min-width: auto !important;
    width: calc(100% - 1.5rem) !important;
    transform: none !important;
    box-shadow: none !important;
  }
  
  .dropdown-submenu.show > .dropdown-menu {
    display: block !important;
  }
  
  .dropdown-submenu > .dropdown-item:after {
    content: "▼" !important;
    float: right;
    margin-left: 8px;
    font-size: 0.8em;
    transition: transform 0.2s ease;
  }
  
  .dropdown-submenu > .dropdown-item[aria-expanded="true"]:after {
    transform: rotate(180deg) !important;
  }

  /* Override Bootstrap's dropend behavior on mobile */
  .dropend .dropdown-menu {
    left: 0 !important;
    top: auto !important;
    margin-left: 1.5rem !important;
    position: static !important;
  }
}

.dropdown-menu > .dropdown-submenu > .dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 575.98px) {
  .navbar-title {
    font-size: 0.8rem !important;
    white-space: normal !important;
    line-height: 1.1 !important;
    text-align: left !important;
    word-break: break-word !important;
  }
}