/* General Styles */
:root {
    --primary-color: #0D1F3C;
    --secondary-color: #D4A236;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --dark-navy: #0D1F3C;
    --light-navy: #1a3456;
    --orange-gold: #D4A236;
}

/* ---------------------------------------------------------------------------
   Bootstrap theme
   Remap Bootstrap 5.3's default blue "primary"/"info" palette to the AfIMPP
   navy and gold, so utility classes used throughout the templates
   (.text-primary, .bg-primary, .btn-primary, .btn-outline-primary, badges,
   pagination, progress bars, links, form focus rings) follow the brand
   instead of showing Bootstrap blue.
   --------------------------------------------------------------------------- */
:root,
[data-bs-theme="light"] {
    --bs-primary: #0D1F3C;
    --bs-primary-rgb: 13, 31, 60;
    --bs-primary-text-emphasis: #0D1F3C;
    --bs-primary-bg-subtle: #e8ecf3;
    --bs-primary-border-subtle: #b9c4d6;
    --bs-info: #D4A236;
    --bs-info-rgb: 212, 162, 54;
    --bs-info-text-emphasis: #8a6410;
    --bs-info-bg-subtle: #fbf3e0;
    --bs-info-border-subtle: #eed9a6;
    --bs-link-color: #0D1F3C;
    --bs-link-color-rgb: 13, 31, 60;
    --bs-link-hover-color: #b8891f;
    --bs-link-hover-color-rgb: 184, 137, 31;
    --bs-focus-ring-color: rgba(212, 162, 54, 0.35);
}

.btn-primary {
    --bs-btn-bg: #0D1F3C;
    --bs-btn-border-color: #0D1F3C;
    --bs-btn-hover-bg: #1a3456;
    --bs-btn-hover-border-color: #1a3456;
    --bs-btn-active-bg: #1a3456;
    --bs-btn-active-border-color: #1a3456;
    --bs-btn-disabled-bg: #0D1F3C;
    --bs-btn-disabled-border-color: #0D1F3C;
    --bs-btn-focus-shadow-rgb: 212, 162, 54;
}

.btn-outline-primary {
    --bs-btn-color: #0D1F3C;
    --bs-btn-border-color: #0D1F3C;
    --bs-btn-hover-bg: #0D1F3C;
    --bs-btn-hover-border-color: #0D1F3C;
    --bs-btn-active-bg: #0D1F3C;
    --bs-btn-active-border-color: #0D1F3C;
    --bs-btn-disabled-color: #0D1F3C;
    --bs-btn-disabled-border-color: #0D1F3C;
    --bs-btn-focus-shadow-rgb: 212, 162, 54;
}

.btn-info {
    --bs-btn-color: #0D1F3C;
    --bs-btn-bg: #D4A236;
    --bs-btn-border-color: #D4A236;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #b8891f;
    --bs-btn-hover-border-color: #b8891f;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #b8891f;
    --bs-btn-active-border-color: #b8891f;
    --bs-btn-disabled-color: #0D1F3C;
    --bs-btn-disabled-bg: #D4A236;
    --bs-btn-disabled-border-color: #D4A236;
    --bs-btn-focus-shadow-rgb: 212, 162, 54;
}

.btn-outline-info {
    --bs-btn-color: #b8891f;
    --bs-btn-border-color: #D4A236;
    --bs-btn-hover-color: #0D1F3C;
    --bs-btn-hover-bg: #D4A236;
    --bs-btn-hover-border-color: #D4A236;
    --bs-btn-active-color: #0D1F3C;
    --bs-btn-active-bg: #D4A236;
    --bs-btn-active-border-color: #D4A236;
    --bs-btn-disabled-color: #b8891f;
    --bs-btn-disabled-border-color: #D4A236;
    --bs-btn-focus-shadow-rgb: 212, 162, 54;
}

.pagination {
    --bs-pagination-color: #0D1F3C;
    --bs-pagination-hover-color: #b8891f;
    --bs-pagination-focus-color: #b8891f;
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(212, 162, 54, 0.35);
    --bs-pagination-active-bg: #0D1F3C;
    --bs-pagination-active-border-color: #0D1F3C;
}

