/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* Global Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #fafafa;
  color: #333;
}


/* ===== UI MICRO-INTERACTIONS ===== */

/* Smooth transitions for all interactive elements */
a, button, .card, .btn, input, .modal, .toast {
  transition: all 0.3s ease;
}

/* Button ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Card hover effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.browse-categories-card:hover {
  transform: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.subscribe-newsletter-card:hover {
  transform: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.project-card:hover {
  transform: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.project-card .status-badge-static,
.project-card .category-badge-static,
.project-card .status-badge-static:hover,
.project-card .category-badge-static:hover {
  transform: none !important;
  transition: none !important;
}

.project-card [data-favorite-btn],
.project-card [data-favorite-btn]:hover,
.project-card [data-favorite-btn]:focus,
.project-card [data-favorite-btn]:active {
  transform: none !important;
  box-shadow: none !important;
}

.faq-static-box,
.faq-static-box:hover {
  transform: none !important;
}

#faqAccordion .faq-static-box .accordion-button:hover {
  transform: none !important;
}

.support-static-box,
.support-static-box:hover {
  transform: none !important;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.collaborations-cta-link,
.collaborations-cta-link:hover,
.collaborations-cta-link:focus,
.collaborations-cta-link:active {
  text-decoration: none !important;
  transform: none !important;
}

/* Button hover effects */
.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(57, 173, 229, 0.3);
}

.btn:active {
  transform: translateY(0);
}

