/* ==========================================================================
   EdgeWrapper Theme - Services & Sub-Services Custom CSS
   ========================================================================== */

/* --------------------------------------------------------------------------
   Global & Shared Tokens
   -------------------------------------------------------------------------- */
:root {
    --accent-glow: rgba(55, 192, 40, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(229, 231, 235, 0.6);
    --transition-premium: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Main Services Listing Page (page-services.php)
   -------------------------------------------------------------------------- */



/* Stats Box Refinements */
.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-premium);
}

.stat-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(55, 192, 40, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: #37C028;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 4px;
    display: block;
}

/* Detailed Services Cards Grid */
.services-detailed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.service-card-detailed {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-premium);
    display: flex;
    flex-direction: column;
}

.service-card-detailed:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(55, 192, 40, 0.25);
}

.service-thumbnail {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #f3f4f6;
}

.service-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-premium);
}

.service-card-detailed:hover .service-thumbnail img {
    transform: scale(1.06);
}

.service-card-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.service-card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    flex: 1;
}

.learn-more-green {
    color: #37C028;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s ease;
}

.learn-more-green:hover {
    color: #2da822;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   Individual Service Details Page Layouts
   -------------------------------------------------------------------------- */
.service-detail-hero {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: var(--spacing-2xl) 0;
    border-bottom: 1px solid var(--border-color);
}

.service-detail-hero .container {
    margin-top: 2rem;
}

.service-detail-hero .hero-content {
    max-width: 800px;
}

.service-detail-hero .section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-top: var(--spacing-sm);
}

.service-detail-hero .section-desc {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-top: var(--spacing-md);
}

/* Sub-Services Container Wrapper */
.sub-services-wrapper {
    background: #ffffff;
    padding: var(--spacing-2xl) 0;
}

.sub-service-section {
    padding: var(--spacing-2xl) 0;
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

.sub-service-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Alternating Split Row Structure */
.sub-service-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-2xl);
    flex-wrap: wrap;
}

/* Odd/Even Alternating Layout */
.sub-service-section:nth-child(even) .sub-service-row {
    flex-direction: row-reverse;
}

.sub-service-info {
    flex: 1 1 450px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sub-service-slider-wrapper {
    flex: 1 1 500px;
    min-width: 0;
    /* Prevents slider track flex blowout */
    background: #f8fafc;
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(229, 231, 235, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Sub-service Information Styling */
.sub-service-badge {
    background: rgba(55, 192, 40, 0.1);
    color: #37C028;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-md);
    display: inline-block;
}

.sub-service-info h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
}

.sub-service-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: var(--spacing-lg);
}

/* Capabilities Checklist */
.capabilities-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-lg) 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm) var(--spacing-md);
    width: 100%;
}

.capability-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.capability-item svg {
    flex-shrink: 0;
    color: #37C028;
    margin-top: 2px;
}

/* Technology Stack Tags */
.tech-stack-wrapper {
    margin-top: var(--spacing-md);
    width: 100%;
}

.tech-stack-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-xs);
}

.tech-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag-pill {
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 0.825rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(229, 231, 235, 0.4);
    transition: all var(--transition-fast);
}

