/* Services Page Specific Styles */

/* Add background image to services hero */
.services-hero.hero-contact-wrapper {
    background-image: url('../images/servicesbackground.png') !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    padding-bottom: 100px;
}

.services-hero.hero-contact-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

/* Make title and subtitle black on services page */
.services-hero .hero-title {
    color: #000 !important;
}

.services-hero .hero-subtitle {
    color: #000 !important;
}

.services-hero .gradient-text {
    color: #000 !important;
}

/* Make navigation black on services page */
.services-hero ~ * .logo-link,
body:has(.services-hero) .logo-link {
    color: #000 !important;
}

body:has(.services-hero) .nav-menu a {
    color: #000 !important;
}

.services-hero {
    padding: 60px 20px 80px;
    text-align: center;
    background: #fafafa;
    padding-top: 110px;
}

.services-hero .hero-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #000;
}

.services-hero .hero-subtitle {
    font-size: 16px;
    color: #000;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.35;
}

/* Flip Cards Grid */
.services-hero .services-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
    gap: 40px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* Flip Card Container - Fixed Height */
.services-hero .services-flip-card {
    width: 100%;
    height: 500px;
    perspective: 1000px;
    transition: transform 0.4s;
}

/* Hover effect on container - card rises */
.services-hero .services-flip-card:hover {
    transform: translateY(-8px);
}

/* Flip Card Inner */
.services-hero .services-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    /* Disable pointer events during flip to prevent jitter */
}

/* Disable hover while flipping */
.services-hero .services-flip-card.is-flipping {
    pointer-events: none;
}

/* Add flipped class to rotate - ALWAYS rotates 180deg */
.services-hero .services-flip-card.is-flipped .services-flip-card-inner {
    transform: rotateY(180deg);
}

/* Front and Back Faces */
.services-hero .services-card-front,
.services-hero .services-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Rotate back face 180deg */
.services-hero .services-card-back {
    transform: rotateY(180deg);
}

/* Dark Card Styling */
.services-hero .services-dark-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* Remove transition from the card itself */
}

/* Remove any pseudo-elements */
.services-hero .services-dark-card::before,
.services-hero .services-dark-card::after {
    display: none !important;
}

/* Hover effect on the individual card faces */
.services-hero .services-flip-card:hover .services-card-front .services-dark-card,
.services-hero .services-flip-card:hover .services-card-back .services-dark-card {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.services-hero .services-card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
}

.services-hero .services-card-title {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
}

.services-hero .services-card-description {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    flex-grow: 1;
}

.services-hero .services-card-button {
    display: inline-block;
    padding: 12px 28px;
    background: white;
    color: #000;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    align-self: flex-start;
}

/* Button glows when card container is hovered */
.services-hero .services-flip-card:hover .services-card-button {
    transform: translateY(-2px);
    box-shadow: 0 0px 12px rgba(255, 255, 255, 0.6);
}

/* Back of card styles */
.services-hero .services-card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    flex-grow: 1;
}

.services-hero .services-card-list li {
    padding: 12px 0 12px 28px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.6;
    position: relative;
}

.services-hero .services-card-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

/* CTA Section */
.cta-section {
    padding: 100px 20px;
    background: #000;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.cta-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    min-height: 44px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .services-hero {
        padding: 100px 16px 60px;
    }
    
    .services-hero .hero-title {
        font-size: 32px;
        margin-bottom: 16px;
    }
    
    .services-hero .hero-subtitle {
        font-size: 16px;
        padding: 0 12px;
    }

    .services-hero .services-cards-grid {
        grid-template-columns: 1fr !important;
    }

    .services-hero .services-flip-card {
        height: 480px;
    }

    .services-hero .services-dark-card {
        padding: 40px 30px;
    }
    
    .cta-section {
        padding: 60px 16px;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .cta-subtitle {
        font-size: 16px;
    }
    
    .cta-button {
        padding: 14px 32px;
        font-size: 15px;
    }
}