.progress { --bs-progress-bar-bg: #0D1F3C; }
.list-group { --bs-list-group-active-bg: #0D1F3C; --bs-list-group-active-border-color: #0D1F3C; }
.dropdown-menu { --bs-dropdown-link-active-bg: #0D1F3C; }
.nav-pills { --bs-nav-pills-link-active-bg: #0D1F3C; }
.accordion {
    --bs-accordion-active-color: #0D1F3C;
    --bs-accordion-active-bg: #e8ecf3;
    --bs-accordion-btn-focus-border-color: #D4A236;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(212, 162, 54, 0.35);
}

.form-control:focus,
.form-select:focus {
    border-color: #D4A236;
    box-shadow: 0 0 0 0.25rem rgba(212, 162, 54, 0.25);
}
.form-check-input:checked { background-color: #0D1F3C; border-color: #0D1F3C; }
.form-check-input:focus { border-color: #D4A236; box-shadow: 0 0 0 0.25rem rgba(212, 162, 54, 0.25); }


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Navbar Styles */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: var(--light-navy);
    border-color: var(--light-navy);
    transform: translateY(-2px);
}

.btn-secondary-custom {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background-color: #b8891f;
    border-color: #b8891f;
    transform: translateY(-2px);
    color: var(--white);
}

/* Hero Slider Section */
.hero-slider-section {
    position: relative;
    overflow: hidden;
}

.hero-slider-section .carousel,
.hero-slider-section .carousel-inner,
.hero-slider-section .carousel-item {
    height: 100%;
}

.hero-slide {
    position: relative;
    min-height: 680px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #0D1F3C;
    display: flex;
    align-items: center;
    padding: 100px 0;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 25, 41, 0.88) 0%, rgba(13, 31, 60, 0.80) 50%, rgba(26, 52, 86, 0.70) 100%);
    z-index: 0;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
    height: 100%;
}

.hero-slide .row {
    min-height: 480px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-slide h1,
.hero-slide .hero-heading {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-slide-subtitle {
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.8;
}

/* Hero right-side image */
.hero-right-img {
    max-height: 460px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
    animation: heroImgFloat 4s ease-in-out infinite;
}

@keyframes heroImgFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}

/* Slide 2 cert box */
.hero-cert-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 162, 54, 0.4);
    border-radius: 16px;
    backdrop-filter: blur(6px);
    max-width: 400px;
}

/* Slide 3 stats box */
.hero-stats-box {
    max-width: 420px;
}
.hero-stat-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 162, 54, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    transition: background 0.3s;
}
.hero-stat-card:hover {
    background: rgba(212, 162, 54, 0.2);
}

/* Carousel controls */
.hero-indicators {
    bottom: 24px;
    z-index: 10;
}
.hero-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: none;
    margin: 0 5px;
    transition: background 0.3s, transform 0.3s;
}
.hero-indicators button.active {
    background-color: var(--secondary-color);
    transform: scale(1.3);
}

.hero-carousel-prev,
.hero-carousel-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}
.hero-carousel-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: rgba(212, 162, 54, 0.85);
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    transition: background 0.3s, transform 0.3s;
}
.hero-carousel-prev:hover .hero-carousel-arrow,
.hero-carousel-next:hover .hero-carousel-arrow {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Carousel fade animation */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}
.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Legacy hero-content z-index (keep) */
.hero-right-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.hero-right-content .target-audience {
    color: var(--white);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
}

.section-title.text-start::after {
    left: 0;
    transform: translateX(0);
}

