#home-main-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
    min-height: 700px;
    position: relative;
    overflow: hidden;
}

/* Subtle animated pattern overlay */
#home-main-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.03) 50%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(59, 130, 246, 0.03) 50%, transparent 100%);
    background-size: 300px 300px, 200px 200px;
    animation: subtleFlow 25s linear infinite;
    pointer-events: none;
}

@keyframes subtleFlow {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 300px 300px, 200px 200px; }
}

/* CTA Button States */
.cta-btn {
    /* Default state - handled by Tailwind classes */
    transition: all 0.2s ease;
}

/* Hover state for non-active buttons */
.cta-btn:not(.cta-btn-active):hover {
    background-color: rgb(254 215 170) !important; /* bg-orange-200 */
    color: rgb(234 88 12) !important; /* text-orange-600 */
    transform: translateY(-2px);
}

.cta-btn-active {
    background-color: rgb(249 115 22) !important; /* bg-orange-500 */
    color: white !important;
}

.cta-btn-active:hover {
    background-color: rgb(234 88 12) !important; /* bg-orange-600 */
    transform: translateY(-2px);
}

/* Fixed height for CTA headers to prevent layout shift */
#home-main-hero h1 {
    height: 180px; /* Fixed height for desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    color: #1f2937 !important; /* Dark text for readability */
}

@media (max-width: 768px) {
    #home-main-hero h1 {
        height: 120px; /* Smaller height for mobile */
        font-size: 2rem !important; /* Smaller font for mobile */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #home-main-hero h1 {
        height: 140px; /* Medium height for tablet */
        font-size: 3rem !important; /* Medium font for tablet */
    }
}

/* Service Cards - Scattered Layout */
.service-cards {
    position: relative;
    height: 600px;
    margin-top: 2rem;
    padding: 0;
}

.service-card:nth-child(1) {
    position: absolute;
    top: 0;
    right: -20px;
    transform: rotate(-8deg);
    z-index: 6;
}

.service-card:nth-child(2) {
    position: absolute;
    top: 90px;
    right: 280px;
    transform: rotate(12deg);
    z-index: 5;
}

.service-card:nth-child(3) {
    position: absolute;
    top: 180px;
    right: 100px;
    transform: rotate(-5deg);
    z-index: 4;
}

.service-card:nth-child(4) {
    position: absolute;
    top: 270px;
    right: 250px;
    transform: rotate(9deg);
    z-index: 3;
}

.service-card:nth-child(5) {
    position: absolute;
    top: 360px;
    right: 20px;
    transform: rotate(-10deg);
    z-index: 2;
}

.service-card:nth-child(6) {
    position: absolute;
    top: 450px;
    right: 180px;
    transform: rotate(6deg);
    z-index: 1;
}

@media (max-width: 1024px) {
    .service-cards {
        height: 700px;
    }
    
    .service-card:nth-child(1) {
        right: 10px;
        top: 0;
    }
    
    .service-card:nth-child(2) {
        right: -20px;
        top: 100px;
    }
    
    .service-card:nth-child(3) {
        right: 15px;
        top: 200px;
    }
    
    .service-card:nth-child(4) {
        right: -10px;
        top: 300px;
    }
    
    .service-card:nth-child(5) {
        right: 20px;
        top: 400px;
    }
    
    .service-card:nth-child(6) {
        right: -15px;
        top: 500px;
    }
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(229, 231, 235, 0.5);
    overflow: hidden;
    cursor: pointer;
    height: 180px;
    width: 280px;
}

.service-card:hover {
    transform: translateY(-8px) rotate(0deg) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 20 !important;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg) !important;
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.service-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 8px;
    padding: 1.5rem;
}

.service-icon {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

.service-card-back h3 {
    color: white;
    margin-bottom: 1rem;
}

.service-card-back p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
}

.service-card-back .cta-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.2s;
}

.service-card-back .cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Orange background when CTA button triggers the card */
.service-card-back.cta-activated {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
}

.service-card-back.cta-activated h3,
.service-card-back.cta-activated p {
    color: white !important;
}

.service-card-back.cta-activated .cta-button {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #f97316 !important;
    border-color: white !important;
}

.service-card-back.cta-activated .cta-button:hover {
    background: white !important;
    transform: translateY(-1px);
}