/* -------------------------------------------------
   BASE STYLES
   ------------------------------------------------- */
html {
    scroll-behavior: smooth;
}


#sr-courses {
    scroll-margin-top: 140px; /* or 64px, 80px—match your navbar */
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    color: #1f2937;
    /* Tailwind gray-800 */
    background: #ffffff;
    line-height: 1.6;
}

.padding-50 {
    padding: 50px;
}

/* -------------------------------------------------
   CAROUSEL SECTION
   ------------------------------------------------- */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    /* Optional but recommended – fallback color if image fails */
    background-color: #991b1b;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .4);
    color: #fff;
    border: none;
    font-size: 2rem;
    padding: 10px;
    cursor: pointer;
    z-index: 2;
}

/* -------------------------------------------------
   CAROUSEL NAVIGATION BUTTONS – Premium UX
   ------------------------------------------------- */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    outline: none;
}

/* Position */
.carousel-btn.prev {
    left: 1.5rem;
}

.carousel-btn.next {
    right: 1.5rem;
}

/* Hover & Active States */
.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(1.05);
    transition: transform 0.1s;
}

/* Subtle pulse animation on first load (optional but nice) */
.carousel-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    opacity: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Mobile: smaller buttons + closer to edge */
@media (max-width: 767px) {
    .carousel-btn {
        width: 48px;
        height: 48px;
        font-size: 1.6rem;
        background: rgba(0, 0, 0, 0.5);
    }

    .carousel-btn.prev {
        left: 0.75rem;
    }

    .carousel-btn.next {
        right: 0.75rem;
    }

    .carousel-btn::after {
        display: none;
    }

    .cta {
        opacity: 1;
        transform: none;
    }
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .5rem;
}

.carousel-indicators button {
    width: .75rem;
    height: .75rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
    transition: background .3s;
}

.carousel-indicators button.active {
    background: #fff;
}

/* Responsive carousel */
@media (min-width: 768px) {
    .hero-carousel {
        height: 80vh;
    }

    .carousel-btn {
        font-size: 2.5rem;
    }
}

/* -------------------------------------------------
   GENERAL IMAGE STYLES
   ------------------------------------------------- */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* -------------------------------------------------
   HEADER – RESPONSIVE & MODERN
   ------------------------------------------------- */
.site-header {
    position: relative;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    z-index: 1000;
}

/* LOGO (desktop & mobile drawer) */
.site-header .logo img,
.site-footer .logo img,
.mobile-logo img {
    height: 44px;
    width: auto;
}

/* ---------- DESKTOP NAV ---------- */
.main {
    padding: 20%;
    background-color: red;
}

.main-nav.desktop-only {
    display: none;
    /* hidden on mobile */
    gap: 2rem;
}

.main-nav a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    transition: color .2s;
    margin-top: .4rem;
}

.main-nav a:hover {
    color: #111827;
}

.main-nav .submenu a {
    margin-top: 0;
    padding-top: 0;
}

/* DROPDOWN (mega-menu) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: .25rem;
    background: none;
    border: none;
    font: inherit;
    color: #4b5563;
    cursor: pointer;
    padding: 0 .75rem;
    border-radius: .375rem;
}

.dropdown-toggle:hover {
    background: #f3f4f6;
}

.dropdown-toggle .material-icons {
    font-size: 1.25rem;
    transition: transform .2s;
    margin-top: 8px;
}

.dropdown-toggle[aria-expanded="true"] .material-icons {
    transform: rotate(180deg);
}
/* 
/* Mega-menu */
/*.mega-menu {
    position: absolute;
    top: calc(100% + .7rem);
    left: 130%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    min-width: 720px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
} */

/* Leaders main menu container */
.leaders-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    width: 260px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.submenu {
    padding: 6px 0;
}

.submenu-title {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-weight: bold;
    color: #1f2937;
    cursor: pointer;
    padding: 6px 0;
}

