@extends('layouts.app')

@section('title', 'Pricing Plans | DIGITAL STUDIO2')

@push('styles')
    <style>
        /* Packages Page Specific Styles */
        .hero-packages {
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.85) 100%),
                url('{{ asset("assets/service-hero-bg.png") }}');
            background-size: cover;
            background-position: center;
            min-height: 60vh;
            display: flex;
            align-items: center;
        }

        .pricing-tabs {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            justify-content: center;
            margin-bottom: 3rem;
        }

        .pricing-tab {
            padding: 0.75rem 1.5rem;
            background: transparent;
            border: 2px solid var(--text-300);
            color: var(--text-600);
            border-radius: var(--radius-full);
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition-normal);
        }

        .pricing-tab:hover {
            border-color: var(--primary-500);
            color: var(--primary-500);
            transform: translateY(-2px);
        }

        .pricing-tab.active {
            background: var(--primary-500);
            border-color: var(--primary-500);
            color: white;
        }

        .pricing-card {
            background: var(--bg-white);
            border-radius: var(--radius-xl);
            padding: 3rem 2rem;
            border: 2px solid var(--text-200);
            transition: all var(--transition-normal);
            height: 100%;
            position: relative;
        }

        .pricing-card.featured {
            border-color: var(--primary-500);
            box-shadow: var(--shadow-primary);
            transform: scale(1.02);
        }

        .pricing-card:hover {
            transform: translateY(-8px);
            box-shadow: var(--shadow-xl);
        }

        .pricing-badge {
            position: absolute;
            top: -12px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--primary-500);
            color: white;
            padding: 0.5rem 1.5rem;
            border-radius: var(--radius-full);
            font-size: 0.875rem;
            font-weight: 700;
        }

        .pricing-price {
            font-family: 'Sora', sans-serif;
            font-size: 3.5rem;
            font-weight: 800;
            color: var(--text-900);
            margin: 1.5rem 0;
            line-height: 1;
        }

        .pricing-price span {
            font-size: 1rem;
            color: var(--text-500);
            font-weight: 600;
        }

        .pricing-feature {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.75rem;
            color: var(--text-600);
        }

        .pricing-feature i {
            color: var(--primary-500);
            font-size: 0.875rem;
        }

        .pricing-feature.unavailable {
            color: var(--text-400);
        }

        .pricing-feature.unavailable i {
            color: var(--text-400);
        }

        .comparison-table {
            background: var(--bg-white);
            border-radius: var(--radius-lg);
            overflow: hidden;
            border: 1px solid var(--text-200);
        }

        .comparison-table th {
            background: var(--primary-50);
            border-bottom: 2px solid var(--primary-500);
            padding: 1.5rem;
            font-weight: 700;
        }

        .comparison-table td {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--text-200);
        }

        .comparison-table tr:last-child td {
            border-bottom: none;
        }

        .faq-item {
            background: var(--bg-white);
            border-radius: var(--radius-lg);
            border: 1px solid var(--text-200);
            margin-bottom: 1rem;
            overflow: hidden;
        }

        .faq-question {
            padding: 1.5rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all var(--transition-fast);
        }

        .faq-question:hover {
            background: var(--bg-light);
        }

        .faq-question.active {
            background: var(--primary-50);
            border-bottom: 1px solid var(--primary-100);
        }

        .faq-answer {
            padding: 0 1.5rem;
            max-height: 0;
            overflow: hidden;
            transition: all var(--transition-normal);
        }

        .faq-answer.active {
            padding: 1.5rem;
            max-height: 500px;
        }

        @media (max-width: 768px) {
            .hero-packages {
                min-height: 50vh;
            }

            .pricing-card {
                padding: 2rem 1.5rem;
            }

            .pricing-price {
                font-size: 2.5rem;
            }

            .comparison-table {
                font-size: 0.875rem;
            }
        }

        @media (max-width: 576px) {
            .pricing-tabs {
                gap: 0.25rem;
            }

            .pricing-tab {
                padding: 0.5rem 1rem;
                font-size: 0.875rem;
            }
        }
    </style>
@endpush

