/* Base Styles */
body {
    margin: 0;
    padding: 0;
    background: #E7F5F3;
    color: #5d4b4b;
    box-sizing: border-box;
    font-family: "Teachers", sans-serif;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Main Services Section */
.services-page .services-section {
    padding: 60px 20px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
} 
.services-page .services-title {
    font-size: 2.5rem;
    color: #5d4b4b;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
    font-family: "HandyCasual", "Happy monkey", sans-serif;
	letter-spacing: 3px;
    font-weight: normal;
}
.services-page .intro-text {
    font-size: 1.5rem;
    font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif; 
    letter-spacing: 1px;
    line-height: 1.8;
    color: #5d4b4b;
    max-width: 900px;
    margin: 0 auto 20px;
    animation: slideUp 0.8s ease-out 0.2s both;
}
.services-page .update-note {
    font-size: 1rem;
    font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif; 
    letter-spacing: 1px;
    color: #5d4b4b;
    font-style: italic;
    margin-bottom: 40px;
    animation: slideUp 0.8s ease-out 0.3s both;
    
}

/* On-Page Navigation */
.services-page .onpage-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.services-page .onpage-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #5a4a3a;
    transition: transform 0.2s;
    font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif; 
    font-weight: 800;
    letter-spacing: 1px;
}
.services-page .onpage-link:hover {
    transform: translateY(-3px);
}

/* Visual state for the current onpage link */
.services-page .onpage-link[aria-current="true"] {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border-radius: 8px;
    background: rgba(255,255,255,0.9);
    padding: 6px 8px;
}
.services-page .onpage-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 8px;
}

/* Service Group */
.services-page .service-group {
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
    max-width: 1200px;
    flex-wrap: wrap;
} 

/* Make anchor targets sit nicely under any fixed header */
.services-page .service-group {
    scroll-margin-top: 110px; /* default offset; adjusted in media queries */
}

/* Highlight animation when navigated to via onpage links */
@keyframes headerHighlight {
    0% { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
    60% { transform: translateY(0); box-shadow: 0 10px 24px rgba(0,0,0,0.10); }
    100% { transform: translateY(0); box-shadow: none; }
}

.services-page .group-header.focus-highlight {
    animation: headerHighlight 1.8s ease forwards;
}

.services-page .group-header:focus {
    outline: 3px solid rgba(255,79,104,0.14);
    outline-offset: 4px;
}

.services-page .group-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}
.services-page .group-icon {
    width: 200px;
    height: auto;
    max-width: 200px;
    object-fit: contain;
} 
.services-page .group-title {
    font-size: 3rem;
    color: #5d4b4b;
    margin: 0;
    font-family: "HandyCasual", "Happy monkey", sans-serif;
	letter-spacing: 3px;
}

/* Service Cards Grid */
.services-page .service-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.services-page .service-card {
    background: #faf5f2;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.services-page .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.services-page .card-title {
    font-size: 2rem;
    color: #5d4b4b;
    margin-bottom: 15px;
    font-weight: 700;
}
.services-page .card-desc {
    font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif; 
    letter-spacing: 1px;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #5d4b4b;
    margin: 0;
}

/* Footer Note */
.services-page .footer-note {
    text-align: center;
    padding: 30px 20px;
    font-size: 14px;
    color: #5d4b4b;
    animation: fadeIn 0.8s ease-out 0.8s both;
}
.services-page .footer-note strong {
    font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif; 
    letter-spacing: 1px;
    font-size: 1rem;
    display: block;
    margin: 8px 0;
    font-weight: 600;
    color: #5d4b4b;
}

/* Responsive tweaks */
@media (max-width: 1200px) {
    .services-page .services-section { padding: 52px 18px; }
    .services-page .services-title { font-size: 2.2rem; }
    .services-page .intro-text { font-size: 1.4rem; max-width: 850px; }
    .services-page .onpage-icon { width: 48px; height: 48px; }
    .services-page .group-icon { width: 170px; max-width: 170px; }
    .services-page .group-title { font-size: 2.6rem; }
    .services-page .service-group { padding: 36px 18px; }
    .services-page .service-cards-grid { gap: 22px; }
}

@media (max-width: 900px) {
    .services-page .services-section { padding: 40px 16px; }
    .services-page .services-title { font-size: 2rem; }
    .services-page .intro-text { font-size: 1.2rem; max-width: 700px; }
    .services-page .onpage-nav { padding: 12px; gap: 12px; }
    .services-page .onpage-icon { width: 42px; height: 42px; }
    .services-page .group-icon { width: 140px; max-width: 140px; }
    .services-page .group-title { font-size: 2.2rem; text-align: center; }
    .services-page .service-cards-grid { gap: 20px; }

    /* Reduce scroll offset on smaller headers */
    .services-page .service-group { scroll-margin-top: 90px; }
}

@media (max-width: 480px) {
    .services-page .services-section { padding: 28px 12px; }
    .services-page .services-title { font-size: 1.8rem; }
    .services-page .intro-text { font-size: 1.05rem; }
    .services-page .onpage-icon { width: 36px; height: 36px; }
    .services-page .group-icon { width: 120px; max-width: 120px; }
    .services-page .group-title { font-size: 1.8rem; }
    .services-page .service-cards-grid { gap: 16px; }
    .services-page .group-header { flex-direction: column; gap: 10px; }

    /* Mobile header offset is smaller when header gets taller due to stacked content */
    .services-page .service-group { scroll-margin-top: 70px; }
}

