/**
 * Job Automobile Dealer — animated navbar brand
 * Logo showcase cycle: 60s | India map orbit: 10s appear/disappear
 */

.jad-brand {
    position: relative;
    overflow: visible !important;
}

.jad-brand-stage {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 2px 4px;
    isolation: isolate;
}

.jad-brand-core {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jad-brand-logo {
    max-height: 40px !important;
    width: auto;
    border-radius: 8px;
    transition: max-height 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.main-navbar.scrolled .jad-brand-logo {
    max-height: 34px !important;
}

.jad-brand-text {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
    gap: 0;
}

.jad-word {
    display: block;
    font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), text-shadow 0.4s ease;
}

.jad-word--job {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fcd34d, var(--premium-gold, #ffd700), #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.95;
}

.jad-word--auto {
    font-size: 1.05rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent-white, #e6e1dc) 40%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.jad-word--dealer {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--premium-gold, #ffd700);
    opacity: 0.9;
}

.main-navbar.scrolled .jad-word--auto { font-size: 0.92rem; }
.main-navbar.scrolled .jad-word--job { font-size: 0.55rem; }
.main-navbar.scrolled .jad-word--dealer { font-size: 0.65rem; }

/* Ambient glow behind brand */
.jad-brand-glow {
    position: absolute;
    inset: -8px -12px;
    z-index: 0;
    border-radius: 14px;
    background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(255, 215, 0, 0.12), transparent 70%);
    opacity: 0;
    pointer-events: none;
    animation: jadGlowPulse 60s ease-in-out infinite;
}

@keyframes jadGlowPulse {
    0%, 88%, 100% { opacity: 0; transform: scale(0.95); }
    4% { opacity: 0.7; transform: scale(1); }
    8% { opacity: 0.35; transform: scale(1.02); }
    12% { opacity: 0; transform: scale(0.98); }
}

/* Shimmer sweep across brand text */
.jad-brand-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 55%;
    height: 100%;
    z-index: 4;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.08) 45%,
        rgba(255, 215, 0, 0.35) 50%,
        rgba(255, 255, 255, 0.08) 55%,
        transparent 65%
    );
    pointer-events: none;
    animation: jadShimmerSweep 60s ease-in-out infinite;
}

@keyframes jadShimmerSweep {
    0%, 90%, 100% { left: -100%; opacity: 0; }
    2% { opacity: 1; }
    8% { left: 140%; opacity: 1; }
    10% { opacity: 0; }
}

/* 60s showcase — logo lift + word dance */
.jad-brand-stage.jad-showcase .jad-brand-logo {
    transform: scale(1.08) rotate(-2deg);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.45));
}

.jad-brand-stage.jad-showcase .jad-word--job {
    transform: translateX(4px);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.jad-brand-stage.jad-showcase .jad-word--auto {
    transform: scale(1.04);
    background: linear-gradient(135deg, #fff 0%, var(--premium-gold, #ffd700) 50%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.jad-brand-stage.jad-showcase .jad-word--dealer {
    transform: translateX(-3px);
    color: #fff;
    text-shadow: 0 0 16px rgba(255, 215, 0, 0.6);
}

/* India map orbit ring */
.jad-india-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 118px;
    height: 118px;
    margin: -59px 0 0 -59px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.6);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0.7s,
                transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jad-india-orbit.jad-india-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.jad-india-orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed rgba(255, 215, 0, 0.22);
    animation: jadOrbitSpin 12s linear infinite;
}

.jad-india-orbit-ring::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(34, 197, 94, 0.15);
    animation: jadOrbitSpin 18s linear infinite reverse;
}

@keyframes jadOrbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.jad-india-satellite {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    transform-origin: 14px 14px;
    animation: jadSatelliteOrbit 10s linear infinite;
    filter: drop-shadow(0 2px 8px rgba(255, 153, 51, 0.35));
}

.jad-india-satellite--1 { animation-duration: 9s; animation-delay: 0s; }
.jad-india-satellite--2 { animation-duration: 11s; animation-delay: -3.3s; width: 22px; height: 22px; margin: -11px 0 0 -11px; transform-origin: 11px 11px; opacity: 0.85; }
.jad-india-satellite--3 { animation-duration: 13s; animation-delay: -6.6s; width: 20px; height: 20px; margin: -10px 0 0 -10px; transform-origin: 10px 10px; opacity: 0.7; }

@keyframes jadSatelliteOrbit {
    from { transform: rotate(0deg) translateX(52px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(52px) rotate(-360deg); }
}

.jad-india-satellite--2 {
    animation-name: jadSatelliteOrbit2;
}
@keyframes jadSatelliteOrbit2 {
    from { transform: rotate(120deg) translateX(46px) rotate(-120deg); }
    to { transform: rotate(480deg) translateX(46px) rotate(-480deg); }
}

.jad-india-satellite--3 {
    animation-name: jadSatelliteOrbit3;
}
@keyframes jadSatelliteOrbit3 {
    from { transform: rotate(240deg) translateX(40px) rotate(-240deg); }
    to { transform: rotate(600deg) translateX(40px) rotate(-600deg); }
}

.jad-india-map {
    width: 100%;
    height: 100%;
    display: block;
    animation: jadIndiaFloat 3s ease-in-out infinite;
}

@keyframes jadIndiaFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.06); }
}

.jad-india-map .india-fill {
    fill: url(#jadIndiaGradient);
    stroke: rgba(255, 215, 0, 0.55);
    stroke-width: 0.8;
}

.jad-india-map .india-tricolor {
    animation: jadTricolorShine 2.5s ease-in-out infinite;
}

@keyframes jadTricolorShine {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

/* Mobile: floating India map near location pill */
.jad-india-mobile-pop {
    position: absolute;
    top: -6px;
    right: -4px;
    width: 22px;
    height: 22px;
    z-index: 5;
    opacity: 0;
    transform: scale(0.4) rotate(-15deg);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(255, 153, 51, 0.4));
}

.jad-india-mobile-pop svg {
    width: 100%;
    height: 100%;
    display: block;
    animation: jadIndiaFloat 2.5s ease-in-out infinite;
}

.jad-brand.jad-india-visible .jad-india-mobile-pop {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Hover micro-interaction */
.jad-brand:hover .jad-brand-logo {
    transform: scale(1.03);
}

.jad-brand:hover .jad-word--auto {
    background: linear-gradient(135deg, #fff 0%, var(--premium-gold, #ffd700) 60%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .jad-brand-glow,
    .jad-brand-shimmer,
    .jad-india-orbit-ring,
    .jad-india-satellite,
    .jad-india-map,
    .jad-india-map .india-tricolor {
        animation: none !important;
    }
    .jad-india-orbit.jad-india-visible {
        opacity: 0.6;
    }
}

/* Tablet / desktop only for full orbit */
@media (max-width: 991px) {
    .jad-india-orbit {
        width: 90px;
        height: 90px;
        margin: -45px 0 0 -45px;
    }
    .jad-india-satellite { width: 22px; height: 22px; margin: -11px 0 0 -11px; transform-origin: 11px 11px; }
    @keyframes jadSatelliteOrbit {
        from { transform: rotate(0deg) translateX(38px) rotate(0deg); }
        to { transform: rotate(360deg) translateX(38px) rotate(-360deg); }
    }
}

@media (max-width: 767px) {
    .jad-brand-stage {
        display: none !important;
    }
    .jad-india-orbit {
        display: none;
    }
}