
/* Base mobile styles (< 480px) */
@media (max-width:400px) {
    .study{
        display: contents;
    }
    .app{
        display: none;
    }
    .loginlink{
        display: none;
    }
    .hbloginlink{
        display: block;
    }
    #questionsholder{
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    #contentwrap{
        background-image: url(/assets/images/bg01m.jpg);
        background-size: 400px auto;
        background-position: top center;
    }
    #marker::after{
        content: "max-width:400px";
    }
}

/* Mobile landscape / Small tablets (480px+) */
@media (min-width:401px) and (max-width:767px) {

    .study{
        display: inline;
    }
    .loginlink{
        display: inline-block;
    }
    .hbloginlink{
        display: none;
    }
    #questionsholder{
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    #contentwrap{
        background-image: url(/assets/images/bg01m.jpg);
        background-size: 768px auto;
        background-position: top center;
    }
    #marker::after{
        content: "min-width:480px";
    }

}

/*
 * SEARCH BOX LAYOUT
 */

@media (max-width: 479px)  {

    #navsearchr, #navsearchl{
        float: none;
    }
    #navsearchr {
        padding: 0 0 7px 0;
    }

    #searchbox #search, #searchbox #fsssearch {
        width: calc(100% - 80px);
    }

}


@media (min-width: 480px) and (max-width: 767px)  {

    .hbloginlink{
        display: none;
    }

    #searchboxoutsm, #fsssearchboxoutsm {
        width: 280px;
    }
    #search, #fsssearch {
        width: 210px !important;
    }

}

@media (min-width:768px){

    .hbloginlink{
        display: none;
    }

    #searchboxoutsm, #fsssearchboxoutsm {
        width: 348px;
    }
    #search, #fsssearch {
        width: 275px !important;
    }
}

/*
 * **********************
 */


/*
 * MENU LAYOUT
 */

@media (max-width: 479px)  {

    #menupad{
        padding-right: 0px;
        text-align: center;
    }
    #menupad ul{
        column-count: 1;
    }
    .pagewhitebg{
        background: none;
    }
}

@media (min-width: 480px) and (max-width: 767px)  {

    #menupad{
        padding-right: 0px;
        text-align: center;
    }
    #menupad ul{
        column-count: 2;
    }

}


@media (min-width:768px){

    #menupad{
        padding-left: 60px;
        text-align: center;
    }

    #menupad ul{
        column-count: 4;
    }

}



/*
 * **********************
 */

@media (min-width:768px) {
    
    #marker::after{
        content: "min-width:768px";
    }
    
    #contentpad {
        padding: 0 20px;
    }   
    
    #bookletlayout{
        display: flex;
        flex-direction: row-reverse;
        gap: 20px;
        
    }

    #bookletleft{
        width: 300px;
    }
    #bookletbody{
        flex: 1;
    }

    #articlebody, #bookletbody{
        margin: 0;
    }
    
    .pagenobg{
        padding: 0;
    }
    
    .pagewhitebg{
        padding: 20px 20px 100px 20px;
    }

    #toolpanelwrap{
        margin: 20px 0 0 0;
    }
    
    #toolpanelwrap{
        float: right;
        width: 340px;  
    }
    
    .qholder{
        /*margin-right: 360px;*/
    }
    
    #articlebody{
        margin-right: 360px;
    }
    
    #contentwrap{
        background-image: url(/assets/images/bg01.jpg);
        background-size: 1440px auto;
        background-position: top center;

    }   
    #questionsheader{
        padding-top: 20px;
        width: 60%;
    }
    #questionsholder{
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }    

    

    
}



@media (min-width:1440px) {

    #marker::after{
        content: "min-width:1440px";
    }

    .pagewhitebg{
        padding: 20px 20px 100px 20px;
    }

    #nav, #menu, #navsearch, #content, #footer{
        width: 1440px;
    }

    #searchresults{
        width: 1440px;
    } 

    #searchresultspad{
        padding: 20px 60px;
    }    
    
    #contentwrap{
        background-image: url(/assets/images/bg01.jpg);
        background-position: top center;        
        background-size: contain;
    }
    
    #questionsheader{
        padding-top: 20px;
        width: 60%;
    }
    #questionsholder{
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }    

    .modal-content {
      background-color: #fefefe;
      border: 1px solid #888;
      width: 1320px; /* Proportionally increased for 1440px max-width */
    }
    
}  

