/* African Energy Research - Reimagined Stylesheet v2 */

/* 1. Root Variables & Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600&family=Poppins:wght@400;600;700&display=swap');

:root {
    --aer-primary-blue: #336699; /* UPDATED THEME COLOR */
    --aer-charcoal: #336699;
    --aer-charcoal-1: #212529;
    --aer-gold: #D4AF37;
    --aer-light-bg: #f7f9f9;
    --aer-white: #ffffff;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Poppins', serif;
}

body {
    background-color: var(--aer-white);
    color: var(--aer-charcoal);
    font-family: var(--font-body);
    font-size: 1rem; /* Adjusted for better baseline */
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--aer-charcoal);
}

/* 2. Reusable Components */
.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 45%;
    width: 60px;
    height: 3px;
    background-color: var(--aer-primary-blue); /* UPDATED */
}
.section-subtitle {
    font-family: var(--font-body);
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 3rem;
}
.btn-primary {
    background-color: var(--aer-primary-blue); /* UPDATED */
    border-color: var(--aer-primary-blue); /* UPDATED */
    font-family: var(--font-heading);
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}
.btn-primary:hover {
    background-color: #2a5580; /* UPDATED hover color */
    border-color: #2a5580; /* UPDATED hover color */
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--aer-gold);
    color: var(--aer-gold);
    font-family: var(--font-heading);
    padding: 10px 28px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: var(--aer-charcoal-1);
    color: var(--aer-white);
    transform: translateY(-3px);
}

/* 3. Header & Navigation */
.navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar-brand img {
    height: 55px;
}
.navbar-nav .nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--aer-charcoal);
    position: relative;
    padding: 0.5rem 1rem;
}
.navbar-nav .nav-link:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--aer-primary-blue); /* UPDATED */
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.navbar-nav .nav-link.active:after,
.navbar-nav .nav-link:hover:after {
    transform: scaleX(1);
}

/* 4. Hero Section */
.hero-section {
    padding: 6rem 0;
    background-color: var(--aer-light-bg);
    display: flex;
    align-items: center;
    min-height: 80vh;
}
.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
}
.hero-content .lead {
    font-size: 1.2rem;
    color: #555;
}
.hero-image-container {
    background: "assets/img/hero-img-2.jpg" no-repeat center center;
    background-size: cover;
    min-height: 400px;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 5. Value Blocks Section */
.value-block {
    text-align: center;
    padding: 1rem;
    transition: all 0.3s ease;
}
.value-block .icon {
    font-size: 2.5rem;
    color: var(--aer-primary-blue); /* UPDATED */
    margin-bottom: 1rem;
    display: inline-block;
}

/* 6. Featured Research Section */
.featured-research-section {
    background-color: var(--aer-charcoal);
    color: var(--aer-white);
    padding: 6rem 0;
}
.featured-research-section .section-title,
.featured-research-section h3 {
    color: var(--aer-white);
}
.featured-research-section .section-title::after {
    background-color: var(--aer-gold);
}
.featured-research-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 2rem;
}
.featured-research-card p {
    color: rgba(255, 255, 255, 0.8);
}

/* 7. Recent Insights Section */
.insight-card {
    background-color: var(--aer-white);
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height */
}
.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.insight-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.insight-card .card-title {
    font-size: 1.2rem;
    font-weight: 600;
}
.insight-card .card-text {
    flex-grow: 1;
    color: #555;
    font-size: 0.95rem;
}
.insight-card .card-link {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--aer-primary-blue); /* UPDATED */
    text-decoration: none;
    margin-top: 1rem;
}
.insight-card .card-link:hover {
    text-decoration: underline;
}

/* 8. Impact Stats Section */
.impact-section {
    padding: 5rem 0;
    background-color: var(--aer-light-bg);
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--aer-primary-blue); /* UPDATED */
}
.stat-label {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #555;
}

