/* ==============================================================
   Gorizont — Visual Enhancements  (enhancements.css)
   Adds color, depth, animation to reduce "flat black" feel.
   ============================================================== */

/* ---------- CUSTOM SCROLLBAR ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-darker); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), #8b5cf6);
  border-radius: 5px;
  border: 2px solid var(--bg-darker);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #4fc3f7, var(--primary)); }
html { scrollbar-color: var(--primary) var(--bg-darker); scrollbar-width: thin; }

/* ---------- TEXT SELECTION ---------- */
::selection { background: rgba(0,113,227,.4); color: #fff; }
::-moz-selection { background: rgba(0,113,227,.4); color: #fff; }

/* ---------- PRELOADER ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg-darker);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--primary);
  border-right-color: #8b5cf6;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- BACK-TO-TOP BUTTON ---------- */
.back-to-top {
  position: fixed; bottom: 90px; right: 24px; z-index: 900;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff; border: none; border-radius: 50%;
  cursor: pointer; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px) scale(.8);
  transition: opacity .3s ease, transform .3s ease, box-shadow .3s ease;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,113,227,.3);
}
.back-to-top.visible {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.back-to-top:hover {
  box-shadow: 0 6px 30px rgba(0,113,227,.5);
  transform: translateY(-2px) scale(1.05);
}

/* ---------- BUTTON RIPPLE ---------- */
.btn { position: relative; overflow: hidden; }
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  transform: scale(0);
  animation: ripple-anim .6s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ---------- SECTION COLOR VARIANTS ---------- */
/* Use gradient tinted backgrounds to break black monotony */
.section-gradient-blue {
  background: linear-gradient(160deg,
    rgba(0,113,227,.06) 0%,
    rgba(79,195,247,.04) 50%,
    transparent 100%) !important;
}
.section-gradient-purple {
  background: linear-gradient(160deg,
    rgba(139,92,246,.06) 0%,
    rgba(236,72,153,.03) 50%,
    transparent 100%) !important;
}
.section-gradient-teal {
  background: linear-gradient(160deg,
    rgba(20,184,166,.06) 0%,
    rgba(34,197,94,.03) 50%,
    transparent 100%) !important;
}
.section-gradient-warm {
  background: linear-gradient(160deg,
    rgba(245,158,11,.05) 0%,
    rgba(239,68,68,.03) 50%,
    transparent 100%) !important;
}

/* ---------- DECORATIVE GRADIENT DIVIDERS ---------- */
.section-divider {
  height: 2px; border: none; margin: 0;
  background: linear-gradient(90deg, transparent, var(--primary), #8b5cf6, #14b8a6, transparent);
  background-size: 200% 100%;
  animation: gradient-flow 4s ease infinite;
}
@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- DECORATIVE FLOATING ORBS ---------- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .12;
  pointer-events: none;
  z-index: 0;
}
.orb-blue { background: #0071e3; width: 300px; height: 300px; }
.orb-purple { background: #8b5cf6; width: 250px; height: 250px; }
.orb-teal { background: #14b8a6; width: 200px; height: 200px; }
.orb-pink { background: #ec4899; width: 220px; height: 220px; }

/* ---------- ENHANCED CARDS — GRADIENT BORDER + GLOW ---------- */
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  background: linear-gradient(135deg, var(--primary), #8b5cf6, #14b8a6);
  opacity: 0;
  transition: opacity .4s ease;
  z-index: -1;
}
.product-card:hover::before { opacity: 1; }
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,113,227,.15), 0 0 60px rgba(139,92,246,.08);
}

/* ---------- FEATURE-ITEM COLORED ICON BG ---------- */
.feature-icon {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(0,113,227,.15), rgba(139,92,246,.1));
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-item:hover .feature-icon {
  transform: scale(1.1) rotate(-3deg);
  box-shadow: 0 4px 20px rgba(0,113,227,.2);
}

/* Alternating feature icon colors */
.feature-item:nth-child(2) .feature-icon {
  background: linear-gradient(135deg, rgba(139,92,246,.15), rgba(236,72,153,.1));
}
.feature-item:nth-child(3) .feature-icon {
  background: linear-gradient(135deg, rgba(20,184,166,.15), rgba(34,197,94,.1));
}
.feature-item:nth-child(4) .feature-icon {
  background: linear-gradient(135deg, rgba(245,158,11,.15), rgba(239,68,68,.1));
}
.feature-item:nth-child(5) .feature-icon {
  background: linear-gradient(135deg, rgba(79,195,247,.15), rgba(0,113,227,.1));
}
.feature-item:nth-child(6) .feature-icon {
  background: linear-gradient(135deg, rgba(236,72,153,.15), rgba(139,92,246,.1));
}

/* ---------- ANIMATED GRADIENT TEXT FOR HEADINGS ---------- */
.gradient-text {
  background: linear-gradient(135deg, #4fc3f7, var(--primary), #8b5cf6, #ec4899);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease infinite;
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- HERO ENHANCEMENTS ---------- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,113,227,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139,92,246,.1) 0%, transparent 40%),
    radial-gradient(ellipse at 60% 80%, rgba(79,195,247,.08) 0%, transparent 45%),
    radial-gradient(ellipse at 30% 80%, rgba(20,184,166,.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

/* Hero badge glow */
.hero-badge {
  display: inline-block;
  border-radius: 20px; padding: 6px 16px;
  font-size: .85rem; font-weight: 600;
  background: linear-gradient(135deg, rgba(0,113,227,.2), rgba(139,92,246,.2));
  border: 1px solid rgba(0,113,227,.3);
  color: #4fc3f7;
  box-shadow: 0 0 20px rgba(0,113,227,.15);
  animation: badge-pulse 3s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,113,227,.15); }
  50% { box-shadow: 0 0 30px rgba(0,113,227,.25), 0 0 60px rgba(139,92,246,.1); }
}

/* ---------- GLASSMORPHISM PANELS ---------- */
.glass {
  background: rgba(49,55,64,.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.06);
}

/* ---------- ANIMATED FOOTER ---------- */
.site-footer {
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), #8b5cf6, #14b8a6, transparent);
  background-size: 200% 100%;
  animation: gradient-flow 4s ease infinite;
}
.footer-col a {
  position: relative;
}
.footer-col a::after {
  content: '';
  position: absolute; bottom: 8px; left: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  transition: width .3s ease;
}
.footer-col a:hover::after { width: 100%; }

/* ---------- FAQ ENHANCED COLORS ---------- */
.faq-question {
  transition: background var(--transition), color var(--transition);
}
.faq-item.open .faq-question {
  background: linear-gradient(135deg, rgba(0,113,227,.08), rgba(139,92,246,.05));
}

/* ---------- DOWNLOADS TABLE COLORS ---------- */
.downloads-table tr {
  transition: background var(--transition);
}
.downloads-table tr:hover {
  background: rgba(0,113,227,.05);
}

/* ---------- COOKIE CONSENT BANNER ---------- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 9000;
  background: rgba(22,26,31,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform .4s ease;
  font-size: .9rem;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { color: var(--text-muted); margin: 0; max-width: 600px; }
.cookie-banner a { color: var(--primary); text-decoration: underline; }
.cookie-btn-accept {
  padding: 10px 24px;
  background: var(--primary); color: #fff; border: none;
  border-radius: 8px; font-weight: 600; cursor: pointer;
  transition: background var(--transition);
}
.cookie-btn-accept:hover { background: var(--accent); }
.cookie-btn-decline {
  padding: 10px 24px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: all var(--transition);
}
.cookie-btn-decline:hover { border-color: var(--text); color: var(--text); }

/* ---------- HEADER SCROLL EFFECT ---------- */
.site-header {
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.site-header.scrolled {
  background: rgba(22,26,31,.98);
  box-shadow: 0 4px 30px rgba(0,0,0,.3);
  border-bottom-color: transparent;
}

/* ---------- LINK GLOW ON HOVER ---------- */
.nav-desktop a, .mobile-menu a {
  position: relative;
  transition: color var(--transition), text-shadow .3s ease;
}
.nav-desktop a:hover, .mobile-menu a:hover {
  text-shadow: 0 0 12px rgba(0,113,227,.4);
}

/* ---------- NOSCRIPT ---------- */
.noscript-banner {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: #000; text-align: center;
  padding: 12px 16px; font-weight: 600; font-size: .9rem;
}

/* ---------- ANIMATED NUMBERS ---------- */
.counter {
  font-variant-numeric: tabular-nums;
  transition: all .3s ease;
}

/* ---------- SECTION HIGHLIGHT BORDER ---------- */
.features {
  border-left: 3px solid transparent;
  border-image: linear-gradient(to bottom, transparent, rgba(0,113,227,.2), transparent) 1;
}

/* ---------- QUICK LINKS BANNER (above footer) ---------- */
.cta-gradient {
  background: linear-gradient(135deg, rgba(0,113,227,.1), rgba(139,92,246,.08), rgba(20,184,166,.06));
  border-top: 1px solid rgba(0,113,227,.15);
  border-bottom: 1px solid rgba(139,92,246,.15);
}

/* ---------- TOOLTIP ---------- */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--card); color: var(--text);
  padding: 6px 12px; border-radius: 6px;
  font-size: .8rem; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow-sm);
}
[data-tooltip]:hover::after {
  opacity: 1; transform: translateX(-50%) translateY(-8px);
}

/* ---------- ANIMATED BADGES ---------- */
.badge-new {
  display: inline-block;
  background: linear-gradient(135deg, var(--success), #14b8a6);
  color: #fff; padding: 2px 8px;
  border-radius: 4px; font-size: .7rem;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em;
  animation: badge-shine 3s ease infinite;
}
@keyframes badge-shine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

/* ---------- MOBILE ENHANCEMENTS ---------- */
@media (max-width: 767px) {
  .back-to-top { bottom: 80px; right: 16px; width: 42px; height: 42px; }
  .cookie-banner { flex-direction: column; text-align: center; padding: 20px 16px; }
  .orb { display: none; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .preloader-spinner { animation: none; }
  .section-divider { animation: none; }
  .gradient-text { animation: none; }
  .hero-badge { animation: none; }
  .site-footer::before { animation: none; }
  .badge-new { animation: none; }
  .btn .ripple { animation: none; }
}
