/* Services Section */
.services {
    padding: 100px 0;
    background: var(--white);
}

/* Container principal da grade - Grid com 3 colunas na linha superior */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

/* Enhanced Service Cards with Morphing Gradients */
.service-card {
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-light);
    opacity: 0;
    transition: all 0.8s ease;
    z-index: -1;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    background-size: 400% 400%;
    animation: gradientRotate 8s linear infinite;
    border-radius: 22px;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.service-card:hover::before {
    left: 0;
    opacity: 0.1;
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 60px rgba(142, 78, 198, 0.25), 
                0 0 50px rgba(169, 104, 212, 0.15);
    border-color: transparent;
}

@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* Enhanced Service Icons with Breathing Animation */
.service-icon {
    font-size: 4rem;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    animation: iconBreathe 4s ease-in-out infinite, gradientShift 6s ease infinite;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 5px 15px rgba(142, 78, 198, 0.4));
}

@keyframes iconBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Featured Service Card with Special Effects */
.service-card.featured {
    background: var(--gradient-light);
    background-size: 300% 300%;
    animation: featuredGlow 8s ease infinite;
    transform: scale(1.05);
    position: relative;
    border: 3px solid transparent;
}

.service-card.featured::before {
    background: var(--gradient-vibrant);
    opacity: 0.15;
    left: 0;
}

.service-card.featured::after {
    opacity: 1;
    animation: gradientRotate 6s linear infinite;
}

@keyframes featuredGlow {
    0%, 100% { 
        background-position: 0% 50%;
        box-shadow: 0 15px 40px rgba(142, 78, 198, 0.3);
    }
    50% { 
        background-position: 100% 50%;
        box-shadow: 0 20px 50px rgba(169, 104, 212, 0.4);
    }
}

.popular-badge {
    background: var(--gradient-vibrant);
    background-size: 200% 200%;
    animation: badgeShimmer 3s ease infinite;
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    position: absolute;
    top: -10px;
    right: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

@keyframes badgeShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.service-card h3 {
    color: var(--dark-purple);
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: bold;
}

.service-card p {
    color: var(--dark-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    margin: 20px 0;
    text-align: left;
}

.service-features li {
    margin-bottom: 10px;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
}

.service-features li i {
    color: var(--success-green);
    margin-right: 10px;
    font-size: 0.9rem;
}

.service-price {
    color: var(--primary-purple);
    font-size: 1.8rem;
    font-weight: bold;
    margin: 25px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.service-cta {
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
    margin-top: 10px;
}

.service-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(142, 78, 198, 0.3);
}

/* ---------------------------------------------------- */
/* LAYOUT CORRIGIDO PARA CENTRALIZAR AS DUAS ÚLTIMAS CAIXAS */
/* ---------------------------------------------------- */

/* Container para as duas últimas caixas centralizadas */
.services-bottom-row {
    grid-column: 1 / -1; /* Ocupa toda a largura do grid */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-top: 30px;
}

/* Garante que as duas caixas mantenham o mesmo estilo e tamanho */
.services-bottom-row .service-card {
    flex: 0 0 auto; /* Não cresce nem encolhe */
    width: calc(33.333% - 15px); /* Mesmo tamanho das caixas da linha superior */
    max-width: 350px;
}

/* ---------------------------------------------------- */
/* MEDIA QUERIES RESPONSIVAS */
/* ---------------------------------------------------- */

/* Tablets grandes */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    
    .services-bottom-row .service-card {
        width: calc(50% - 12.5px);
    }
}

/* Tablets pequenos */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-title-mobile {
        text-align: center;
        font-size: 2.0rem;
        color: var(--dark-purple);
        margin-bottom: 25px;
        font-weight: bold;
        
    }
    
    .services-bottom-row {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .services-bottom-row .service-card {
        width: 100%;
        max-width: 400px;
    }
}

/* Celulares */
@media (max-width: 480px) {
    .services {
        padding: 60px 0;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .service-icon {
        font-size: 3rem;
    }
}