/* ============================================
   StabilityPower – Premium Design System (CSS)
   ============================================ */

/* ---- 1. Base & Custom Scrollbar ---- */
::selection { background: rgba(240,185,11,.3); color: #fff; }

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #131722; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #2B3139; border-radius: 999px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #3B4149; }

body { scrollbar-width: thin; scrollbar-color: #2B3139 #0B0E11; }

/* ---- 2. Animated Orb Blobs ---- */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}
.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(240,185,11,.15) 0%, transparent 70%);
    top: -10%; left: -10%;
    animation: orb-drift-1 18s ease-in-out infinite;
}
.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(41,98,255,.15) 0%, transparent 70%);
    bottom: -5%; right: -8%;
    animation: orb-drift-2 22s ease-in-out infinite;
}
.orb-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(0,229,255,.10) 0%, transparent 70%);
    top: 40%; left: 50%;
    animation: orb-drift-3 26s ease-in-out infinite;
}

@keyframes orb-drift-1 {
    0%,100% { transform: translate(0,0) scale(1); }
    33%     { transform: translate(40px,60px) scale(1.05); }
    66%     { transform: translate(-30px,30px) scale(.95); }
}
@keyframes orb-drift-2 {
    0%,100% { transform: translate(0,0) scale(1); }
    33%     { transform: translate(-50px,-40px) scale(1.08); }
    66%     { transform: translate(20px,-20px) scale(.93); }
}
@keyframes orb-drift-3 {
    0%,100% { transform: translate(0,0) scale(1); }
    50%     { transform: translate(60px,-50px) scale(1.1); }
}

/* ---- 3. Floating Stat Animations ---- */
@keyframes float-slow {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-12px); }
}
@keyframes float-medium {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-18px); }
}
@keyframes float-fast {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-10px); }
}
.animate-float-slow   { animation: float-slow   6s ease-in-out infinite; }
.animate-float-medium { animation: float-medium  5s ease-in-out infinite; }
.animate-float-fast   { animation: float-fast    4s ease-in-out infinite; }

/* ---- 4. Gradient Text ---- */
.hero-gradient-text {
    background: linear-gradient(135deg, #F0B90B 0%, #2962FF 50%, #00E5FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- 5. Scroll-Reveal ---- */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- 6. Glass Card ---- */
.glass-card {
    background: rgba(19,23,34,.60);
    border: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color .3s, box-shadow .3s, transform .3s;
}
.glass-card:hover {
    border-color: rgba(255,255,255,.12);
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

/* ---- 7. Navigation ---- */
.nav-link {
    position: relative;
    display: inline-block;
    padding: .5rem 1rem;
    font-size: .875rem;
    font-weight: 500;
    color: #9CA3AF;
    border-radius: .5rem;
    transition: color .25s, background .25s;
}
.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.05);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 50%; transform: translateX(-50%);
    width: 18px; height: 2px;
    border-radius: 999px;
    background: #F0B90B;
}

.mobile-nav-link {
    display: block;
    padding: .75rem 1rem;
    font-size: .9375rem;
    font-weight: 500;
    color: #D1D5DB;
    border-radius: .5rem;
    transition: color .25s, background .25s;
}
.mobile-nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }

/* ---- 8. Buttons ---- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .875rem 2rem;
    font-size: .9375rem; font-weight: 700;
    color: #0B0E11;
    background: linear-gradient(135deg, #F0B90B, #D4A20A);
    border-radius: .75rem;
    transition: box-shadow .3s, transform .2s;
}
.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(240,185,11,.35);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .875rem 2rem;
    font-size: .9375rem; font-weight: 600;
    color: #D1D5DB;
    border: 1px solid #374151;
    border-radius: .75rem;
    transition: border-color .3s, color .3s, background .3s;
}
.btn-secondary:hover {
    border-color: #6B7280;
    color: #fff;
    background: rgba(255,255,255,.04);
}

/* ---- 9. Service Cards ---- */
.service-card {
    background: rgba(19,23,34,.50);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform .35s, border-color .35s, box-shadow .35s;
}
.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,.12);
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.service-card-icon {
    width: 56px; height: 56px;
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: background .35s, color .35s;
}

/* ---- 10. Service Detail Cards (services.html) ---- */
.service-detail-card {
    background: rgba(19,23,34,.50);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform .35s, border-color .35s, box-shadow .35s;
}
.service-detail-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,.12);
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
}

/* ---- 11. Feature Cards ---- */
.feature-card {
    background: rgba(19,23,34,.40);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform .35s, border-color .35s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.10); }