/* 9. Partners Section */
.partners-section {
    padding: 4rem 0;
}
.partner-logo {
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}
.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* 10. Footer */
.main-footer {
    background-color: var(--aer-charcoal);
    color: var(--aer-white);
    padding: 4rem 0 2rem 0;
}
.main-footer h5 {
    font-family: var(--font-heading);
    color: var(--aer-gold);
    margin-bottom: 1.5rem;
}
.main-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}
.main-footer a:hover {
    color: var(--aer-white);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    color: rgba(255,255,255,0.5);
}

/* 11. Media Queries for Responsiveness (NEW SECTION) */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem; /* Smaller h1 for tablets */
    }
    .hero-section {
        padding: 4rem 0;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.95rem; /* Slightly smaller base font on mobile */
    }
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
        text-align: center;
    }
    .hero-image-container {
        min-height: 250px;
        margin-top: 2rem; /* Space between text and image when stacked */
    }
    .hero-content h1 {
        font-size: 2.2rem; /* Smaller h1 for phones */
    }
    .stat-item {
        margin-bottom: 2rem; /* Add space between stacked stat items */
    }
    .stat-item:last-child {
        margin-bottom: 0;
    }
    .footer-bottom {
        text-align: center;
    }
}

/* 6. NEW Focus Areas Tabs */
.focus-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1.5rem;
}
.focus-tabs .nav-item {
    margin-bottom: -2px;
}
.focus-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
}
.focus-tabs .nav-link.active, .focus-tabs .nav-link:hover {
    color: var(--aer-primary-blue);
    border-bottom-color: var(--aer-primary-blue);
}
.focus-tab-content {
    background-color: var(--aer-white);
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

/* 12. Styles for Reimagined About Page
-------------------------------------------------- */

/* About Page Hero */
.about-hero-section {
    position: relative;
    background: url('../img/about-hero-4.jpg') no-repeat center center;
    background-size: cover;
    padding: 6rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

/* Mission & Vision Cards */
.mission-vision-card {
    background-color: var(--aer-white);
    padding: 2rem;
    border-radius: 0.5rem;
    height: 100%;
    border-left: 4px solid var(--aer-primary-blue);
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

/* Our Approach Items */
.approach-item {
    padding: 2rem;
}
.approach-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: #dee2e6;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}
.timeline-item {
    padding: 1rem 3rem;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 50px;
}
.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 50px;
}
.timeline-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--aer-white);
    border: 3px solid var(--aer-primary-blue);
    top: 28px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}
.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}
.timeline-content {
    background-color: var(--aer-white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.timeline-item:nth-child(even) .timeline-content {
    text-align: left;
}
.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
}
.timeline-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.timeline-date {
    font-size: 0.9rem;
    color: #6c757d;
    font-family: var(--font-heading);
}

/* Final CTA Section */
.final-cta-section .btn-outline-dark {
    border-width: 2px;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::after {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 1rem;
    }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-dot {
        left: 12px;
    }
    .timeline-item:nth-child(odd) .timeline-content, .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
    }
}

/* 13. Styles for Research Page
-------------------------------------------------- */

/* Research Page Hero & Filter Bar */
.research-hero-section {
    background-color: var(--aer-light-bg);
    padding: 4rem 0;
}
.filter-bar .form-control,
.filter-bar .form-select {
    border-color: #ced4da;
}
.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(51, 102, 153, 0.25);
    border-color: var(--aer-primary-blue);
}

/* Featured Publication */
.featured-publication {
    background-color: var(--aer-charcoal-1);
    color: var(--aer-white);
    border-radius: 0.5rem;
    overflow: hidden;
}
.featured-publication h2, .featured-publication p {
    color: var(--aer-white);
}
.featured-publication-img {
    background: url('../img/featured-publication-img.jpg') no-repeat center center;
    background-size: cover;
}

/* Publication Cards */
.publication-card {
    background-color: var(--aer-white);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--aer-primary-blue);
}
.publication-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.publication-date {
    font-size: 0.85rem;
    color: #6c757d;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}
.publication-summary {
    font-size: 0.95rem;
    flex-grow: 1;
}
.publication-downloads {
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
    padding-top: 1rem;
}
.downloads-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.5rem;
}
.download-link {
    display: block;
    text-decoration: none;
    color: var(--aer-primary-blue);
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.download-link:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination .page-link {
    color: var(--aer-primary-blue);
}
.pagination .page-item.active .page-link {
    background-color: var(--aer-primary-blue);
    border-color: var(--aer-primary-blue);
    color: var(--aer-white);
}
.pagination .page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(51, 102, 153, 0.25);
}

