/* ==========================================================================
   Gardoon — Homepage hero tech animation (globe + orbit + cards)
   Extracted from sections/homepage/hero.blade.php inline <style>.
   Fully responsive (percentage-based); scoped to .gardoon-hero--globe.
   ========================================================================== */

.gardoon-hero--globe .gardoon-hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
}

.gardoon-hero--globe .gardoon-hero__content {
    max-width: 640px;
}

/* --- Layered tech-hero (scoped to hero) — fully responsive with percentages --- */
.gardoon-hero--globe .tech-hero {
    position: relative;
    width: min(600px, 100%);
    aspect-ratio: 1 / 1;
    height: auto;
    margin: 0 auto;
}

/* Globe: round container with no background so no square shows behind it */
.gardoon-hero--globe .tech-hero .globe {
    position: absolute;
    width: 58%;
    aspect-ratio: 1 / 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    border-radius: 50%;
    background: transparent;
    filter: drop-shadow(0 0 4px aqua);
}

.gardoon-hero--globe .tech-hero .globe-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    animation: tech-hero-float 5s ease-in-out infinite, tech-globe-spin 40s linear infinite, tech-pulse-glow 4s ease-in-out infinite;
}

/* Scan line inside the globe */
.gardoon-hero--globe .tech-hero .scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    top: 0;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    box-shadow: 0 0 20px cyan;
    animation: tech-scan-move 4s linear infinite;
}

@keyframes tech-scan-move {
    0% { top: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Breathing globe glow */
@keyframes tech-pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 30px cyan); }
    50% { filter: drop-shadow(0 0 50px cyan); }
}

/* Slow spin, separate from float so they don't conflict */
@keyframes tech-globe-spin {
    from { rotate: 0deg; }
    to { rotate: 360deg; }
}

.gardoon-hero--globe .tech-hero .orbit {
    position: absolute;
    top: 8%;
    left: 8%;
    width: 84%;
    height: 84%;
    z-index: 1;
    opacity: 0.25;
    animation: tech-hero-rotate 18s linear infinite;
}

/* Second reversed ring — different speed and direction */
.gardoon-hero--globe .tech-hero::before {
    content: "";
    position: absolute;
    width: 560px;
    height: 290px;
    max-width: 94%;
    top: 155px;
    left: 20px;
    border: 1px dashed rgba(0, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.2);
    z-index: 1;
    animation: tech-hero-rotate-rev 30s linear infinite;
}

/* Halo behind the globe — round and very dim so no square shows */
.gardoon-hero--globe .tech-hero::after {
    content: "";
    position: absolute;
    width: 50%;
    aspect-ratio: 1 / 1;
    top: 25%;
    left: 25%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.25), transparent 70%);
    filter: blur(20px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

/* Outer card holds position only — no animation on it */
.gardoon-hero--globe .tech-hero .tech-card {
    position: absolute;
    width: 12%;
    aspect-ratio: 1 / 1;
    max-width: 78px;
    opacity: 0.9;
    filter: drop-shadow(0 0 20px cyan);
    transition: opacity 0.3s ease, filter 0.3s ease, translate 0.3s ease, scale 0.3s ease;
    z-index: 10;
}

.gardoon-hero--globe .tech-hero .tech-card:hover {
    opacity: 1;
    translate: 0 -10px;
    scale: 1.08;
    filter: drop-shadow(0 0 40px cyan) brightness(1.15);
}

/* Float only on the inner layer */
.gardoon-hero--globe .tech-hero .card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: tech-floating 5s ease-in-out infinite;
}

.gardoon-hero--globe .tech-hero .card-inner img {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes tech-floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* 5 cards on one circular orbit, evenly spaced (percentages, responsive) */
.gardoon-hero--globe .tech-hero .cloud {
    top: 11%;
    left: 50%;
    transform: translateX(-50%);
}

.gardoon-hero--globe .tech-hero .ai {
    left: 12.5%;
    top: 34%;
}

.gardoon-hero--globe .tech-hero .code {
    right: 12.5%;
    top: 34%;
}

.gardoon-hero--globe .tech-hero .data {
    left: 24.5%;
    bottom: 17%;
}

.gardoon-hero--globe .tech-hero .security {
    right: 24.5%;
    bottom: 17%;
}

.gardoon-hero--globe .tech-hero .cloud .card-inner { animation-delay: 0.5s; }
.gardoon-hero--globe .tech-hero .ai .card-inner { animation-delay: 1s; }
.gardoon-hero--globe .tech-hero .code .card-inner { animation-delay: 1.5s; }
.gardoon-hero--globe .tech-hero .data .card-inner { animation-delay: 2s; }
.gardoon-hero--globe .tech-hero .security .card-inner { animation-delay: 2.5s; }

/* Data lines: cards to globe */
.gardoon-hero--globe .tech-hero .connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    opacity: 0.35;
    box-shadow: 0 0 10px cyan;
    z-index: 6;
    animation: tech-hero-conn 3s ease-in-out infinite;
}

