/* ============================================================
   SERVICES.CSS — Services Page Styles
   ============================================================ */

/* --- Hero --- */
.hero-services {
    min-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(10, 10, 18, 0.82), rgba(10, 10, 18, 0.58) 50%, rgba(10, 10, 18, 0.82)),
        url('../../assets/images/hero/services-hero.png') center / cover no-repeat;
    color: #FFFFFF;
    position: relative;
    padding-top: var(--nav-height);
    padding-bottom: var(--space-3xl);
    overflow: hidden;
}

.hero-services::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(233, 30, 140, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(233, 30, 140, 0.12) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    opacity: 0.1;
    transform: perspective(500px) rotateX(60deg) scale(2);
    transform-origin: center top;
    animation: gridMove 20s linear infinite;
}

.hero-services::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 35%, rgba(233, 30, 140, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(10, 10, 18, 0.12), rgba(10, 10, 18, 0.5));
    z-index: 1;
}

@keyframes gridMove {
    from {
        background-position: center 0;
    }

    to {
        background-position: center 500px;
    }
}

.hero-services__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: var(--space-3xl) var(--space-xl);
}

.hero-services__content.reveal {
    opacity: 1;
    transform: none;
}

.hero-services .hero__headline {
    color: #FFFFFF;
    text-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hero-services .hero__subheadline {
    color: rgba(255, 255, 255, 0.88);
}

/* --- Seamless Marquee --- */
.services-marquee {
    overflow: hidden;
    padding: var(--space-xl) 0;
    background: var(--color-surface);
    display: flex;
}

.marquee-track {
    display: flex;
    animation: marqueeScroll 30s linear infinite;
    width: max-content;
}

.marquee-set {
    display: flex;
    gap: var(--space-md);
    padding-right: var(--space-md);
}

.marquee-image {
    width: clamp(250px, 20vw, 350px);
    height: clamp(150px, 15vw, 250px);
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* --- Service Control Center (Grid) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

/* --- Service Card (Expandable) --- */
.service-card {
    background: var(--color-surface);
    border: 1px solid var(--color-accent-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out-quart);
    position: relative;
}

.service-card:hover,
.service-card.is-active {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-sm), var(--shadow-lg);
}

.service-card__header {
    padding: var(--space-xl);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
}

.service-card__icon-wrapper {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: var(--color-primary-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all var(--duration-normal);
}

.service-card:hover .service-card__icon-wrapper,
.service-card.is-active .service-card__icon-wrapper {
    background: var(--color-primary) !important;
    color: #FFFFFF !important;
}

.service-card:hover .service-card__icon-wrapper svg,
.service-card.is-active .service-card__icon-wrapper svg {
    stroke: #FFFFFF !important;
    color: #FFFFFF !important;
}

.service-card__header-content {
    flex: 1;
}

.service-card__title {
    font-size: var(--fs-h3);
    margin-bottom: var(--space-xs);
    transition: color var(--duration-normal);
}

.service-card.is-active .service-card__title {
    color: var(--color-primary);
}

.service-card__subtitle {
    font-size: var(--fs-small);
    color: var(--text-tertiary);
}

.service-card__toggle {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-accent-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--duration-normal);
}

.service-card__toggle svg {
    transition: transform var(--duration-normal);
}

.service-card.is-active .service-card__toggle {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--text-on-primary);
}

.service-card.is-active .service-card__toggle svg {
    transform: rotate(180deg);
}

/* --- Expanded Details --- */
.service-card__details {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-slow) var(--ease-out-quart);
    background: var(--color-surface-elevated);
    border-top: 1px solid transparent;
}

.service-card.is-active .service-card__details {
    max-height: 800px;
    /* Arbitrary large height for animation */
    border-top-color: var(--color-accent-subtle);
}

.service-list {
    padding: var(--space-xl);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.service-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    opacity: 0;
    transform: translateX(-20px);
    transition: all var(--duration-normal);
}

/* Staggered reveal for items when active */
.service-card.is-active .service-item {
    opacity: 1;
    transform: translateX(0);
}

.service-card.is-active .service-item:nth-child(1) {
    transition-delay: 100ms;
}

.service-card.is-active .service-item:nth-child(2) {
    transition-delay: 150ms;
}

.service-card.is-active .service-item:nth-child(3) {
    transition-delay: 200ms;
}

.service-card.is-active .service-item:nth-child(4) {
    transition-delay: 250ms;
}

.service-card.is-active .service-item:nth-child(5) {
    transition-delay: 300ms;
}

.service-card.is-active .service-item:nth-child(6) {
    transition-delay: 350ms;
}

.service-card.is-active .service-item:nth-child(7) {
    transition-delay: 400ms;
}

.service-card.is-active .service-item:nth-child(8) {
    transition-delay: 450ms;
}

.service-item__marker {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 5px var(--color-primary);
}

.service-item__text {
    font-size: var(--fs-body);
    color: var(--text-secondary);
}

/* --- Decorative Elements --- */
.service-bg-text {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 15rem;
    font-weight: 900;
    color: rgba(26, 26, 46, 0.03);
    z-index: 0;
    pointer-events: none;
    line-height: 0.8;
    overflow: hidden;
    white-space: nowrap;
}

.service-bg-text--1 {
    top: 10%;
    left: -10%;
    transform: rotate(-5deg);
}

.service-bg-text--2 {
    bottom: 10%;
    right: -10%;
    transform: rotate(5deg);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 700px;
        margin-inline: auto;
    }
}

@media (max-width: 768px) {
    .hero-services {
        min-height: 68vh;
    }

    .service-card__header {
        padding: var(--space-lg);
    }

    .service-list {
        padding: var(--space-lg);
    }
}
