:root {
    --primary-blue: #4a90c2;
    --secondary-blue: #357abd;
    --brand-dark: #2c3e50;
    --surface-muted: #f8f9fa;
}

body {
    background: var(--surface-muted);
    min-height: 100vh;
}

.main-container {
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header Styles */
.site-header {
    padding: 1.5rem 0;
    border-bottom: 3px solid var(--secondary-blue);
}

.site-title {
    color: var(--brand-dark);
    font-weight: 700;
}

.site-tagline {
    color: #6c757d;
    max-width: 48rem;
}

.logo {
    max-height: 80px;
    width: auto;
    border-radius: 8px;
}

/* Navigation Styles */
.navbar {
    /* Force the brand colour over Bootstrap's navbar default; scoped override kept
       to this single rule per project convention. */
    background-color: var(--secondary-blue) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    margin: 0 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.2);
}

.navbar-toggler {
    border-color: white;
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 400px);
}

/* Hero Carousel */
.hero-carousel {
    background: var(--surface-muted);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.hero-carousel .carousel-caption {
    /* Dark scrim so captions stay readable over busy photos */
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem 1.5rem 1rem;
}

.carousel-img-fix {
    object-fit: cover;     /* Crops image to fill the 16x9 ratio box without distortion */
    object-position: center; /* Centers the image within the box */
}

/* Section Headers */
.section-header {
    color: var(--secondary-blue);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Event Cards */
.event-card {
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-blue);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(53, 122, 189, 0.15);
}

.event-title {
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.event-date {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.event-links a {
    color: var(--secondary-blue);
    text-decoration: none;
    margin-right: 1rem;
    font-size: 0.9rem;
}

.event-links a:hover {
    text-decoration: underline;
}

/* Sidebar Styles */
.sidebar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.sidebar-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar h5 {
    color: var(--secondary-blue);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.announcement-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #495057;
}

.announcement-text img {
    max-width: 100%;
    height: auto;
}

.bulletin-link {
    display: block;
    color: var(--secondary-blue);
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.bulletin-link:hover {
    text-decoration: underline;
    color: var(--primary-blue);
}

.bulletin-link i {
    margin-right: 0.5rem;
}

.no-jobs {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background-color: var(--brand-dark);
    color: white;
    margin-top: auto;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Brand colour helpers (Bootstrap's primary is a different blue) */
.bg-brand {
    background-color: var(--secondary-blue);
}

.btn-brand {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    color: white;
}

.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.btn-outline-brand {
    border-color: var(--secondary-blue);
    color: var(--secondary-blue);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    color: white;
}

/* Sidebar that follows the reader below the sticky navbar */
.sidebar-sticky {
    position: sticky;
    top: 4.5rem;
}

/* Document lists (bulletins, publications) */
.document-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.document-title {
    color: var(--secondary-blue);
    font-weight: 600;
    line-height: 1.4;
}

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

/* Year-anchor targets land below the sticky navbar */
.document-group {
    scroll-margin-top: 5rem;
}

/* Page / section titles with brand accent underline */
.section-title {
    position: relative;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-blue), var(--secondary-blue));
}