/* ---- 12. Stat Cards ---- */
.stat-card {
    padding: 1.5rem;
    border-radius: 1rem;
}

/* ---- 13. Team Cards ---- */
.team-card { text-align: center; }
.team-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 1/1;
}
.team-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.team-img-wrap:hover .team-img { transform: scale(1.08); }
.team-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 1.5rem;
    background: rgba(11,14,17,.85);
    opacity: 0;
    transition: opacity .4s;
}
.team-img-wrap:hover .team-overlay { opacity: 1; }
.team-social {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.2);
    color: #D1D5DB;
    font-size: .875rem;
    transition: border-color .25s, color .25s, background .25s;
}
.team-social:hover {
    border-color: #F0B90B; color: #F0B90B; background: rgba(240,185,11,.1);
}

/* ---- 14. Pricing Cards ---- */
.pricing-card {
    position: relative;
    background: rgba(19,23,34,.60);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform .35s, box-shadow .35s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.pricing-card.featured {
    border-color: rgba(240,185,11,.35);
    box-shadow: 0 0 60px rgba(240,185,11,.08);
}
.pricing-card.featured:hover { box-shadow: 0 0 80px rgba(240,185,11,.12); }

.pricing-feature {
    display: flex; align-items: center; gap: .625rem;
    font-size: .875rem; color: #D1D5DB;
}
.pricing-feature i { width: 16px; text-align: center; }
.pricing-feature i.fa-check { color: #22C55E; }
.pricing-feature.disabled { color: #4B5563; }
.pricing-feature.disabled i { color: #4B5563; }

/* ---- 15. Blog Cards ---- */
.blog-card {
    background: rgba(19,23,34,.50);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform .35s, box-shadow .35s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.3); }

/* ---- 16. Footer Links ---- */
.footer-link {
    display: inline-block;
    font-size: .875rem; color: #9CA3AF;
    transition: color .25s;
    background: none; border: none; cursor: pointer; padding: 0;
}
.footer-link:hover { color: #F0B90B; }

.social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.1);
    color: #9CA3AF;
    font-size: .8125rem;
    transition: all .25s;
}
.social-icon:hover {
    border-color: #F0B90B; color: #F0B90B; background: rgba(240,185,11,.1);
}

/* ---- 17. Modals ---- */
.modal-overlay {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.70);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    opacity: 1; transition: opacity .3s;
}
.modal-overlay.hidden { display: none; }

.modal-content {
    position: relative;
    width: 90%; max-width: 440px;
    background: #131722;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1.25rem;
    padding: 2.5rem;
    animation: modal-in .35s ease-out;
}
@keyframes modal-in {
    from { opacity:0; transform: translateY(24px) scale(.96); }
    to   { opacity:1; transform: translateY(0) scale(1); }
}

.close-modal {
    position: absolute; top: 1rem; right: 1.25rem;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #6B7280;
    border-radius: .5rem;
    transition: color .2s, background .2s;
    cursor: pointer; background: none; border: none;
}
.close-modal:hover { color: #fff; background: rgba(255,255,255,.06); }

/* ---- 18. Form Elements ---- */
.form-label {
    display: block;
    font-size: .8125rem; font-weight: 600;
    color: #D1D5DB;
    margin-bottom: .375rem;
}
.form-input {
    display: block; width: 100%;
    padding: .75rem 1rem;
    font-size: .875rem; color: #F3F4F6;
    background: rgba(11,14,17,.6);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: .75rem;
    outline: none;
    transition: border-color .25s, box-shadow .25s;
}
.form-input::placeholder { color: #4B5563; }
.form-input:focus {
    border-color: #F0B90B;
    box-shadow: 0 0 0 3px rgba(240,185,11,.12);
}
.form-input.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

.form-error {
    font-size: .75rem; color: #F87171;
    margin-top: .25rem;
}

/* ---- 19. Testimonial Carousel ---- */
#testimonial-carousel { width: 100%; }

.testimonial-item {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: .5rem;
}
@media (min-width: 768px)  { .testimonial-item { flex: 0 0 50%; } }
@media (min-width: 1024px) { .testimonial-item { flex: 0 0 33.333%; } }

.testimonial-dot {
    cursor: pointer;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #4B5563;
    transition: background .3s, transform .3s;
}
.testimonial-dot.active,
.testimonial-dot:hover {
    background: #F0B90B;
    transform: scale(1.3);
}

/* ---- 20. FAQ Accordion ---- */
.faq-item {
    background: rgba(19,23,34,.50);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: .75rem;
    overflow: hidden;
    transition: border-color .3s;
}
.faq-item:hover { border-color: rgba(255,255,255,.10); }
.faq-item.active { border-color: rgba(240,185,11,.2); }

.faq-question {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
}
.faq-question i { transition: transform .35s; color: #F0B90B; }
.faq-item.active .faq-question i { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .5s cubic-bezier(.16,1,.3,1), padding .4s;
    padding: 0 1.5rem;
}
.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 1.5rem 1.25rem;
}

/* ---- 21. Header Scroll State ---- */
#main-header.scrolled {
    background: rgba(11,14,17,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.05);
    box-shadow: 0 4px 30px rgba(0,0,0,.3);
}

/* ---- 22. Back-to-Top visible ---- */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- 23. Hero Video Background ---- */
#hero video {
    filter: brightness(0.5) saturate(0.8);
    transition: filter 2s ease;
}
#hero:hover video {
    filter: brightness(0.55) saturate(0.9);
}

