/* =========================================
   SANSTHA LIST SECTION (used on home.html row + this page)
   ========================================= */
.sanstha-list {
    padding: 4rem 8%;
    background: #FFFBEE;
}

.sanstha-list-content {
    margin: 0 auto;
}

/* Header: title on the left, View All on the right */
.sanstha-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.sanstha-list-heading .section-title {
    text-align: left;
    margin-bottom: 0.4rem;
    font-size: 44px;
}

.sanstha-list-subtitle {
    text-align: left;
    color: #4C493D;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 0;
}

.sanstha-view-all {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: #FB2C36;
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sanstha-view-all i {
    transition: transform 0.3s ease;
}

.sanstha-view-all:hover {
    color: linear-gradient(to right, #FF6900, #FB2C36);
    box-shadow: 0 6px 18px rgba(255, 105, 0, 0.25);
}

.sanstha-view-all:hover i {
    transform: translateX(4px);
}

/* Row of 5 cards (home page) */
.sanstha-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* ---- Shared card ---- */
.sanstha-card {
    background: white;
    border: 1px solid #FFE6C4;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sanstha-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(255, 105, 0, 0.18);
}

/* Cover image */
.sanstha-cover {
    position: relative;
    height: 110px;
    width: 100%;
    overflow: hidden;
}

.sanstha-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
  
}

.sanstha-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 105, 0, 0.15), rgba(251, 44, 54, 0.35));
}

/* Logo overlapping the cover */
.sanstha-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: white;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    margin: -36px auto 0;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sanstha-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;    
}

/* Name + location */
.sanstha-body {
    padding: 0.9rem 1rem 1.4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.sanstha-name {
    font-size: 16px;
    font-weight: 700;
    color: #2d2d2d;
    margin: 0.5rem 0 0.4rem;
    line-height: 1.35;
     display: -webkit-box;
    -webkit-line-clamp: 2;   /* Show only 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sanstha-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #4C493D;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;   /* Show only 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sanstha-location i {
    color: #FF6900;
    font-size: 15px;
}

/* =========================================
   SANSTHA LIST PAGE
   (page layout + filter sidebar)
   ========================================= */

/* Back button */
.sl-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 1.5rem 0 0 8%;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #FB2C36;
    background: white;
    border: 2px solid #FF6900;
    border-radius: 12px;
    padding: 0.5rem 1.3rem;
    transition: all 0.3s ease;
}

.sl-back i {
    transition: transform 0.3s ease;
}

.sl-back:hover {
    background: linear-gradient(to right, #FF6900, #FB2C36);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(255, 105, 0, 0.25);
}

.sl-back:hover i {
    transform: translateX(-4px);
}

/* Page hero / title band */
.sl-hero {
    background: #FFFBEE;
    padding: 3rem 5% 2rem;
    text-align: center;
}

.sl-hero .section-title {
    font-size: 48px;
    margin-bottom: 0.6rem;
}

.sl-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4C493D;
    margin-bottom: 1rem;
}

.sl-breadcrumb a {
    color: #FF6900;
    text-decoration: none;
}

.sl-breadcrumb a:hover {
    text-decoration: underline;
}

.sl-breadcrumb i {
    font-size: 12px;
    color: #C4C4C4;
}

section .section-subtitle{
    margin-bottom: 0rem !important;
}

/* Main layout: filter sidebar + cards */
.sl-layout {
    padding: 2.5rem 8% 4rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ---- Filter sidebar ---- */
.sl-filter {
    background: #ffffff;
    border: 1px solid #ECECEC;
    border-radius: 20px;
    padding: 1.25rem 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 1.5rem;
}

.sl-filter-title {
    font-size: 13px;
    font-weight: 600;
    color: #9A9A9A;
    letter-spacing: 0.4px;
    padding: 0.25rem 0.75rem 0.75rem;
}

.sl-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.sl-filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.85rem 0.75rem;
    font-size: 16px;
    font-weight: 600;
    color: #2d2d2d;
    background: none;
    border: none;
    border-radius: 12px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
}

.sl-filter-item i {
    font-size: 14px;
    color: #C4C4C4;
    transition: transform 0.25s ease, color 0.25s ease;
}

.sl-filter-item:hover {
    background: #FFF7F0;
    color: #FF6900;
}

.sl-filter-item:hover i {
    color: #FF6900;
    transform: translateX(3px);
}

/* Active tab — orange like the reference */
.sl-filter-item.active {
    color: #FF6900;
}

.sl-filter-item.active i {
    color: #FF6900;
}

/* ---- Cards area ---- */
.sl-results-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.sl-results-head h2 {
    font-size: 26px;
    font-weight: 700;
    color: #2d2d2d;
}

.sl-results-head span {
    font-size: 15px;
    font-weight: 500;
    color: #4C493D;
}

.sl-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Empty state */
.sl-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #4C493D;
    font-weight: 500;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1400px) {
    .sl-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .sl-layout {
        grid-template-columns: 220px 1fr;
        padding: 2rem 5% 3rem;
    }
    .sl-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sl-hero .section-title {
        font-size: 36px;
    }
    /* Home page row: 3 per row on tablets */
    .sanstha-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sanstha-list-heading .section-title {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    .sl-layout {
        grid-template-columns: 1fr;
    }
    /* Let the grid children shrink to the track instead of forcing
       their content width (min-width:auto) and overflowing the page. */
    .sl-filter,
    .sl-results {
        min-width: 0;
    }
    /* Home page row: 2 per row + stacked header */
    .sanstha-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .sanstha-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    /* Filter becomes a set of pills that WRAP to fit the screen
       (no horizontal scroll — every category stays reachable). */
    .sl-filter {
        position: static;
        padding: 1rem;
    }
    .sl-filter-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    .sl-filter-item {
        width: auto;
        white-space: nowrap;
        border: 1px solid #FFE6C4;
        padding: 0.55rem 1rem;
    }
    .sl-filter-item i {
        display: none;
    }
    .sl-filter-item.active {
        background: linear-gradient(to right, #FF6900, #FB2C36);
        color: #fff;
        border-color: transparent;
    }
}

@media (max-width: 480px) {
    .sl-hero {
        padding: 1.5rem 5% 1rem;
    }
    .sl-hero .section-title {
        font-size: 24px !important;
    }
    .sl-cards-grid {
        grid-template-columns: 1fr;
    }
    /* Home page row: single column on phones */
    .sanstha-list {
        padding: 1rem 5% !important;
    }
    .sanstha-grid {
        grid-template-columns: 1fr;
    }
    .sanstha-list-heading .section-title {
        font-size: 24px !important;
        padding-left: 0% !important;
    }
    .sanstha-view-all {
        width: 100%;
        justify-content: center;
    }
}

html,
body {
    overflow-x: clip;
    max-width: 100%;
}

@media (max-width: 768px) {
    .header-login-btn {
        display: none !important;
    }
}

.sl-loader{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:60px 0;
}

.sl-loader.hide{
    display:none;
}

.spinner{
    width:50px;
    height:50px;
    border:5px solid #ececec;
    border-top:5px solid #ff6b00;
    border-radius:50%;
    animation:spin .8s linear infinite;
    margin-bottom:15px;
}

@keyframes spin{
    to{
        transform:rotate(360deg);
    }
}