/* ==================== Services Page Styles ==================== */
.services-hero {
    padding: 50px 0 20px; 
    background-color: lightgrey;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 30px;
}

#services-heading {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px; 
    line-height: 1.2;
    color: var(--primary-dark);
    position: relative;
    display: inline-block;
    margin-top: 20px; 
}

#services-heading .highlight {
    position: relative;
    z-index: 1;
}

#services-heading .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 15px;
    z-index: -1;
    border-radius: 2px;
}

#services-heading,
#services-heading .highlight {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ==================== CTA Section ==================== */
.services-cta {
    padding: 40px 0;
    background-color: #E5E5E8;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-dark);
    border: 1px solid var(--primary-dark);
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ==================== Services Grid Section  ==================== */
.services-grid-section {
    padding: 20px 0 60px; 
    background-color: lightgrey;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px; 
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Make the last row center two items */
.services-grid:after {
    content: '';
    width: calc(33.33% - 20px); 
}

.service-card {
    background-color: #E5E5E8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    height: 100%; 
    position: relative;
    transform: translateY(0);
}

.service-card:nth-last-child(2):nth-child(odd) {
    grid-column: 2;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.service-header {
    padding: 25px 25px 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.service-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(4,30,100,0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotate(10deg) scale(1.1);
}

.service-icon svg {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
}

.service-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.3;
}

.service-body {
    padding: 20px 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-summary {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 15px;
    text-align: left;
    flex-shrink: 0;
}

.service-features {
    flex-grow: 1;
}

.service-features h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
    font-weight: 600;
}

.service-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-features li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: transform 0.2s ease;
}

.service-features li:hover {
    transform: translateX(5px);
}

.service-features li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.service-features li:hover:before {
    transform: scale(1.3);
}

.service-footer {
    padding: 15px 25px;
    border-top: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.service-duration span, .service-price span {
    font-weight: 600;
    color: var(--primary-dark);
}

.book-consult-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.book-consult-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.book-consult-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.book-consult-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-card:nth-last-child(2):nth-child(odd) {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    #services-heading {
        font-size: 2.5rem;
    }
    
    .services-hero {
        padding: 40px 0 15px; 
    }
    
    .services-grid-section {
        padding: 15px 0 40px; 
    }
    
    .services-grid {
        margin-top: 15px; 
    }
    
    .services-cta {
        padding: 30px 0;
    }
    
    .cta-text {
        font-size: 1.1rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .service-header, .service-body, .service-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    #services-heading {
        font-size: 2rem;
        margin-bottom: 8px; 
    }
    
    .services-hero {
        padding: 30px 0 10px; 
        margin-top: 80px;
    }
    
    .services-grid-section {
        padding: 10px 0 30px; 
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .service-card:hover, 
    .book-consult-btn:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .service-icon,
    .service-features li,
    .service-features li:before {
        transform: none !important;
        animation: none !important;
    }
    
    .service-card::before {
        transition: none;
    }
}