/* ---------- GLOBAL ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Calibri", "Arial", sans-serif; /* Added fallback font */
}

body {
  /* Ek halka geometric pattern */
  background-image: url("https://www.toptal.com/designers/subtlepatterns/uploads/double-bubble-outline.png");
  background-repeat: repeat; /* Image ko repeat karega */
  
  /* UPDATED: Fallback color ko light blue kar diya */
  background-color: #e8f0f8; 
  
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top:0; left:0;
  width: 100%; height: 100%;
  
  background: rgba(15, 61, 145, 0.10); 
  
  z-index:0;
}

/* Bring content above overlay */
header,
main,
footer {
  position: relative;
  z-index: 1;
}

main {
  flex: 1; /* Ensures main content pushes footer down */
}


/* ---------- HEADER ---------- */
header {
  background: rgba(15,61,145,0.9);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  position: sticky;
  top:0;
  z-index:1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav ul {
  display: flex;
  gap: 35px;
  list-style: none;
}

nav ul li a {
  color:white;
  text-decoration:none;
  font-size:18px;
  font-weight:500;
  transition: 0.3s;
}

nav ul li a.active {
  border-bottom:2px solid #fff;
}

nav ul li a:hover {
  color:#ffdd57;
}

/* Hamburger */
.hamburger {
  display:none;
  font-size:2rem;
  cursor:pointer;
  color: white; /* Added color */
}

/* Mobile nav */
@media (max-width:768px) {
  nav ul {
    flex-direction: column;
    max-height:0;
    overflow:hidden;
    background: rgba(15,61,145,0.95);
    width:100%;
    position:absolute;
    top: 60px; /* Adjusted to match header height */
    right:0;
    border-radius:0 0 8px 8px;
    padding:0;
    z-index: 999; /* Ensure it's above other content */
  }
  nav ul.show {
    max-height:500px;
    padding:15px 0;
  }
  .hamburger { display:block; }
}


/* ---------- FOOTER (Compact Version) ---------- */
footer {
  background: linear-gradient(135deg, #0a2a6b, #143d91);
  color: #fff;
  padding: 30px 20px 20px; /* Reduced top padding */
  font-family: 'Poppins', sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px; /* Reduced gap */
  max-width: 1200px;
  margin: auto;
}

.footer-about {
  flex: 1 1 300px;
}

.footer-about h3 {
  font-size: 1.3rem; /* Reduced font size */
  margin-bottom: 10px;
  color: #fff;
}

.footer-about p {
  font-size: 0.9rem; /* Reduced font size */
  color: #ddd;
  line-height: 1.6;
}

.footer-links {
  flex: 1 1 200px;
}

.footer-links h4 {
  margin-bottom: 10px;
  font-size: 1.1rem; /* Reduced font size */
  color: #fff;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin: 6px 0;
}

.footer-links ul li a {
  color: #ddd;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links ul li a:hover {
  color: #fff;
}

.footer-contact {
  flex: 1 1 250px;
}

.footer-contact h4 {
  margin-bottom: 10px;
  font-size: 1.1rem; /* Reduced font size */
}

.footer-contact p {
  font-size: 0.9rem; /* Reduced font size */
  color: #ddd;
  margin: 6px 0;
}

.footer-contact i {
  margin-right: 8px;
  color: #ffd700;
}

.footer-bottom {
  text-align: center;
  margin-top: 25px; /* Reduced margin */
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  color: #ccc;
}

/* ---------- NEW: Dark Mode Toggle Switch ---------- */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-left: 20px; /* Nav links se doori */
}

.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 44px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  background-color: #fff;
  bottom: 3px;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  position: absolute;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #0f3d91;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Icons (Sun/Moon) */
.theme-switch-wrapper i {
  font-size: 1rem;
  color: #fff;
}
.fa-sun {
  margin-right: 8px;
}
.fa-moon {
  margin-left: 8px;
}

/* ---------- NEW: Back to Top Button ---------- */
#back-to-top-btn {
  display: none; /* Shuru mein hidden */
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 999; /* Chatbot se neeche, content se upar */
  
  background: #0f3d91;
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#back-to-top-btn.show {
  display: block;
  opacity: 1;
}

#back-to-top-btn:hover {
  background: #0b2b6f;
  transform: translateY(-3px);
}

/* Dark mode ke liye bhi fix kar dete hain */
body.dark-mode #back-to-top-btn {
  background: #1e1e1e;
  color: #f1f1f1;
  border: 1px solid #444;
}
body.dark-mode #back-to-top-btn:hover {
  background: #333;
}