/* Modern UI 2026 Design System */
:root {
  --primary: #05375c;
  --accent: #48bf84;
  --surface: #ffffff;
  --bg-light: #f8f9fa;
  --text-main: #222222;
  --text-muted: #555555;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
  --glass: rgba(255, 255, 255, 0.95);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Global Enhancements */
body {
  background-color: var(--bg-light);
}

/* Search Container */
.search-hero-container {
  max-width: 800px;
  margin: -40px auto 40px;
  position: relative;
  z-index: 10;
  padding: 0 20px;
}

.modern-search-bar {
  background: var(--glass);
  backdrop-filter: blur(12px);
  padding: 10px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.3s ease;
}

.modern-search-bar:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.search-icon-wrapper {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 15px;
}

.search-input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 18px;
  color: var(--text-main);
  outline: none;
  padding: 0 10px;
  font-weight: 500;
}

.search-input::placeholder {
  color: #aaa;
}

.filter-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.filter-tag {
  background: white;
  border: 1px solid #eee;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Grid Layout */
.modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

/* Modern Card */
.modern-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.modern-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-image-wrapper {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.modern-card:hover .card-image {
  transform: scale(1.08);
}

.card-overlay {
  position: absolute;
  top: 15px;
  left: 15px;
  display: flex;
  gap: 10px;
}

.card-tag {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 15px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item i {
  color: var(--accent);
}

.card-price-row {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.price-block .label {
  font-size: 12px;
  color: #999;
  display: block;
  margin-bottom: 4px;
}

.price-block .amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.card-actions {
  display: flex;
  gap: 10px;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eee;
  background: white;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary-sm {
  background: #e6f2ff;
  color: var(--primary);
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: none;
}

.btn-primary-sm:hover {
  background: #cce4ff;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 55, 92, 0.15);
}

/* Detail Page Improvements */
.detail-hero-content {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 40px;
  border-radius: var(--radius-lg);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.detail-sticky-sidebar {
  background: white;
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid #f0f0f0;
  position: sticky;
  top: 100px;
}

.detail-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.feature-box {
  background: #f8f9fa;
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
}

.feature-box i {
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

@media (max-width: 768px) {
  .modern-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .search-hero-container {
    padding: 0 15px;
  }
}

/* Utility: Text Truncation */
.trim-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Glass Button Styles & Navbar Enhancements */
.glass-btn-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

.glass-btn {
  /* Force consistency */
  height: 54px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  justify-content: center !important;

  position: relative;
  padding: 0 36px !important;
  border-radius: 50px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white !important;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
}

.glass-btn-primary {
  background: rgba(255, 255, 255, 0.15) !important;
}

.glass-btn-primary:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.glass-btn-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
}

.glass-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

.glass-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  transition: all 0.6s ease;
}

.glass-btn:hover::after {
  left: 200%;
  transition: all 0.6s ease;
}

.glass-btn i {
  font-size: 18px;
  margin-top: -2px;
}

/* Navbar Enhancements */
.sf-menu>li>a {
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.3s ease !important;
  border-radius: 50px !important;
  padding: 8px 18px !important;
  background: transparent !important;
  color: white !important;
}

.sf-menu>li>a:hover,
.sf-menu>li.current-menu-item>a,
.sf-menu>li.current_page_item>a {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px);
}

.sf-menu>li>a::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.sf-menu>li>a:hover::after,
.sf-menu>li.current-menu-item>a::after,
.sf-menu>li.current_page_item>a::after {
  opacity: 1;
  left: 200%;
  transition: left 0.6s ease, opacity 0.1s;
}

/* Dropdown Styles */
.menu-item-has-children {
  position: relative;
}

.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: rgba(5, 55, 92, 0.85) !important;
  background-color: rgba(5, 55, 92, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  padding: 8px;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 1000;
  list-style: none;
}

.menu-item-has-children:hover .sub-menu {
  display: block;
  animation: fadeIn 0.3s ease;
}

.sub-menu li {
  display: block;
  margin-bottom: 2px;
  background: transparent !important;
  border: none !important;
}

.sub-menu a {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.9) !important;
  background: transparent !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 10px;
  margin: 0;
  border: 1px solid transparent;
  box-shadow: none !important;
}

.sub-menu a:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  padding-left: 25px;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glass Floating Action Button (Speed Dial) */
.glass-fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  /* Stack actions above trigger visually */
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.glass-fab-trigger {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(5, 55, 92, 0.85);
  /* Dark blue glass connection */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.glass-fab-trigger::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.glass-fab-trigger:hover::after {
  opacity: 1;
  left: 200%;
  transition: left 0.6s ease, opacity 0.1s;
}

.glass-fab-trigger:hover {
  transform: scale(1.1) rotate(90deg);
  background: rgba(72, 191, 132, 0.9);
  /* Accent green on hover */
  box-shadow: 0 12px 40px rgba(72, 191, 132, 0.35);
  border-color: rgba(255, 255, 255, 0.6);
}

/* The list of buttons container */
.glass-fab-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  margin-bottom: 5px;
  align-items: center;
}

/* Show actions on hover of the container */
.glass-fab-container:hover .glass-fab-actions,
.glass-fab-container.active .glass-fab-actions {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.glass-fab-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  text-decoration: none;
  font-size: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.glass-fab-item[title]::before {
  content: attr(title);
  position: absolute;
  right: 60px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  pointer-events: none;
}

.glass-fab-item:hover::before {
  opacity: 1;
  visibility: visible;
}

.glass-fab-item:hover {
  transform: scale(1.15) translateX(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Individual Colors with glass feel */
.glass-fab-item.whatsapp {
  color: #25d366;
}

.glass-fab-item.whatsapp:hover {
  background: #25d366;
  color: white;
  border-color: #25d366;
}

.glass-fab-item.phone {
  color: #007bff;
}

.glass-fab-item.phone:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.glass-fab-item.mail {
  color: #f44336;
}

.glass-fab-item.mail:hover {
  background: #f44336;
  color: white;
  border-color: #f44336;
}