:root {
  --primary-color: #005081;
  --primary-glass: rgba(0, 80, 129, 0.08);
  --accent-color: #bcd212;
  --secondary-color: #25a5b8;
  --action-color: #f37022;
  --action-gradient: linear-gradient(135deg, #f37022 0%, #ff8c4a 100%);
  --bg-color: #f8fafc;
  --white: #ffffff;
  --glass-white: rgba(255, 255, 255, 0.85);
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-radius-lg: 20px;
  --border-radius-md: 12px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

body {
  margin-bottom: 0;
  background-color: var(--bg-color);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Top Bar - Premium Minimal */
.top-bar {
  background: linear-gradient(90deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-bottom: 1px solid rgba(0, 80, 129, 0.05);
  font-weight: 500;
}

.top-bar a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-bar a:hover {
  color: var(--primary-color);
  transform: translateY(-1px);
}

.top-bar .social-icons {
  display: flex;
  gap: 15px;
}

.top-bar .social-icons a {
  font-size: 0.9rem;
  opacity: 0.7;
}

.top-bar .social-icons a:hover {
  opacity: 1;
  color: var(--secondary-color);
}

.top-bar .user-actions a {
  background: rgba(0, 80, 129, 0.04);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.top-bar .user-actions a:hover {
  background: var(--primary-glass);
}

/* Header - Luxury Floating Effect */
.main-header {
  background: rgba(255, 255, 255, 0.8);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-bottom: 1px solid rgba(0, 80, 129, 0.05);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.main-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
  box-shadow: 0 2px 10px rgba(0, 80, 129, 0.1);
}

.header-scrolled {
  padding: 12px 0;
  box-shadow: 0 15px 35px -15px rgba(0, 80, 129, 0.15);
  background: rgba(255, 255, 255, 0.9);
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-box {
  box-shadow: 0 4px 12px rgba(0, 80, 129, 0.2);
  background: linear-gradient(135deg, var(--primary-color) 0%, #003a5e 100%) !important;
}

.logo-text {
  margin-left: 15px;
  line-height: 1.2;
}

.logo-text h1 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}

.logo-text p {
  font-size: 0.85rem;
  margin: 0;
  color: var(--secondary-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-premium-action {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white !important;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 20px -5px rgba(0, 80, 129, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-premium-action:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 25px -5px rgba(0, 80, 129, 0.4);
  filter: brightness(1.1);
}

.btn-premium-action i {
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px;
  border-radius: 50%;
}

/* AI Enhanced Search Bar - Premium Glow */
.search-container {
  position: relative;
  max-width: 540px;
  width: 100%;
  border-radius: 50px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid rgba(0, 80, 129, 0.1);
  box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-container:focus-within {
  box-shadow: 0 15px 30px -10px rgba(0, 80, 129, 0.15);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.search-container::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}

.search-container:focus-within::after {
  opacity: 0.15;
}

.search-input {
  width: 100%;
  padding: 12px 24px 12px 58px;
  border-radius: 50px;
  border: none;
  background-color: transparent;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s;
  color: var(--text-dark);
}

.search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.search-input:focus {
  outline: none;
}

.search-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  z-index: 2;
  transition: all 0.3s;
  opacity: 0.8;
}

.search-container:focus-within .search-icon {
  color: var(--primary-color);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.search-container .btn-primary {
  background: var(--primary-color) !important;
  border: none !important;
  transition: all 0.3s;
  font-weight: 700 !important;
  letter-spacing: 0.3px;
}

.search-container button:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 15px rgba(0, 80, 129, 0.3) !important;
}

/* Buttons - Modern & Bold */
.btn-online {
  background: var(--action-gradient);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 20px -5px rgba(243, 112, 34, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-online:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -5px rgba(243, 112, 34, 0.5);
  color: white;
}

/* Navigation */
.main-nav {
  background-color: var(--white);
  border-top: 1px solid #f0f0f0;
}

.nav-link-custom {
  color: var(--primary-color);
  font-weight: 700;
  text-transform: capitalize;
  padding: 15px 20px;
  position: relative;
  text-decoration: none;
  display: inline-block;
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
  transform: scaleX(1);
}

.nav-link-academic {
  border-left: 1px solid #eee;
  margin-left: 10px;
  padding-left: 30px;
  color: var(--primary-color);
  font-weight: 700;
}

/* Sidebar - Premium Accordion Look */
.sidebar {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 15px;
  border: 1px solid #f1f5f9;
  box-shadow: var(--shadow-md);
}

.sidebar-title {
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
}

.category-list,
.submenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.submenu {
  margin-left: 5px;
  border-left: 1px solid rgba(0, 80, 129, 0.08);
  padding-left: 5px;
  margin-top: 4px;
}

.category-item {
  margin-bottom: 6px;
}

.category-header {
  display: flex;
  align-items: center;
  position: relative;
}

.category-link {
  padding: 10px 14px;
  font-size: 0.8rem;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--text-dark);
  text-decoration: none !important;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  flex-grow: 1;
}

.category-link:hover {
  background-color: var(--primary-glass);
  color: var(--primary-color);
  padding-left: 18px;
}

.category-link.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  box-shadow: 0 8px 16px -4px rgba(0, 80, 129, 0.3);
  color: var(--white) !important;
  font-weight: 700;
}

.category-icon {
  width: 20px;
  margin-right: 5px;
  text-align: center;
  opacity: 0.7;
  font-size: 0.8em;
}

.category-link.active .category-icon {
  opacity: 1;
}

.submenu-toggle {
  width: 32px;
  height: 32px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.3s;
  border: none !important;
  background: transparent;
  cursor: pointer;
  outline: none !important;
}

.submenu-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--primary-color);
}

.category-item.expanded>.category-header .submenu-toggle {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.category-item.expanded>.category-header .category-icon {
  color: var(--primary-color);
  opacity: 1;
}

.category-item.expanded>.category-header .category-link.active .category-icon {
  color: white;
}

.category-count {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* AI Sidebar Feature */
.ai-sidebar-box {
  background: linear-gradient(160deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  margin-top: 30px;
  padding: 15px;
  border-radius: 12px;
}

/* Hero Section - Immersive */
.hero-wrapper {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: all 0.4s;
  margin-top: 20px;
}

.hero-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Cards */
.publication-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  border: 1px solid #f1f5f9;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  height: 100%;
}

.publication-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
  height: 180px;
  background: linear-gradient(45deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-badge {
  background: var(--accent-color);
  box-shadow: 0 4px 8px rgba(188, 210, 18, 0.3);
  position: absolute;
  top: 15px;
  right: 15px;
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Publication Details Styles */
.ai-summary-premium {
  /*background: linear-gradient(135deg, #005081 0%, #25a5b8 100%);*/
  min-height: 100px;
  border: 2px solid #005081 !important;
  color: rgba↳rgba(33, 37, 41, 1) ↳ #212529(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
}

.ai-icon-container {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.ai-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 2px solid #bcd212;
  animation: ai-ring-pulse 2s infinite;
  opacity: 0;
}

@keyframes ai-ring-pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.ai-bg-blob {
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, #bcd212 0%, transparent 70%);
  top: -50px;
  right: -30px;
  opacity: 0.2;
  filter: blur(30px);
}

.ai-bg-blob-2 {
  background: radial-gradient(circle, #f37022 0%, transparent 70%);
  bottom: -50px;
  left: -30px;
  top: auto;
  right: auto;
}

.premium-badge {
  background: #005081;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
}

.text-lime {
  color: #bcd212 !important;
}

.meta-separator {
  width: 1px;
  height: 20px;
  background: #e2e8f0;
}

.title-gradient {
  background: linear-gradient(135deg, #1e293b 0%, #005081 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.ls-tight {
  letter-spacing: -0.04em;
}

.premium-bar {
  height: 3px;
  border-radius: 10px;
}

.primary-bar {
  width: calc(100% - 150px);
  background: #005081;
}

.accent-bar {
  width: 100px;
  background: #bcd212;
}

.secondary-bar {
  width: 20px;
  background: #25a5b8;
}

.header-accent-circle {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(188, 210, 18, 0.04) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  z-index: 1;
}

.header-accent-dots {
  position: absolute;
  width: 150px;
  height: 150px;
  background-image: radial-gradient(#e2e8f0 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  bottom: 20px;
  right: 40px;
  opacity: 0.5;
  z-index: 1;
}

.dot-pulse {
  width: 8px;
  height: 8px;
  background: #bcd212;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #bcd212;
  animation: dot-pulse 2s infinite;
}

@keyframes dot-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.5;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.9;
  }
}

.publication-detail .card {
  border-top: none !important;
  border-radius: 2rem !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08) !important;
}

.rounded-5 {
  border-radius: 0.7rem !important;
}

.rounded-start-5 {
  border-top-left-radius: 2rem !important;
  border-bottom-left-radius: 2rem !important;
}

.topic-link:hover {
  padding-left: 12px !important;
  color: #005081 !important;
  background: linear-gradient(to right, rgba(0, 80, 129, 0.05), transparent) !important;
  border-radius: 8px;
}

.ask-ai-section {
  background: linear-gradient(180deg, transparent, rgba(37, 165, 184, 0.02));
  border-radius: 2rem;
  padding: 2rem;
}

.main-topics-discover {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.topic-discover-item {
  background: #f8fafc;
}

.topic-discover-item:hover {
  background: white !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 10px 20px -5px rgba(0, 80, 129, 0.1);
  transform: translateY(-2px);
}

.topic-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.3;
  transition: all 0.3s;
}

.topic-discover-item:hover .topic-dot {
  opacity: 1;
  transform: scale(1.5);
  background: var(--secondary-color);
  box-shadow: 0 0 10px var(--secondary-color);
}

.topic-discover-item i {
  transition: all 0.3s;
}

.topic-discover-item:hover i {
  opacity: 1 !important;
  color: var(--primary-color);
  transform: translateX(4px);
}

.bg-primary-glass {
  background: var(--primary-glass);
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fw-800 {
  font-weight: 800;
}

.fw-900 {
  font-weight: 900;
}

.x-small {
  font-size: 0.65rem !important;
}

.placeholder-img {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.ls-1 {
  letter-spacing: 1px;
}

.topic-grid-item {
  border: 1px solid rgba(0, 80, 129, 0.05) !important;
}

.topic-grid-item:hover {
  background-color: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(0, 80, 129, 0.2) !important;
  border-color: var(--primary-color) !important;
}

.topic-grid-item:hover span {
  color: white !important;
}

.topic-grid-icon {
  width: 28px;
  height: 28px;
  background: var(--primary-glass);
  color: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.3s;
}

.topic-grid-item:hover .topic-grid-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.topics-vip-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(0, 80, 129, 0.08);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.08);
  margin-top: 30px;
  position: relative;
  overflow: hidden;
}

.topics-vip-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.vip-card-header .vip-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 8px rgba(0, 80, 129, 0.2);
}

.vip-title {
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--primary-color);
}

.vip-topics-list {
  max-height: 400px;
  /*overflow-y: auto;*/
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vip-topic-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #475569;
}

.vip-topic-item:hover {
  background: var(--primary-glass);
  color: var(--primary-color);
  transform: translateX(6px);
}

.vip-topic-dot {
  width: 6px;
  height: 6px;
  background: #cbd5e1;
  border-radius: 50%;
  transition: all 0.3s;
}

.vip-topic-item:hover .vip-topic-dot {
  background: var(--primary-color);
  transform: scale(1.5);
}

.vip-topic-text {
  font-size: 0.85rem;
  font-weight: 600;
}

.vip-topic-item i {
  font-size: 0.7rem;
  opacity: 0;
  transition: all 0.3s;
}

.vip-topic-item:hover i {
  opacity: 0.5;
  transform: translateX(2px);
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

/* Publication Image-Only Grid Styles - Enhanced Magazine/Book Effect */
.publication-item {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  perspective: 2000px;
  transform-style: preserve-3d;
  background: transparent;
  position: relative;
  display: block;
}

/* Base "Pages" (Static back of the book) */
.publication-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f1f1e6;
  /* Warmer paper color */
  background-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0.1) 2%,
      rgba(0, 0, 0, 0) 4%);
  background-size: 5px 100%;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #d1d5db;
  z-index: 1;
  border-radius: 4px;
  transition: transform 0.6s ease;
}

/* The Front Cover Wrapper */
.publication-item>div:first-child {
  position: relative;
  z-index: 10;
  transform-origin: left center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

/* Spine effect on the front cover */
.publication-item>div:first-child::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 20;
  pointer-events: none;
}

/* HOVER STATE: Rotate the cover only - REDUCED ANGLE */
.publication-item:hover>div:first-child {
  transform: rotateY(-28deg);
  box-shadow: 10px 10px 25px rgba(0, 80, 129, 0.25);
}

/* Slight tilt for the whole container to show depth */
.publication-item:hover {
  transform: translateX(5px);
}

.publication-item:hover::after {
  transform: translateZ(-5px) scale(0.98);
}

.publication-item img,
.publication-item [id^="placeholder"],
.publication-item [id^="recent-placeholder"] {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.publication-item:hover .hover-overlay {
  opacity: 1 !important;
}


.publication-item .hover-overlay span {
  transform: translateY(10px);
  transition: transform 0.4s ease;
}


.publication-item:hover .hover-overlay span {
  transform: translateY(0);
}

/* --- Responsive Adjustments --- */

@media (max-width: 991.98px) {
  .main-header {
    padding: 12px 0;
  }

  .header-actions {
    display: none !important;
    /* Hide secondary actions on mobile header */
  }

  .main-header .container {
    gap: 15px !important;
  }

  .search-container {
    max-width: 100%;
    order: 3;
  }

  .sidebar {
    margin-bottom: 30px;
  }
}

@media (max-width: 767.98px) {
  :root {
    --border-radius-lg: 16px;
  }

  /* Breadcrumb Mobile */
  .breadcrumb-premium {
    padding: 12px 15px !important;
    border-radius: 12px !important;
  }

  .breadcrumb-item a {
    font-size: 0.75rem !important;
  }

  /* Hero Section Mobile */
  .hero-wrapper {
    min-height: 280px !important;
    padding: 30px 20px !important;
    margin-top: 10px;
    margin-bottom: 25px !important;
  }

  .hero-content {
    width: 100% !important;
  }

  .hero-content h1 {
    font-size: 1.6rem !important;
    margin-bottom: 15px !important;
    line-height: 1.3 !important;
  }

  .hero-content p {
    font-size: 0.85rem !important;
    margin-bottom: 25px !important;
    opacity: 0.8 !important;
  }

  /* Section Headers */
  .section-header h2 {
    font-size: 1.25rem !important;
  }

  .section-header p {
    font-size: 0.75rem !important;
  }

  /* Details Page Mobile */
  .card-header.p-5 {
    padding: 25px 15px !important;
  }

  .title-gradient {
    font-size: 1.25rem !important;
  }

  .ai-summary-premium {
    margin-top: 0px !important;
    padding: 18px !important;
    border-radius: 15px !important;
  }

  /* Layout Container */
  .container.mt-5 {
    margin-top: 20px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .category-link {
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
  }

  .sidebar {
    padding: 15px !important;
    margin-bottom: 20px !important;
  }

  .sidebar-title {
    font-size: 0.9rem !important;
    margin-bottom: 15px !important;
  }

  .publication-item {
    margin-bottom: 0 !important;
  }

  .row.g-4 {
    --bs-gutter-x: 0.75rem !important;
    --bs-gutter-y: 0.75rem !important;
  }
}

@media (max-width: 575.98px) {
  .logo-container img {
    max-height: 40px !important;
  }

  .top-bar {
    display: none;
    /* Hide top bar on very small devices */
  }

  .search-input {
    padding: 10px 15px 10px 45px;
    font-size: 0.85rem;
  }

  .search-icon {
    left: 18px;
    font-size: 1.1rem;
  }

  .search-container button {
    padding: 5px 15px !important;
    font-size: 0.75rem !important;
  }
}

/* --- Floating AI Assistant Styles --- */
.ai-floating-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  box-shadow: 0 10px 30px rgba(0, 80, 129, 0.4);
  cursor: pointer;
  z-index: 1050;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.ai-floating-button:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 40px rgba(0, 80, 129, 0.5);
}

.ai-floating-button .ai-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-color);
  opacity: 0.5;
  z-index: -1;
  animation: ai-button-pulse 2s infinite;
}

@keyframes ai-button-pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.ai-chat-widget {
  position: fixed;
  bottom: 110px;
  right: 30px;
  width: 380px;
  max-width: calc(100vw - 60px);
  height: 500px;
  max-height: calc(100vh - 150px);
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 1049;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(0, 80, 129, 0.08);
}

.ai-chat-widget.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ai-chat-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 20px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-header h6 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ai-chat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ai-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-message.bot {
  background: white;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.ai-message.user {
  background: var(--primary-color);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 80, 129, 0.2);
}

.ai-chat-footer {
  padding: 15px;
  background: white;
  border-top: 1px solid #f1f5f9;
}

.ai-chat-footer form {
  position: relative;
  display: flex;
  gap: 10px;
}

.ai-chat-footer textarea {
  border-radius: 15px;
  border: 1px solid #e2e8f0;
  padding: 10px 15px;
  font-size: 0.9rem;
  resize: none;
  background: #f8fafc;
  transition: all 0.3s;
}

.ai-chat-footer textarea:focus {
  background: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 80, 129, 0.1);
}

@media (max-width: 575.98px) {
  .ai-chat-widget {
    right: 15px;
    bottom: 90px;
    width: calc(100vw - 30px);
    max-width: none;
  }

  .ai-floating-button {
    right: 15px;
    bottom: 15px;
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
  }
}

/* Custom grid for 8 items in a row */
@media (min-width: 992px) {
  .col-lg-1-5 {
    flex: 0 0 auto;
    width: 12.5% !important;
  }
}

/* --- Hero Slider Premium Styles --- */
.hero-slider-container {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  margin-bottom: 3rem;
}

.hero-wrapper {
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hero-tag {
  background: var(--accent-color) !important;
  color: var(--primary-color) !important;
  font-weight: 800 !important;
  letter-spacing: 1.5px !important;
  font-size: 0.7rem !important;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(188, 210, 18, 0.3);
  display: none;
}

.hero-title {
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.hero-desc {
  font-weight: 500;
  line-height: 1.6;
  max-width: 650px;
}

.btn-premium-hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, #a9bd10 100%);
  color: var(--primary-color) !important;
  border: none !important;
  font-weight: 800 !important;
  border-radius: 14px !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: 0 10px 25px rgba(188, 210, 18, 0.3) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-premium-hero:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 35px rgba(188, 210, 18, 0.4) !important;
  filter: brightness(1.05);
}

/* Custom Swiper Controls */
.hero-next-btn,
.hero-prev-btn {
  width: 60px !important;
  height: 60px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 50% !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 0.4s ease !important;
  display: none;
}

.hero-next-btn:after,
.hero-prev-btn:after {
  font-size: 1.25rem !important;
  font-weight: 900 !important;
}

.hero-next-btn:hover,
.hero-prev-btn:hover {
  background: white !important;
  color: var(--primary-color) !important;
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-pagination {
  bottom: 30px !important;
}

.hero-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: white;
  opacity: 0.4;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin: 0 6px !important;
}

.hero-pagination .swiper-pagination-bullet-active {
  background: var(--accent-color);
  opacity: 1;
  width: 30px;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem !important;
  }

  .hero-next-btn,
  .hero-prev-btn {
    display: none !important;
  }
}

/* Rich Text Areas (CKEditor Content) */
.rich-text-area {
  line-height: 1.8;
  color: var(--text-dark);
}

.rich-text-area p {
  margin-bottom: 1.5rem;
}

.rich-text-area img {
  max-width: 100%;
  height: auto !important;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: var(--shadow-md);
}

.rich-text-area h1,
.rich-text-area h2,
.rich-text-area h3 {
  color: var(--primary-color);
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
}

.rich-text-area ul,
.rich-text-area ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.rich-text-area li {
  margin-bottom: 0.5rem;
}

.category-info-panel {
  border-bottom: 4px solid var(--accent-color) !important;
}

.rich-text-area blockquote {
  border-left: 4px solid var(--secondary-color);
  padding: 1rem 2rem;
  background: #f8fafc;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  margin: 2rem 0;
}

/* Document Download Cards */
.document-download-card {
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.document-download-card:hover {
  box-shadow: 0 10px 20px rgba(0, 80, 129, 0.08) !important;
  border-color: var(--primary-color) !important;
  background: #fff !important;
}

.document-icon-box {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.document-download-card:hover .document-icon-box {
  transform: scale(1.05);
}

.hover-translate-y:hover {
  transform: translateY(-5px);
}

.primary-glass {
  background: rgba(0, 80, 129, 0.05);
}