/* Parallax Depth Card Styles */

#engagements.container {
    width: 100% !important;
    max-width: 1200px !important;
}

.engagements-grid {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.parallax-card-wrap {
    transform: perspective(800px);
    transform-style: preserve-3d;
    cursor: pointer;
}

.parallax-card-wrap:hover .parallax-card {
    box-shadow: rgba(0, 0, 0, 0.4) 0 20px 50px 0;
}

.parallax-card-wrap:hover .parallax-card-bg {
    opacity: 0.3;
}

.parallax-card-wrap:hover .parallax-card-info {
    transform: translateY(0);
}

.parallax-card-wrap:hover .parallax-card-info p {
    opacity: 1;
}

.parallax-card {
    position: relative;
    width: 320px;
    height: 180px;
    background: #1a1a1a;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.25) 0 10px 30px 0;
    transition: 0.4s ease;
}

.parallax-card-bg {
    opacity: 0.85;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: 0.4s ease;
    pointer-events: none;
}

.parallax-card-info {
    padding: 20px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    transform: translateY(40%);
    transition: 0.3s ease;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.parallax-card-info p {
    opacity: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    transition: 0.3s ease;
}

/* Responsive */
@media (max-width: 980px) {
    .parallax-card {
        width: 280px;
        height: 158px;
    }
}

@media (max-width: 600px) {
    .engagements-grid {
        gap: 15px;
        padding: 15px;
    }
    .parallax-card {
        width: 300px;
        height: 169px;
    }
}

/* Touch devices - Engagements */
@media (hover: none) {
    .parallax-card-wrap {
        transform: none;
    }
    .parallax-card {
        transform: none !important;
    }
    .parallax-card-bg {
        transform: translate(-50%, -50%) !important;
        opacity: 0.9;
    }
    .parallax-card-info {
        display: none;
    }
}

/* ========================================
   Services Section - Tall Parallax Cards
   ======================================== */

#services.box.alt.container {
    width: 100% !important;
    max-width: 1400px !important;
}

.services-grid {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.service-card-wrap {
    transform: perspective(800px);
    transform-style: preserve-3d;
    cursor: pointer;
}

.service-card-wrap:hover .service-card {
    border-color: rgba(255,255,255,0.8);
    box-shadow: rgba(0, 0, 0, 0.6) 0 30px 50px 0;
}

.service-card-wrap:hover .service-card::before {
    background: linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(0,0,0,0.85) 70%, rgba(0,0,0,0.98) 100%);
}

.service-card-wrap:hover .service-card-info {
    transform: translateY(0);
}

.service-card-wrap:hover .service-card-info p {
    opacity: 1;
}

.service-card-wrap:hover .service-card-info::after {
    opacity: 1;
    transform: translateY(0);
}

.service-card {
    position: relative;
    width: 416px;
    height: 364px;
    background: #333;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.4);
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.5) 0 20px 40px 0;
    transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-card-bg {
    opacity: 1;
    position: absolute;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

/* Gradient overlay - dark at bottom, transparent at top */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(0,0,0,0.8) 70%, rgba(0,0,0,0.95) 100%);
    z-index: 1;
    pointer-events: none;
    border-radius: 10px;
    transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-card-info {
    padding: 20px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    transform: translateY(40%);
    transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
}

.service-card-info::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0;
    transform: translateY(100%);
    transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-card-info h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    font-weight: 500;
    color: #fff;
    line-height: 1.2;
    text-shadow: rgba(0, 0, 0, 0.5) 0 10px 10px;
}

.service-card-info p {
    position: relative;
    z-index: 1;
    opacity: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    text-shadow: rgba(0, 0, 0, 1) 0 2px 3px;
    transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Services Responsive */
@media (max-width: 1400px) {
    .service-card {
        width: 360px;
        height: 315px;
    }
}

@media (max-width: 980px) {
    .service-card {
        width: 320px;
        height: 280px;
    }
    .service-card-info h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    .services-grid {
        gap: 15px;
        padding: 15px;
    }
    .service-card-wrap {
        width: 100%;
        max-width: 360px;
    }
    .service-card {
        width: 100%;
        max-width: 360px;
        height: 260px;
    }
    .service-card-info {
        padding: 12px;
    }
    .service-card-info h3 {
        font-size: 1.1rem;
    }
    .service-card-info p {
        font-size: 0.75rem;
    }
}

/* Touch devices - Services */
@media (hover: none) {
    .service-card-wrap {
        transform: none;
    }
    .service-card {
        transform: none !important;
    }
    .service-card::before {
        background: linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(0,0,0,0.85) 70%, rgba(0,0,0,0.98) 100%);
    }
    .service-card-bg {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: none !important;
    }
    .service-card-info {
        transform: translateY(0);
    }
    .service-card-info::after {
        opacity: 1;
        transform: translateY(0);
    }
    .service-card-info p {
        opacity: 1;
    }
}
