<?php
session_start();
require_once __DIR__ . '/includes/db.php';
require_once __DIR__ . '/includes/functions.php';

$success = '';
$error = '';
$formData = [
    'name' => '',
    'email' => '',
    'subject' => '',
    'message' => ''
];

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $formData['name'] = sanitizeInput($_POST['name'] ?? '');
    $formData['email'] = filter_var($_POST['email'] ?? '', FILTER_SANITIZE_EMAIL);
    $formData['subject'] = sanitizeInput($_POST['subject'] ?? '');
    $formData['message'] = sanitizeInput($_POST['message'] ?? '');

    // Validation
    if (empty($formData['name'])) {
        $error = 'Please enter your name';
    } elseif (empty($formData['email']) || !filter_var($formData['email'], FILTER_VALIDATE_EMAIL)) {
        $error = 'Please enter a valid email address';
    } elseif (empty($formData['subject'])) {
        $error = 'Please enter a subject';
    } elseif (empty($formData['message'])) {
        $error = 'Please enter your message';
    } else {
        try {
            // Store contact inquiry in database
            $stmt = $pdo->prepare("INSERT INTO contact_inquiries (name, email, subject, message, status, created_at) VALUES (?, ?, ?, ?, 'pending', NOW())");
            $stmt->execute([$formData['name'], $formData['email'], $formData['subject'], $formData['message']]);

            $success = 'Thank you for contacting us. We will respond within 24 hours.';
            $formData = ['name' => '', 'email' => '', 'subject' => '', 'message' => ''];
        } catch (PDOException $e) {
            error_log("Contact form error: " . $e->getMessage());
            $error = 'Unable to send message. Please try again later.';
        }
    }
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description"
        content="Contact Oakshire Finance. Our support team is ready to help with your banking questions." />
    <title>Contact Us | Oakshire Finance</title>
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link
        href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap"
        rel="stylesheet" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary-navy: #0a2540;
            --primary-dark: #0a1c2f;
            --primary-blue: #1a4d8c;
            --accent-blue: #2c7da0;
            --success-green: #2e7d32;
            --error-red: #dc3545;
            --gray-50: #f8f9fc;
            --gray-100: #f1f3f9;
            --gray-200: #e9ecef;
            --gray-300: #dee2e6;
            --gray-400: #ced4da;
            --gray-500: #adb5bd;
            --gray-600: #6c757d;
            --gray-700: #495057;
            --gray-800: #343a40;
            --gray-900: #212529;
            --white: #ffffff;
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
            --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
            --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.12);
            --transition: all 0.3s ease;
        }

        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            color: var(--gray-800);
            background-color: var(--gray-50);
            line-height: 1.5;
            overflow-x: hidden;
        }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 32px;
        }

        /* Animation Keyframes */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInLeft {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes fadeInRight {
            from {
                opacity: 0;
                transform: translateX(30px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .animate-fadeUp {
            animation: fadeInUp 0.8s ease forwards;
        }

        .animate-fadeLeft {
            animation: fadeInLeft 0.8s ease forwards;
        }

        .animate-fadeRight {
            animation: fadeInRight 0.8s ease forwards;
        }

        .delay-100 {
            animation-delay: 0.1s;
            opacity: 0;
        }

        .delay-200 {
            animation-delay: 0.2s;
            opacity: 0;
        }

        .delay-300 {
            animation-delay: 0.3s;
            opacity: 0;
        }

        /* Header */
        header {
            background: var(--white);
            box-shadow: var(--shadow-sm);
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid var(--gray-200);
            transition: var(--transition);
        }

        header.scrolled {
            box-shadow: var(--shadow-md);
        }

        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 72px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            transition: var(--transition);
        }

        .logo:hover {
            transform: scale(1.02);
        }

        .logo-icon {
            width: 38px;
            height: 38px;
            background: var(--primary-navy);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .logo-icon i {
            font-size: 18px;
            color: white;
        }

        .logo-text {
            font-size: 24px;
            font-weight: 700;
            color: var(--primary-navy);
            letter-spacing: -0.3px;
        }

        .nav-links {
            display: flex;
            gap: 32px;
        }

        .nav-links a {
            text-decoration: none;
            font-weight: 500;
            color: var(--gray-700);
            transition: var(--transition);
            font-size: 15px;
            position: relative;
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--primary-blue);
            transition: width 0.3s ease;
        }

        .nav-links a:hover::after,
        .nav-links a.active::after {
            width: 100%;
        }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--primary-blue);
        }

        .auth-buttons {
            display: flex;
            gap: 16px;
            align-items: center;
        }

        .btn-outline {
            padding: 8px 20px;
            border-radius: 8px;
            font-weight: 600;
            text-decoration: none;
            border: 1px solid var(--gray-300);
            color: var(--gray-700);
            transition: var(--transition);
            background: transparent;
        }

        .btn-outline:hover {
            border-color: var(--primary-blue);
            color: var(--primary-blue);
        }

        .btn-primary {
            padding: 8px 24px;
            border-radius: 8px;
            font-weight: 600;
            text-decoration: none;
            background: var(--primary-navy);
            color: white;
            transition: var(--transition);
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
        }

        /* Mobile Menu */
        .hamburger {
            display: none;
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: var(--gray-800);
            transition: var(--transition);
        }

        .hamburger:hover {
            color: var(--primary-blue);
        }

        @media (max-width: 900px) {
            .container {
                padding: 0 20px;
            }

            .nav-links,
            .auth-buttons {
                position: fixed;
                top: 72px;
                left: 0;
                width: 100%;
                background: var(--white);
                flex-direction: column;
                padding: 24px;
                gap: 16px;
                box-shadow: var(--shadow-lg);
                transform: translateY(-120%);
                opacity: 0;
                pointer-events: none;
                transition: transform 0.3s ease, opacity 0.2s ease;
                z-index: 999;
                border-bottom: 1px solid var(--gray-200);
            }

            .nav-links {
                align-items: center;
            }

            .auth-buttons {
                top: calc(72px + 260px);
                flex-direction: row;
                justify-content: center;
            }

            .nav-links.active,
            .auth-buttons.active {
                transform: translateY(0);
                opacity: 1;
                pointer-events: all;
            }

            .hamburger {
                display: block;
            }
        }

        /* Page Hero */
        .page-hero {
            margin-top: 72px;
            background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-dark) 100%);
            padding: 80px 0;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .page-hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><path fill="white" d="M10,50 L90,50 M50,10 L50,90 M30,30 L70,70 M30,70 L70,30"/></svg>') repeat;
            pointer-events: none;
        }

        .page-hero h1 {
            font-size: 48px;
            font-weight: 800;
            color: white;
            margin-bottom: 16px;
        }

        .page-hero p {
            font-size: 18px;
            color: rgba(255, 255, 255, 0.85);
            max-width: 700px;
            margin: 0 auto;
        }

        /* Contact Section */
        .contact-section {
            padding: 80px 0;
        }

        .contact-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 60px;
        }

        /* Contact Info Cards */
        .info-card {
            background: var(--white);
            border-radius: 20px;
            padding: 32px;
            margin-bottom: 32px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--gray-200);
            transition: var(--transition);
        }

        .info-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-hover);
        }

        .info-icon {
            width: 56px;
            height: 56px;
            background: rgba(26, 77, 140, 0.1);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
        }

        .info-icon i {
            font-size: 24px;
            color: var(--primary-blue);
        }

        .info-card h3 {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 12px;
            color: var(--gray-900);
        }

        .info-card p {
            color: var(--gray-600);
            line-height: 1.6;
            margin-bottom: 16px;
        }

        .info-detail {
            color: var(--primary-blue);
            text-decoration: none;
            font-weight: 500;
            display: inline-block;
        }

        .business-hours {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--gray-200);
        }

        .business-hours p {
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
        }

        /* Contact Form */
        .contact-form {
            background: var(--white);
            border-radius: 20px;
            padding: 40px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--gray-200);
        }

        .contact-form h2 {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 8px;
            color: var(--gray-900);
        }

        .contact-form p {
            color: var(--gray-600);
            margin-bottom: 32px;
        }

        .form-group {
            margin-bottom: 24px;
        }

        .form-group label {
            display: block;
            font-size: 14px;
            font-weight: 500;
            color: var(--gray-700);
            margin-bottom: 8px;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px 16px;
            font-size: 15px;
            font-family: 'Inter', sans-serif;
            border: 1.5px solid var(--gray-200);
            border-radius: 12px;
            background: var(--white);
            transition: var(--transition);
            outline: none;
            color: var(--gray-800);
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: var(--primary-blue);
            box-shadow: 0 0 0 3px rgba(26, 77, 140, 0.1);
        }

        .form-group textarea {
            resize: vertical;
            min-height: 120px;
        }

        .btn-submit {
            width: 100%;
            padding: 14px;
            background: var(--primary-navy);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-submit:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }

        /* Alert Messages */
        .alert {
            padding: 14px 16px;
            border-radius: 12px;
            margin-bottom: 24px;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .alert-success {
            background: rgba(46, 125, 50, 0.1);
            border-left: 3px solid var(--success-green);
            color: var(--success-green);
        }

        .alert-danger {
            background: rgba(220, 53, 69, 0.1);
            border-left: 3px solid var(--error-red);
            color: var(--error-red);
        }

        /* Map Section */
        .map-section {
            padding: 0 0 80px 0;
        }

        .map-container {
            border-radius: 20px;
            overflow: hidden;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--gray-200);
        }

        .map-container iframe {
            width: 100%;
            height: 400px;
            border: none;
        }

        /* FAQ Section */
        .faq-section {
            padding: 80px 0;
            background: var(--gray-50);
        }

        .faq-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 24px;
        }

        .faq-item {
            background: var(--white);
            border-radius: 16px;
            padding: 24px;
            border: 1px solid var(--gray-200);
            transition: var(--transition);
        }

        .faq-item:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .faq-question {
            font-size: 18px;
            font-weight: 600;
            color: var(--gray-900);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .faq-question i {
            color: var(--primary-blue);
            font-size: 20px;
        }

        .faq-answer {
            color: var(--gray-600);
            line-height: 1.6;
            padding-left: 32px;
        }

        /* Footer */
        footer {
            background: var(--gray-900);
            color: var(--gray-400);
            padding: 60px 0 32px;
        }

        .footer-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 48px;
            margin-bottom: 48px;
        }

        .footer-col h4 {
            font-size: 16px;
            font-weight: 600;
            color: white;
            margin-bottom: 20px;
        }

        .footer-col p {
            font-size: 14px;
            line-height: 1.6;
            color: var(--gray-500);
        }

        .footer-links {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 12px;
        }

        .footer-links a {
            color: var(--gray-500);
            text-decoration: none;
            font-size: 14px;
            transition: var(--transition);
        }

        .footer-links a:hover {
            color: white;
        }

        .footer-bottom {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
            font-size: 13px;
        }

        .social-links {
            display: flex;
            gap: 20px;
        }

        .social-links a {
            color: var(--gray-500);
            font-size: 18px;
            transition: var(--transition);
        }

        .social-links a:hover {
            color: white;
            transform: translateY(-2px);
        }

        @media (max-width: 900px) {
            .contact-grid {
                grid-template-columns: 1fr;
                gap: 40px;
            }

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

            .page-hero h1 {
                font-size: 32px;
            }

            .contact-form {
                padding: 28px;
            }

            .footer-bottom {
                flex-direction: column;
                text-align: center;
            }
        }

        /* Scroll Animation */
        .scroll-trigger {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.8s ease, transform 0.8s ease;
        }

        .scroll-trigger.visible {
            opacity: 1;
            transform: translateY(0);
        }
    </style>
    <link rel="stylesheet" href="assets/css/nexus-theme.css" />
