/* Modern Color Palette & Variables */
:root {
    /* Primary Brand Colors */
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    /* Indigo 600 */
    --accent: #d946ef;
    /* Fuchsia 500 */

    /* Backgrounds */
    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-strong: rgba(255, 255, 255, 0.9);

    /* Text */
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #f8fafc;

    /* Borders & Shadows */
    --border-glass: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --neon-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    /* Spacing */
    --container-padding: 2rem;
    --radius-lg: 24px;
    --radius-md: 16px;

    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    /* Prevent horizontal scroll from mesh blobs */
    overflow-x: hidden;
}

/* 
   Override the default .contain wrapper from boilerplate.ejs 
   to allow full-width hero and sections on the Home Page.
*/
.contain {
    display: block !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    grid-template-columns: none !important;
}

/* =========================================
   Glassmorphism Utilities
   ========================================= */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-md);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
    position: relative;
    padding: 6rem 2rem 8rem;
    /* Large bottom padding for curve/overlap */
    background: #0f172a;
    /* Fallback */
    overflow: hidden;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

/* Mesh Gradient Background */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.4), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(217, 70, 239, 0.3), transparent 40%);
    animation: pulseGradient 10s infinite alternate;
}

@keyframes pulseGradient {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
    /* Full width as requested */
    margin: 0 auto;
    padding: 0 1rem;
    /* Extra padding for safety */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Search Bar in Hero */
.hero-search-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    max-width: 500px;
    margin: 0 auto 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: white;
    font-size: 1rem;
    outline: none;
}

.hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.hero-search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-search-btn:hover {
    background: var(--primary-hover);
}

/* Quick Pills (Icon Categories) */
.category-pills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.cat-pill {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* =========================================
   Value Props (Floating Cards)
   ========================================= */
.value-props {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: -4rem;
    /* Overlap hero */
    padding: 0 2rem;
    position: relative;
    /* z-index stacking */
    z-index: 10;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.prop-card {
    flex: 1;
    min-width: 280px;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.prop-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: inline-block;
    padding: 1rem;
    background: #e0e7ff;
    border-radius: 50%;
}

.prop-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.prop-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   Category Scroll Bar (Horizontal)
   ========================================= */
.category-scroll-container {
    width: 100%;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.category-scroll {
    display: flex;
    gap: 1.5rem;
    padding: 0 2rem;
    width: max-content;
    margin: 0 auto;
}

.scroll-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    min-width: 70px;
    transition: all 0.2s;
}

.scroll-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-item span {
    font-size: 0.85rem;
    font-weight: 500;
}

.scroll-item:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.scroll-item:hover .scroll-icon {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
    transform: scale(1.1);
    border-color: var(--primary);
}

/* =========================================
   Main Grid (Marketplace)
   ========================================= */
.section-title-bar {
    text-align: center;
    margin: 4rem 0 2rem;
}

.section-title-bar h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

.section-title-bar h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns */
    gap: 2rem;
    padding: 0 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablet */
    }
}

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
}

.service-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    background: white;
    /* Glass-like but solid for readability */
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e2e8f0;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-img-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.5rem;
}

.card-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex-grow: 1;
    /* Push any footer down */
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-section {
        padding-bottom: 4rem;
        /* Reduce padding on mobile */
    }

    .value-props {
        margin-top: 2rem;
        /* No overlap on mobile */
    }

    .service-grid {
        grid-template-columns: 1fr;
        /* Full width cards */
    }
}