@section('content')
    <!-- Hero Section -->
    <section class="hero-packages position-relative">
        <!-- Glow Effects -->
        <div class="glow-effect glow-primary glow-top-right"></div>
        <div class="glow-effect glow-primary glow-bottom-left"></div>

        <div class="container">
            <div class="row justify-content-center text-center">
                <div class="col-lg-8" data-aos="fade-up">
                    <h1 class="display-3 fw-bold text-white mb-4">
                        Competitive <span class="text-gradient">Pricing Plans</span>
                    </h1>
                    <p class="lead text-light opacity-90">
                        Empowering your business with comprehensive brand development services,
                        tailored for start-ups and large-scale enterprises alike.
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- Pricing Section -->
    <section class="py-5">
        <div class="container">
            <div class="text-center mb-5" data-aos="fade-up">
                <span class="badge bg-primary-100 text-primary mb-3 px-3 py-2 rounded-pill">
                    Our Pricing
                </span>
                <h2 class="mb-4"><span class="text-gradient">Budget-Friendly</span> Pricing Plans</h2>
                <p class="text-muted mx-auto" style="max-width: 800px">
                    Collaborating with DIGITAL STUDIO2 provides a wealth of advantages. Boost your brand awareness,
                    enhance customer interaction, and maximise your ROI with our customised strategies.
                </p>
            </div>

            <!-- Pricing Tabs -->
            <div class="pricing-tabs" data-aos="fade-up" data-aos-delay="100">
                <button class="pricing-tab active" data-plan="logo">Logo Design</button>
                <button class="pricing-tab" data-plan="web">Web Development</button>
                <button class="pricing-tab" data-plan="branding">Branding</button>
                <button class="pricing-tab" data-plan="video">Video Animation</button>
            </div>

            <!-- Pricing Plans -->
            <div class="row g-4 justify-content-center">
                <!-- Basic Plan -->
                <div class="col-lg-4" data-aos="fade-up" data-aos-delay="200">
                    <div class="pricing-card">
                        <h4 class="fw-bold mb-4">Basic</h4>
                        <div class="pricing-price" id="basic-price">£39</div>
                        <p class="text-muted mb-4">Perfect for startups and small businesses</p>

                        <ul class="list-unstyled mb-4" id="basic-features">
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>2
                                Custom Logo Concepts</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>1
                                Creative Designer</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>3
                                Rounds of Revisions</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>Final
                                Files (JPG & PNG)</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>24-72
                                Hours Delivery</li>
                        </ul>

                        <a href="https://www.paypal.com/ncp/payment/26F2ULF7SLUUN" target="_blank"
                            class="btn btn-outline-primary w-100">
                            Get Started
                        </a>
                    </div>
                </div>

                <!-- Standard Plan -->
                <div class="col-lg-4" data-aos="fade-up" data-aos-delay="300">
                    <div class="pricing-card featured">
                        <div class="pricing-badge">Most Popular</div>
                        <h4 class="fw-bold mb-4">Standard</h4>
                        <div class="pricing-price" id="standard-price">£59</div>
                        <p class="text-muted mb-4">Ideal for growing businesses</p>

                        <ul class="list-unstyled mb-4" id="standard-features">
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>3-4
                                Custom Logo Concepts</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>2
                                Creative Designers</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>5-6
                                Rounds of Revisions</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>Final
                                Files (JPG, PNG & PDF)</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>24-72
                                Hours Delivery</li>
                        </ul>

                        <a href="https://www.paypal.com/ncp/payment/26F2ULF7SLUUN" target="_blank"
                            class="btn btn-primary w-100">
                            Get Started
                        </a>
                    </div>
                </div>

                <!-- Premium Plan -->
                <div class="col-lg-4" data-aos="fade-up" data-aos-delay="400">
                    <div class="pricing-card">
                        <h4 class="fw-bold mb-4">Premium</h4>
                        <div class="pricing-price" id="premium-price">£99</div>
                        <p class="text-muted mb-4">For enterprises and large projects</p>

                        <ul class="list-unstyled mb-4" id="premium-features">
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>6
                                Custom Logo Concepts</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>3
                                Creative Designers</li>
                            <li class="mb-2 d-flex align-items-center"><i
                                    class="fas fa-check me-2 text-primary"></i>Unlimited Revisions</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>Final
                                Files (All Formats)</li>
                            <li class="mb-2 d-flex align-items-center"><i class="fas fa-check me-2 text-primary"></i>24-72
                                Hours Delivery</li>
                        </ul>

                        <a href="https://www.paypal.com/ncp/payment/26F2ULF7SLUUN" target="_blank"
                            class="btn btn-outline-primary w-100">
                            Get Started
                        </a>
                    </div>
                </div>
            </div>

            <div class="text-center mt-5" data-aos="fade-up">
                <p class="text-muted">
                    Need a custom solution?
                    <a href="{{ route('contact') }}" class="text-primary fw-semibold">Contact us for a quote</a>
                </p>
            </div>
        </div>
    </section>

    <!-- Comparison Table -->
    <section class="py-5 bg-light">
        <div class="container">
            <div class="text-center mb-5" data-aos="fade-up">
                <span class="badge bg-primary-100 text-primary mb-3 px-3 py-2 rounded-pill">
                    Compare Plans
                </span>
                <h2 class="mb-4">Plan <span class="text-gradient">Comparison</span></h2>
            </div>

            <div class="comparison-table" data-aos="fade-up">
                <table class="table table-borderless mb-0">
                    <thead>
                        <tr>
                            <th>Features</th>
                            <th class="text-center">Basic</th>
                            <th class="text-center">Standard</th>
                            <th class="text-center">Premium</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>Number of Pages</td>
                            <td class="text-center">5</td>
                            <td class="text-center">10+</td>
                            <td class="text-center">Unlimited</td>
                        </tr>
                        <tr>
                            <td>Responsive Design</td>
                            <td class="text-center"><i class="fas fa-check text-primary"></i></td>
                            <td class="text-center"><i class="fas fa-check text-primary"></i></td>
                            <td class="text-center"><i class="fas fa-check text-primary"></i></td>
                        </tr>
                        <tr>
                            <td>E-commerce Integration</td>
                            <td class="text-center"><i class="fas fa-times text-muted"></i></td>
                            <td class="text-center"><i class="fas fa-check text-primary"></i></td>
                            <td class="text-center"><i class="fas fa-check text-primary"></i></td>
                        </tr>
                        <tr>
                            <td>SEO Optimisation</td>
                            <td class="text-center">Basic</td>
                            <td class="text-center">Advanced</td>
                            <td class="text-center">Complete</td>
                        </tr>
                        <tr>
                            <td>Custom Features</td>
                            <td class="text-center"><i class="fas fa-times text-muted"></i></td>
                            <td class="text-center"><i class="fas fa-times text-muted"></i></td>
                            <td class="text-center"><i class="fas fa-check text-primary"></i></td>
                        </tr>
                        <tr>
                            <td>Support</td>
                            <td class="text-center">30 Days</td>
                            <td class="text-center">90 Days</td>
                            <td class="text-center">1 Year</td>
                        </tr>
                        <tr>
                            <td>Revisions</td>
                            <td class="text-center">3 Rounds</td>
                            <td class="text-center">Unlimited</td>
                            <td class="text-center">Unlimited</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </section>

    <!-- Process Section -->
    <section class="py-5">
        <div class="container">
            <div class="text-center mb-5" data-aos="fade-up">
                <span class="badge bg-primary-100 text-primary mb-3 px-3 py-2 rounded-pill">
                    Our Process
                </span>
                <h2 class="mb-4">How We <span class="text-gradient">Work</span></h2>
                <p class="text-muted mx-auto" style="max-width: 800px">
                    Working with DIGITAL STUDIO2 provides numerous advantages. Experience greater brand awareness,
                    improved customer interaction, and a superior return on investment.
                </p>
            </div>

            <div class="row g-4">
                <div class="col-md-4" data-aos="fade-up" data-aos-delay="100">
                    <div class="pricing-card text-center">
                        <div class="mb-4">
                            <div class="d-inline-flex align-items-center justify-content-center rounded-circle"
                                style="width: 80px; height: 80px; background: var(--primary-100);">
                                <i class="fas fa-file-alt fa-2x text-primary"></i>
                            </div>
                        </div>
                        <h4 class="fw-bold mb-3">Submit Brief</h4>
                        <p class="text-muted mb-0">
                            Fill out our detailed project brief form with all your requirements and vision.
                        </p>
                    </div>
                </div>
                <div class="col-md-4" data-aos="fade-up" data-aos-delay="200">
                    <div class="pricing-card text-center">
                        <div class="mb-4">
                            <div class="d-inline-flex align-items-center justify-content-center rounded-circle"
                                style="width: 80px; height: 80px; background: var(--primary-100);">
                                <i class="fas fa-credit-card fa-2x text-primary"></i>
                            </div>
                        </div>
                        <h4 class="fw-bold mb-3">Secure Payment</h4>
                        <p class="text-muted mb-0">
                            Choose your package and complete secure payment to start your project.
                        </p>
                    </div>
                </div>
                <div class="col-md-4" data-aos="fade-up" data-aos-delay="300">
                    <div class="pricing-card text-center">
                        <div class="mb-4">
                            <div class="d-inline-flex align-items-center justify-content-center rounded-circle"
                                style="width: 80px; height: 80px; background: var(--primary-100);">
                                <i class="fas fa-rocket fa-2x text-primary"></i>
                            </div>
                        </div>
                        <h4 class="fw-bold mb-3">Launch Project</h4>
                        <p class="text-muted mb-0">
                            We deliver your completed project with revisions and ongoing support.
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- FAQ Section -->
    <section class="py-5 bg-light">
        <div class="container">
            <div class="text-center mb-5" data-aos="fade-up">
                <span class="badge bg-primary-100 text-primary mb-3 px-3 py-2 rounded-pill">
                    FAQ
                </span>
                <h2 class="mb-4">Frequently Asked <span class="text-gradient">Questions</span></h2>
            </div>

            <div class="row justify-content-center">
                <div class="col-lg-8" data-aos="fade-up">
                    <div class="faq-item">
                        <div class="faq-question">
                            <span>What payment methods do you accept?</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            <p class="text-muted mb-0">
                                We accept all major credit/debit cards, PayPal, and bank transfers. All payments
                                are processed securely through encrypted channels.
                            </p>
                        </div>
                    </div>

                    <div class="faq-item">
                        <div class="faq-question">
                            <span>How many revisions do I get?</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            <p class="text-muted mb-0">
                                Our Basic plan includes 3 rounds of revisions, while Standard and Premium plans
                                include unlimited revisions until you're completely satisfied.
                            </p>
                        </div>
                    </div>

                    <div class="faq-item">
                        <div class="faq-question">
                            <span>How long does a project take?</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            <p class="text-muted mb-0">
                                Timeline varies by project complexity: Basic websites take 7-10 days, Standard
                                takes 10-15 days, and Premium projects take 15-25 days.
                            </p>
                        </div>
                    </div>

                    <div class="faq-item">
                        <div class="faq-question">
                            <span>Do you offer ongoing support?</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            <p class="text-muted mb-0">
                                Yes! All plans include post-launch support: Basic (30 days), Standard (90 days),
                                and Premium (1 year) of technical support.
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- CTA Section -->
    <section class="service-cta">
        <div class="cta-pattern"></div>
        <div class="container">
            <div class="row justify-content-center text-center">
                <div class="col-lg-8" data-aos="fade-up">
                    <div class="service-cta-content">
                        <h2 class="text-white mb-4">Ready to Start Your Project?</h2>
                        <p class="text-light mb-5 opacity-90">
                            Choose the perfect plan for your business or contact us for a custom quote tailored
                            to your specific needs.
                        </p>
                        <div class="d-flex flex-wrap gap-3 justify-content-center">
                            <a href="{{ route('contact') }}" class="btn btn-primary btn-lg">
                                Get Custom Quote
                            </a>
                            <a href="#pricing" class="btn btn-outline-light btn-lg">
                                View All Plans
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
@endsection

