/* ============================================
   Magic UI - Subtle UX + Hero Effects
   No theme color / layout / border-radius changes
   ============================================ */

/* ===========================================
   HERO EFFECTS
   =========================================== */

/* --- Particles Canvas --- */
.magic-particles-wrapper {
    position: relative;
    overflow: hidden;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.magic-particles-wrapper .container {
    position: relative;
    z-index: 1;
}

/* --- Animated Gradient Text --- */
.magic-gradient-text {
    background: linear-gradient(
        270deg,
        #0b3d91,
        #2563eb,
        #7c3aed,
        #ec4899,
        #2563eb,
        #0b3d91
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: magicGradientShift 6s ease infinite;
}

@keyframes magicGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Shimmer Effect --- */
.magic-shimmer {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.magic-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: magicShimmer 3s ease-in-out infinite;
}

@keyframes magicShimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

/* --- Glow Pulse on Feature Icons --- */
.magic-glow-icon {
    position: relative;
    transition: all 0.3s ease;
}

.magic-glow-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(11, 61, 145, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: magicGlowPulse 2s ease-in-out infinite;
}

.magic-glow-icon:hover::before {
    opacity: 1;
}

@keyframes magicGlowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.4; }
    50%      { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

/* --- Floating Animation --- */
.magic-float {
    animation: magicFloat 4s ease-in-out infinite;
}

.magic-float:nth-child(2) { animation-delay: 0.5s; }
.magic-float:nth-child(3) { animation-delay: 1s; }
.magic-float:nth-child(4) { animation-delay: 1.5s; }

@keyframes magicFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* --- Hero Overlay Gradient --- */
.magic-hero-overlay {
    position: relative;
}

.magic-hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at 20% 50%,
        rgba(11, 61, 145, 0.08) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 80% 50%,
        rgba(124, 58, 237, 0.05) 0%,
        transparent 50%
    );
    z-index: 0;
    pointer-events: none;
}

.magic-hero-overlay .container {
    position: relative;
    z-index: 1;
}

/* ===========================================
   SUBTLE UX IMPROVEMENTS
   =========================================== */

/* --- Smooth Scroll --- */
html {
    scroll-behavior: smooth;
}

/* --- Selection Color --- */
::selection {
    background: #CD5C5C;
    color: white;
}

/* --- Focus States --- */
:focus-visible {
    outline: 2px solid #0b3d91;
    outline-offset: 2px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #CD5C5C;
}
::-webkit-scrollbar-thumb:hover {
    background: #0b3d91;
}

/* --- Images subtle load transition --- */
img {
    transition: opacity 0.3s ease;
}

/* --- Links smooth transition --- */
a {
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* --- Navbar smooth sticky --- */
.sticky-top {
    transition: top 0.4s ease;
}

/* --- Buttons subtle hover --- */
.btn {
    transition: all 0.3s ease;
}

/* --- Feature icons subtle scale on hover --- */
.col-md-6.col-lg-4 i.fa-5x {
    transition: transform 0.3s ease;
}
.col-md-6.col-lg-4:hover i.fa-5x {
    transform: scale(1.05);
}

/* --- Project image subtle zoom --- */
.project-item img {
    transition: transform 0.4s ease;
}
.project-item:hover img {
    transform: scale(1.03);
}

/* --- Service item hover --- */
.service-item {
    transition: background 0.3s ease, transform 0.3s ease;
}
.service-item:hover {
    transform: translateY(-3px);
}

/* --- Testimonial carousel smooth --- */
.testimonial-item {
    transition: opacity 0.3s ease;
}

/* --- Footer links subtle hover --- */
.footer .btn.btn-link {
    transition: color 0.3s ease, letter-spacing 0.3s ease, padding-left 0.3s ease;
}

/* --- Back to top smooth --- */
.back-to-top {
    transition: opacity 0.3s ease, bottom 0.3s ease;
}

/* ===========================================
   NAVBAR MOBILE MENU
   =========================================== */

/* --- Mobile dropdown background --- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 15px;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }
    .navbar .dropdown-menu {
        background: white;
        border: none;
        box-shadow: none;
        padding-left: 15px;
    }
}

/* ===========================================
   FOOTER ANIMATIONS
   =========================================== */

/* --- Footer Brand Hover --- */
.footer h1 {
    transition: letter-spacing 0.3s ease, opacity 0.3s ease;
}
.footer h1:hover {
    letter-spacing: 2px;
}

/* --- Social Icons --- */
.footer .d-flex .btn-square {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.footer .d-flex .btn-square:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* --- Contact Lines Hover --- */
.footer .col-md-6.col-lg-3 p {
    transition: padding-left 0.3s ease;
}
.footer .col-md-6.col-lg-3 p:hover {
    padding-left: 5px;
}

/* --- Footer Links Slide --- */
.footer .btn.btn-link {
    position: relative;
    padding-left: 15px;
}
.footer .btn.btn-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s ease;
}
.footer .btn.btn-link:hover::before {
    width: 10px;
}
.footer .btn.btn-link:hover {
    padding-left: 20px;
}

/* --- Footer Column Stagger --- */
.footer .col-md-6.col-lg-3 {
    opacity: 0;
    transform: translateY(20px);
    animation: magicFooterFadeIn 0.6s ease forwards;
}
.footer .col-md-6.col-lg-3:nth-child(1) { animation-delay: 0.1s; }
.footer .col-md-6.col-lg-3:nth-child(2) { animation-delay: 0.2s; }
.footer .col-md-6.col-lg-3:nth-child(3) { animation-delay: 0.3s; }
.footer .col-md-6.col-lg-3:nth-child(4) { animation-delay: 0.4s; }

@keyframes magicFooterFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Copyright Fade --- */
.footer .copyright {
    opacity: 0;
    animation: magicCopyrightFade 0.6s ease 0.5s forwards;
}

@keyframes magicCopyrightFade {
    to {
        opacity: 1;
    }
}
