/* ============================================
   The Zeniva Stack - Services Section Redesign
   ============================================ */

/* Hero Carousel Wrapper */
.hero-carousel-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.hero-carousel-container {
    position: relative;
    overflow: hidden;
}

.hero-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-white);
    border: 2px solid var(--color-light);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-carousel-nav:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
}

.hero-carousel-prev {
    left: -28px;
}

.hero-carousel-next {
    right: -28px;
}

.hero-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-light);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot:hover {
    background: rgba(222, 110, 39, 0.5);
    transform: scale(1.3);
}

.hero-dot.active {
    background: var(--color-accent);
    width: 40px;
    border-radius: 6px;
}

/* Hero Service Card */
.hero-service-card {
    position: relative;
    background: linear-gradient(160deg, rgba(45, 48, 71, 0.95) 0%, rgba(22, 24, 40, 0.98) 100%);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid rgba(222, 110, 39, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

.hero-service-card.active {
    display: block;
}

.hero-service-card:hover {
    border-color: rgba(222, 110, 39, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(222, 110, 39, 0.1);
    transform: translateY(-5px);
}

.hero-glow {
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    background: conic-gradient(from 0deg, transparent 60%, rgba(222, 110, 39, 0.4) 70%, rgba(222, 110, 39, 0.7) 75%, rgba(222, 110, 39, 0.4) 80%, transparent 90%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    animation: hero-glow-spin 4s linear infinite paused;
}

.hero-service-card:hover .hero-glow {
    opacity: 1;
    animation-play-state: running;
}

@keyframes hero-glow-spin {
    to { transform: rotate(360deg); }
}

.service-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Hero Left Side */
.service-hero-left {
    color: #fff;
}

.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 8px rgba(222, 110, 39, 0.6);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.service-hero-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(222, 110, 39, 0.15) 0%, rgba(222, 110, 39, 0.05) 100%);
    border: 1px solid rgba(222, 110, 39, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.hero-service-card:hover .service-hero-icon {
    background: linear-gradient(135deg, rgba(222, 110, 39, 0.25) 0%, rgba(222, 110, 39, 0.1) 100%);
    border-color: rgba(222, 110, 39, 0.4);
    transform: scale(1.05) rotate(-3deg);
}

.service-hero-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-hero-tagline {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.service-hero-features {
    list-style: none;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-hero-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.service-hero-features li:hover {
    color: #fff;
    transform: translateX(5px);
}

.service-hero-features li svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.service-hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero Right Side */
.service-hero-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.metric-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.metric-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(222, 110, 39, 0.3);
    transform: translateY(-3px);
}

.metric-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-hero-preview {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-browser {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.browser-bar {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-dots {
    display: flex;
    gap: 0.5rem;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.browser-dots span:nth-child(1) { background: #ff5f56; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #27c93f; }

.browser-content {
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(222, 110, 39, 0.05) 0%, rgba(45, 48, 71, 0.3) 100%);
    overflow: hidden;
}

.preview-placeholder {
    color: rgba(222, 110, 39, 0.3);
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Phone Mockup */
.preview-phone {
    width: 180px;
    height: 320px;
    background: #1a1a1a;
    border-radius: 28px;
    padding: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
                0 0 0 2px rgba(255, 255, 255, 0.1),
                inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    margin: 0 auto;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 2;
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.phone-button {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 2;
}

/* Services Carousel */
.services-carousel {
    margin-top: 4rem;
}

.carousel-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 2rem;
}

.carousel-container {
    position: relative;
    padding: 0 3rem;
}

.carousel-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-white);
    border: 2px solid var(--color-light);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: none; /* Hidden on desktop since all 4 cards fit */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: var(--color-primary);
}

.carousel-nav:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

/* Service Cards */
.service-card {
    position: relative;
    background: var(--color-white);
    border: 2px solid var(--color-light);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.service-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-glow {
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(222, 110, 39, 0.2) 0%, rgba(222, 110, 39, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.service-card:hover .card-glow {
    opacity: 1;
}

.card-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-gray);
    margin-bottom: 1.5rem;
}

.badge-dot.badge-green {
    background: #28c840;
    box-shadow: 0 0 8px rgba(40, 200, 64, 0.6);
}

.badge-dot.badge-blue {
    background: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.badge-dot.badge-purple {
    background: #8b5cf6;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.card-icon {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(222, 110, 39, 0.1) 0%, rgba(222, 110, 39, 0.03) 100%);
    border: 1px solid rgba(222, 110, 39, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.service-card:hover .card-icon {
    background: linear-gradient(135deg, rgba(222, 110, 39, 0.2) 0%, rgba(222, 110, 39, 0.08) 100%);
    border-color: rgba(222, 110, 39, 0.3);
    transform: scale(1.1) rotate(-5deg);
}

.card-title {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.card-tagline {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    color: var(--color-gray);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.card-features {
    position: relative;
    z-index: 1;
    list-style: none;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-features li {
    font-size: 0.875rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
    position: relative;
}

.card-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

.card-stat {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(222, 110, 39, 0.05) 0%, rgba(222, 110, 39, 0.02) 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    transition: gap 0.3s ease;
}

.card-link:hover {
    gap: 0.75rem;
}

.card-link svg {
    transition: transform 0.3s ease;
}

.card-link:hover svg {
    transform: translateX(3px);
}

/* Carousel Dots */
.carousel-dots {
    display: none; /* Hidden on desktop since all 4 cards fit */
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-light);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.dot:hover {
    background: rgba(222, 110, 39, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: var(--color-accent);
    width: 32px;
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .service-hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-hero-metrics {
        grid-template-columns: repeat(3, 1fr);
    }

    .carousel-track {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-nav {
        display: flex; /* Show navigation on tablet */
    }

    .carousel-dots {
        display: flex; /* Show dots on tablet */
    }
}

@media (max-width: 768px) {
    .hero-service-card {
        padding: 2rem;
    }

    .service-hero-title {
        font-size: 2rem;
    }

    .service-hero-metrics {
        grid-template-columns: 1fr;
    }

    .metric-value {
        font-size: 2rem;
    }

    .carousel-container {
        padding: 0 2rem;
    }

    .carousel-track {
        grid-template-columns: 1fr;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-service-card {
        padding: 1.5rem;
    }

    .service-hero-cta-group {
        flex-direction: column;
    }

    .service-hero-cta-group .btn-primary,
    .service-hero-cta-group .btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .carousel-container {
        padding: 0 1rem;
    }
}

/* Animation Classes */
.hero-service-card.animate-in {
    animation: hero-slide-up 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes hero-slide-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card.slide-in {
    animation: card-slide-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes card-slide-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
