/* ==========================================================================
   Stella Maris IAS Academy - Global Custom Stylesheet
   ========================================================================== */

:root {
  --primary-navy: #0d233a;
  --secondary-navy: #16325c;
  --accent-gold: #d4af37;
  --hover-gold: #b89528;
  --dark-bg: #121212;
  --dark-card: #1e1e1e;
  --dark-text: #e0e0e0;
  --light-bg: #f8f9fa;
  --body-text: #333333;
  --transition: all 0.3s ease-in-out;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--body-text);
  background-color: #ffffff;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* Dark Mode Support */
body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

body.dark-mode .card, 
body.dark-mode .bg-white,
body.dark-mode .bg-light {
  background-color: var(--dark-card) !important;
  color: var(--dark-text) !important;
  border-color: #333 !important;
}

body.dark-mode .nav-link,
body.dark-mode .text-navy,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
  color: #ffffff !important;
}

body.dark-mode .text-muted {
  color: #b0b0b0 !important;
}

/* Preloader Disabled Fix */
#preloader {
  display: none !important;
}

/* Top Bar & Announcement Ticker */
.top-bar {
  background-color: var(--primary-navy);
  color: #fff;
  font-size: 0.85rem;
}

.ticker-wrap {
  background-color: #f1f3f5;
  border-bottom: 2px solid var(--accent-gold);
  overflow: hidden;
  white-space: nowrap;
}

.ticker {
  display: inline-block;
  animation: ticker 25s linear infinite;
}

@keyframes ticker {
  0% { transform: translate3d(100%, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Navbar Logo & Navigation Fixes */
.navbar {
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.navbar-brand img {
  height: 50px !important;
  width: auto !important;
  max-height: 50px !important;
  object-fit: contain;
}

.nav-link {
  font-weight: 500;
  color: var(--primary-navy) !important;
  padding: 0.5rem 0.8rem !important;
  transition: var(--transition);
}

.nav-link:hover, 
.nav-link.active {
  color: var(--accent-gold) !important;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(13, 35, 58, 0.88), rgba(13, 35, 58, 0.88)), url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  color: #fff;
  padding: 90px 0;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

/* Custom Buttons */
.btn-gold {
  background-color: var(--accent-gold);
  color: var(--primary-navy);
  font-weight: 600;
  border: none;
  transition: var(--transition);
}

.btn-gold:hover {
  background-color: var(--hover-gold);
  color: #ffffff;
}

.btn-navy {
  background-color: var(--primary-navy);
  color: #ffffff;
  font-weight: 600;
  transition: var(--transition);
}

.btn-navy:hover {
  background-color: var(--secondary-navy);
  color: var(--accent-gold);
}

/* Custom Cards */
.custom-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

/* Floating WhatsApp & Back-To-Top */
.floating-whatsapp {
  position: fixed;
  bottom: 80px;
  right: 25px;
  background-color: #25d366;
  color: white;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  text-decoration: none;
  transition: var(--transition);
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  color: white;
}

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 25px;
  display: none;
  width: 45px;
  height: 45px;
  z-index: 1000;
}

/* AI Chatbot Assistant Widget */
#chat-widget-button {
  position: fixed;
  bottom: 20px;
  left: 25px;
  background-color: var(--primary-navy);
  color: var(--accent-gold);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  transition: var(--transition);
}

#chat-widget-button:hover {
  transform: scale(1.08);
}

#chatbot-container {
  position: fixed;
  bottom: 85px;
  left: 25px;
  width: 340px;
  height: 460px;
  background: white;
  border-radius: 12px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.chatbot-header {
  background-color: var(--primary-navy);
  color: white;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bot-msg, .user-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-line;
}

.bot-msg {
  background-color: #e9ecef;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.user-msg {
  background-color: var(--primary-navy);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-footer {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
  background: white;
}

.chat-footer input {
  flex: 1;
  border: 1px solid #ccc;
  padding: 8px 12px;
  border-radius: 20px;
  outline: none;
  font-size: 0.85rem;
}

.chat-footer button {
  background: var(--primary-navy);
  color: var(--accent-gold);
  border: none;
  padding: 8px 14px;
  margin-left: 8px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.chat-footer button:hover {
  background: var(--secondary-navy);
}
/* ==========================================
   NAVBAR & BASE STYLES
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
}

.header {
  background-color: #0d233a;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo a {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: bold;
  text-decoration: none;
}

/* DESKTOP NAV LINKS */
.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #f39c12;
}

/* HAMBURGER BUTTON (Hidden on Desktop) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: #ffffff;
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* ==========================================
   MOBILE STYLES (Screens 768px and smaller)
   ========================================== */
@media (max-width: 768px) {
  /* Show Hamburger Button */
  .menu-toggle {
    display: flex;
  }

  /* Hide Desktop Links and format for Mobile Dropdown */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0d233a;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  }

  .nav-links li {
    text-align: center;
    padding: 0.8rem 0;
  }

  .nav-links li a {
    display: block;
    width: 100%;
    font-size: 1.1rem;
  }

  /* Active Class added by JS to toggle display */
  .nav-links.active {
    display: flex !important;
  }
}