#home-main-hero {
    background: linear-gradient(
      180deg,
      #1e40af 0%,
      #2563eb 15%,
      #3b82f6 30%,
      #60a5fa 45%,
      #93c5fd 60%,
      #bfdbfe 75%,
      #dbeafe 85%,
      #f0f9ff 93%,
      #ffffff 100%
    );
    min-height: 500px; /* Reduced from 700px to show savings section above fold */
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    #home-main-hero {
        min-height: 550px; /* Slightly taller on desktop but still compact */
    }
}

@media (min-width: 1440px) {
    #home-main-hero {
        min-height: 600px; /* Bit more height on larger screens */
    }
}

@media (min-width: 1920px) {
    #home-main-hero {
        min-height: 650px; /* Even larger screens */
    }
}

/* 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 {
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

/* Hover state for non-active buttons */
.cta-btn:not(.cta-btn-active):hover {
    background-color: rgba(249, 250, 251, 1) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.cta-btn-active {
    background-color: #f16700 !important;
    color: white !important;
    box-shadow: 0 10px 15px -3px rgba(241, 103, 0, 0.3), 0 4px 6px -2px rgba(241, 103, 0, 0.2);
}

.cta-btn-active:hover {
    background-color: #d85a00 !important;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(241, 103, 0, 0.3), 0 10px 10px -5px rgba(241, 103, 0, 0.2) !important;
}

/* Fixed height for CTA headers to prevent layout shift */
#home-main-hero h1 {
    min-height: 80px; /* Reduced from 180px - use min-height instead of fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    color: #ffffff !important; /* White text on blue gradient */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

@media (min-width: 769px) and (max-width: 1024px) {
    #home-main-hero h1 {
        min-height: 70px; /* Reduced from 140px 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: #1e293b;
    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);
}

/* Savings Section Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out 0.2s forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out 0.4s forwards;
}