/* ==========================================================================
   GLOBAL SETTINGS & VARIABLES
   ========================================================================== */
:root {
  --primary-color: #0073aa;
  --secondary-color: #e9ecef;
  --bg-color: #f8f9fa;
  --text-color: #333;
  --font-family: 'Arial', sans-serif;
  --transition-speed: 0.3s;
}

/* ==========================================================================
   GLOBAL ELEMENT STYLES
   ========================================================================== */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  margin: 0 auto;
  max-width: 1440px;
  padding: 20px;
}

h1,
h2,
h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* ----------------------------------------------------------------------------
   Anchor & Button Base Styling
   ---------------------------------------------------------------------------- */
a {
  border-radius: 5px;
  color: #fff;
  display: inline-block;
  padding: 10px 20px;
  text-decoration: none;
  transition: background var(--transition-speed);
}

a:hover {
  background: #005f8a;
}

/* ==========================================================================
   PROJECT SHOWCASE SECTION
   ========================================================================== */
.project-showcase {
  background: linear-gradient(to right, var(--bg-color), var(--secondary-color));
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding: 2rem;
}

.project-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin: 0 auto;
  max-width: 1200px;
  transition: transform var(--transition-speed);
}

.project-card:hover {
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

.project-image-container {
  overflow: hidden;
  position: relative;
}

.thumbnail {
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  height: 400px;
  object-fit: cover;
  transition: transform 0.5s ease;
  width: 100%;
}

.project-overlay {
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: opacity var(--transition-speed);
}

/* ==========================================================================
   TECH STACK & PROJECT DETAILS
   ========================================================================== */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
}

.tech-stack span {
  background: var(--primary-color);
  border-radius: 20px;
  color: #fff;
  font-size: 0.9rem;
  padding: 8px 15px;
}

.project-details {
  padding: 2rem;
}

.feature-list {
  list-style-type: none;
  margin: 1rem 0;
  padding: 0;
}

.feature-list li {
  padding: 8px 0 8px 25px;
  position: relative;
}

.feature-list li:before {
  color: var(--primary-color);
  content: '→';
  left: 0;
  position: absolute;
}

/* ==========================================================================
   PROJECT LINKS & BUTTONS
   ========================================================================== */
.project-links {
  display: flex;
  gap: 15px;
  margin-top: 1.5rem;
}

.project-links a,
.project-links button {
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  padding: 10px 25px;
  text-decoration: none;
  transition: background var(--transition-speed);
}

/* Button Variants */
.live-demo {
  background: var(--primary-color);
  border: none;
  color: white;
}

