:root {
  --bg: #ffffff;
  --text-main: #0f172a;
  --accent: #043a92;
  --card-border: rgba(0, 0, 0, 0.08);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--bg);
}

#scrollToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  display: none;
  /* Hidden by default */
  z-index: 9999;
  border: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

#scrollToTop:hover {
  transform: translateY(-5px);
  background-color: #000;
  /* Darker shift on hover to match your dark accents */
  color: #fff;
}

.text-primary {
  color: var(--accent) !important;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--bg);
  color: var(--text-main);
}

.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 0;
}

.nav-link {
  font-weight: 600;
  padding: 0.5rem 1.2rem !important;
  transition: 0.2s ease;
}

.btn-talk {
  background: var(--text-main);
  color: #fff !important;
  border-radius: 12px;
  padding: 10px 22px !important;
  transition: 0.3s ease;
}

.btn-talk:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.offcanvas-start {
  width: 280px;
}

@media (max-width: 991.98px) {
  .offcanvas-body .nav-link {
    font-size: 1.1rem;
    padding: 1rem 0 !important;
    border-bottom: 1px solid #f1f5f9;
    width: 100%;
  }

  .offcanvas-body .btn-talk {
    width: 100%;
    margin-top: 1.5rem;
    text-align: center;
  }
}

main {
  padding-top: 100px;
}

.fw-800 {
  font-weight: 800;
}

.col-6 {
  transition: transform 0.4s ease;
}

.col-6:hover {
  transform: translateY(-10px);
}

.input-group:focus-within {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.cert-img-wrapper {
  position: relative;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.cert-img-wrapper img {
  width: 100%;
  height: auto;
}

.portfolio-img-container {
  position: relative;
  overflow: hidden;
  background: #f8f9fa;
}

.portfolio-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover .portfolio-img-container img {
  transform: scale(1.05);
}

.btn-light:hover {
  background-color: var(--accent);
  color: var(--bg);
}

.fw-600 {
  font-weight: 600;
}

.letter-spacing-1 {
  letter-spacing: 1px;
}

/* Medical Teal Theme */
.text-teal {
  color: #0d9488;
}

.bg-teal-soft {
  background-color: #f0fdfa;
}

.bg-teal-gradient {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

.btn-teal-dark {
  background: #0f172a;
  color: white;
  transition: 0.3s;
}

.btn-teal-dark:hover {
  background: #0d9488;
  color: white;
  transform: translateY(-2px);
}

.product-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1.5rem;
}

.ui-mockup {
  background: white;
  padding: 10px;
  border-radius: 20px;
  transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
  transition: 0.5s ease;
}

.product-card:hover .ui-mockup {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.min-h-400 {
  min-height: 400px;
}

@media (max-width: 991px) {
  .ui-mockup {
    transform: none;
  }
}

.notification-popup {
  position: fixed;
  bottom: 30px;
  right: -400px;
  /* Hidden by default */
  background: white;
  padding: 15px 25px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--card-border);
  z-index: 9999;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-popup.show {
  right: 30px;
  /* Slide in */
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.bell-container {
  position: relative;
  width: 45px;
  height: 45px;
  background: var(--bg-teal-soft);
  /* Using your teal from products.php */
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.2rem;
}

.bell-dot {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid white;
}

/* Shake Animation for Bell */
@keyframes bellShake {
  0%,
  100% {
    transform: rotate(0);
  }

  25% {
    transform: rotate(15deg);
  }

  75% {
    transform: rotate(-15deg);
  }
}

.notification-popup.show .bi-bell-fill {
  animation: bellShake 0.5s ease-in-out 3;
}

.creative {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Filter Styling */
.filter-group .nav-link {
  color: var(--text-main);
  transition: 0.3s;
  border: none;
}

.filter-group .nav-link.active {
  background: var(--accent);
  color: var(--bg);
  shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.badge-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 800;
}

/* Poster Card - Visual Focus */
.poster-card {
  position: relative;
  cursor: pointer;
}

.poster-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s;
}

.poster-card:hover .poster-overlay {
  opacity: 1;
}

@media (max-width: 991px) {
  .creative {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
}

.tracking-wider {
  letter-spacing: 1px;
}

.experience-row {
  transition: all 0.3s ease;
  border-color: #f0f0f0 !important;
}

.experience-row:hover {
  border-color: #0d6efd !important;
  background: #fcfcfc;
}

@media (min-width: 768px) {
  .border-start-md {
    border-left: 2px solid #f8f9fa !important;
  }
}

.modal-body > .row {
  position: relative;
  z-index: 1;
}

/* Modal Entrance Animation */
.modal.fade .modal-dialog {
  transform: scale(0.9) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Subtle Cover Rotation in Modal */
.transform-rotate {
  transform: rotate(-5deg);
  transition: transform 0.6s ease;
}

.modal.show .transform-rotate {
  transform: rotate(0deg);
}

.tracking-widest {
  letter-spacing: 3px;
}

.z-index-1 {
  z-index: 10;
}

/* Ensure the modal content is scrollable on small screens */
@media (max-width: 991.98px) {
    .modal-dialog {
        margin: 0.5rem; /* Give a little space around the edges */
        max-width: 100%;
    }
    
    .modal-content {
        max-height: 90vh; /* Prevents modal from being taller than the screen */
        overflow-y: auto; /* Enables scrolling inside the modal */
    }

    /* Remove the left side image padding/margin for better fit */
    .modal-body .bg-dark {
        padding: 2rem !important;
    }
}
