<?php
/**
 * Template Name: Services Page
 */
get_header(); ?>

<style>
/* --- Retained Hero Styles --- */
.plans-hero {
    background-color: #E6F7F9; 
    padding: 80px 0 0 0; 
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.plans-hero-content {
    max-width: 1200px;
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plans-text {
    flex: 1.2;
    padding-right: 50px;
    padding-bottom: 80px; 
}

.services-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    color: #1a365d; 
    margin-bottom: 24px;
}

.services-title .gradient-text {
    color: #00B5B5; 
}

.services-hero-desc {
    font-size: 18px;
    line-height: 1.6;
    color: #334e68;
    max-width: 580px;
}

.plans-image {
    flex: 0.8;
    display: flex;
    align-items: flex-end; 
}

.plans-image img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* --- Categories Section --- */
.categories-section {
    padding: 100px 0;
    background-color: #ffffff;
}

.section-heading {
    font-size: 36px;
    font-weight: 800;
    color: #1e3a8a; 
    margin-bottom: 50px;
    padding-left: 5%;
}

.categories-main-container {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    background-color: #eef2ff; 
    border-radius: 24px;
    overflow: visible; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    align-items: stretch;
    height: auto;
}

.categories-sidebar {
    background-color: #1e3a8a; 
    width: 300px;
    padding: 30px 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
}

.cat-tab {
    width: 100%;
    background: none;
    border: none;
    padding: 18px 25px;
    color: #ffffff;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.cat-tab.active {
    color: #22d3ee; 
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #22d3ee;
}

.categories-content-area {
    flex-grow: 1;
    padding: 60px 50px;
    height: auto !important;
    overflow: visible !important;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.service-group { margin-bottom: 35px; }
.service-group h3 { font-size: 20px; font-weight: 700; color: #1e3a8a; margin-bottom: 8px; }
.service-group p { font-size: 15px; line-height: 1.6; color: #475569; }

/* --- Ready to Work Smarter Section (Figma Match) --- */
.ready-section {
    position: relative;
    /* Gradient from Figma Screenshot: #1D3E88 to #04B7B4 */
    background: linear-gradient(90deg, #1D3E88 0%, #04B7B4 100%);
    min-height: 355px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    margin-bottom: 160px; /* Space before footer */
}

.ready-section-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%; 
    height: 100%;
    background-image: url('<?php echo get_template_directory_uri(); ?>/images/ready-to-work-smarter-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    /* Blends the image into the gradient */
    mask-image: linear-gradient(to left, black 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 75%, transparent 100%);
}

.ready-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

.ready-content {
    max-width: 520px;
}

.ready-content h2 {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.1;
    color: #ffffff;
}

.ready-content p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
    opacity: 0.95;
}

.btn-schedule {
    display: inline-block;
    background-color: #00E5E5; /* Figma Cyan */
    color: #1a365d;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
}

.btn-schedule:hover {
    transform: scale(1.05);
    background-color: #ffffff;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .plans-hero-content { flex-direction: column; text-align: center; }
    .plans-text { padding-right: 0; padding-bottom: 40px; }
    .categories-main-container { flex-direction: column; }
    .categories-sidebar { 
        width: 100%; flex-direction: row; overflow-x: auto; 
        border-bottom-left-radius: 0; border-top-right-radius: 24px;
    }
    .cat-tab { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
    
    .ready-section { text-align: center; padding: 60px 0; margin-bottom: 40px; }
    .ready-section-bg { width: 100%; opacity: 0.2; }
    .ready-content { margin: 0 auto; }
}
</style>

<main class="services-page-wrapper">
    <section class="plans-hero">
        <div class="plans-hero-content">
            <div class="plans-text">
                <h1 class="services-title">
                    No matter what you<br> 
                    need, <span class="gradient-text">DAVA has a<br> plan for you.</span>
                </h1>
                <p class="services-hero-desc">
                    We offer a wide range of service packages designed to support every functional area of your business. Each plan includes a dedicated Part-time or Full-time Virtual Assistant, a committed Customer Success Manager (CSM), and full complimentary access to the DAVA Workspace App—everything you need to work smarter and scale with ease.
                </p>
            </div>
            <div class="plans-image">
                <img src="<?php echo get_template_directory_uri(); ?>/images/services-hero-woman-dial-a-virtual-assistant.png" alt="DAVA Assistant" id="hero-img">
            </div>
        </div>
    </section>

    <section class="categories-section">
        <div class="container">
            <h2 class="section-heading">Categories</h2>
            <div class="categories-main-container">
                <aside class="categories-sidebar">
                    <button class="cat-tab active" data-target="productivity">Personal Productivity</button>
                    <button class="cat-tab" data-target="hr">HR, Admin and Finance</button>
                    <button class="cat-tab" data-target="sales">Sales Development</button>
                    <button class="cat-tab" data-target="marketing">Marketing</button>
                    <button class="cat-tab" data-target="customer-service">Customer Service</button>
                    <button class="cat-tab" data-target="software">Software Developers</button>
                    <button class="cat-tab" data-target="industry">Industry-specific Plans</button>
                    <button class="cat-tab" data-target="real-estate">Real Estate</button>
                </aside>

                <div class="categories-content-area" id="services-display">
                    <div class="tab-content active" id="productivity">
                        <div class="service-group">
                            <h3>General Virtual Assistant</h3>
                            <p>A DAVA General Virtual Assistant manages your personal and team calendars, coordinates meetings, and keeps your daily operations organized and efficient.</p>
                        </div>
                        <div class="service-group">
                            <h3>Personal Assistant</h3>
                            <p>Your DAVA Personal Assistant helps you stay on top of life and work — managing schedules, reminders, errands, and day-to-day tasks with ease.</p>
                        </div>
                        </div>
                </div>
            </div>
        </div>
    </section>

    <section class="ready-section">
        <div class="ready-section-bg"></div>
        <div class="ready-container">
            <div class="ready-content">
                <h2>Ready to Work Smarter?</h2>
                <p>
                    Book a meeting with DAVA and discover how a dedicated Virtual Assistant 
                    can streamline your workload, free your time, and help you operate at your best.
                </p>
                <a href="<?php echo site_url('/calendar'); ?>" class="btn-schedule">
                    Schedule a Meeting
                </a>
            </div>
        </div>
    </section>
</main>

<script>
document.addEventListener('DOMContentLoaded', function() {
    const tabs = document.querySelectorAll('.cat-tab');
    const contents = document.querySelectorAll('.tab-content');

    tabs.forEach(tab => {
        tab.addEventListener('click', () => {
            tabs.forEach(t => t.classList.remove('active'));
            contents.forEach(c => c.classList.remove('active'));

            tab.classList.add('active');
            const targetId = tab.getAttribute('data-target');
            const targetEl = document.getElementById(targetId);
            if(targetEl) targetEl.classList.add('active');
        });
    });
});
</script>

<?php get_footer(); ?>