.source-code {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.case-study-btn {
  background: var(--secondary-color);
  color: var(--primary-color);
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.my-profile {
  padding-top: .1rem;
}

.logout {
  padding-bottom: .2rem;
}

/* ==========================================================================
   MODAL STYLING
   ========================================================================== */
.modal {
  background: rgba(0, 0, 0, 0.5);
  display: none;
  height: 100%;
  left: 0;
  overflow: auto;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

.modal-content {
  animation: fadeIn var(--transition-speed) ease-in;
  background-color: #fff;
  border-radius: 10px;
  margin: 10% auto;
  max-width: 600px;
  padding: 2rem;
  position: relative;
  width: 80%;
}

.close-modal {
  color: #333;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 5px;
  position: absolute;
  right: 10px;
  top: 10px;
}

/* ==========================================================================
   CARD COMPONENTS
   ========================================================================== */
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.my-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: #fff;
  max-width: 40%;
  padding: 0;
  gap: 1rem;
}

.my-card-body .bottom-button {
  margin-top: auto;
}

.my-card {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.row-alt {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: calc(-1* var(--bs-gutter-y));
  margin-right: calc(-.5* var(--bs-gutter-x));
  margin-left: calc(-.5* var(--bs-gutter-x));
}

/* ==========================================================================
   LOGIN & LOGOUT BUTTONS
   ========================================================================== */
.btn-login {
  background-color: #007bff;
  border: none;
  border-radius: 0.3rem;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: background-color 0.2s ease-in-out;
}

.btn-login:hover {
  background-color: #0056b3;
}

/* Consistent button styling */
.btn-consistent {
  flex: 1 1 auto;
  text-align: center;
  white-space: nowrap;
}

/* Optional: ensure consistent padding on small buttons */
.btn-consistent.btn-sm {
  padding: 0.375rem 0.75rem;
}

/* Shaking effect for special buttons */
.btn-shake {
  animation: shake 7s infinite;
}

.d-flex {
  display: flex;
  flex-shrink: 1;
}

.btn-consistent {
  flex: 1 1 auto;
  text-align: center;
  white-space: wrap;
}

/* ==========================================================================
   LOGOUT FORM & BUTTON
   ========================================================================== */
.logout-form {
  display: inline;
}

.logout-button {
  display: inline;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  cursor: pointer;
}

/* Mimic nav-link styling if needed */
.logout-button.nav-link {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   SAVED FOR LATER BUTTONS 
   ========================================================================== */

.saved-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-btns a {
  color: #fff;
  flex: 1;
}

.saved-btns a:first-of-type:not(.btn-danger) {
  background-color: #047a92;
  border-color: #047a92;
}

.saved-btns a:first-of-type:hover:not(.btn-danger) {
  background-color: #086a7e;
  border-color: #086a7e;
  color: #fff;
}

/* ==========================================================================
   STRIPE PAYMENT FORM
   ========================================================================== */
#card-element {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  margin-top: 2rem;
}



/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes shake {
  0% {
    transform: rotate(0deg);
  }

  3% {
    transform: rotate(-3deg);
  }

  6% {
    transform: rotate(3deg);
  }

  9% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* ==========================================================================
   MEDIA QUERIES - RESPONSIVE STYLING
   ========================================================================== */
@media (max-width: 992px) {
  .navbar-nav {
    align-items: end;
  }

  .product-container {
    margin-top: 2.5rem;
  }

  .mb-2 {
    margin-bottom: 0;
  }

}

@media (min-width: 768px) {
  .container {
    max-width: 100%;
  }

  /* .navbar .collapse.navbar-collapse {
    order: 4;
    text-align: right;
    width: 100%;
  } */

  .logout {
    display: flex;
    justify-content: end;
  }
}

@media (max-width: 768px) {

  /* Adjust thumbnail height */
  .thumbnail {
    height: 300px;
  }

  /* Reduce padding in project details */
  .project-details {
    padding: 1rem;
  }

  /* Responsive buttons: reduce padding & font-size */
  a,
  .project-links a,
  .project-links button,
  .btn-login,
  .btn-consistent {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .navbar {
    padding: 0 1rem 0 0;
  }

  /* Ensure the navbar container is a flex container with wrapping enabled */
  .navbar .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  /* Make sure the brand appears on the first row */
  .navbar .navbar-brand {
    order: 1;
    flex: 1 0 auto;
    margin-right: 0;
  }

  /* Place the hamburger toggler on the first row at the right */
  .navbar-toggler {
    order: 2;
    margin-left: auto;
  }

  /* Move the search form to a new row and make it full-width */
  .navbar form {
    order: 3;
    max-width: 768px;
    margin-top: 2rem;
    width: 100%;
  }

  /* The rest of the collapsible nav items (if any) come afterwards */
  .navbar .collapse.navbar-collapse {
    margin-top: 3.5rem;
    order: 4;
    text-align: right;
    width: 100%;
  }

  .saved-btns a.btn {
    margin-bottom: 0;
    padding: 1rem;
  }

  .logout {
    display: flex;
    justify-content: end;
  }

  #navbarSupprotedContent {
    margin-right: 1rem;
  }
}

@media (max-width: 576px) {
  .container,
  .container-sm {
    max-width: 576px;
  }
}

@media (max-width: 375px) {

  /* Further adjust thumbnail dimensions */
  .thumbnail {
    height: 150px;
    width: 300px;
  }

  /* More compact button styling for extra small devices */
  a,
  .project-links a,
  .project-links button,
  .btn-login,
  .btn-consistent {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}
