/* Enable 3D Canvas Background Visibility Across Homepage */
html, body, body.index-page, main, #main, .main, section, .section, .hero, .hero-bg, .light-background, .dark-background {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* Crisp high-performance card styling without GPU fillrate stalls */
.service-item, .info-item, .features .feature-box, .pricing .pricing-item, .contact .info-item {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05) !important;
}
body {
    margin: 0;
    font-family: Arial, sans-serif;
}
/* Redirect message styles */
#redirect-message {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    margin-top: 100px;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.service-item {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    background: #f8f9fa;
    transition: transform 0.3s;
}
.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.service-item img {
    margin-bottom: 20px;
}
.info-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    height: 100%;
}
.info-item i {
    font-size: 32px;
    color: #007bff;
    margin-bottom: 15px;
}

/* Fixed Square Hero Image Styling - No cropping */
#dynamicImage {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Vertical Image Marquee styling */
.marquee-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 8px;
    box-sizing: border-box;
    z-index: 5;
}

.marquee-wrapper::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0d9488 50%, #f59e0b 100%);
    filter: blur(20px);
    opacity: 0.12;
    z-index: 1;
    border-radius: 20px;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.marquee-wrapper:hover::before {
    opacity: 0.22;
    filter: blur(25px);
}

.hero-image-marquee {
    perspective: 1000px;
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    z-index: 2;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.1), 0 5px 15px rgba(0,0,0,0.05);
    background: #ffffff;
    border: 4px solid #ffffff;
    outline: 1px solid rgba(30, 58, 138, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.marquee-wrapper:hover .hero-image-marquee {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(30, 58, 138, 0.15), 0 8px 20px rgba(0,0,0,0.08);
}

/* Hover Hint styling */
.marquee-hint {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    color: #1e293b;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.hero-image-marquee:hover .marquee-hint {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 3D Flip Card Container styles */
.flip-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card-inner.flipped {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 12px;
}

.flip-card-back {
    transform: rotateY(180deg);
}

.flip-card-front img, .flip-card-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.hero-image-marquee:hover .flip-card-front img, 
.hero-image-marquee:hover .flip-card-back img {
    transform: scale(1.02);
    filter: brightness(1.02);
}

/* Top Marquee Bar styles */
.top-marquee-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background: linear-gradient(90deg, #1e3a8a 0%, #0d9488 100%);
    color: #ffffff;
    z-index: 996;
    display: flex;
    align-items: center;
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

body.has-marquee .header {
    top: 36px !important;
    transition: top 0.3s ease, background-color 0.5s !important;
}

body.has-marquee.scrolled .top-marquee-bar {
    transform: translateY(-100%);
}

body.has-marquee.scrolled .header {
    top: 0 !important;
}

.marquee-track {
    display: flex;
    overflow: hidden;
    width: 100%;
    position: relative;
}

.marquee-title {
    background: #1e3a8a;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    z-index: 10;
    box-shadow: 5px 0 15px rgba(0,0,0,0.15);
    white-space: nowrap;
    position: relative;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.marquee-title::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 10px solid #1e3a8a;
}

.marquee-items {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: marquee-scroll 25s linear infinite;
}

.marquee-track:hover .marquee-items {
    animation-play-state: paused;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    padding-left: 45px;
    color: #ffffff;
    font-weight: 500;
}

.marquee-item .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
}

@keyframes marquee-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Adjust hero top padding to account for marquee banner on desktop */
@media (min-width: 992px) {
    body.has-marquee .hero {
        padding-top: 110px !important;
    }
    .top-marquee-bar {
        font-size: 0.85rem;
        height: 40px;
    }
    .marquee-title {
        font-size: 0.8rem;
    }
    .marquee-title::after {
        border-top: 20px solid transparent;
        border-bottom: 20px solid transparent;
    }
    body.has-marquee .header {
        top: 40px !important;
    }
    body.has-marquee.scrolled .header {
        top: 0 !important;
    }
}