/* Ultra-small screens - very rare, keeping for extreme cases */
@media (max-width:275px) {

    #questionsholder{
        display: block;
    }
    .homeimage{
        padding: 10px;
    }
}

.mobile_x{
    display: none;
}
@media (min-width: 768px){
    .mobile_y{
        display: none;
    }
    .mobile_x{
       display: block;
    }

}


@media (max-width: 768px){
    
    .bkbuttweb a{
        margin-bottom: 20px;
    }
    
    .pagewhitebgarticle{
        padding: 20px 0 0 0;
        
    }
    
    #bookletleft{
        padding: 0 20px; 
    }
    
    .bqr{
        top: 24px;
        left: 24px;
    }
    
    
    .articleimg{
        padding: 10px 0 0 20px !important;
    }    
    .articleimg img{
        border-radius: 7px !important;
        width: 100% !important;
    }    
    
    #resourcewrapper{
        padding: 0 20px 20px 20px;
    }
}


@media (min-width:1024px) {

    .wfull{
        width: calc(100% - 372px);
    }
    .wfullta{
        width: calc(100% - 84px);
        height: 100px;
    }
}

@media (max-width:1023px) {
    .libeditform span, .libeditform label{
        display: block;

    }

    .libeditform label{
        width: auto;
        text-align: left;
    }

    .libeditform br{
        display: none;
    }

    .wfull, .wfullta{
        width: 100% !important;
    }
    .wfullta{
        height: 100px;
    }
    .libeditform button{
        float: none !important;
        width: calc(100% / 3.1) !important;
    }

}



/*
*  Booklets
*/

@media (min-width:768px) {

    .bookletholder{

        display: flex;

        justify-content: center;
        align-items: stretch;

        flex-flow: row wrap;

        gap: 15px;

    }

    .bookletholder div{
        background: #eee;
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 15px;
        width: 31%;
    }
}




ul.ui-autocomplete{
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
}



#cquranwrapper{
    padding-left: 75px;
}

#cqurans{
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.cquran{
  color: white;
  padding: 1rem;
  height: 4rem;
  
}    

.qdesc{
    text-align: center;
}
.qname{
    text-align: center;
}

/* Smart responsive grid for Quran chapters - automatically adjusts columns */
#cqurans {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}


#dqpadding{
    padding-left: 75px;
}

.qdwrapperbg{
    
    background-color: #6666ff;
    padding: 20px;
    margin-bottom: 20px;
    background-image: url(/assets/images/diffs/bg.png);
    background-size: cover;    
}

.qdwrapper div{
    color: #fff;
}

.qdwrapper div ll{
    color: #1DD355 !important;
}

.qdwrapper div rr{
    color: #FFC000 !important;
}


.qd01{
    font-size: 20px;
    text-align: center;
    font-family: 'Pragati Narrow';
}

.qd02, .qd03{
    font-size: 23px;
}

.qd02, .qd05{
    color: #1DD355 !important;
}
.qd03, .qd07{
    color: #FFC000 !important;
}

/* --- With help from  --*/
/* --- https://cssgrid-generator.netlify.app/ --*/

.qdwrapper{
    display: grid;
    grid-template-columns: repeat(4, auto);
    grid-template-rows: repeat(6, auto);
    grid-column-gap: 15px;
    grid-row-gap: 10px;
    align-items: center;

}

.qd01 { grid-area: 1 / 1 / 2 / 5; }
.qd02 { grid-area: 2 / 1 / 3 / 3; }
.qd03 { grid-area: 2 / 3 / 3 / 5; }
.qd04 { grid-area: 3 / 1 / 4 / 2; }
.qd05 { grid-area: 3 / 2 / 4 / 3; }
.qd06 { grid-area: 3 / 3 / 4 / 4; }
.qd07 { grid-area: 3 / 4 / 4 / 5; }
.qd08 { grid-area: 4 / 1 / 5 / 3; }
.qd09 { grid-area: 4 / 3 / 5 / 5; }
.qd10 { grid-area: 5 / 1 / 6 / 3; }
.qd11 { grid-area: 5 / 3 / 6 / 5; }
.qd12 { grid-area: 6 / 1 / 7 / 5; }