@push('scripts')
    <script>
        document.addEventListener('DOMContentLoaded', function () {
            // Pricing Tabs
            const pricingTabs = document.querySelectorAll('.pricing-tab');

            pricingTabs.forEach(tab => {
                tab.addEventListener('click', function () {
                    // Remove active class from all tabs
                    pricingTabs.forEach(t => t.classList.remove('active'));

                    // Update active class
                    this.classList.add('active');

                    // Update pricing content
                    const plan = this.dataset.plan;
                    if (typeof updatePricing === 'function') {
                        updatePricing(plan);
                    } else {
                        console.error('updatePricing function is not defined');
                    }
                });
            });

            // FAQ Accordion
            const faqQuestions = document.querySelectorAll('.faq-question');

            faqQuestions.forEach(question => {
                question.addEventListener('click', function () {
                    const answer = this.nextElementSibling;
                    const icon = this.querySelector('i');

                    // Close all other answers
                    faqQuestions.forEach(q => {
                        if (q !== this) {
                            q.classList.remove('active');
                            q.nextElementSibling.classList.remove('active');
                            q.querySelector('i').classList.remove('fa-chevron-up');
                            q.querySelector('i').classList.add('fa-chevron-down');
                        }
                    });

                    // Toggle current answer
                    this.classList.toggle('active');
                    answer.classList.toggle('active');

                    // Toggle icon
                    if (icon.classList.contains('fa-chevron-down')) {
                        icon.classList.remove('fa-chevron-down');
                        icon.classList.add('fa-chevron-up');
                    } else {
                        icon.classList.remove('fa-chevron-up');
                        icon.classList.add('fa-chevron-down');
                    }
                });
            });
        });
    </script>
@endpush