html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #2563eb;
}

body {
  margin-bottom: 0;
  background-color: #f8fafc;
}

/* Custom styles for Titly */
.avatar {
  font-weight: 600;
}

.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e5e7eb;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1) !important;
  border-color: #2563eb;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.7) !important;
}

.bg-white-50 {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Header styling - Default (for public pages like Index) */
.header {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Header styling - User Dashboard Only */
header.header.header-user-dashboard,
.header.header-user-dashboard {
  background-color: #ffffff !important;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  color: var(--bs-body-color);
}

header.header.header-user-dashboard .logo,
.header.header-user-dashboard .logo {
  border-right-color: var(--bs-border-color) !important;
}

header.header.header-user-dashboard .logo small,
.header.header-user-dashboard .logo small {
  color: var(--bs-secondary-color) !important;
}

header.header.header-user-dashboard .nav-link,
.header.header-user-dashboard .nav-link {
  color: var(--bs-body-color) !important;
}

header.header.header-user-dashboard .nav-link:hover,
.header.header-user-dashboard .nav-link:hover {
  color: #2563eb !important;
}

header.header.header-user-dashboard svg,
.header.header-user-dashboard svg {
  color: var(--bs-body-color) !important;
}

header.header.header-user-dashboard .dropdown-toggle,
.header.header-user-dashboard .dropdown-toggle {
  color: var(--bs-body-color) !important;
}

header.header.header-user-dashboard .btn,
.header.header-user-dashboard .btn {
  color: var(--bs-body-color) !important;
}

/* Module boxes with better colors */
.module-box {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.module-box:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #2563eb;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

/* Button improvements */
.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

/* Page heading improvements */
.page-heading {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e5e7eb;
}

/* Search input styling */
.page-search {
  position: relative;
}

.searchInput {
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
  background: #ffffff;
  font-weight: 400;
}

.searchInput:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  outline: none;
  background: #ffffff;
}

.searchInput::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.icon-search {
  color: #9ca3af;
  transition: color 0.3s ease;
}

.searchInput:focus + .icon-search,
.searchInput:focus ~ .icon-search {
  color: #2563eb;
}

/* Search results dropdown */
#searchResults {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-item {
  transition: all 0.2s ease;
  padding: 12px;
}

.suggestion-item:hover {
  background-color: #f3f4f6;
  transform: translateX(5px);
}

.quick-filter {
  transition: all 0.2s ease;
}

.quick-filter:hover {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-pointer:hover {
  background-color: #eff6ff !important;
  border-color: #2563eb !important;
  color: #2563eb !important;
}

/* Weather info styling */
.weather-info {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(30, 64, 175, 0.02) 100%);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

#weatherIcon {
  font-size: 2rem;
  line-height: 1;
}

#weatherTemp {
  font-size: 2rem;
  font-weight: 700;
  color: #2563eb;
  line-height: 1;
}

#dayName {
  color: #1e293b;
  font-weight: 600;
}

#fullDate {
  color: #64748b;
  font-size: 0.875rem;
}

#currentTime {
  color: #2563eb;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

/* Notifications dropdown styling */
.bullet-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--bs-body-bg);
}

.animation-blink {
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hover-svg {
  transition: transform 0.2s ease, color 0.2s ease;
}

.hover-svg:hover {
  transform: scale(1.1);
  color: var(--bs-primary) !important;
}

.notifications {
  min-width: 320px;
  max-width: 400px;
}

.notifications .list-group-item {
  transition: background-color 0.2s ease;
}

.notifications .list-group-item:hover {
  background-color: var(--bs-primary-bg-subtle);
}

.notifications .list-group-item a {
  color: inherit;
  text-decoration: none;
}

.notifications .list-group-item a:hover {
  color: var(--bs-primary);
}

/* Testimonials Section */
.testimonials-section {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.testimonial-card {
  transition: all 0.3s ease;
  border-radius: 16px !important;
  overflow: hidden;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15) !important;
  border-color: #2563eb !important;
}

.testimonial-card .card-body {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 80px;
  color: rgba(37, 99, 235, 0.1);
  font-family: Georgia, serif;
  line-height: 1;
  z-index: 0;
}

.testimonial-card .card-body > * {
  position: relative;
  z-index: 1;
}

/* Footer Section */
.footer-section {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  margin-top: auto;
}

.footer-section h5 {
  color: #1e293b;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section a {
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: #2563eb !important;
  transform: translateX(3px);
}

.footer-section .social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f5f9;
  transition: all 0.3s ease;
}

.footer-section .social-icon:hover {
  background: #2563eb;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* User Layout - Sidebar Menu */
.module-card {
  transition: all 0.3s ease;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15) !important;
  border-color: #2563eb !important;
}

.nav-sidebar .nav-link {
  display: flex;
  align-items-center;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: var(--bs-body-color);
  text-decoration: none;
}

.nav-sidebar .nav-link:hover,
.nav-sidebar .nav-link.active {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.nav-sidebar .nav-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* User Dashboard - White Sidebar */
.left-sidebar {
  background-color: #ffffff !important;
  color: var(--bs-body-color);
}

.left-sidebar .nav-title {
  color: var(--bs-secondary-color) !important;
}

.left-sidebar .nav-link {
  color: var(--bs-body-color) !important;
}

.left-sidebar .nav-link:hover,
.left-sidebar .nav-link.active {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
}

.left-sidebar svg {
  color: var(--bs-body-color);
}