@media (min-width:768px) {
    .promisestiles{
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        grid-template-rows: 1fr;
        grid-column-gap: 10px;
        grid-row-gap: 0px;
        padding-bottom: 20px;
    }

    .promisestiles a{
        aspect-ratio: 1 / 1;
    }


}
@media (max-width:767px) {
    .promisestiles{


        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 1fr);
        grid-column-gap: 10px;
        grid-row-gap: 10px;
        padding-bottom: 21px;


    }
    .promisestiles a:last-of-type {
              grid-area: 2 / 3 / span 1 / span 2;
              aspect-ratio: 2;
    }


}

@media (min-width:1024px) {

   .promisessectionbg{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        line-height: 1;
    }
}
@media (max-width:1023px) {

    .promisessectionbg{
        display: grid;
        grid-template-rows: auto;
        grid-row-gap: 20px;
        line-height: 1;
    }

}


/*
        FAQ Card grid
 */

@media (min-width: 1024px) {
    .fsscardgrid{
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {

    .fsscardgrid{
        grid-template-columns: auto auto;
    }

}



/* Hero Section (translated from Tailwind) */
.hero {
    /*margin-top: 3rem;*/   /* adjust as needed */
    /*margin-bottom: 3rem;*/              /* mb-12 */
    /*border-radius: 7px;*/               /* Match qwrapper border-radius */
    /*background-color: #ddd;*/           /* Match qwrapper background */
    /*padding: 10px;*/                    /* Match qwrapper padding */
}

.hero__wrapper {
    position: relative;               /* relative */
    width: 100%;
    overflow: hidden;                 /* overflow-hidden */
    /*border-radius: 7px;*/               /* Inner border-radius */
}

.hero__title_mob{
    width: fit-content;
    margin: 20px 10px;
    font-size: 2.2rem;
}

/* Mobile: Fixed height with darker overlay */
@media (max-width: 767px) {
    .hero__wrapper {
        /*height: 300px;*/
        display: none;
    }
    .hero__wrapper_mob {
        /*height: 300px;*/
        display: none;
        padding: 1px 20px 1px 20px;
        background-color: #fff;
    }
}

/* Desktop: Maintain aspect ratio */
@media (min-width: 768px) {
    .hero__wrapper {
        aspect-ratio: 2.8 / 1;
    }
    .hero__wrapper_mob{
        display: none;
    }
}

.hero__image {
    position: absolute;               /* absolute positioning */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;              /* Preserve aspect ratio */
    display: block;
}

.hero__overlay {
    position: absolute;               /* absolute */
    inset: 0;                         /* inset-0 */
    background: rgba(0, 0, 0, 0.5);   /* Darker overlay for mobile */
}

/* Desktop: Lighter overlay */
@media (min-width: 768px) {
    .hero__overlay {
        background: rgba(0, 0, 0, 0.2);
    }
}

.hero__content {
    position: absolute;               /* absolute */
    inset: 0;                         /* inset-0 */
    display: flex;                    /* flex */
    align-items: center;              /* items-center */
    justify-content: center;          /* Center on mobile */
}

.hero__inner {
    padding: 1rem 1.5rem;             /* Mobile padding */
    color: #ffffff;                   /* text-white */
    text-align: center;               /* Center text on mobile */
}

/* Desktop: Left-aligned with more spacing */
@media (min-width: 768px) {
    .hero__content {
        justify-content: flex-start;
    }

    .hero__inner {
        margin-left: 1rem;
        padding-left: 2rem;
        padding-right: 2rem;
        max-width: 56rem;
        text-align: left;
    }
}

.hero__title {
    font-weight: 700;                 /* font-bold */
    margin-bottom: 0.75rem;           /* Smaller margin on mobile */
    width: 100%;                      /* Always 100% width */
    font-size: clamp(1.75rem, 8vw, 4rem); /* Fluid typography */
    line-height: 1.2;
}

/* Small screens: Allow wrapping to 2 lines */
@media (max-width: 500px) {
    .hero__title {
        font-size: clamp(1.5rem, 7vw, 2rem);
        line-height: 1.3;
        word-wrap: break-word;
    }
}

/* md:text-5xl */
@media (min-width: 768px) {
    .hero__title {
        font-size: clamp(3rem, 5vw, 4rem);
        line-height: 1.1;
        margin-bottom: 1rem;
    }
}

/* Large screens: Full size */
@media (min-width: 1200px) {
    .hero__title {
        font-size: 4rem;
        line-height: 1;
    }
}

.hero__subtitle {
    display: none;                    /* Hide on mobile */
}

/* md:text-xl */
@media (min-width: 768px) {
    .hero__subtitle {
        display: block;                 /* Show on desktop */
        font-size: 1.25rem;             /* text-xl */
        line-height: 1.75rem;
        margin-bottom: 1.5rem;
    }
}

/* Mobile: Remove contentpad padding and hide navsearchr */
@media (max-width: 767px) {
    #contentpad {
        padding: 0 !important;
    }

    #navsearchr {
        display: none !important;
    }
}