/* 14. Styles for Get Involved Page
-------------------------------------------------- */

/* Get Involved Page Hero */
.get-involved-hero-section {
    background-color: var(--aer-light-bg);
    padding: 4rem 0;
}

/* Involvement Cards */
.involvement-card {
    background-color: var(--aer-white);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.involvement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--aer-primary-blue);
}
.involvement-card .btn-outline-dark {
    border-color: var(--aer-charcoal);
    border-width: 2px;
}
.involvement-card .btn-outline-dark:hover {
    background-color: var(--aer-charcoal);
    color: var(--aer-white);
}

/* Styled lists for cards */
.list-styled {
    padding-left: 1.2rem;
    font-size: 0.95rem;
}
.list-styled li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}
.list-styled li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--aer-primary-blue);
    font-weight: 700;
}

/* FAQ Accordion Styling */
.accordion-button {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
}
.accordion-button:not(.collapsed) {
    color: var(--aer-white);
    background-color: var(--aer-primary-blue);
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(51, 102, 153, 0.25);
}
.accordion-item {
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    overflow: hidden;
}
.accordion-item:last-child {
    margin-bottom: 0;
}

/* 15. Styles for Programs Page
-------------------------------------------------- */

/* Programs Page Hero */
.programs-hero-section {
    background-color: var(--aer-light-bg);
    padding: 4rem 0;
}

/* Program Section Content */
.program-section h2 {
    font-size: 2rem;
    font-weight: 700;
}

.program-section p {
    font-size: 1.05rem;
    color: #555;
}

/* 16. Styles for Blog Page
-------------------------------------------------- */

/* Blog Page Hero */
.blog-hero-section {
    background-color: var(--aer-light-bg);
    padding: 4rem 0;
}

/* Featured Post Card */
.featured-post-card {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    color: var(--aer-white);
}
.featured-post-card .card-img-top {
    filter: brightness(0.6);
}
.featured-post-card .card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.featured-post-card .card-title a:hover {
    text-decoration: underline;
}
.featured-post-card .author-info {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Regular Blog Cards */
.blog-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.blog-card .card-img-top {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.blog-card .card-body {
    padding: 1.5rem;
}
.blog-card .card-category {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--aer-primary-blue);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}
.blog-card .card-title a:hover {
    color: var(--aer-primary-blue) !important;
}

/* Sidebar */
.sidebar-widget {
    background-color: var(--aer-light-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}
.sidebar-widget .widget-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}
.category-list li {
    margin-bottom: 0.5rem;
}
.category-list a {
    text-decoration: none;
    color: var(--aer-charcoal);
    font-weight: 600;
}
.category-list a:hover {
    color: var(--aer-primary-blue);
}

/* 17. Styles for Contact Page
-------------------------------------------------- */

/* Contact Page Hero */
.contact-hero-section {
    background-color: var(--aer-light-bg);
    padding: 4rem 0;
}

/* Contact Details List */
.contact-details-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}
.contact-details-list .icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    background-color: var(--aer-light-bg);
    border-radius: 50%;
    /* In a real project, you'd place an inline SVG icon here for each item */
}
.contact-details-list a {
    text-decoration: none;
    color: var(--aer-primary-blue);
    font-weight: 600;
}
.contact-details-list a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form-wrapper {
    background-color: var(--aer-white);
    padding: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}
.contact-form-wrapper .form-control:focus,
.contact-form-wrapper .form-select:focus {
     box-shadow: 0 0 0 0.25rem rgba(51, 102, 153, 0.25);
    border-color: var(--aer-primary-blue);
}

/* Responsive adjustments for the form wrapper */
@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 1.5rem;
    }
}