.section-subtitle {
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* Card Styles */
.course-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.course-card img.card-img-top {
    /* Generated course cards are 1200x630; keep that ratio so the
       title is never cropped, whatever the column width. Scoped to the
       cover image so the small instructor avatar inside the card is
       left alone. */
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
}

.course-card .card-body {
    padding: 1.5rem;
}

.course-card .card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.course-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.badge-level {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Category Card */
.category-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #e5e7eb;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.category-icon {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.category-card h5 {
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 1.25rem;
}

.category-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.category-card .btn {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.6rem 1.5rem;
}

.category-card .btn:hover {
    background-color: #b8891f;
    border-color: #b8891f;
}

/* Instructor Card */
.instructor-card {
    text-align: center;
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.instructor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.instructor-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 5px solid var(--bg-light);
}

.instructor-card h5 {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.instructor-card .text-muted {
    font-size: 0.9rem;
}

/* Blog Card */
.blog-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.blog-card img {
    height: 200px;
    object-fit: cover;
}

.blog-date {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Footer Styles */
.footer {
    background-color: #1f2937;
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer h5 {
    color: var(--white);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.footer p,
.footer .text-muted,
.footer .text-secondary {
    /* Bootstrap's .text-muted is dark grey; on the dark footer it is unreadable. */
    color: #d1d5db !important;
}
.footer a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--secondary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: #9ca3af;
}

/* Stats Section */
.stats-section {
    background-color: var(--secondary-color);
    padding: 3rem 0;
}

.stat-item {
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--white);
    font-weight: 500;
}

/* Utilities */
.py-section {
    padding: 5rem 0;
}

.bg-light-custom {
    background-color: var(--bg-light);
}

/* Additional decorative elements */
.wave-decoration {
    width: 100px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 0 auto 1rem;
}

.section-icon {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* About section image */
.about-img-wrapper {
    display: inline-block;
    width: 100%;
}
.about-main-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
}
.about-img-badge {
    position: absolute;
    bottom: -20px;
    right: 20px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* CTA boxes */
.cta-box {
    background: var(--dark-navy);
    color: var(--white);
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
}

.cta-box h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.cta-box .btn {
    margin-top: 1rem;
}

/* Hover card effect */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}

/* Page Header Banner */
.page-header-banner {
    background: linear-gradient(135deg, var(--dark-navy) 0%, var(--light-navy) 100%);
    color: var(--white);
    padding: 3rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slide {
        min-height: 520px;
        padding: 80px 0 60px;
    }

    .hero-slide h1,
    .hero-slide .hero-heading {
        font-size: 2rem;
    }

    .hero-slide .row {
        min-height: auto;
    }

    .hero-carousel-prev,
    .hero-carousel-next {
        display: none;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .stat-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}
/* Course placeholder images (shown when no image uploaded) */
.course-placeholder-img {
    width: 100%;
    height: 380px;
    background: linear-gradient(135deg, #0D1F3C 0%, #1a3a6b 60%, #c8960c 100%);
}

.course-placeholder-img-sm {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #0D1F3C 0%, #1a3a6b 60%, #c8960c 100%);
}

/* Search Box Styles */
.search-box {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box .form-control {
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
}

.search-box .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.search-box .btn {
    border-radius: 0;
    padding: 12px 25px;
}

.search-box .btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.search-box .btn-primary-custom:hover {
    background-color: var(--light-navy);
    border-color: var(--light-navy);
}

.search-box .btn-outline-secondary {
    border-color: #dee2e6;
    color: var(--text-light);
}

.search-box .btn-outline-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Sidebar Styles */
.sidebar-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.sidebar-card .card-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
    /* The header is navy (inline style); Bootstrap's default heading colour is
       near-black, so force white for the title and icon. */
    color: var(--white);
}
.sidebar-card .card-header h5,
.sidebar-card .card-header i {
    color: var(--white);
}

.sidebar-card .card-body {
    padding: 0;
}

.sidebar-card .list-group-item {
    border: none;
    padding: 12px 1.25rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-card .list-group-item:last-child {
    border-bottom: none;
}

.sidebar-card .list-group-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.5rem;
}

.sidebar-card .list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.sidebar-card .list-group-item.active:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    padding-left: 1.25rem;
}

.sidebar-card .list-group-item.active .badge {
    background-color: var(--white) !important;
    color: var(--primary-color);
}

.sidebar-card .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Responsive sidebar */
@media (max-width: 991px) {
    .sidebar-card {
        margin-bottom: 2rem;
    }
}


/* ---------------------------------------------------------------------------
   Motion & polish
   Small, brand-consistent animations: scroll reveal, hero entrance, count-up
   numbers, hover lifts, nav underline, compact navbar on scroll. Everything
   is disabled for visitors who prefer reduced motion.
   --------------------------------------------------------------------------- */

/* Scroll reveal (elements get .reveal from main.js, .is-visible when on screen) */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Section title underline grows in when revealed */
.section-title::after {
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}
.section-title.reveal:not(.is-visible)::after {
    width: 0;
}

/* Hero: staggered entrance for the active slide's text block */
@keyframes heroRise {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
}
.carousel-item.active .hero-content > * {
    animation: heroRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.carousel-item.active .hero-content > *:nth-child(1) { animation-delay: 0.10s; }
.carousel-item.active .hero-content > *:nth-child(2) { animation-delay: 0.22s; }
.carousel-item.active .hero-content > *:nth-child(3) { animation-delay: 0.34s; }
.carousel-item.active .hero-content > *:nth-child(4) { animation-delay: 0.46s; }
.carousel-item.active .hero-cert-box,
.carousel-item.active .hero-stats-box {
    animation: heroRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

/* Hero backgrounds: slow, subtle drift on the topographic pattern */
@keyframes topoDrift {
    from { background-position: 50% 0%; }
    to   { background-position: 50% 100%; }
}
.hero-slide.hero-slide-topo {
    background-image: url("../images/generated/hero-topo.c5380b294569.webp");
    background-size: cover;
    background-position: 50% 0%;
    animation: topoDrift 40s ease-in-out infinite alternate;
}
.hero-slide.hero-slide-topo .hero-slide-overlay {
    background: linear-gradient(90deg, rgba(13, 31, 60, 0.85) 0%, rgba(13, 31, 60, 0.55) 60%, rgba(13, 31, 60, 0.35) 100%);
}

/* Page banners get the same pattern behind the gradient */
.page-header-banner {
    background:
        linear-gradient(135deg, rgba(13, 31, 60, 0.92) 0%, rgba(26, 52, 86, 0.88) 100%),
        url("../images/generated/banner-topo.07d6995f5b2d.webp") center / cover no-repeat;
}

/* Card hover: gentle lift plus image zoom */
.course-card,
.blog-card,
.instructor-card,
.category-card,
.hover-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.course-card .card-img-top,
.blog-card .card-img-top,
.blog-card img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.course-card:hover .card-img-top,
.blog-card:hover .card-img-top,
.blog-card:hover img {
    transform: scale(1.04);
}
.blog-card { overflow: hidden; }

/* Category icon: generated badge image, spins a touch on hover */
.category-icon img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.category-card:hover .category-icon img {
    transform: translateY(-4px) rotate(-6deg) scale(1.06);
}

/* Instructor avatar: gold ring glow on hover */
.instructor-img {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.instructor-card:hover .instructor-img {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(212, 162, 54, 0.25);
}

/* Buttons: lift and shadow */
.btn-primary,
.btn-outline-primary,
.btn-primary-custom,
.btn-secondary-custom,
.btn-info {
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary:hover,
.btn-outline-primary:hover,
.btn-primary-custom:hover,
.btn-secondary-custom:hover,
.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(13, 31, 60, 0.18);
}

/* Nav links: gold underline slides in */
.navbar-nav .nav-link {
    position: relative;
}
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.25rem;
    height: 2px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

/* Navbar: compacts and gains a stronger shadow once the page is scrolled */
.navbar {
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
    padding: 0.4rem 0;
    box-shadow: 0 6px 20px rgba(13, 31, 60, 0.12);
}

/* Stats: numbers pop slightly when they finish counting */
@keyframes statPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.count-done {
    animation: statPop 0.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .section-title.reveal:not(.is-visible)::after { width: 80px; }
    .carousel-item.active .hero-content > *,
    .carousel-item.active .hero-cert-box,
    .carousel-item.active .hero-stats-box,
    .hero-slide.hero-slide-topo,
    .hero-right-img,
    .count-done { animation: none; }
    .course-card, .blog-card, .instructor-card, .category-card, .hover-card,
    .course-card .card-img-top, .blog-card img, .category-icon img, .instructor-img,
    .navbar-nav .nav-link::after, .btn { transition: none; }
}

/* ---------------------------------------------------------------------------
   FAQ lists and course link lists on SEO landing pages (mining certification,
   course catalogue). <details> keeps answers in the HTML for crawlers.
--------------------------------------------------------------------------- */
.faq-list details {
    border-bottom: 1px solid rgba(13, 31, 60, 0.12);
    padding: 0.85rem 0;
}
.faq-list summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
}
.faq-list summary::marker {
    color: var(--secondary-color);
}
.faq-list details p {
    margin: 0.6rem 0 0;
}
.cert-course-list a {
    color: var(--primary-color);
    text-decoration: none;
}
.cert-course-list a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Keep anchored sections (e.g. /mining-certification/#advanced) clear of the sticky navbar. */
section[id] {
    scroll-margin-top: 90px;
}