/* Latest Articles Section */
.latest-articles {
    /*margin-bottom: 3rem;*/          /* mb-12 */
    background-color: #fff;       /* White background */
    padding: 20px 20px 0 20px;                /* Padding around content */
    /*border-radius: 7px;*/           /* Match site border-radius */
}

.latest-articles__heading {
    font-size: 1.25rem;           /* text-xl */
    font-weight: 700;             /* font-bold */
    color: #1f2937;               /* text-gray-800 */
    margin: 0 0 10px 0px;        /* mb-6 */
}

/* Override qwrapper grey background for article cards on home page */
.latest-articles .qwrapper {
    background-color: #fff !important;
    border: 1px solid #e5e7eb;
    padding: 0 !important;
    overflow: hidden;
}

/* Article card image wrapper */
.latest-articles .qwrapper > div:first-child {
    width: 100%;
    aspect-ratio: 9 / 6;
    overflow: hidden;
    margin: 0;
}

.latest-articles .qwrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0 !important;
}

/* Article card content padding */
.latest-articles .entry,
.latest-articles .qwrapper p {
    padding-left: 10px;
    padding-right: 10px;
}

.latest-articles .entry {
    padding-top: 10px;
}

.latest-articles .qwrapper p:last-child {
    padding-bottom: 10px;
}

/* Category label stays inline with text content */
.latest-articles .article-category {
    margin-left: 10px;
    margin-bottom: 10px;
}

/* Article card text styling */
.latest-articles .entry {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 10px 0 8px 0;
}

.latest-articles .qwrapper p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #4b5563;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    margin: 0; /* 0 20px*/
    padding: 0 40px;
}

/* Carousel Track - Horizontal scrolling container */
.carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;      /* Mobile: 1 card */
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;        /* Firefox */
    -webkit-overflow-scrolling: touch;
    /*padding: 0 30px 0 30px;*/       /* Extra padding for nav buttons to overlap */
}

.carousel-track::-webkit-scrollbar {
    display: none;                /* Chrome, Safari, Edge */
}

/* Carousel Items */
.carousel-item {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-width: 0;                 /* Prevent overflow */
}

/* Article Category Label */
.article-category {
    display: inline-block;
    font-size: 0.75rem;           /* Small text */
    font-weight: 600;             /* Semi-bold */
    color: #3aa4d0;               /* Blue color matching site */
    background-color: rgba(58, 164, 208, 0.1); /* Light blue background */
    padding: 4px 10px;
    border-radius: 4px;
    margin: 8px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Limit article summary text */
.article-summary-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* Responsive card widths */
@media (min-width: 768px) {
    .carousel-track {
        grid-auto-columns: calc(50% - 10px); /* Tablet: 2 cards */
    }
}

@media (min-width: 1024px) {
    .carousel-track {
        grid-auto-columns: calc(33.333% - 14px); /* Desktop: 3 cards */
    }
}

@media (min-width: 1440px) {
    .carousel-track {
        grid-auto-columns: calc(25% - 15px); /* Large desktop: 4 cards */
    }
}

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #1f2937;
}

