/* =====================================================
   Service 24 Support - Services Page Styles
   ===================================================== */

/* ===================
   Services Hero
   =================== */
.services-hero {
    position: relative;
    padding: calc(var(--header-height) + var(--space-20)) 0 var(--space-20);
    background: var(--gradient-hero);
    text-align: center;
    overflow: hidden;
}

.services-hero-bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.services-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    color: var(--color-white);
}

.services-hero-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: var(--color-white);
}

.services-hero-subtitle {
    font-size: var(--text-xl);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    color: var(--color-white);
}

/* ===================
   Services Overview Grid
   =================== */
.services-overview {
    background: var(--color-light);
}

.services-overview-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.service-overview-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-8);
    background: linear-gradient(145deg, var(--color-white) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    transition: all var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

.service-overview-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.service-overview-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}

.service-overview-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        var(--glow-primary),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.service-overview-icon::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    height: 40%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25), transparent);
    border-radius: var(--radius-lg) var(--radius-lg) 50% 50%;
}

.service-overview-icon.crisis {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.service-overview-icon.step-down {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.service-overview-icon.homelessness {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.service-overview-icon.mental-health {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

.service-overview-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--color-white);
}

.service-overview-content h3 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-dark);
    margin-bottom: var(--space-3);
}

.service-overview-content>p {
    color: var(--color-gray-600);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.service-features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-gray-700);
    background: linear-gradient(145deg, var(--color-light) 0%, #e8eef5 100%);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all var(--transition-base);
}

.service-features li:hover {
    background: linear-gradient(145deg, #e8eef5 0%, var(--color-light) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 4px 8px rgba(0, 0, 0, 0.08);
}

.service-features li svg {
    width: 14px;
    height: 14px;
    stroke: var(--color-success);
}

/* ===================
   Why Choose Section
   =================== */
.why-choose {
    background: var(--color-white);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.why-card {
    text-align: center;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    background: var(--color-light);
    transition: all var(--transition-base);
}

.why-card:hover {
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.why-icon {
    width: 64px;
    height: 64px;
    background: rgba(45, 138, 127, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    transition: all var(--transition-base);
}

.why-card:hover .why-icon {
    background: var(--gradient-primary);
}

.why-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-secondary);
    transition: stroke var(--transition-base);
}

.why-card:hover .why-icon svg {
    stroke: var(--color-white);
}

.why-card h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-dark);
    margin-bottom: var(--space-2);
}

.why-card p {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    margin: 0;
}

/* ===================
   Service Detail Page Styles
   =================== */
.service-detail-hero {
    position: relative;
    padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-16);
    background: var(--gradient-hero);
    overflow: hidden;
}

.service-detail-hero-content {
    text-align: center;
    color: var(--color-white);
    max-width: 800px;
    margin: 0 auto;
}

.service-detail-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: var(--color-white);
}

.service-detail-subtitle {
    font-size: var(--text-xl);
    opacity: 0.9;
    color: var(--color-white);
}

.service-detail-content {
    background: var(--color-light);
}

.service-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--space-10);
    align-items: start;
}

.service-detail-main {
    background: linear-gradient(165deg, var(--color-white) 0%, rgba(248, 250, 252, 1) 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.1),
        0 5px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.9);
    position: relative;
}

.service-detail-main::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.8), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.service-detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.12),
        inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 3px solid var(--color-white);
}

.service-detail-image-placeholder {
    width: 100%;
    height: 300px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-detail-image-placeholder svg {
    width: 80px;
    height: 80px;
    stroke: rgba(255, 255, 255, 0.4);
}

.service-detail-main h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
    color: var(--color-dark);
}

.service-detail-main h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin: var(--space-8) 0 var(--space-4);
    color: var(--color-dark);
}

.service-detail-main p {
    color: var(--color-gray-600);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.service-detail-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.service-detail-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(145deg, var(--color-light) 0%, #e8eef5 100%);
    border-radius: var(--radius-lg);
    color: var(--color-gray-700);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: all var(--transition-base);
}

.service-detail-list li:hover {
    background: linear-gradient(145deg, #e8eef5 0%, var(--color-light) 100%);
    transform: translateX(4px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 4px 10px rgba(0, 0, 0, 0.08);
}

.service-detail-list li::before {
    content: '✓';
    color: var(--color-success);
    font-weight: var(--font-bold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.service-detail-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-6));
}

.sidebar-card {
    background: linear-gradient(160deg, var(--color-white) 0%, rgba(248, 250, 252, 1) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 3px 10px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    margin-bottom: var(--space-6);
    border: 1px solid rgba(255, 255, 255, 0.85);
    position: relative;
    backdrop-filter: blur(8px);
}

.sidebar-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.7), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.sidebar-card h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
    color: var(--color-dark);
}

.sidebar-card p {
    color: var(--color-gray-600);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.sidebar-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-gray-700);
}

.sidebar-list li svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-success);
    flex-shrink: 0;
}

.sidebar-card.cta-card {
    background: var(--gradient-primary);
    color: var(--color-white);
}

.sidebar-card.cta-card h4,
.sidebar-card.cta-card p {
    color: var(--color-white);
}

.sidebar-card.cta-card p {
    opacity: 0.9;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: var(--space-3);
}

.btn-block:last-child {
    margin-bottom: 0;
}

.other-services-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.other-services-list a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    color: var(--color-gray-700);
    transition: all var(--transition-base);
}

.other-services-list a:hover {
    background: var(--color-light);
    color: var(--color-secondary);
}

.other-services-list a svg {
    width: 18px;
    height: 18px;
}

/* ===================
   Responsive
   =================== */
@media (max-width: 1024px) {
    .service-overview-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .service-overview-icon {
        margin: 0 auto;
    }

    .service-features {
        justify-content: center;
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-detail-content {
        grid-template-columns: 1fr;
    }

    .service-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .services-hero-title {
        font-size: var(--text-4xl);
    }

    .why-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .services-hero-title {
        font-size: var(--text-3xl);
    }

    .service-overview-icon {
        width: 64px;
        height: 64px;
    }

    .service-overview-icon svg {
        width: 32px;
        height: 32px;
    }
}