.tech-tag-pill:hover {
    background: #e2e8f0;
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Sub-Service Blogs Sliders
   -------------------------------------------------------------------------- */
.sub-service-slider-wrapper .service-blog-header {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 var(--spacing-md) 0;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    margin-bottom: var(--spacing-md);
}

.sub-service-slider-wrapper .service-blog-title {
    gap: var(--spacing-sm);
}

.sub-service-slider-wrapper .service-blog-title h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sub-service-slider-wrapper .service-blog-icon {
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: var(--radius-sm);
}

.sub-service-slider-wrapper .slider-controls {
    gap: 6px;
}

.sub-service-slider-wrapper .slider-prev,
.sub-service-slider-wrapper .slider-next {
    width: 36px;
    height: 36px;
    box-shadow: none;
}

.sub-service-slider-wrapper .slider-prev svg,
.sub-service-slider-wrapper .slider-next svg {
    width: 18px;
    height: 18px;
}

/* Blog slider items & card styling modifications inside sub-services */
.sub-service-slider-wrapper .blog-slider-item {
    flex: 0 0 100%;
    /* Show 1 card per slide on smaller viewports inside the split column, or let script scale it */
}

@media (min-width: 992px) {
    .sub-service-slider-wrapper .blog-slider-item {
        flex: 0 0 100%;
        /* Keep 1 blog card visible at a time inside the split columns on desktop */
    }
}

.sub-service-slider-wrapper .blog-card {
    border-color: rgba(229, 231, 235, 0.6);
}

.sub-service-slider-wrapper .blog-card-content {
    padding: var(--spacing-lg);
}

.sub-service-slider-wrapper .blog-card-excerpt {
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.fallback-badge {
    background: #e0f2fe;
    color: #0284c7;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   Responsive Layout Overrides
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .sub-service-row {
        gap: var(--spacing-xl);
    }

    .sub-service-slider-wrapper {
        flex: 1 1 100%;
        margin-top: var(--spacing-sm);
    }

    .sub-service-info {
        flex: 1 1 100%;
    }

    .sub-service-section:nth-child(even) .sub-service-row {
        flex-direction: column;
        /* Standard stack direction on mobile/tablet */
    }
}

@media (max-width: 576px) {
    .capabilities-list {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Unique Interactive Ticker/Marquee CTA Section
   -------------------------------------------------------------------------- */
.services-interactive-cta {
    background: #f8fafc;
    padding: 6rem 0;
    overflow: hidden;
    position: relative;
}

.services-cta-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3.5rem;
    align-items: center;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    padding: 3rem;
}

.services-cta-ticker-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
}

.services-cta-ticker-col::before,
.services-cta-ticker-col::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.services-cta-ticker-col::before {
    left: 0;
    background: linear-gradient(to right, #ffffff, transparent);
}

.services-cta-ticker-col::after {
    right: 0;
    background: linear-gradient(to left, #ffffff, transparent);
}

.ticker-wrap {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 1rem;
}

.ticker-track {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
    min-width: 100%;
    animation: scrollTicker 30s linear infinite;
}

.ticker-wrap.reverse .ticker-track {
    animation-direction: reverse;
}

@keyframes scrollTicker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.ticker-item {
    padding: 0.75rem 1.5rem;
    background: #f1f5f9;
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 12px;
    font-size: 0.925rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    transition: all 0.3s;
}

.ticker-item:hover {
    background: rgba(55, 192, 40, 0.08);
    border-color: rgba(55, 192, 40, 0.25);
    color: #37C028;
    transform: translateY(-2px);
}

.services-cta-content-col {
    display: flex;
    justify-content: center;
}

.glass-cta-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(55, 192, 40, 0.15);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 420px;
}

.glass-cta-card .pulse-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(55, 192, 40, 0.04);
    border-radius: 50%;
    top: -40px;
    right: -40px;
    z-index: 0;
}

.glass-cta-card .cta-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.glass-cta-card .cta-desc {
    font-size: 0.975rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.btn-green-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #37C028;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(55, 192, 40, 0.3);
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.btn-green-glow:hover {
    background: #2da320;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(55, 192, 40, 0.45);
}

.btn-green-glow svg {
    transition: transform 0.3s;
}

.btn-green-glow:hover svg {
    transform: translateX(4px);
}

@media (max-width: 991px) {
    .services-cta-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2.5rem;
    }
}

/* Clients Auto-Scrolling Ticker */
.clients-section {
    overflow: hidden;
    position: relative;
    padding: 5rem 0;
}

.clients-section .client-ticker-wrap {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 3rem;
    align-items: center;
    position: relative;
    width: 100%;
}

.clients-section .client-ticker-wrap::before,
.clients-section .client-ticker-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.clients-section .client-ticker-wrap::before {
    left: 0;
    background: linear-gradient(to right, #ffffff, transparent);
}

.clients-section .client-ticker-wrap::after {
    right: 0;
    background: linear-gradient(to left, #ffffff, transparent);
}

.clients-section .client-ticker-track {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4rem;
    min-width: 100%;
    animation: scrollTicker 30s linear infinite;
}

.clients-section .client-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.clients-section .client-logo img {
    max-height: 100%;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.clients-section .client-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
}