/* ========================================================
   HCWW Cross-Platform Hub & App Switcher Styles
   ======================================================== */

@import url("../../admin/css/line-awesome.min.css");

:root {
  --hcww-primary: #0284c7;
  --hcww-primary-dark: #0369a1;
  --hcww-accent: #06b6d4;
  --hcww-glass-bg: rgba(255, 255, 255, 0.15);
  --hcww-glass-border: rgba(255, 255, 255, 0.28);
  --hcww-card-radius: 22px;
}

/* ==================== Homepage Cards Section ==================== */
.hcww-platforms-section {
  padding: 60px 0 80px;
  position: relative;
  background: linear-gradient(180deg, #f8fafc 0%, #f0fdfa 50%, #ffffff 100%);
  overflow: hidden;
}

.hcww-platforms-section .section-header-wrap {
  margin-bottom: 40px;
}

.hcww-platforms-section .section-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.hcww-platforms-section .title-compass-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
  font-size: 22px;
}

.hcww-platforms-section .main-title {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.5px;
}

.hcww-platforms-section .sub-title {
  color: #64748b;
  font-size: 16px;
  margin-top: 8px;
  max-width: 680px;
}

/* Platform Cards Grid */
.hcww-platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

@media (min-width: 1200px) {
  .hcww-platforms-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .hcww-platforms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .hcww-platforms-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    gap: 18px;
  }
}

/* Individual Platform Card */
.hcww-platform-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  border-radius: var(--hcww-card-radius);
  overflow: hidden;
  text-decoration: none !important;
  color: #ffffff !important;
  box-shadow: 0 14px 35px -8px rgba(15, 23, 42, 0.22);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background-color: #1e293b;
}

@media (max-width: 767px) {
  .hcww-platform-card {
    flex: 0 0 85%;
    min-height: 380px;
    scroll-snap-align: start;
  }
}

.hcww-platform-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 45px -8px rgba(14, 165, 233, 0.32);
}

/* Card Cover Image */
.hcww-platform-card .card-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hcww-platform-card .card-bg-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hcww-platform-card:hover .card-bg-wrap img {
  transform: scale(1.08);
}

.hcww-platform-card .card-bg-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.65) 45%,
    rgba(15, 23, 42, 0.2) 80%,
    rgba(15, 23, 42, 0.1) 100%
  );
  transition: background 0.4s ease;
}

.hcww-platform-card:hover .card-bg-wrap::after {
  background: linear-gradient(
    to top,
    rgba(14, 116, 144, 0.92) 0%,
    rgba(15, 23, 42, 0.65) 45%,
    rgba(15, 23, 42, 0.25) 80%,
    rgba(15, 23, 42, 0.15) 100%
  );
}

/* Shimmer Highlight */
.hcww-platform-card .card-shimmer {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%
  );
  opacity: 0;
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.8s ease, opacity 0.2s ease;
  pointer-events: none;
}

.hcww-platform-card:hover .card-shimmer {
  opacity: 1;
  transform: translateX(120%) skewX(-15deg);
}

/* Top Icon Tile */
.hcww-platform-card .card-icon-tile {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--hcww-glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--hcww-glass-border);
  color: #ffffff;
  font-size: 24px;
  transition: transform 0.3s ease, background 0.3s ease;
}

html[dir="rtl"] .hcww-platform-card .card-icon-tile {
  right: auto;
  left: 20px;
}

.hcww-platform-card:hover .card-icon-tile {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.28);
}

.hcww-platform-card .card-icon-tile i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: #ffffff;
}

/* Card Content Area */
.hcww-platform-card .card-body-content {
  position: relative;
  z-index: 3;
  padding: 24px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Eyebrow Badge */
.hcww-platform-card .card-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid var(--hcww-glass-border);
  background: var(--hcww-glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 12px;
  color: #f1f5f9;
}

/* Current Platform Active Badge */
.hcww-platform-card .active-platform-pill {
  background: #10b981;
  color: #ffffff;
  border: none;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.hcww-platform-card .card-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.hcww-platform-card .card-desc {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card CTA Action */
.hcww-platform-card .card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--hcww-glass-bg);
  border: 1px solid var(--hcww-glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  transition: all 0.3s ease;
}

.hcww-platform-card:hover .card-action-btn {
  background: #ffffff;
  color: #0f172a !important;
  border-color: #ffffff;
  transform: translateX(4px);
}

html[dir="rtl"] .hcww-platform-card:hover .card-action-btn {
  transform: translateX(-4px);
}

.hcww-platform-card.is-current-active {
  border: 2px solid rgba(16, 185, 129, 0.5);
}

.hcww-platform-card.is-current-active .card-action-btn {
  background: rgba(16, 185, 129, 0.3);
  border-color: rgba(16, 185, 129, 0.6);
}

/* ==================== 9-Dot Grid App Switcher (Waffle Menu) ==================== */
.hcww-app-switcher-wrapper {
  position: relative;
  display: inline-block;
}

.hcww-waffle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #334155;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.header-layout-1.nav-white-color:not(.sticky-header-active) .hcww-waffle-btn {
  color: #ffffff;
}

.hcww-waffle-btn:hover,
.hcww-waffle-btn:focus {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.08);
}

.header-layout-1.nav-white-color:not(.sticky-header-active) .hcww-waffle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Waffle SVG Grid */
.hcww-waffle-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
}

.hcww-waffle-btn:hover .hcww-waffle-icon {
  transform: rotate(90deg);
}

/* Dropdown Menu */
.hcww-switcher-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 1050;
  width: 360px;
  max-width: 95vw;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.06);
  padding: 16px;
  display: none;
  animation: hcwwDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html[dir="rtl"] .hcww-switcher-dropdown {
  right: auto;
  left: 0;
}

.hcww-app-switcher-wrapper.show .hcww-switcher-dropdown {
  display: block;
}

@keyframes hcwwDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hcww-switcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.hcww-switcher-header h6 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hcww-switcher-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.hcww-switcher-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  border-radius: 12px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  position: relative;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.hcww-switcher-item:hover {
  background: #f0fdfa;
  border-color: #ccfbf1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.08);
}

.hcww-switcher-item.is-active-item {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.hcww-switcher-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #0284c7;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}

.hcww-switcher-item:hover .hcww-switcher-item-icon {
  transform: scale(1.1);
  color: #0369a1;
}

.hcww-switcher-item.is-active-item .hcww-switcher-item-icon {
  color: #059669;
}

.hcww-switcher-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
  line-height: 1.25;
}

.hcww-switcher-item-tag {
  font-size: 10.5px;
  color: #64748b;
}

.hcww-switcher-item .active-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px #ffffff;
}

html[dir="rtl"] .hcww-switcher-item .active-badge {
  right: auto;
  left: 6px;
}

.hcww-switcher-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.hcww-switcher-footer span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}
