/* ==========================================================
   SERVICES PAGE - Digital Motion Studio
   ==========================================================
   Mobile-First Responsive CSS
   Breakpoints: 376px, 481px, 769px, 1025px, 1281px
   ========================================================== */

/* ==========================================================
   PAGE BACKGROUND
========================================================== */
.services-page {
    background: #0a0a0f;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

/* ==========================================================
   SMALL PHONES (320-375px) - BASE STYLES
========================================================== */

/* ============================
    CAPABILITIES SECTION
============================ */
.capabilities-particle-section {
    position: relative;
    width: 100%;
    height: auto;
    min-height: auto;
    padding: 2rem 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    background: transparent;
    z-index: 2;
}

.capabilities-magic {
    position: relative;
    height: 20rem;
    width: 100%;
    z-index: 3;
    transform: scale(1.2);
    transform-origin: center top;
    margin-top: -5rem;
}

.capabilities-magic canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 28rem;
    transform: scale(1.4);
    transform-origin: center center;
}

/* H1 for SEO - visually hidden but accessible */
.capabilities-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.capabilities-description {
    position: relative;
    max-width: 100%;
    text-align: center;
    z-index: 15;
    padding: 0 0.75rem;
    margin: -8rem auto 0;
}

.capabilities-description p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: center;
}

.capabilities-description p:last-child {
    margin-bottom: 0;
}

/* ============================
    SERVICES SECTION
============================ */
.services {
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 3rem 0 4rem;
    margin-top: 3rem;
}

.services-title {
    font-size: clamp(1.75rem, 5vw, 3.5rem);
    font-weight: 900;
    text-align: center;
    margin: 0 0 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services-closing {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    max-width: 38rem;
    margin: 2rem auto 0;
    font-style: italic;
    line-height: 1.6;
}

/* ============================
    SERVICES SLIDER
============================ */
.services-slider {
    position: relative;
    margin-top: 2rem;
    padding: 0 0.5rem;
}

.slides-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1rem 0;
    overscroll-behavior-x: contain;
}

.slides-container::-webkit-scrollbar {
    display: none;
}

/* ============================
    SERVICE CARD
============================ */
.service-card {
    --card-radius: 0.625rem;
    flex-shrink: 0;
    width: 75vw;
    max-width: 15rem;
    background: #1e1e1e;
    border-radius: var(--card-radius);
    position: relative;
    overflow: hidden;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
}

.service-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem 0.2rem 0.25rem;
    background: rgba(0, 0, 0, 0.6);
    border-bottom-right-radius: var(--card-radius);
    font-size: 0.75rem;
    line-height: 1.7;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
}

.service-badge::before {
    content: "";
    flex-shrink: 0;
    display: block;
    width: 0.9rem;
    height: 0.9rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD700'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") center/100% no-repeat;
}

.service-card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    flex-shrink: 0;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0.75rem;
    flex: 1;
}

.service-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
}

.service-card-text {
    font-weight: 300;
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0.7;
    margin: 0;
    flex: 1;
}

.service-card-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.service-card-btn:hover {
    color: #667eea;
}

.btn-arrow {
    flex-shrink: 0;
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center/100% no-repeat;
    transition: transform 0.3s ease;
}

.service-card-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* ============================
    SLIDER NAVIGATION
============================ */
.slider-nav {
    display: none;
}

.slider-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    pointer-events: auto;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    transition: color 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
}

.slider-nav-btn:hover {
    color: #667eea;
    opacity: 1;
}

/* ============================
    SLIDER PAGINATION
============================ */
.slider-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding-top: 1.5rem;
}

.pagination-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: #fff;
    opacity: 0.2;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

.pagination-dot.active {
    width: 1.25rem;
    border-radius: 0.1875rem;
    opacity: 1;
}

/* ===========================================
   LARGER PHONES (376-480px)
=========================================== */
@media (min-width: 376px) {
    /* Capabilities */
    .capabilities-particle-section {
        padding: 3rem 0 0;
    }

    .capabilities-magic {
        height: 30rem;
        transform: scale(1.15);
        margin-top: -15rem;
    }

    .capabilities-magic canvas {
        min-height: 50rem;
        transform: scale(1.3);
    }

    .capabilities-description {
        padding: 0 1rem;
        margin: -6rem auto 0;
    }

    .capabilities-description p {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 1.25rem;
    }

    /* Services Section */
    .services {
        margin-top: 3rem;
    }

    /* Services Slider */
    .services-slider {
        padding: 0 1rem;
        margin-top: 3rem;
    }

    .service-card {
        width: 70vw;
        max-width: 16rem;
    }

    .service-card-title {
        font-size: 1rem;
    }

    .service-card-text {
        font-size: 0.85rem;
    }

    .service-card-content {
        padding: 1.25rem 1rem;
        gap: 1rem;
    }
}

