{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Travel Consult - Flight Price Drops & Points Deals{% endblock %}</title>
    <meta name="description" content="{% block meta_description %}Your destination for the best travel deals, flight price drops, and airline points opportunities.{% endblock %}">
    
    <!-- Bootstrap CSS CDN -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    
    <!-- Custom CSS -->
    <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ current_time|date:'U' }}">
    
    {% block extra_head %}{% endblock %}
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-light fixed-top">
        <div class="container">
            <a class="navbar-brand" href="{% url 'home' %}">TravelConsult</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto align-items-center">
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'home' %}">Home</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/#deals">Latest Deals</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link btn btn-primary text-white" href="/admin/">Admin Portal</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <main style="margin-top: 75px;">
        {% if messages %}
            <div class="container mt-3">
                {% for message in messages %}
                    <div class="alert alert-{{ message.tags }} alert-dismissible fade show">
                        {{ message }}
                        <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                    </div>
                {% endfor %}
            </div>
        {% endif %}

        {% block content %}{% endblock %}
    </main>

    <footer class="bg-white py-5 mt-5">
        <div class="container">
            <div class="row">
                <div class="col-md-4 mb-4">
                    <h5 class="mb-4">TravelConsult</h5>
                    <p class="text-muted">Helping you find the best value in travel through data-driven price tracking and points strategies.</p>
                </div>
                <div class="col-md-4 mb-4">
                    <h5 class="mb-4">Quick Links</h5>
                    <ul class="list-unstyled">
                        <li><a href="{% url 'home' %}" class="text-decoration-none text-muted">Home</a></li>
                        <li><a href="/#deals" class="text-decoration-none text-muted">Latest Deals</a></li>
                        <li><a href="/admin/" class="text-decoration-none text-muted">Admin Login</a></li>
                    </ul>
                </div>
                <div class="col-md-4 mb-4">
                    <h5 class="mb-4">Contact</h5>
                    <p class="text-muted">Questions? Reach out via our deal forms or contact our consultants directly.</p>
                </div>
            </div>
            <hr>
            <div class="text-center text-muted">
                &copy; {{ current_time|date:"Y" }} TravelConsult. All rights reserved.
            </div>
        </div>
    </footer>

    <!-- Bootstrap JS CDN -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    {% block extra_js %}{% endblock %}
</body>
</html>