.carousel-nav:hover {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav--prev {
    left: -10px;
}

.carousel-nav--next {
    right: -10px;
}

.carousel-nav i {
    font-size: 16px;
}

/* Hide nav buttons on mobile if not needed */
@media (max-width: 767px) {
    .carousel-nav {
        width: 32px;
        height: 32px;
    }
    .carousel-nav i {
        font-size: 14px;
    }
}

/* Question Categories Section */
.question-categories {
    /*margin-bottom: 3rem;*/
    background-color: #fff;
    padding: 20px 20px 0 20px;
    /*border-radius: 7px;*/
}

.question-categories__heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.question-categories__grid {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr;  /* Mobile: 1 column */
}

/* Mobile (1 column): Show first 4 cards */
.category-card:nth-child(n+5) {
    display: none;
}

/* Small mobile (480px+): 2 columns */
@media (min-width: 480px) {
    .question-categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Show first 2 cards */
    .category-card:nth-child(n+3) {
        display: none;
    }
    .category-card:nth-child(-n+2) {
        display: block;
    }
}

/* Tablet: 3 columns */
@media (min-width: 768px) {
    .question-categories__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Show first 3 cards, hide rest */
    .category-card:nth-child(n+3) {
        display: none;
    }
    .category-card:nth-child(-n+3) {
        display: block;
    }
}

/* Desktop: 4 columns */
@media (min-width: 1024px) {
    .question-categories__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Show first 4 cards, hide rest */
    .category-card:nth-child(n+4) {
        display: none;
    }
    .category-card:nth-child(-n+4) {
        display: block;
    }
}

/* Large desktop: 5 columns */
@media (min-width: 1440px) {
    .question-categories__grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Show all 5 cards */
    .category-card:nth-child(-n+5) {
        display: block;
    }
}

.question-categories__footer {
    margin-top: 15px;
    text-align: right;
}

.question-categories__more {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3aa4d0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.question-categories__more:hover {
    color: #2d8ab8;
    text-decoration: underline;
}

/* Category Card */
.category-card {
    display: block;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile: Horizontal layout */
@media (max-width: 767px) {
    .category-card {
        display: flex;
        flex-direction: row;
        height: auto;
        min-height: 90px;
    }

    .category-card__image-wrapper {
        width: 140px;
        min-width: 140px;
        aspect-ratio: 16 / 9;
        overflow: hidden;
    }

    .category-card__image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .category-card__content {
        flex: 1;
        padding: 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .category-card__title {
        font-size: 0.95rem;
        font-weight: 600;
        color: #1f2937;
        margin: 0 0 4px 0;
        line-height: 1.3;
    }

    .category-card__description {
        font-size: 0.85rem;
        font-weight: 400;
        color: #4b5563;
        margin: 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Desktop: Vertical layout */
@media (min-width: 768px) {
    .category-card__image-wrapper {
        width: 100%;
        aspect-ratio: 9 / 6;
        overflow: hidden;
    }

    .category-card__image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .category-card__content {
        padding: 10px;
    }

    .category-card__title {
        font-size: 1rem;
        font-weight: 600;
        color: #1f2937;
        margin: 0 0 8px 0;
        line-height: 1.4;
    }

    .category-card__description {
        font-size: 1rem;
        font-weight: 400;
        color: #4b5563;
        margin: 0;
        line-height: 1.5;
    }
}

/* Key Sources Section */
.key-sources {
    margin-bottom: 3rem;
    background-color: #fff;
    padding: 0 20px 20px 20px;
    /*border-radius: 7px;*/
}

.key-sources__heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.key-sources__grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;  /* Mobile: 1 column */
}

/* Small mobile devices (480px+): 2 columns */
@media (min-width: 480px) {
    .key-sources__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Override FSS card styles for home page */
.key-sources__grid .fsscard {
    background-color: #fff !important;
    box-shadow: none !important;
    margin-bottom: 0;
    border: 1px solid #e5e7eb;
}

/* Remove pink/green color coding for home page */
.key-sources__grid .ffscardq {
    background-color: #fff !important;
}

.key-sources__grid .ffscardb {
    background-color: #fff !important;
}

/* Source category label - similar to article-category */
.source-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    margin: 8px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Christian source - blue (matches site theme) */
.ffscardb .source-category {
    color: #3aa4d0;
    background-color: rgba(58, 164, 208, 0.1);
}

/* Islamic source - muted red/pink */
.ffscardq .source-category {
    color: #c2185b;
    background-color: rgba(194, 24, 91, 0.1);
}

/* Color icons and titles by source type */
.key-sources__grid .ffscardb .quotepq,
.key-sources__grid .ffscardb h3.fsstitle,
.key-sources__grid .ffscardb h3.fsstitle a {
    color: #3aa4d0 !important;
}

.key-sources__grid .ffscardq .quotepq,
.key-sources__grid .ffscardq h3.fsstitle,
.key-sources__grid .ffscardq h3.fsstitle a {
    color: #3ca287 !important;
}

/* Key sources text styling to match article cards */
.key-sources__grid h3.fsstitle {
    font-family: 'Oxygen', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 10px 0 8px 0 !important;
}

.key-sources__grid .fsscard p {
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #4b5563 !important;
}

/* Keep colored text for titles */
.key-sources__grid .ffscardb h3.fsstitle,
.key-sources__grid .ffscardb h3.fsstitle a {
    color: #3aa4d0 !important;
}

.key-sources__grid .ffscardq h3.fsstitle,
.key-sources__grid .ffscardq h3.fsstitle a {
    color: #3ca287 !important;
}

/* Limit text preview on home page key sources */
.key-sources__grid .source-text-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* Mobile (1 column): Show first 4 cards */
.key-sources__grid .fsscard:nth-child(n+5) {
    display: none;
}

/* Small mobile (2 columns): 2 columns x 2 rows = 4 cards */
@media (min-width: 480px) {
    .key-sources__grid .fsscard:nth-child(n+5) {
        display: none;
    }
    .key-sources__grid .fsscard:nth-child(-n+4) {
        display: block;
    }
}

/* Tablet: 3 columns x 2 rows = 6 cards */
@media (min-width: 768px) {
    .key-sources__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Show first 6 cards, hide rest */
    .key-sources__grid .fsscard:nth-child(n+7) {
        display: none;
    }
    .key-sources__grid .fsscard:nth-child(-n+6) {
        display: block;
    }
}

/* Desktop: 4 columns x 2 rows = 8 cards */
@media (min-width: 1024px) {
    .key-sources__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Show first 8 cards, hide rest */
    .key-sources__grid .fsscard:nth-child(n+9) {
        display: none;
    }
    .key-sources__grid .fsscard:nth-child(-n+8) {
        display: block;
    }
}

.key-sources__footer {
    margin-top: 15px;
    text-align: right;
}

.key-sources__more {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3aa4d0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.key-sources__more:hover {
    color: #2d8ab8;
    text-decoration: underline;
}

/* md:grid-cols-2 */
@media (min-width: 768px) {
    .latest-articles__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* lg:grid-cols-4 */
@media (min-width: 1024px) {
    .latest-articles__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.article-card {
    background-color: white;      /* bg-white */
    border-radius: 0.75rem;       /* rounded-xl */
    overflow: hidden;             /* overflow-hidden */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);  /* shadow-md */
    transition: box-shadow 0.3s ease;
}

.article-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);  /* hover:shadow-lg */
}

.article-card__image {
    width: 100%;                  /* w-full */
    height: 12rem;                /* h-48 */
    object-fit: cover;            /* object-cover */
    display: block;
}

.article-card__content {
    padding: 1.5rem;              /* p-6 */
}

.article-card__title {
    font-size: 1.125rem;          /* text-lg */
    font-weight: 700;             /* font-bold */
    color: #1f2937;               /* text-gray-800 */
    margin-bottom: 0.5rem;        /* mb-2 */
}

.article-card__description {
    color: #4b5563;               /* text-gray-600 */
    font-size: 0.875rem;          /* text-sm */
    margin-bottom: 1rem;          /* mb-4 */
    line-height: 1.5;
}

.article-card__link {
    color: #2563eb;               /* text-blue-600 */
    font-weight: 500;             /* font-medium */
    font-size: 0.875rem;          /* text-sm */
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card__link:hover {
    color: #1e40af;               /* hover:text-blue-800 */
}


