/* 
    Services Page Styles
    Phase 22 - Complex Animations & Layouts
*/

/* ==========================================================================
   1. Animated Hero Section (6-Column Ticker)
   ========================================================================== */
.services-hero {
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: #050505;
}

.services-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Vignette effect */
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3) 0%, rgba(10, 17, 40, 0.95) 100%);
    pointer-events: none;
}

.services-hero-overlay .massive-title {
    color: var(--white);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.services-hero-overlay .cta-btns {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    width: 100%;
}

.ticker-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    /* Force equal width */
    gap: 15px;
    width: 100%;
    height: 100vh;
    opacity: 0.6;
    transform: scale(1.1);
    /* Prevent edge gaps during animation */
}

.ticker-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.ticker-item {
    width: 100%;
    height: 35vh;
    object-fit: cover;
    border-radius: 8px;
    filter: grayscale(30%) contrast(1.2);
}

/* Animations */
.ticker-down {
    animation: scrollDown 140s linear infinite;
}

.ticker-up {
    animation: scrollUp 145s linear infinite;
    /* Offset start position so they don't look aligned */
    transform: translateY(-50%);
}

/* Slower animations for different columns to add organic feel */
.ticker-col:nth-child(3) {
    animation-duration: 150s;
}

.ticker-col:nth-child(4) {
    animation-duration: 135s;
}

.ticker-col:nth-child(5) {
    animation-duration: 160s;
}

.ticker-col:nth-child(6) {
    animation-duration: 155s;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

/* Responsive Ticker Grid */
@media (max-width: 1024px) {
    .ticker-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .ticker-col:nth-child(5),
    .ticker-col:nth-child(6) {
        display: none;
    }
}

@media (max-width: 768px) {
    .ticker-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ticker-col:nth-child(4) {
        display: none;
    }
}

/* ==========================================================================
   2. What We Do Best (Stacked Alternating Cards)
   ========================================================================== */
.what-we-do-section {
    background-color: #050505;
    background:
        radial-gradient(circle at 10% 20%, rgba(206, 170, 111, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(10, 17, 40, 0.6) 0%, transparent 60%),
        #050505;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.stacked-cards-container {
    position: relative;
    padding-bottom: 10vh;
    /* Allow scroll past last card */
    max-width: 1200px;
    margin: 0 auto;
}

.stacked-card {
    position: sticky;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70vh;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-bottom: 40vh;
    /* Spacing between cards as you scroll */
    overflow: hidden;
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

/* Specific sticky tops to create the stacking effect */
#stack-card-1 {
    top: 15vh;
    z-index: 1;
}

#stack-card-2 {
    top: 18vh;
    z-index: 2;
}

#stack-card-3 {
    top: 21vh;
    z-index: 3;
    margin-bottom: 0;
}

/* Alternating Alignment Magic */
.stacked-card:nth-child(even) {
    flex-direction: row-reverse;
}

.card-content {
    flex: 1;
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #ffffff !important;
    letter-spacing: 2px;
}

.card-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.luxury-list {
    list-style: none;
    padding: 0;
}

.luxury-list li {
    font-family: var(--font-detail);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.luxury-list li i {
    color: var(--accent-color);
}

.card-image {
    flex: 1.2;
    height: 100%;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
}

/* Responsive Stacked Cards */
@media (max-width: 992px) {
    .stacked-card {
        flex-direction: column-reverse !important;
        height: auto;
        min-height: 70vh;
    }

    .card-image {
        flex: 0 0 45%;
        width: 100%;
    }

    .card-content {
        padding: 40px;
    }

    /* Keep the stacking animation alive — just tighten the scroll gaps */
    .stacked-card {
        margin-bottom: 30vh;
    }

    #stack-card-1 {
        top: 10vh;
    }

    #stack-card-2 {
        top: 13vh;
    }

    #stack-card-3 {
        top: 16vh;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .stacked-card {
        min-height: auto;
        margin-bottom: 25vh;
    }

    .card-image {
        flex: 0 0 250px;
    }

    .card-content {
        padding: 30px 25px;
    }

    .card-content h3 {
        font-size: 1.8rem !important;
    }

    .card-content p {
        font-size: 0.95rem;
    }

    #stack-card-1 {
        top: 8vh;
    }

    #stack-card-2 {
        top: 11vh;
    }

    #stack-card-3 {
        top: 14vh;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .card-image {
        flex: 0 0 200px;
    }

    .card-content {
        padding: 25px 20px;
    }

    .card-content h3 {
        font-size: 1.5rem !important;
    }

    .stacked-card {
        margin-bottom: 20vh;
        border-radius: 14px;
    }

    #stack-card-1 {
        top: 6vh;
    }

    #stack-card-2 {
        top: 9vh;
    }

    #stack-card-3 {
        top: 12vh;
        margin-bottom: 0;
    }
}

/* ==========================================================================
   3 & 4. Bento Grid 1 & Moving Numbers (Mesh Gradient)
   ========================================================================== */

/* The Bento Grid classes (.solutions-bento) are inherited from main-ui.css */

.moving-numbers-section {
    position: relative;
    overflow: hidden;
    background-color: var(--primary-color);
}

.mesh-gradient-bg {
    position: absolute;
    inset: 0;
    /* Vibrant mesh gradient using DL colors */
    background:
        radial-gradient(circle at 15% 50%, rgba(206, 170, 111, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(10, 17, 40, 0.8) 0%, transparent 50%);
    z-index: 1;
    filter: blur(40px);
}

.relative-z {
    position: relative;
    z-index: 10;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.metric-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 60px 40px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.metric-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
}

.metric-number {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    color: var(--accent-color);
    line-height: 1;
}

.metric-plus {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent-color);
    vertical-align: top;
}

.metric-item p {
    font-family: var(--font-detail);
    font-size: 1rem;
    color: var(--white);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 15px;
}

@media (max-width: 992px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   5 & 6. Testimonials & Bento Grid 2 (Asymmetrical)
   ========================================================================== */

.bento-two-section {
    background-color: #050505;
}

.bento-grid-asym {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 350px);
    gap: 20px;
}

.bento-item {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.5) 0%, #050505 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

.bento-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.bento-content {
    padding: 40px;
}

.bento-content h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.bento-content h3.text-white,
.massive-title.text-white,
h4.text-white {
    color: #ffffff !important;
}

.bento-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.bento-item.has-image {
    padding: 0;
}

.bento-item.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) contrast(1.1);
}

/* Grid Spanning */
.bento-large {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-tall {
    grid-row: span 2;
}

/* Responsive Grid 2 */
@media(max-width: 992px) {
    .bento-grid-asym {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .bento-item {
        min-height: 300px;
    }

    .bento-tall {
        grid-row: auto;
    }
}

@media(max-width: 768px) {
    .bento-grid-asym {
        grid-template-columns: 1fr;
    }

    .bento-large,
    .bento-wide {
        grid-column: span 1;
    }
}