/*
 * Stylesheet for the Services & Growth Page Template
 * Revised to support a content-first, proof-oriented layout.
 * Leverages global variables from the child theme's style.css.
 */

/* =================================================================== */
/* TABLE OF CONTENTS
/* =================================================================== */
/*  1. Page Layout & Astra Fixes
/*  2. Global Section Styles (Inherited)
/*  3. Offerings Section (Tabs/Accordion)
/*  4. Who This Is For Section
/*  5. Proof of Growth (Case Studies) Section
/*  6. Collaborative Process Section
/*  7. From the Growth Playbook (Content) Section
/*  8. FAQ Section
/*  9. Final CTA Section
/* 10. Responsive Design
/* =================================================================== */

/* 1. Page Layout & Astra Fixes */
.services-template .site-content .ast-container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}
.services-template .entry-header {
    display: none;
}
.services-template #primary {
    padding-top: 0;
}

/* 2. Global Section Styles (Inherited) */
/* 
 * NOTE: Base section header styles (.section-header, .section-title, .section-description)
 * and container styles are inherited from the main style.css for consistency.
 * We add specific background treatments here.
 */
.services-template .services-offerings-section,
.services-template .case-study-section,
.services-template .content-playbook-section,
.services-template .cta-section {
    background-color: var(--background-color);
}
.services-template .who-for-section,
.services-template .process-section,
.services-template .faq-section {
    background-color: var(--white-color);
}
.services-template section {
    border-bottom: 1px solid var(--border-color);
}
.services-template section:last-of-type {
    border-bottom: none;
}


/* 3. Offerings Section (Tabs/Accordion) */
/* This section's styling is largely preserved from your original file as it is well-built. */
.services-tabs {
    max-width: 1000px;
    margin: 0 auto;
}
.tab-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}
.tab-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color);
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.tab-link:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
}
.tab-link.active {
    background-color: var(--accent-color);
    color: var(--white-color);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}
.tab-link svg {
    width: 20px;
    height: 20px;
}
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}
.tab-content.active {
    display: block;
}
.tab-content h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.tab-content > p {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: var(--medium-gray);
}
.service-offering-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.service-offering-card {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: left;
    transition: all 0.3s ease;
}
.service-offering-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.service-offering-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}
.service-offering-card p {
    color: var(--medium-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* 4. Who This Is For Section */
.who-for-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem; /* 24px */
    max-width: 1000px;
    margin: 0 auto;
}
.who-for-card {
    background: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    text-align: left;
}
.who-for-card h4 {
    margin-top: 0;
    font-size: 1.25rem;
}
.who-for-card p {
    color: var(--medium-gray);
    font-size: 1rem;
}


/* 5. Proof of Growth (Case Studies) Section */
.case-study-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}
.case-study-card {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.case-study-card.placeholder {
    border-style: dashed;
    background-color: var(--background-color);
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: none;
}
.case-study-card.placeholder:hover {
    transform: none;
    box-shadow: none;
}
.case-study-logo {
    height: 36px; /* Adjusted size */
    width: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
    align-self: flex-start;
}
.case-study-quote {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    flex-grow: 1;
    font-style: italic;
}
.case-study-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}
.case-study-author .author-name {
    display: block;
    font-weight: 600;
}
.case-study-author .author-title {
    display: block;
    font-size: 0.875rem;
    color: var(--medium-gray);
}
.case-study-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}
.case-study-results h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--medium-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.case-study-results ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}
.case-study-results ul li {
    margin-bottom: 0.75rem;
    color: var(--medium-gray);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.case-study-results ul li::before {
    content: '✓';
    color: #16A34A; /* Green Check */
    font-weight: bold;
}
.case-study-results ul li strong {
    color: var(--primary-color); /* Darker text for the result number */
    font-weight: 700;
}


/* 6. Collaborative Process Section */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}
.step-item {
    background: var(--background-color);
    padding: 2.5rem 1.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}
.step-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1.5rem;
    background: var(--white-color); /* Corrected from undefined variable */
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color); /* Use accent for the icon color */
}
.step-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}
.step-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.step-description {
    color: var(--medium-gray);
    font-size: 0.9rem;
    line-height: 1.6;
}


/* 7. From the Growth Playbook (Content) Section */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.content-card {
    display: block;
    text-decoration: none;
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.content-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}
.content-card-text {
    padding: 1.5rem;
}
.content-category {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--accent-color);
    background-color: #DBEAFE; /* Blue-100 */
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}
.content-card-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--primary-color);
    line-height: 1.4;
}
.content-excerpt {
    font-size: 1rem;
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
}
.content-read-more {
    font-weight: 600;
    font-family: var(--font-primary);
    color: var(--accent-color);
}


/* 8. FAQ Section */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid var(--border-color);
}
.faq-item:last-of-type {
    border-bottom: none;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--primary-color);
}
.faq-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
    color: var(--medium-gray);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding-bottom 0.4s ease;
}
.faq-answer p {
    padding-bottom: 1.5rem;
    color: var(--medium-gray);
    line-height: 1.7;
}
.faq-item.active .faq-answer {
    max-height: 300px; /* Increased for longer answers */
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* 9. Final CTA Section */
.cta-section .cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}
.cta-section h2 {
    font-size: 2.5rem;
}
.cta-section .cal-embed-container {
    margin-top: 2.5rem;
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
}

/* 10. Responsive Design */
@media (max-width: 1024px) {
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-main .section-title,
    .cta-section h2 {
        font-size: 2rem;
    }
    
    /* Mobile Accordion Styles for Tabs */
    .tab-nav {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        overflow: hidden;
    }
    .tab-link {
        width: 100%;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        background-color: var(--white-color);
        color: var(--primary-color) !important; /* Override inline styles */
        border: none;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        transform: none !important; /* Override hover */
        box-shadow: none !important; /* Override active */
        font-size: 1rem;
        text-align: left;
    }
    .tab-link:last-of-type {
        border-bottom: none;
    }
    .tab-link:hover {
        background-color: var(--background-color);
    }
    .tab-link.active {
        background-color: var(--accent-color) !important;
        color: var(--white-color) !important;
        border-color: var(--accent-color);
    }
    .tab-link.active svg {
        stroke: var(--white-color);
    }
    .tab-content {
        display: block !important;
        max-height: 0;
        overflow: hidden;
        background-color: var(--background-color);
        padding: 0 1.25rem;
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    }
    .tab-content:last-of-type {
         border-bottom: 1px solid var(--border-color);
         border-bottom-left-radius: var(--border-radius);
         border-bottom-right-radius: var(--border-radius);
    }
    .tab-content.active {
        max-height: 2500px; /* Generous height for content */
        padding: 2rem 1.25rem;
    }
    .tab-content h3 {
        font-size: 1.5rem;
    }
    .service-offering-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .service-offering-card {
        padding: 1.5rem;
    }

    /* Other Sections on Mobile */
    .who-for-grid,
    .process-steps,
    .content-grid,
    .case-study-grid {
        grid-template-columns: 1fr;
    }
    .case-study-card,
    .cta-section .cal-embed-container {
        padding: 1.5rem;
    }
    .case-study-quote {
        font-size: 1.1rem;
    }
}