.gardoon-hero--globe .tech-hero::before {
    display: none;
}

.gardoon-hero--globe .tech-hero .cloud-line {
    left: 49.8%;
    top: 19.7%;
    width: 2px;
    height: 3%;
    background: linear-gradient(180deg, transparent, cyan, transparent);
}

.gardoon-hero--globe .tech-hero .ai-line {
    left: 20%;
    top: 40.5%;
    width: 4.7%;
    height: 2px;
    background: linear-gradient(90deg, transparent, cyan, transparent);
    animation-delay: 0.6s;
}

.gardoon-hero--globe .tech-hero .code-line {
    left: 74%;
    top: 40.5%;
    width: 6.3%;
    height: 2px;
    background: linear-gradient(90deg, transparent, cyan, transparent);
    animation-delay: 1.2s;
}

.gardoon-hero--globe .tech-hero .data-line {
    left: 32.5%;
    top: 71.3%;
    width: 6%;
    height: 2px;
    rotate: -24deg;
    transform-origin: left center;
    background: linear-gradient(90deg, transparent, cyan, transparent);
    animation-delay: 1.8s;
}

.gardoon-hero--globe .tech-hero .security-line {
    left: 61.5%;
    top: 71.3%;
    width: 6%;
    height: 2px;
    rotate: 24deg;
    transform-origin: left center;
    background: linear-gradient(90deg, transparent, cyan, transparent);
    animation-delay: 2.4s;
}

@keyframes tech-hero-conn {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.7; }
}

/* Tiny particles behind the animation */
.gardoon-hero--globe .tech-hero .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    filter: drop-shadow(0 0 10px cyan);
    animation: tech-hero-float 3s infinite ease-in-out;
    z-index: 0;
}

.gardoon-hero--globe .tech-hero .p1 { left: 10%; top: 20%; animation-delay: 0s; }
.gardoon-hero--globe .tech-hero .p2 { left: 90%; top: 15%; animation-delay: 0.5s; }
.gardoon-hero--globe .tech-hero .p3 { left: 13%; top: 70%; animation-delay: 1s; }
.gardoon-hero--globe .tech-hero .p4 { left: 87%; top: 77%; animation-delay: 1.5s; }
.gardoon-hero--globe .tech-hero .p5 { left: 25%; top: 10%; animation-delay: 2s; }
.gardoon-hero--globe .tech-hero .p6 { left: 75%; top: 90%; animation-delay: 2.5s; }
.gardoon-hero--globe .tech-hero .p7 { left: 50%; top: 7%; animation-delay: 1.2s; }
.gardoon-hero--globe .tech-hero .p8 { left: 7%; top: 50%; animation-delay: 0.8s; }

@keyframes tech-hero-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes tech-hero-rotate-rev {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes tech-hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Hero entrance fade-up (runs once) */
.gardoon-hero--globe .gardoon-hero__content {
    animation: tech-hero-in 0.9s ease both;
}

.gardoon-hero--globe .tech-hero {
    animation: tech-hero-fade 1.2s 0.15s ease both;
}

@keyframes tech-hero-in {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
}

@keyframes tech-hero-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .gardoon-hero--globe .gardoon-hero__content,
    .gardoon-hero--globe .tech-hero,
    .gardoon-hero--globe .tech-hero .globe-img,
    .gardoon-hero--globe .tech-hero .scan-line,
    .gardoon-hero--globe .tech-hero .orbit,
    .gardoon-hero--globe .tech-hero .tech-card,
    .gardoon-hero--globe .tech-hero .card-inner,
    .gardoon-hero--globe .tech-hero .connection,
    .gardoon-hero--globe .tech-hero .particle,
    .gardoon-hero--globe .tech-hero::before { animation: none; }
}

@media (max-width: 991px) {
    .gardoon-hero--globe .gardoon-hero__grid {
        grid-template-columns: 1fr;
    }

    /* Truly responsive: the whole animation scales with percentages, no scale hack */
    .gardoon-hero--globe .tech-hero {
        width: min(360px, 92vw);
        order: -1;
        margin-bottom: 8px;
    }
}

/* Per-card tooltip — hover only, no animation */
.gardoon-hero--globe .tech-hero .card-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 140px;
    max-width: 170px;
    padding: 7px 11px;
    background: rgba(6, 18, 34, 0.94);
    border: 1px solid rgba(0, 255, 255, 0.45);
    border-radius: 11px;
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.25);
    color: #fff;
    font-size: 11px;
    line-height: 1.8;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 30;
}

.gardoon-hero--globe .tech-hero .tech-card:hover .card-tip {
    opacity: 1;
    visibility: visible;
}

/* Top card: tooltip below the card so it doesn't slide under the header */
.gardoon-hero--globe .tech-hero .cloud .card-tip {
    bottom: auto;
    top: calc(100% + 10px);
}
