/* ==================== Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body {
    font-family: 'Prompt', sans-serif;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ==================== Navbar ==================== */
#navbar {
    background: transparent;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled .nav-logo-text {
    color: white;
}

/* ==================== Scroll Animations ==================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ==================== Float Animation ==================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ==================== Counter Animation ==================== */
.counter {
    display: inline-block;
}

/* ==================== FAQ Styles ==================== */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #2563eb;
}

.faq-item.active {
    border-color: #2563eb;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.show {
    max-height: 200px;
}

/* ==================== Back to Top Button ==================== */
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ==================== Form Focus Glow ==================== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==================== Selection Color ==================== */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: #1e3a8a;
}

/* ==================== Smooth Section Transitions ==================== */
section {
    position: relative;
}

/* ==================== Custom Scrollbar ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ==================== Responsive Adjustments ==================== */
@media (max-width: 640px) {
    .animate-on-scroll {
        transform: translateY(20px);
    }

    /* Hide scrollbars on horizontal scroll containers */
    .pricing-grid,
    .testimonials-grid {
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .pricing-grid::-webkit-scrollbar,
    .testimonials-grid::-webkit-scrollbar {
        display: none;
    }

    /* FAQ compact */
    .faq-content.show {
        max-height: 400px;
    }

    /* Back to top button */
    #back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 2.75rem;
        height: 2.75rem;
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 380px) {
    #hero h1 {
        font-size: 1.4rem !important;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .testimonials-grid > div {
        flex: 0 0 88% !important;
    }

    section h2 {
        font-size: 1.2rem !important;
    }
}

/* ==================== Mobile Menu Enhancements ==================== */
#mobile-menu a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;
}

#mobile-menu a:last-child {
    border-bottom: none;
}

#mobile-menu .mobile-cta-btn {
    border-bottom: none;
}

/* ==================== Loading Animation ==================== */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* ==================== Gradient Text ==================== */
.gradient-text {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Card Hover Effects ==================== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ==================== Showcase Grid Carousel (all screens) ==================== */
.showcase-wrapper {
    position: relative;
}

.showcase-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.showcase-grid::-webkit-scrollbar {
    display: none;
}

/* Desktop: 3 cards visible */
.showcase-grid > div {
    flex: 0 0 calc(33.333% - 1rem);
    scroll-snap-align: start;
}

/* Showcase section navigation arrows */
.showcase-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.showcase-nav:hover {
    background: #f8fafc;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #2563eb;
}

.showcase-nav-prev {
    left: -22px;
}

.showcase-nav-next {
    right: -22px;
}

/* Tablet: 2 cards visible */
@media (max-width: 1024px) {
    .showcase-grid > div {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

/* Mobile: 1 card visible */
@media (max-width: 640px) {
    .showcase-grid > div {
        flex: 0 0 85%;
    }

    .showcase-nav {
        width: 36px;
        height: 36px;
    }

    .showcase-nav-prev {
        left: -8px;
    }

    .showcase-nav-next {
        right: -8px;
    }
}

/* ==================== Showcase Image Carousel ==================== */
.sc-carousel {
    position: relative;
}

.sc-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    height: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.sc-track::-webkit-scrollbar {
    display: none;
}

.sc-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

/* Arrows */
.sc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    color: #334155;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sc-carousel:hover .sc-arrow {
    opacity: 1;
}

.sc-arrow:hover {
    background: rgba(255, 255, 255, 1);
}

.sc-prev {
    left: 8px;
}

.sc-next {
    right: 8px;
}

/* Dot indicators */
.sc-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 6px;
}

.sc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: none;
}

.sc-dot.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.25);
}

/* ==================== Admin: Showcase Image Preview ==================== */
.sc-images-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    min-height: 32px;
    align-items: center;
}

.sc-img-thumb {
    position: relative;
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.sc-img-thumb:hover {
    border-color: #3b82f6;
}

.sc-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sc-img-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.sc-img-thumb:hover .sc-img-remove {
    opacity: 1;
}

/* Mobile: always show arrows on touch devices */
@media (hover: none) {
    .sc-arrow {
        opacity: 0.8;
    }
    .sc-img-remove {
        opacity: 1;
    }
}