.submenu-panel {
    display: flex;
    padding-left: 10px;
    flex-direction: column;
    overflow: hidden; /* smoother collapse */
}

.submenu-panel a {
    font-size: 14px;
    padding: 4px 0;
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.submenu-panel a:hover {
    color: #2563eb;
}

[x-cloak] { 
    display: none !important; 
}

/* CTA BUTTON */
.btn-primary {
    background: #991b1b;
    color: #fff;
    padding: .65rem 1.25rem;
    border-radius: .375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}

.btn-primary:hover {
    background: #7f1d1d;
}

/* ---------- MOBILE TOGGLE ---------- */
.mobile-toggle {
    display: flex;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #1f2937;
}

.mobile-toggle[aria-expanded="true"] .material-icons {
    display: none;
}

.mobile-toggle[aria-expanded="true"]::before {
    content: "close";
    font-family: "Material Icons";
}

/* ---------- MOBILE DRAWER ---------- */
.mobile-drawer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

.mobile-drawer[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer>div {
    background: #fff;
    width: 82%;
    max-width: 320px;
    height: 100%;
    overflow-y: auto;
    padding: 1rem;
    transform: translateX(-100%);
    transition: transform .3s ease-out;
}

.mobile-drawer[aria-hidden="false"]>div {
    transform: translateX(0);
}

/* Drawer header */
.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.mobile-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #1f2937;
}

/* Mobile nav links */
.mobile-nav .mobile-nav-link {
    display: block;
    padding: .75rem 0;
    color: #1f2937;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-nav .mobile-nav-link:last-of-type {
    border-bottom: none;
}

/* Mobile accordion (Programs & Services) */
.mobile-accordion {
    border-bottom: 1px solid #e5e7eb;
}

.mobile-accordion-toggle {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 0;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
}

.mobile-accordion-toggle .material-icons {
    transition: transform .2s;
}

.mobile-accordion-toggle[aria-expanded="true"] .material-icons {
    transform: rotate(180deg);
}

.mobile-accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

.mobile-accordion-panel[aria-hidden="false"] {
    max-height: 1800px;
    /* large enough for all items */
}

/* Mobile CTA */
.mobile-cta {
    display: block;
    margin: 1.5rem 0 1rem;
    text-align: center;
}

/* -------------------------------------------------
   BUTTON VARIANTS (kept from original)
   ------------------------------------------------- */
.btn {
    display: inline-block;
    font-weight: 550;
    border: none;
    border-radius: .375rem;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.btn-outline {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #1f2937;
    padding: .75rem 1.5rem;
}

.btn-outline:hover {
    background: #f3f4f6;
}

.btn-light {
    background: #fff;
    color: #1f2937;
    padding: .75rem 1.5rem;
}

.btn-outline-light {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: .75rem 1.5rem;
}

.btn-outline-light:hover {
    background: #fff;
    color: #1f2937;
}

/* -------------------------------------------------
   HERO SECTION
   ------------------------------------------------- */
.hero {
    text-align: center;
    background: #f8f9fa;
    padding: 5rem 1.5rem;
}

.hero h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.hero p {
    color: #4b5563;
    max-width: 48rem;
    margin: 0 auto 2rem;
    font-size: 1rem;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* -------------------------------------------------
   IMAGE SECTION
   ------------------------------------------------- */
.image-section {
    padding: 3rem 1.5rem;
}

.image-section img {
    border-radius: .5rem;
    object-fit: cover;
}

/* -------------------------------------------------
   RESOURCES SECTION
   ------------------------------------------------- */
.resources {
    padding: 5rem 1.5rem;
}

.resources .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.resources h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.resources .grid {
    display: grid;
}

.card {
    text-align: left;
    padding: 2rem;
}

.card span.material-icons,
.material-icons {
    font-size: 2rem;
    color: #111827;
    margin-bottom: .5rem;
    display: inline-block;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: .5rem;
}

.card p {
    color: #4b5563;
    margin-bottom: 1rem;
}

.card a,
.card-body a {
    color: #991b1b;
    font-weight: 500;
    text-decoration: none;
}

.card a:hover,
.card-body a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------
   NEWS SECTION
   ------------------------------------------------- */
.news {
    background: #f9f9f9;
    padding: 5rem 1.5rem;
}

.news .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.news .subtitle {
    font-size: .875rem;
    color: #6b7280;
}

.news h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.news p {
    color: #4b5563;
}

.news .grid {
    display: grid;
    gap: .5rem;
}

.news-card {
    background: #fff;
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.news-card:hover {
    box-shadow: 0 14px 23px rgba(0, 0, 0, .15);
    transform: translateY(-6px);
    transition: transform 0.5s ease, box-shadow 0.4s ease;
}

.news-card:hover img {
    transform: scale(1.04);
}

.news-card img {
    transition: transform 0.5s ease;
}

.news .grid {
    align-items: start;
}

.news-card img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.news-card .card-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 1rem;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.news-card.active .card-body {
    max-height: 400px; 
    padding: 1rem;
}

.news-card .toggle-btn {
    border-radius: 0;
}

.news-card .card-body h3 {
    font-size: 1;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: .5rem;
}

.center {
    text-align: center;
    margin-top: 3rem;
}

.left {
    text-align: left;
    margin-top: 3rem;
}

/* -------------------------------------------------
   CTA SECTION
   ------------------------------------------------- */
.cta {
    position: relative;
    text-align: center;
    color: #fff;
    padding: 5rem 1.5rem;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.5);
    z-index: -1;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 40rem;
    margin: 0 auto;
    overflow: visible;
}

.cta h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta p {
    color: #f3f4f6;
    margin-bottom: 2rem;
}

/* -------------------------------------------------
   FOOTER
   ------------------------------------------------- */
.site-footer {
    background: #fff;
    padding: 4rem 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-nav a {
    color: #4b5563;
    text-decoration: none;
    font-size: .875rem;
}

.footer-nav a:hover {
    color: #111827;
}

.socials {
    display: flex;
    gap: 1rem;
}

.socials span:hover {
    color: #6b7280;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: .875rem;
    color: #6b7280;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    text-decoration: none;
    color: #4b5563;
}

.footer-links a:hover {
    color: #111827;
}

/* -------------------------------------------------
   RESPONSIVE BREAKPOINTS (header + layout)
   ------------------------------------------------- */
@media (min-width: 768px) {
    .site-header {
        padding: .75rem 2rem;
    }

    .main-nav.desktop-only {
        display: flex;
    }

    .mobile-toggle,
    .mobile-drawer {
        display: none !important;
    }

    .btn-primary.desktop-only {
        display: inline-block;
    }

    .hero {
        padding: 6rem 3rem;
    }

    .hero h2 {
        font-size: 3rem;
    }

    .image-section {
        padding: 4rem 3rem;
    }

    .resources {
        padding: 6rem 3rem;
    }

    .resources .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .news {
        padding: 3rem 3rem;
    }

    .news .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sr-courses-section {
        grid-template-columns: repeat(4, 1fr);
        padding: 2rem 3rem;
    }

    .cta {
        padding: 6rem 3rem;
    }

    .footer-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* Wider mega-menu on larger tablets / small desktops */
@media (min-width: 1024px) {
    .mega-menu {
        min-width: 960px;
    }
}

/* -------------------------------------------------
   BLOGS / SUCCESS STORIES
   ------------------------------------------------- */
.blogs-page {
    background-color: #f9f9f9;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Blog Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
    max-width: 1100px;
    margin: 0 auto;
    justify-items: center;
}

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
}

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

.blog-card .card-body {
    padding: 20px;
    flex: 1;
}

.blog-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.blog-card p {
    color: #555;
    line-height: 1.6;
}

.blog-card .read-more {
    display: inline-block;
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
}

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

/* Blog Hero */
.blog-hero {
    background: linear-gradient(to right, #0056b3, #007bff);
    color: #fff;
    border-radius: 0 0 50px 50px;
    padding: 80px 20px;
}

/* CTA (blog page) */
.cta {
    border-radius: 20px;
    margin-top: 80px;
}

.cta-bg {
    filter: brightness(.4);
    z-index: 0;
}

.cta-content {
    z-index: 1;
}

.btn-group .btn {
    margin: 0 10px;
}

/* Utility */
.center {
    text-align: center;
}

.text-muted {
    color: #666 !important;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.py-5 {
    padding: 3rem 0;
}

.back-link {
    margin: 5%;
}

.blog-content.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.blog-image img.blog-featured-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.content-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.back-link {
    margin-top: 1.5rem;
}

.btn.btn-outline {
    display: inline-block;
    padding: .6rem 1.2rem;
    border: 1px solid #333;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background .3s ease;
}

.btn.btn-outline:hover {
    background: #333;
    color: #fff;
}

/* Blog Hero Overlay + Text */
.blog-hero-section .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

.blog-hero-section .hero-text {
    position: relative;
    z-index: 2;
    max-width: 900px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.blog-hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-hero-section p {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Blog Card Improvements */
.blog-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.blog-image {
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.blog-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover img {
    transform: scale(1.08);
}

.read-more {
    color: #991b1b;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.read-more:hover {
    gap: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero-section h1 {
        font-size: 2.4rem;
    }

    .blog-hero-section p {
        font-size: 1.1rem;
    }
}

/* Single Blog Hero – matches homepage */
.blog-hero-single .hero-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.blog-hero-single .hero-text h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.2;
}

.blog-hero-single .subtitle {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    opacity: 0.95;
}

/* Content styling */
.blog-content .content-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}

.blog-content .content-text p {
    margin-bottom: 1.5rem;
}

.blog-content .content-text h2,
.blog-content .content-text h3 {
    color: #991b1b;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero-single .hero-text h1 {
        font-size: 2.6rem;
    }

    .blog-content .content-text {
        font-size: 1.1rem;
    }
}

/* -------------------------------------------------
   AUTO-SCROLLING PHOTO GALLERY – Final Version
   ------------------------------------------------- */
/* Soft fade on left & right edges – looks premium */
.scrolling-gallery::before,
.scrolling-gallery::after {
    content: '';
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.scrolling-gallery::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

.scrolling-gallery::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, transparent);
}

.scrolling-track {
    display: flex;
    gap: 28px;
    /* slightly more spacing */
    animation: scrollLeftToRight 70s linear infinite;
    /* slower = more peaceful */
}

.scrolling-track img {
    height: 240px;
    /* a bit taller – looks better */
    width: auto;
    object-fit: cover;
    border-radius: 18px;
    flex-shrink: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease;
}

.scrolling-track img:hover {
    transform: scale(1.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

/* Smooth infinite loop */
@keyframes scrollLeftToRight {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause on hover – excellent UX */
.scrolling-gallery:hover .scrolling-track {
    animation-play-state: paused;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .scrolling-gallery {
        padding: 40px 0;
    }

    .scrolling-track img {
        height: 180px;
        border-radius: 14px;
    }

    .scrolling-track {
        gap: 16px;
    }

    .scrolling-gallery::before,
    .scrolling-gallery::after {
        width: 60px;
    }
}

/* -------------------------------------------------
   THUMBNAIL AUTO-SCROLLER – Final Clean Version (Recommended)
   ------------------------------------------------- */
.thumbnail-scroller {
    overflow: hidden;
    width: 100%;
    padding: 50px 0;
    /* nice breathing room */
    background: #f8f9fa;
    /* matches your site perfectly */
    position: relative;
}

/* Soft fade edges – premium look */
.thumbnail-scroller::before,
.thumbnail-scroller::after {
    content: '';
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.thumbnail-scroller::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

.thumbnail-scroller::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, transparent);
}

.thumbnail-track {
    display: flex;
    gap: 18px;
    animation: scrollThumbnails 10s linear infinite;
    padding: 10px 0;
    /* prevents clipping on hover lift */
}

.thumbnail-track img {
    height: 120px;
    width: 180px;
    /* keeps natural aspect ratio */
    object-fit: cover;
    border-radius: 14px;
    flex-shrink: 0;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Beautiful hover effect */
.thumbnail-track img:hover {
    transform: translateY(-10px) scale(1.06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 3;
    border-color: #e5e7eb;
}

/* Infinite smooth scroll */
@keyframes scrollThumbnails {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause when user hovers – great for accessibility */
.thumbnail-scroller:hover .thumbnail-track {
    animation-play-state: paused;
}

/* Mobile perfection */
@media (max-width: 768px) {
    .thumbnail-scroller {
        padding: 35px 0;
    }

    .thumbnail-scroller::before,
    .thumbnail-scroller::after {
        width: 60px;
    }

    .thumbnail-track {
        gap: 14px;
    }

    .thumbnail-track img {
        height: 95px;
        border-width: 3px;
        border-radius: 12px;
    }
}
    
@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;   /* single column on small screens */
        justify-items: stretch;       /* make children take full width */
    }
    .grid > * {
        width: 100%;                  /* ensure items don’t shrink */
    }
    
    .resources .grid {
        grid-template-columns: 1fr; /* force single column */
        justify-content: center;    /* keep the single column centered */
    }
    .resources .grid .card {
        width: 85%;                /* ensure full width card */
    }
}

/* TEST CAROUSEL FOR FAMILY-SERVICES PAGE */

.carousel-wrapper {
    padding: 1rem 0 3rem;
    position: relative;
}

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
}

.card {
    flex: 0 0 auto;
    scroll-snap-align: center;
    background: #fff;
    width: 260px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card-text {
    padding: 1rem;
    text-align: left;
}

/* Toggle button */
.toggle-btn {
  width: 100%;
  padding: 12px;
  border: none;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}

.main-nav a,
.main-nav button {
    font: inherit;
    font-weight: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    line-height: inherit;
}

.main-nav a,
.main-nav .dropdown-toggle {
    padding: 0.2rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    cursor: pointer;
}

.submenu-title {
    font-weight: 500;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.submenu-title.active {
    font-weight: 700;
    color: #1f2937; /* darker = clearer focus */
}

/* Desktop: 2 columns */
@media (min-width: 1024px) { /* adjust breakpoint as needed */
  .left.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.25rem; /* row gap, column gap */
  }
}

.self-reliance-courses-grid {
    padding: 4rem 1.5rem;
}


/* Make sure AOS doesn't keep them invisible */
/* .cta .cta-content [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
} */

  /* Force visible, readable text */
.cta .cta-content h2,
.cta .cta-content p {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important; /* defeats gradient-text transparency */
}

  /* Just in case a rule zeroed font sizes on mobile */
.cta .cta-content h2 { font-size: 1.75rem !important; line-height: 1.25 !important; }
.cta .cta-content p  { font-size: 1rem !important; line-height: 1.6   !important; }

  /* Ensure the background stays behind */
.cta .cta-bg { z-index: -1 !important; }

#btn-contact-home, #btn-join-home {
    background: #fff;
    padding: .7rem 2rem;
    color: #000000;
    text-decoration: none;
    border: #fff 1px solid;
}

#btn-contact-home:hover, 
#btn-join-home:hover {
    border: #fff 1px solid;
    padding: .7rem 2rem;
    background: #000000;
    color: #fff;
    text-decoration: none;
}

.education-resources-section {
    padding: 2rem;
}