/* ==========================================================
   JoomlaUpgrade.eu — V3 Premium Design Layer
   Load AFTER all existing page CSS files.
   ========================================================== */

:root {
  --ju3-orange: #ff6b22;
  --ju3-orange-2: #ff8b4d;
  --ju3-orange-glow: rgba(255, 107, 34, .28);
  --ju3-navy: #0d1420;
  --ju3-navy-2: #151f30;
  --ju3-blue: #3f67b1;
  --ju3-green: #35b96f;
  --ju3-surface: rgba(255, 255, 255, .84);
  --ju3-border: rgba(255, 255, 255, .62);
  --ju3-shadow: 0 24px 70px rgba(17, 23, 34, .13);
  --ju3-shadow-soft: 0 16px 44px rgba(17, 23, 34, .08);
  --ju3-ease: cubic-bezier(.2,.7,.2,1);
}

/* Global polish */
.ju2-page {
  position: relative;
  background: #fff;
  isolation: isolate;
}

.ju2-page::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 10%, rgba(255,107,34,.035), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(63,103,177,.035), transparent 25%);
}

.ju2-page h1,
.ju2-page h2,
.ju2-page h3 {
  text-wrap: balance;
}

.ju2-page p {
  text-wrap: pretty;
}

.ju2-page a:focus-visible,
.ju2-page button:focus-visible,
.ju2-page summary:focus-visible {
  outline: 3px solid rgba(255,107,34,.35);
  outline-offset: 4px;
  border-radius: 8px;
}

/* More premium section rhythm */
.ju2-section {
  position: relative;
}

.ju2-section:not(.ju2-section-dark):not(.ju2-section-soft):not(.ju2-section-gradient)::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(17,23,34,.08), transparent);
}

/* Enhanced hero ambience */
.ju2-hero,
.ju2-inner-hero,
.ju2-pricing-hero,
.ju2-services-hero {
  overflow: hidden;
}

.ju2-hero::after,
.ju2-inner-hero::after,
.ju2-pricing-hero::after,
.ju2-services-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 520px;
  height: 520px;
  right: -190px;
  top: -210px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,107,34,.15) 0%, rgba(255,107,34,.04) 46%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.ju2-hero-grid,
.ju2-inner-hero-grid,
.ju2-pricing-hero-grid,
.ju2-services-hero-grid {
  z-index: 1;
}

/* Glass cards */
.ju2-dashboard,
.ju2-hero-card,
.ju2-upgrade-map,
.ju2-recovery-monitor,
.ju2-malware-console,
.ju2-performance-dashboard,
.ju2-pricing-summary-card,
.ju2-services-overview-card,
.ju2-contact-highlight,
.ju2-security-card {
  border: 1px solid var(--ju3-border);
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.78));
  box-shadow:
    0 30px 80px rgba(17,23,34,.14),
    inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(18px) saturate(135%);
}

/* Card hover system */
.ju2-card,
.ju2-problem-card,
.ju2-service-grid article,
.ju2-process-grid article,
.ju2-process-item,
.ju2-included-grid article,
.ju2-warning-grid article,
.ju2-malware-type-grid article,
.ju2-php-error-grid article,
.ju2-scenario-grid article,
.ju2-services-main-card,
.ju2-price-card-v2,
.ju2-maintenance-card,
.ju2-extra-grid article,
.ju2-contact-cards article,
.ju2-form-placeholder,
.ju2-eu-benefits > div {
  transition:
    transform .28s var(--ju3-ease),
    box-shadow .28s var(--ju3-ease),
    border-color .28s ease,
    background-color .28s ease;
}

.ju2-card:hover,
.ju2-problem-card:hover,
.ju2-service-grid article:hover,
.ju2-process-grid article:hover,
.ju2-process-item:hover,
.ju2-included-grid article:hover,
.ju2-warning-grid article:hover,
.ju2-malware-type-grid article:hover,
.ju2-php-error-grid article:hover,
.ju2-scenario-grid article:hover,
.ju2-services-main-card:hover,
.ju2-price-card-v2:hover,
.ju2-maintenance-card:hover,
.ju2-extra-grid article:hover,
.ju2-contact-cards article:hover,
.ju2-eu-benefits > div:hover {
  transform: translateY(-7px);
  border-color: rgba(255,107,34,.34);
  box-shadow: var(--ju3-shadow);
}

/* Featured cards */
.ju2-card-featured,
.ju2-problem-card-accent,
.ju2-services-main-card-featured,
.ju2-price-card-featured,
.ju2-maintenance-card-featured {
  position: relative;
  overflow: hidden;
}

.ju2-card-featured::before,
.ju2-problem-card-accent::before,
.ju2-services-main-card-featured::before,
.ju2-price-card-featured::before,
.ju2-maintenance-card-featured::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -95px;
  right: -85px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,34,.18), transparent 68%);
  pointer-events: none;
}

/* Buttons */
.ju2-btn {
  position: relative;
  overflow: hidden;
  box-shadow: none;
  transition:
    transform .22s var(--ju3-ease),
    box-shadow .22s ease,
    background-color .22s ease,
    border-color .22s ease;
}

.ju2-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.28) 50%, transparent 80%);
  transition: transform .55s ease;
}

.ju2-btn:hover::after {
  transform: translateX(120%);
}

