/* =======================
   🌐 GLOBAL RESET & BASE
======================= */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

section {
  min-height: auto;
  padding: 0px 0;
}



/* Smooth transition for theme toggle */
body, header, nav, section, footer, .project-card {
  transition: background-color 0.4s ease, color 0.4s ease, opacity 0.3s ease;
}

/* =======================
   HEADER & NAVBAR
======================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 🔹 Top Navbar */
.top-navbar {
  font-size: 14px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e5e5e5;
  padding: 5px 0 !important;
  line-height: 1.3;
}

.flag-icon {
  width: 30px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid #ddd;
}

/* 🔸 Search Form */
.search-form .form-control {
  border-radius: 50px 0 0 50px;
  border: 1px solid #ddd;
  padding: 8px 15px;
  font-size: 14px;
}

.search-form .input-group-text {
  border-radius: 0 50px 50px 0;
  border: 1px solid #ddd;
  cursor: pointer;
  background-color: #fff;
  color: #dc2626;
}

/* 🔸 Main Navbar */
.main-navbar {
  background-color: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 6px 0 !important;
}

.main-navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-navbar .navbar-brand img {
  max-height: 42px;
  transition: transform 0.3s ease;
}

.main-navbar .navbar-brand:hover img {
  transform: scale(1.05);
}

.main-navbar .nav-link {
  font-weight: 500;
  color: #333 !important;
  padding: 8px 15px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
  background-color: #dc2626;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

/* Buttons */
.main-navbar .btn-outline-success {
  border: 1px solid #16a34a;
}

.main-navbar .btn-outline-success:hover {
  background-color: #16a34a;
  color: white;
}

.main-navbar .btn-outline-danger {
  border: 1px solid #dc2626;
}

.main-navbar .btn-outline-danger:hover {
  background-color: #dc2626;
  color: white;
}

/* =======================
   🌙 DARK MODE ENHANCED
======================= */
.dark-mode header,
.dark-mode .main-navbar,
.dark-mode .top-navbar {
  background-color: #181818 !important;
  border-bottom: 1px solid #2a2a2a !important;
}

.dark-mode .navbar-brand span {
  color: #fff !important;
}

.dark-mode .navbar-brand img {
  filter: brightness(0.9) contrast(1.2);
}

/* 🔥 Nav links */
.dark-mode .navbar .nav-link {
  color: #ddd !important;
  opacity: 0.9;
}

.dark-mode .navbar .nav-link:hover,
.dark-mode .navbar .nav-link.active {
  background-color: #dc2626 !important;
  color: #fff !important;
  opacity: 1;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* 🔎 Search */
.dark-mode .search-form .form-control {
  background-color: #2b2b2b !important;
  border-color: #444;
  color: #eee;
}

.dark-mode .search-form .input-group-text {
  background-color: #333 !important;
  border-color: #444;
  color: #f5f5f5;
}

/* 🔘 Toggle Button */
#theme-toggle {
  border: 1px solid #bbb;
  color: #333;
  background: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

#theme-toggle:hover {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

.dark-mode #theme-toggle {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
  transform: rotate(180deg);
}

/* 🔽 Dropdown */
.dark-mode .dropdown-menu {
  background-color: #2a2a2a;
  border: 1px solid #444;
}

.dark-mode .dropdown-item {
  color: #ddd;
}

.dark-mode .dropdown-item:hover {
  background-color: #dc2626;
  color: #fff;
}

/* =======================
   CAROUSEL & FOOTER
======================= */
.carousel-item img {
  height: 90vh;
  object-fit: cover;
  filter: brightness(0.75);
}

.carousel-caption .text-content {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  border-radius: 10px;
  max-width: 800px;
  padding: 25px 30px;
}

.carousel-caption h2 {
  font-weight: 700;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.carousel-caption p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.dark-mode .carousel-caption .text-content {
  background: rgba(0, 0, 0, 0.7);
  color: #f1f1f1;
}

footer {
  background: #f8f8f8;
  text-align: center;
  padding: 20px 0;
  color: #666;
}

.dark-mode footer {
  background-color: #000;
  color: #bbb;
  border-top: 1px solid #333;
}

/* =======================
   FLOATING BUTTONS
======================= */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1050;
  background-color: #25d366;
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.whatsapp-float img {
  width: 42px;
  height: 42px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #1ebe5d;
}

#backToTop {
  position: fixed;
  bottom: 25px;
  right: 90px;
  z-index: 1050;
  display: none;
  background-color: #dc2626;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

#backToTop:hover {
  background-color: #b91c1c;
  transform: translateY(-3px);
}

/* =======================
   RESPONSIVE FIXES
======================= */
@media (max-width: 992px) {
  .navbar-toggler {
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    padding: 5px 8px !important;
  }

  .search-form .form-control {
    width: 160px !important;
  }

  .carousel-item img {
    height: 70vh;
  }
}

@media (max-width: 576px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float img {
    width: 36px;
    height: 36px;
  }

  #backToTop {
    right: 75px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .carousel-item img {
    height: 65vh;
  }

  .carousel-caption h2 {
    font-size: 1.4rem;
  }

  .carousel-caption p {
    font-size: 0.9rem;
  }

  .carousel-caption .text-content {
    padding: 16px;
  }
}