/* Input focus animations */
.form-control {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.form-control:focus {
  transform: scale(1.01);
}

/* Toast animations */
.toast {
  animation: slideInRight 0.4s ease-out;
}

.toast.hide {
  animation: slideOutRight 0.4s ease-in;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Modal animations */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: scale(0.9) translateY(-50px);
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Fade-in animation for content */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Loading spinner pulse */
.spinner-border {
  animation: spinnerPulse 1s ease-in-out infinite;
}

@keyframes spinnerPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Smooth page transitions */
.page-transition {
  animation: pageSlideIn 0.4s ease-out;
}

@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Badge pulse animation */
.badge {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.project-date-badge:hover {
  transform: none !important;
}

/* Link hover animations */
a {
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  transform: translateX(2px);
}

/* Scroll-to-top button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #39ade5;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 1000;
  font-size: 1.5rem;
}

.scroll-to-top.visible {
  display: flex;
  animation: fadeInUp 0.3s ease-out;
}

.scroll-to-top:hover {
  background: #2d9ad0;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

/* ===== END UI MICRO-INTERACTIONS ===== */


/* Navbar */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: large;
  gap: 0.4rem;
  font-weight: 600;
  color: #39ade5;
}

button.btn-primary {
  background-color: #39ade5;
  border: none;
  border-radius: 6px;
}

.account-btn:hover {
  background-color: #2d9ad0;
}

.navbar .nav-link:hover,
.navbar .dropdown-item:hover,
.navbar .logo:hover {
  transform: none !important;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 2rem;
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  list-style: none;
}

.dropdown-menu li {
  padding: 0.6rem 1rem;
}

.dropdown-menu li a {
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
}

.dropdown-menu li:hover {
  background: #f5f8ff;
}

.dropdown-menu.show {
  display: block;
}

/* Account Dropdown */
.btn-account {
  background-color: #39ade5;
  border: none;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.btn-account:hover,
.btn-account:focus,
.btn-account:active,
.btn-account.show {
  background-color: #2d9ad0 !important;
  border: none !important;
  box-shadow: none !important;
}

.account-dropdown-menu {
  min-width: 180px;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 6px 0;
}

.account-dropdown-menu .dropdown-item {
  padding: 8px 18px;
  font-size: 0.9rem;
  color: #333;
  border-radius: 6px;
  margin: 1px 6px;
  width: auto;
}

.account-dropdown-menu .dropdown-item:hover {
  background-color: #f0f8ff;
  color: #39ade5;
}

.account-dropdown-menu .dropdown-divider {
  margin: 4px 12px;
}


/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 3rem 2rem;
}

.hero-content {
  flex: 1;
  min-width: 300px;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: #222;
}

.search-bar {
  display: flex;
  max-width: 400px;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: #fff;
}

.search-bar input {
  flex: 1;
  border: none;
  padding: 0.75rem;
  outline: none;
  background: transparent;
}

.search-bar button {
  background: #39ade5;
  border: none;
  color: #fff;
  padding: 0 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
}

.search-bar button:hover {
  background: #2d9ad0;
}

.hero-content p {
  color: #666;
  max-width: 480px;
}

.hero-image img {
  max-width: 550px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}


/* Partner Section */
.partners {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid #eee;
}

.partners p {
  color: #39ade5;
  font-weight: 600;
  margin-bottom: 1rem;
}

.partner-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.partner-logos img {
  filter: grayscale(100%);
  transition: filter 0.3s;
}

.partner-logos img:hover {
  filter: grayscale(0%);
}


/* MOBILE MENU */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    border-top: 1px solid #eee;
    padding: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-image img {
    margin-top: 2rem;
  }
}


/* New Projects + Browse Categories */
.projects-section {
  padding: 4rem 2rem;
  background-color: #fafafa;
}

.projects-section h4 {
  color: #222;
  font-weight: 600;
}


/* Sidebar */
.sidebar {
  width: 250px;
  background: #fff;
  border-right: 1px solid #eee;
  min-height: 100vh;
  padding-top: 1rem;
  position: fixed;
  top: 0;
  left: 0;
}

.sidebar .list-group {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-group-item {
  border: none;
  padding: 17px 18px;
  color: #333;
  text-decoration: none;
  display: block;
  transition: background 0.3s, color 0.3s;
}

.list-group-item:hover {
  background-color: #f5f8ff;
}

.list-group-item.active {
  background-color: #39ade5;
  border-color: #39ade5;
  color: #fff;
  font-weight: 600;
}

.list-group-item.active:hover {
  background-color: #39ade5;
}


/* Subscribe box */
.projects-section .bg-light {
  background-color: #eaf6ff !important;
  border-radius: 10px;
  padding: 1.5rem;
}

.projects-section .bg-light input {
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.5rem;
}

.projects-section .bg-light button {
  background-color: #39ade5;
  border: none;
  border-radius: 6px;
  transition: background 0.3s;
  width: 100%;
  margin-top: 0.5rem;
  color: #fff;
  padding: 0.6rem;
  font-weight: 500;
}

.projects-section .bg-light button:hover {
  background-color: #2d9ad0;
}


/* Circle stats */
.projects-section .circle {
  font-weight: 600;
  background: #39ade5;
  color: #fff;
  width: 70px;
  height: 70px;
  line-height: 70px;
  border-radius: 50%;
  text-align: center;
  margin: auto;
}


/* Right side (Projects grid) */
.projects-section .card-img-top {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  height: 180px;
  object-fit: cover;
}

.projects-section .card-body {
  padding: 1rem;
}

.projects-section .card-body h6 {
  color: #222;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.projects-section .card-body small {
  color: #666;
}

.projects-section .badge {
  font-size: 0.8rem;
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
}

.card.bg-light {
  background-color: #ebf6ff !important;
  border-radius: 10px;
}


/* Build the Future */
.build-future-section {
  background-color: #e7f2fc !important;
  border-top: 1px solid #d9ecff;
  border-bottom: 1px solid #d9ecff;
}

.build-future-section h2 {
  color: #39ade5;
  font-weight: 700;
}

.build-future-section p {
  font-size: 1rem;
  color: #555;
}

.build-future-section .btn-primary {
  background-color: #39ade5;
  border: none;
  border-radius: 6px;
  padding: 0.6rem;
  transition: background 0.3s;
}

.build-future-section .btn-primary:hover {
  background-color: #2d9ad0;
}

.future-img {
  max-width: 230px;
  transition: transform 0.3s ease;
}

.future-img:hover {
  transform: translateY(-6px);
}


/* Footer */
footer h6 {
  color: #333;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .list-group-item {
    text-align: center;
  }
}

/* Login Modal Styling */
.modal-content {
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
}

.modal-title {
  color: #39ade5;
}

.form-control:focus {
  border-color: #39ade5;
  box-shadow: 0 0 0 0.2rem rgba(57, 173, 229, 0.25);
}

.btn-primary {
  background-color: #39ade5;
  border: none;
  border-radius: 6px;
  transition: background 0.3s;
}

.btn-primary:hover {
  background-color: #2d9ad0;
}

#loginModal .modal-footer a.text-primary {
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

#loginModal .modal-footer a.text-primary:hover {
  color: #0b5ed7; /* Bootstrap primary shade */
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .build-future-section .text-content {
    text-align: center;
  }

  .build-future-section .d-flex.justify-content-center {
    flex-wrap: wrap;
  }

  .future-img {
    margin-bottom: 1rem;
  }
}

@media (max-width: 992px) {
  .projects-section .col-md-3 {
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .projects-section {
    padding: 2rem 1rem;
  }

  .projects-section .card-body {
    text-align: center;
  }
}