/* Global Styles */
:root {
    --aww-green: #1B6B4D;
    --aww-bg: #FDFBF7;
    --aww-text: #2C2416;
    --aww-border: #E0D9CC;
}

body {
    background-color: var(--aww-bg);
    color: var(--aww-text);
    font-family: 'Source Sans 3', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { flex: 1; }
h1, h2, h4, .navbar-brand { font-family: 'Fraunces', serif; }

/* Navbar */
.navbar { background-color: white; border-bottom: 3px solid var(--aww-green); }
.navbar-brand { color: var(--aww-green) !important; font-size: 1.5rem; }

.navbar-nav .nav-link {
    color: var(--aww-text);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    padding-bottom: 5px;
}

.navbar-nav .nav-link:hover {
    color: var(--aww-green);
}

.navbar-nav .nav-link.active {
    color: var(--aww-green) !important;
    border-bottom: 2px solid var(--aww-green);
}

/* Navbar Custom Adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 0.5rem;
        border-top: 1px solid var(--aww-border);
        padding-top: 0.5rem;
    }
    .border-top {
        border-top: 1px solid var(--aww-border) !important;
    }
}

@media (min-width: 992px) {
    .border-lg-0 {
        border-top: 0 !important;
    }
}

/* Article Components */
.dropdown-item:active {
    background-color: var(--aww-green);
}
.dropdown-menu {
    border-radius: 0;
    font-size: 0.9rem;
}
.category-tag {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 8px;
    background: #E8F4EE;
    color: var(--aww-green);
    text-transform: uppercase;
}
.card { border: 1px solid var(--aww-border); border-radius: 0; }
.article-img { width: 100%; height: 250px; object-fit: cover; border-bottom: 1px solid var(--aww-border); }

/* Landing Page Specific */
.hero-section {
    padding: 100px 0;
    background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), url('/static/images/hero-pattern.png');
}
.btn-aww {
    background-color: var(--aww-green);
    color: white;
    border-radius: 0;
    padding: 12px 30px;
    font-weight: 600;
}
/* Pagination and Layout Adjustments */
.btn-xs {
    padding: 1px 5px;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 3px;
}

/* Legislature Badges */
.badge-westminster { background-color: #e7f1ff; color: #0d6efd; border: 1px solid #9ec5fe; }
.badge-scotland { background-color: #f3e5f5; color: #7b1fa2; border: 1px solid #d1c4e9; }
.badge-wales { background-color: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.badge-ni { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* Legislature Buttons (Filter Sidebar) */
.btn-westminster { color: #0d6efd; border-color: #0d6efd; }
.btn-westminster:hover, .btn-westminster.active { background-color: #0d6efd; color: white; border-color: #0d6efd; }

.btn-scotland { color: #7b1fa2; border-color: #7b1fa2; }
.btn-scotland:hover, .btn-scotland.active { background-color: #7b1fa2; color: white; border-color: #7b1fa2; }

.btn-wales { color: #c62828; border-color: #c62828; }
.btn-wales:hover, .btn-wales.active { background-color: #c62828; color: white; border-color: #c62828; }

.btn-ni { color: #2e7d32; border-color: #2e7d32; }
.btn-ni:hover, .btn-ni.active { background-color: #2e7d32; color: white; border-color: #2e7d32; }

/* Custom Search Button */
.btn-aww-search {
    background-color: var(--aww-green);
    color: white;
    border: 1px solid var(--aww-green);
}

.btn-aww-search:hover {
    background-color: #14523a;
    color: white;
    border-color: #14523a;
}

/* Back to Top Button */
.btn-aww-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--aww-green);
    color: white;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.btn-aww-back-to-top:hover {
    background-color: #14523a;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.btn-aww-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .btn-aww-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}