/* ==========================================================
   TABLET (481-768px)
========================================================== */
@media (min-width: 481px) {
    /* Capabilities */
    .capabilities-particle-section {
        padding: 3rem 0 0;
    }

    .capabilities-magic {
        height: 32rem;
        transform: scale(1.1);
        margin-top: -12rem;
    }

    .capabilities-magic canvas {
        min-height: 50rem;
        transform: scale(1.2);
    }

    .capabilities-description {
        padding: 0 1.5rem;
        margin: -6rem auto 0;
    }

    .capabilities-description p {
        font-size: 1rem;
        line-height: 1.75;
        margin-bottom: 1.5rem;
    }

    /* Services */
    .services {
        padding: 4rem 0 5rem;
    }

    .services-slider {
        padding: 0 2rem;
        margin-top: 4rem;
    }

    .slides-container {
        gap: 1.5rem;
    }

    .service-card {
        width: 45vw;
        max-width: 18rem;
    }

    .service-card-image {
        aspect-ratio: 1 / 1;
    }

    .service-card-title {
        font-size: 1.1rem;
    }

    .service-card-text {
        font-size: 0.9rem;
    }

    .slider-pagination {
        gap: 0.5rem;
        padding-top: 2rem;
    }

    .pagination-dot {
        width: 0.5rem;
        height: 0.5rem;
    }

    .pagination-dot.active {
        width: 1.5rem;
    }
}

/* ==========================================================
   SMALL DESKTOP (769-1024px)
========================================================== */
@media (min-width: 769px) {
    /* Capabilities */
    .capabilities-particle-section {
        height: 100vh;
        min-height: 700px;
        padding: 0;
        padding-top: 20rem;
        display: block;
    }

    .capabilities-magic {
        position: absolute;
        top: 8rem;
        left: 0;
        right: 0;
        bottom: 0;
        height: auto;
        margin-top: 0;
        transform: scale(1.5);
        transform-origin: center center;
    }

    .capabilities-magic canvas {
        min-height: auto;
        transform: none;
    }

    .capabilities-description {
        position: absolute;
        bottom: -45%;
        left: 50%;
        transform: translateX(-50%);
        max-width: 45rem;
        padding: 0 2rem;
        margin: 0;
    }

    .capabilities-description p {
        font-size: 1.2rem;
        line-height: 1.8;
    }

    /* Services */
    .services {
        padding: 6rem 0;
        margin-top: 30rem;
    }

    .services-slider {
        padding: 0 4rem;
        margin-top: 5rem;
    }

    .slides-container {
        gap: 2rem;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        scroll-snap-type: x mandatory;
        padding: 1rem 2rem;
    }

    .service-card {
        flex-shrink: 0;
        width: 18rem;
        max-width: none;
        height: 32rem;
        scroll-snap-align: center;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .service-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    }

    .service-card-image {
        aspect-ratio: 1 / 1;
    }

    .service-card-content {
        padding: 1.5rem 1.25rem;
        gap: 1.25rem;
    }

    .service-card-title {
        font-size: 1.15rem;
    }

    .service-card-text {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .slider-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        z-index: 1;
        pointer-events: none;
        padding: 0 0.5rem;
    }

    .slider-pagination {
        display: none;
    }

    .services-closing {
        font-size: 1rem;
        margin-top: 3rem;
    }
}

/* ==========================================================
   DESKTOP (1025-1280px)
========================================================== */
@media (min-width: 1025px) {
    /* Capabilities */
    .capabilities-particle-section {
        height: 100vh;
        min-height: 700px;
    }

    .capabilities-description {
        bottom: -60%;
        max-width: 50rem;
    }

    .capabilities-description p {
        font-size: 1.4rem;
        line-height: 1.85;
    }

    /* Services */
    .services {
        margin-top: 30rem;
    }

    .services-slider {
        padding: 0 6rem;
    }

    .service-card {
        max-width: 16rem;
        height: 36rem;
    }

    .service-card-title {
        font-size: 1.25rem;
    }

    .service-card-text {
        font-size: 1rem;
    }

    .service-card-btn {
        font-size: 1rem;
    }

    .btn-arrow {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* ==========================================================
   LARGE DESKTOP (1281px+)
========================================================== */
@media (min-width: 1281px) {
    /* Capabilities */
    .capabilities-particle-section {
        min-height: 800px;
    }

    .capabilities-description {
        max-width: 55rem;
    }

    .capabilities-description p {
        font-size: 1.5rem;
        line-height: 1.9;
    }

    /* Services */
    .services {
        margin-top: 35rem;
    }

    .services-slider {
        padding: 0 8rem;
    }

    .slides-container {
        gap: 2.5rem;
    }

    .service-card {
        max-width: 17rem;
        height: 38rem;
    }
}