</head>

<body>
    <header id="header">
        <div class="container">
            <nav>
                <a href="index.php" class="logo">
                    <div class="logo-icon">
                        <i class="fas fa-building-columns"></i>
                    </div>
                    <span class="logo-text">Oakshire Finance</span>
                </a>
                <div class="nav-links" id="navLinks">
                    <a href="index.php">Home</a>
                    <a href="about-us.php">About Us</a>
                    <a href="services.php">Services</a>
                    <a href="contact.php" class="active">Contact</a>
                </div>
                <div class="auth-buttons" id="authButtons">
                    <?php if (isset($_SESSION['user_id'])): ?>
                        <a href="dashboard.php" class="btn-outline">Dashboard</a>
                        <a href="logout.php" class="btn-outline">Logout</a>
                    <?php else: ?>
                        <a href="login.php" class="btn-outline">Sign In</a>
                        <a href="register.php" class="btn-primary">Open Account</a>
                    <?php endif; ?>
                </div>
                <button class="hamburger" id="hamburger" aria-label="Menu">
                    <i class="fas fa-bars"></i>
                </button>
            </nav>
        </div>
    </header>

    <main>
        <!-- Hero Section -->
        <section class="page-hero">
            <div class="container">
                <h1>We're Here to Help</h1>
                <p>Our dedicated support team is available 24/7 to assist you with any questions or concerns.</p>
            </div>
        </section>

        <!-- Contact Section -->
        <section class="contact-section">
            <div class="container">
                <div class="contact-grid">
                    <!-- Contact Information -->
                    <div class="contact-info">
                        <div class="info-card scroll-trigger">
                            <div class="info-icon"><i class="fas fa-map-marker-alt"></i></div>
                            <h3>Visit Our Headquarters</h3>
                            <p>123 Financial District<br>Makati City, Metro Manila<br>Philippines 1200</p>
                            <a href="#" class="info-detail">Get Directions <i class="fas fa-arrow-right"></i></a>
                        </div>

                        <div class="info-card scroll-trigger">
                            <div class="info-icon"><i class="fas fa-phone-alt"></i></div>
                            <h3>Call Us</h3>
                            <p>Customer Service: <strong>1-800-NEXUS-01</strong><br>International: <strong>+63 2 1234
                                    5678</strong><br>24/7 Support Hotline: <strong>+63 956 4282 978</strong></p>
                            <a href="tel:1800NEXUS01" class="info-detail">Call Now <i
                                    class="fas fa-arrow-right"></i></a>
                        </div>

                        <div class="info-card scroll-trigger">
                            <div class="info-icon"><i class="fas fa-envelope"></i></div>
                            <h3>Email Us</h3>
                            <p>General Inquiries: <strong>support@oakshirefinance.com</strong><br>Loan Department:
                                <strong>loans@oakshirefinance.com</strong><br>Investments:
                                <strong>invest@oakshirefinance.com</strong>
                            </p>
                            <a href="mailto:support@oakshirefinance.com" class="info-detail">Send Email <i
                                    class="fas fa-arrow-right"></i></a>
                        </div>

                        <div class="info-card scroll-trigger">
                            <div class="info-icon"><i class="fas fa-clock"></i></div>
                            <h3>Business Hours</h3>
                            <div class="business-hours">
                                <p><span>Monday - Friday:</span> <span>9:00 AM - 6:00 PM</span></p>
                                <p><span>Saturday:</span> <span>10:00 AM - 2:00 PM</span></p>
                                <p><span>Sunday:</span> <span>Closed</span></p>
                                <p><span>24/7 Phone Support:</span> <span>Available</span></p>
                            </div>
                        </div>
                    </div>

                    <!-- Contact Form -->
                    <div class="contact-form scroll-trigger">
                        <h2>Send us a message</h2>
                        <p>Fill out the form below and we'll get back to you within 24 hours.</p>

                        <?php if ($success): ?>
                            <div class="alert alert-success">
                                <i class="fas fa-check-circle"></i>
                                <span><?= htmlspecialchars($success) ?></span>
                            </div>
                        <?php endif; ?>

                        <?php if ($error): ?>
                            <div class="alert alert-danger">
                                <i class="fas fa-exclamation-circle"></i>
                                <span><?= htmlspecialchars($error) ?></span>
                            </div>
                        <?php endif; ?>

                        <form method="POST" id="contactForm">
                            <div class="form-group">
                                <label for="name">Full Name *</label>
                                <input type="text" id="name" name="name"
                                    value="<?= htmlspecialchars($formData['name']) ?>" required>
                            </div>
                            <div class="form-group">
                                <label for="email">Email Address *</label>
                                <input type="email" id="email" name="email"
                                    value="<?= htmlspecialchars($formData['email']) ?>" required>
                            </div>
                            <div class="form-group">
                                <label for="subject">Subject *</label>
                                <select id="subject" name="subject" required>
                                    <option value="" disabled <?= empty($formData['subject']) ? 'selected' : '' ?>>Select
                                        a subject</option>
                                    <option value="General Inquiry" <?= $formData['subject'] === 'General Inquiry' ? 'selected' : '' ?>>General Inquiry</option>
                                    <option value="Account Support" <?= $formData['subject'] === 'Account Support' ? 'selected' : '' ?>>Account Support</option>
                                    <option value="Loan Application" <?= $formData['subject'] === 'Loan Application' ? 'selected' : '' ?>>Loan Application</option>
                                    <option value="Investment Questions" <?= $formData['subject'] === 'Investment Questions' ? 'selected' : '' ?>>Investment Questions</option>
                                    <option value="Complaint" <?= $formData['subject'] === 'Complaint' ? 'selected' : '' ?>>Complaint</option>
                                    <option value="Other" <?= $formData['subject'] === 'Other' ? 'selected' : '' ?>>Other
                                    </option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="message">Message *</label>
                                <textarea id="message" name="message"
                                    required><?= htmlspecialchars($formData['message']) ?></textarea>
                            </div>
                            <button type="submit" class="btn-submit" id="submitBtn">
                                Send Message <i class="fas fa-paper-plane"></i>
                            </button>
                        </form>
                    </div>
                </div>
            </div>
        </section>

        <!-- Map Section -->
        <section class="map-section">
            <div class="container">
                <div class="map-container scroll-trigger">
                    <iframe
                        src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1x3861.567890123456!2d121.017123456789!3d14.556123456789!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3397c8a8b8b8b8b8%3A0x1234567890abcdef!2sMakati%20City%2C%20Metro%20Manila!5e0!3m2!1sen!2sph!4v1234567890123!5m2!1sen!2sph"
                        allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade">
                    </iframe>
                </div>
            </div>
        </section>

        <!-- FAQ Section -->
        <section class="faq-section">
            <div class="container">
                <div class="category-header scroll-trigger" style="text-align: center; margin-bottom: 48px;">
                    <h2>Frequently Asked Questions</h2>
                    <p>Find quick answers to common questions about our services.</p>
                </div>
                <div class="faq-grid">
                    <div class="faq-item scroll-trigger">
                        <div class="faq-question">
                            <i class="fas fa-question-circle"></i>
                            <span>How do I open a new account?</span>
                        </div>
                        <div class="faq-answer">
                            You can open an account online by clicking the "Open Account" button. The process takes
                            about 5-10 minutes and requires valid ID and basic personal information.
                        </div>
                    </div>
                    <div class="faq-item scroll-trigger">
                        <div class="faq-question">
                            <i class="fas fa-question-circle"></i>
                            <span>What are your customer service hours?</span>
                        </div>
                        <div class="faq-answer">
                            Our phone support is available 24/7. Branch hours are Monday-Friday 9 AM-6 PM and Saturday
                            10 AM-2 PM. Online banking is available 24/7.
                        </div>
                    </div>
                    <div class="faq-item scroll-trigger">
                        <div class="faq-question">
                            <i class="fas fa-question-circle"></i>
                            <span>How do I report a lost or stolen card?</span>
                        </div>
                        <div class="faq-answer">
                            Call our 24/7 support hotline immediately at 1-800-NEXUS-01 to report lost or stolen cards.
                            You can also freeze your card through the mobile app.
                        </div>
                    </div>
                    <div class="faq-item scroll-trigger">
                        <div class="faq-question">
                            <i class="fas fa-question-circle"></i>
                            <span>What is the minimum balance for a savings account?</span>
                        </div>
                        <div class="faq-answer">
                            Our Basic Savings account requires no minimum balance. Premium accounts may have higher
                            requirements but offer additional benefits.
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <footer>
        <div class="container">
            <div class="footer-grid">
                <div class="footer-col">
                    <h4>Oakshire Finance</h4>
                    <p>Building trust through secure, reliable banking solutions since 2019.</p>
                    <div style="margin-top: 16px;">
                        <p><i class="fas fa-envelope"></i> support@oakshirefinance.com</p>
                        <p><i class="fas fa-phone"></i> 1-800-NEXUS-01</p>
                    </div>
                </div>
                <div class="footer-col">
                    <h4>Banking</h4>
                    <ul class="footer-links">
                        <li><a href="#">Personal Banking</a></li>
                        <li><a href="#">Business Banking</a></li>
                        <li><a href="#">Loans</a></li>
                        <li><a href="#">Credit Cards</a></li>
                    </ul>
                </div>
                <div class="footer-col">
                    <h4>Support</h4>
                    <ul class="footer-links">
                        <li><a href="#">Help Center</a></li>
                        <li><a href="#">Security</a></li>
                        <li><a href="#">Fraud Prevention</a></li>
                        <li><a href="contact.php">Contact Us</a></li>
                    </ul>
                </div>
                <div class="footer-col">
                    <h4>Legal</h4>
                    <ul class="footer-links">
                        <li><a href="terms.php">Terms & Conditions</a></li>
                        <li><a href="privacy-policy.php">Privacy Policy</a></li>
                        <li><a href="security-policy.php">Security Policy</a></li>
                    </ul>
                </div>
            </div>
            <div class="footer-bottom">
                <div>&copy; 2025 Oakshire Finance. All rights reserved. Member FDIC.</div>
                <div class="social-links">
                    <a href="#"><i class="fab fa-facebook-f"></i></a>
                    <a href="#"><i class="fab fa-twitter"></i></a>
                    <a href="#"><i class="fab fa-linkedin-in"></i></a>
                    <a href="#"><i class="fab fa-instagram"></i></a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        // Header scroll effect
        const header = document.getElementById('header');
        window.addEventListener('scroll', () => {
            if (window.scrollY > 50) {
                header.classList.add('scrolled');
            } else {
                header.classList.remove('scrolled');
            }
        });

        // Intersection Observer for scroll animations
        const observerOptions = {
            threshold: 0.1,
            rootMargin: '0px 0px -50px 0px'
        };

        const observer = new IntersectionObserver((entries) => {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    entry.target.classList.add('visible');
                    observer.unobserve(entry.target);
                }
            });
        }, observerOptions);

        document.querySelectorAll('.scroll-trigger').forEach(el => {
            observer.observe(el);
        });

        // Form submission loading state
        const contactForm = document.getElementById('contactForm');
        const submitBtn = document.getElementById('submitBtn');

        if (contactForm) {
            contactForm.addEventListener('submit', () => {
                submitBtn.classList.add('loading');
                submitBtn.disabled = true;
                submitBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Sending...';
            });
        }

        // Auto-dismiss alerts
        const alerts = document.querySelectorAll('.alert');
        alerts.forEach(alert => {
            setTimeout(() => {
                alert.style.transition = 'opacity 0.3s ease';
                alert.style.opacity = '0';
                setTimeout(() => alert.remove(), 300);
            }, 5000);
        });

        // Mobile menu toggle
        const hamburger = document.getElementById('hamburger');
        const navLinks = document.getElementById('navLinks');
        const authButtons = document.getElementById('authButtons');
        let menuOpen = false;

        if (hamburger) {
            hamburger.addEventListener('click', () => {
                menuOpen = !menuOpen;
                navLinks.classList.toggle('active', menuOpen);
                authButtons.classList.toggle('active', menuOpen);
                const icon = hamburger.querySelector('i');
                if (menuOpen) {
                    icon.classList.remove('fa-bars');
                    icon.classList.add('fa-times');
                } else {
                    icon.classList.remove('fa-times');
                    icon.classList.add('fa-bars');
                }
            });
        }

        // Close menu when clicking links on mobile
        document.querySelectorAll('#navLinks a, #authButtons a').forEach(link => {
            link.addEventListener('click', () => {
                if (window.innerWidth <= 900 && menuOpen) {
                    navLinks.classList.remove('active');
                    authButtons.classList.remove('active');
                    menuOpen = false;
                    const icon = hamburger.querySelector('i');
                    if (icon) {
                        icon.classList.remove('fa-times');
                        icon.classList.add('fa-bars');
                    }
                }
            });
        });

        window.addEventListener('resize', () => {
            if (window.innerWidth > 900 && menuOpen) {
                navLinks.classList.remove('active');
                authButtons.classList.remove('active');
                menuOpen = false;
                const icon = hamburger.querySelector('i');
                if (icon) {
                    icon.classList.remove('fa-times');
                    icon.classList.add('fa-bars');
                }
            }
        });
    </script>
</body>

</html>