.ju2-btn-primary,
.ju2-btn-contact {
  background: linear-gradient(135deg, var(--ju3-orange), #f0540c);
  box-shadow: 0 13px 30px rgba(255,107,34,.25);
}

.ju2-btn-primary:hover,
.ju2-btn-contact:hover {
  box-shadow: 0 18px 40px rgba(255,107,34,.34);
}

.ju2-btn-ghost,
.ju2-btn-price {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
}

.ju2-btn-ghost:hover,
.ju2-btn-price:hover {
  border-color: rgba(255,107,34,.45);
  background: #fff7f2;
}

/* Icons */
.ju2-icon,
.ju2-problem-icon,
.ju2-included-icon,
.ju2-warning-icon,
.ju2-malware-type-icon,
.ju2-php-error-code,
.ju2-services-main-icon,
.ju2-process-icon {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .28s var(--ju3-ease), box-shadow .28s ease;
}

article:hover > .ju2-icon,
article:hover > .ju2-problem-icon,
article:hover > .ju2-included-icon,
article:hover > .ju2-warning-icon,
article:hover > .ju2-malware-type-icon,
article:hover > .ju2-php-error-code,
article:hover > .ju2-services-main-icon,
article:hover > .ju2-process-icon {
  transform: rotate(-3deg) scale(1.08);
  box-shadow:
    0 12px 26px rgba(255,107,34,.18),
    inset 0 1px 0 rgba(255,255,255,.78);
}

/* Dark sections */
.ju2-section-dark,
.ju2-final-cta {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,107,34,.15), transparent 26%),
    radial-gradient(circle at 88% 80%, rgba(63,103,177,.14), transparent 30%),
    linear-gradient(135deg, #0b111b 0%, #151f30 100%);
}

.ju2-section-dark::after,
.ju2-final-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.ju2-section-dark > .ju2-shell,
.ju2-final-cta > .ju2-shell {
  position: relative;
  z-index: 1;
}

/* CTA contact card */
.ju2-contact-card {
  border: 1px solid rgba(255,255,255,.74);
  background:
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,255,255,.88));
  box-shadow:
    0 30px 70px rgba(0,0,0,.26),
    inset 0 1px 0 #fff;
}

.ju2-contact-card::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  top: -80px;
  right: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,34,.18), transparent 68%);
  pointer-events: none;
}

.ju2-contact-card {
  position: relative;
  overflow: hidden;
}

/* FAQ */
.ju2-faq details {
  overflow: hidden;
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s var(--ju3-ease);
}

.ju2-faq details:hover {
  transform: translateY(-2px);
  border-color: rgba(255,107,34,.3);
  box-shadow: var(--ju3-shadow-soft);
}

.ju2-faq details[open] {
  border-color: rgba(255,107,34,.36);
  box-shadow: var(--ju3-shadow-soft);
}

.ju2-faq summary {
  transition: background-color .2s ease, color .2s ease;
}

.ju2-faq details[open] summary {
  background: #fff7f2;
}

/* Timeline */
.ju2-timeline-item span {
  transition: transform .25s var(--ju3-ease), box-shadow .25s ease;
}

.ju2-timeline-item:hover span {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 14px 34px rgba(255,107,34,.18);
}

/* Service selector */
.ju2-service-selector a {
  position: relative;
  overflow: hidden;
}

.ju2-service-selector a::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,107,34,.08), transparent);
  transition: transform .5s ease;
}

.ju2-service-selector a:hover::before {
  transform: translateX(100%);
}

/* Pricing emphasis */
.ju2-price-card-v2,
.ju2-maintenance-card {
  overflow: hidden;
}

.ju2-price-card-top strong,
.ju2-maintenance-card > strong {
  background: linear-gradient(135deg, var(--ju3-orange), #bd3c00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Form placeholder */
.ju2-form-placeholder {
  position: relative;
  background:
    linear-gradient(145deg, #fffaf7, #fff),
    #fff;
  border-style: dashed;
  border-width: 2px;
  box-shadow: 0 16px 42px rgba(255,107,34,.08);
}

/* Reveal animations — activated by JS */
.ju3-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .7s var(--ju3-ease),
    transform .7s var(--ju3-ease);
  transition-delay: var(--ju3-delay, 0ms);
}

.ju3-reveal.ju3-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Soft floating effect for hero cards */
@keyframes ju3Float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: no-preference) {
  .ju2-floating-card,
  .ju2-migration-badge,
  .ju2-php-badge {
    animation: ju3Float 5s ease-in-out infinite;
  }

  .ju2-floating-card-bottom,
  .ju2-migration-badge-b {
    animation-delay: -2.2s;
  }
}

/* Mobile refinement */
@media (max-width: 700px) {
  .ju2-section {
    padding: 64px 0;
  }

  .ju2-page h1 {
    letter-spacing: -.038em;
  }

  .ju2-card:hover,
  .ju2-problem-card:hover,
  .ju2-service-grid article:hover,
  .ju2-process-grid article:hover,
  .ju2-process-item:hover,
  .ju2-included-grid article:hover,
  .ju2-warning-grid article:hover,
  .ju2-malware-type-grid article:hover,
  .ju2-php-error-grid article:hover,
  .ju2-scenario-grid article:hover,
  .ju2-services-main-card:hover,
  .ju2-price-card-v2:hover,
  .ju2-maintenance-card:hover,
  .ju2-extra-grid article:hover,
  .ju2-contact-cards article:hover,
  .ju2-eu-benefits > div:hover {
    transform: none;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .ju3-reveal,
  .ju2-btn,
  .ju2-floating-card,
  .ju2-migration-badge,
  .ju2-php-badge {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