/* ---- 24. Enhanced Section Dividers ---- */
.section-divider {
    width: 60px; height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #F0B90B, #2962FF);
    margin: 0 auto;
}

/* ---- 25. Glow Effects ---- */
.glow-gold { box-shadow: 0 0 40px rgba(240,185,11,0.12), 0 0 80px rgba(240,185,11,0.06); }
.glow-blue { box-shadow: 0 0 40px rgba(41,98,255,0.12), 0 0 80px rgba(41,98,255,0.06); }

/* ---- 26. Animated Border Gradient ---- */
.border-gradient {
    position: relative;
    border: none !important;
}
.border-gradient::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(240,185,11,0.3), rgba(41,98,255,0.3), rgba(0,229,255,0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ---- 27. Improved Card Hover States ---- */
.service-card:hover .service-card-icon {
    transform: scale(1.1) rotate(-3deg);
    transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}

.glass-card {
    background: rgba(19,23,34,.65);
    border: 1px solid rgba(255,255,255,.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.glass-card:hover {
    border-color: rgba(255,255,255,.14);
    box-shadow: 0 8px 40px rgba(0,0,0,.3), 0 0 60px rgba(240,185,11,0.03);
}

/* ---- 28. Smooth Page Transitions ---- */
main {
    animation: page-fade-in .8s ease-out;
}
@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- 29. Enhanced Stat Counter Styles ---- */
.stat-card {
    padding: 2rem;
    border-radius: 1.25rem;
    background: rgba(19,23,34,0.3);
    border: 1px solid rgba(255,255,255,0.04);
    transition: transform .35s, background .35s, border-color .35s;
}
.stat-card:hover {
    transform: translateY(-4px);
    background: rgba(19,23,34,0.5);
    border-color: rgba(255,255,255,0.08);
}

/* ---- 30. Improved Feature Cards ---- */
.feature-card {
    background: rgba(19,23,34,.45);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    transition: transform .4s, border-color .4s, box-shadow .4s;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,.12);
    box-shadow: 0 16px 48px rgba(0,0,0,.25);
}

/* ---- 31. CTA Section Pulse ---- */
@keyframes pulse-ring {
    0%   { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}
.cta-pulse {
    position: relative;
}
.cta-pulse::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid rgba(240,185,11,0.4);
    animation: pulse-ring 2.5s ease-out infinite;
}

/* ---- 32. Text Shadow for video overlay readability ---- */
.text-hero-shadow {
    text-shadow: 0 2px 20px rgba(0,0,0,0.5), 0 4px 40px rgba(0,0,0,0.3);
}

/* ---- 33. Service Detail Card Improvements ---- */
.service-detail-card:hover {
    transform: translateY(-6px);
    border-color: rgba(240,185,11,.15);
    box-shadow: 0 16px 48px rgba(0,0,0,.35), 0 0 40px rgba(240,185,11,0.04);
}

/* ---- 34. Scroll-Reveal Stagger ---- */
.reveal-up:nth-child(2) { transition-delay: .08s; }
.reveal-up:nth-child(3) { transition-delay: .16s; }
.reveal-up:nth-child(4) { transition-delay: .24s; }

/* ---- 35. Mobile Responsive Refinements ---- */
@media (max-width: 768px) {
    #hero video {
        filter: brightness(0.4) saturate(0.7);
    }
    .orb { display: none; }
    .floating-stat { display: none; }
}