/**
 * SC Showcase Gallery — Styles v1.0.0
 * =================================================
 * Layout: CSS Grid 3-col × 3-row.
 *   First child spans 2 columns + 2 rows.
 *   Remaining 5 items auto-flow into the grid.
 *   Same structure repeats for every page and every filter.
 *
 * Individual design tokens per element × state (default / hover / active).
 */

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
    /* ── Section & Typography ── */
    --sc-bg:                #F8F9FA;
    --sc-heading-color:     #1A1A1A;
    --sc-body-color:        #6B7280;
    --sc-accent:            #1E40AF;
    --sc-accent-hover:      #1B3A9E;
    --sc-accent-glow:       rgba(30, 64, 175, 0.25);
    --sc-font-family:       'Almarai', -apple-system, BlinkMacSystemFont,
                            "Segoe UI", Roboto, "Helvetica Neue", Arial,
                            sans-serif;

    /* ── Filter Buttons — DEFAULT ── */
    --sc-filter-bg:             #FFFFFF;
    --sc-filter-text:           #535366;
    --sc-filter-border:         #E5E7EB;
    --sc-filter-radius:         100px;

    /* ── Filter Buttons — HOVER ── */
    --sc-filter-hover-bg:       #FFFFFF;
    --sc-filter-hover-text:     #1E40AF;
    --sc-filter-hover-border:   #1E40AF;
    --sc-filter-hover-radius:   20px;

    /* ── Filter Buttons — ACTIVE ── */
    --sc-filter-active-bg:      #1E40AF;
    --sc-filter-active-text:    #FFFFFF;
    --sc-filter-active-border:  #1E40AF;
    --sc-filter-active-radius:  20px;

    /* ── Category Tag — DEFAULT ── */
    --sc-tag-bg:            #fff;
    --sc-tag-text:          #FFFFFF;
    --sc-tag-radius:       100px;

    /* ── Category Tag — HOVER ── */
    --sc-tag-hover-bg:      #1B3A9E;
    --sc-tag-hover-text:    #FFFFFF;
    --sc-tag-hover-radius:  4px;

    /* ── Category Tag — ACTIVE ── */
    --sc-tag-active-bg:     #1E40AF;
    --sc-tag-active-text:   #FFFFFF;
    --sc-tag-active-radius: 4px;

    /* ── Description / Caption — DEFAULT ── */
    --sc-desc-text:         #FFFFFF;

    /* ── Description / Caption — HOVER ── */
    --sc-desc-hover-text:   #FFFFFF;

    /* ── Description / Caption — ACTIVE ── */
    --sc-desc-active-text:  #FFFFFF;

    /* ── Pagination (Numbers) — DEFAULT ── */
    --sc-page-bg:           #FFFFFF;
    --sc-page-text:         #6B7280;
    --sc-page-border:       #E5E7EB;
    --sc-page-radius:       50%;

    /* ── Pagination (Numbers) — HOVER ── */
    --sc-page-hover-bg:       #FFFFFF;
    --sc-page-hover-text:     #1E40AF;
    --sc-page-hover-border:   #1E40AF;
    --sc-page-hover-radius:   50%;

    /* ── Pagination (Numbers) — ACTIVE ── */
    --sc-page-active-bg:      #1E40AF;
    --sc-page-active-text:    #FFFFFF;
    --sc-page-active-border:  #1E40AF;
    --sc-page-active-radius:  50%;

    /* ── Pagination Arrows — DEFAULT ── */
    --sc-arrow-bg:           #FFFFFF;
    --sc-arrow-color:        #6B7280;
    --sc-arrow-border:       #E5E7EB;
    --sc-arrow-radius:       50%;

    /* ── Pagination Arrows — HOVER ── */
    --sc-arrow-hover-bg:       #FFFFFF;
    --sc-arrow-hover-color:    #1E40AF;
    --sc-arrow-hover-border:   #1E40AF;
    --sc-arrow-hover-radius:   50%;

    /* ── Pagination Arrows — ACTIVE ── */
    --sc-arrow-active-bg:      #1E40AF;
    --sc-arrow-active-color:   #FFFFFF;
    --sc-arrow-active-border:  #1E40AF;
    --sc-arrow-active-radius:  50%;

    /* ── Spacing & Misc (unchanged) ── */
    --sc-filter-font:       14px;
    --sc-filter-pad-y:      10px;
    --sc-filter-pad-x:      20px;
    --sc-filter-gap:        12px;

    --sc-grid-cols:         3;
    --sc-grid-gap:          24px;
    --sc-card-radius:       12px;
    --sc-card-hover-scale:  1.02;
    --sc-card-hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.10);
    --sc-card-transition:   0.3s ease;

    --sc-tag-bg:            #fff;
    --sc-tag-text:          #020212;
    --sc-tag-font:          12px;
    --sc-tag-radius:        100px;
    --sc-tag-spacing:       0.5px;

    --sc-overlay-gradient:  linear-gradient(
                                to top,
                                rgba(0, 0, 0, 0.65) 0%,
                                rgba(0, 0, 0, 0.30) 60%,
                                transparent 100%
                            );
    --sc-overlay-font:      14px;
    --sc-overlay-pad:       12px 16px;

    --sc-page-bg:           #FFFFFF;
    --sc-page-border:       #E5E7EB;
    --sc-page-radius:       50%;
    --sc-page-size:         40px;
    --sc-page-font:         14px;
    --sc-page-gap:          8px;
    --sc-page-arrow-color:  #6B7280;

    --sc-section-pad-top:    100px;
    --sc-section-pad-bottom: 100px;
    --sc-header-margin:      0 auto 56px ;
    --sc-subtitle-margin:    0 auto 0 auto;
    --sc-filters-margin:     0 0 56px 0;
    --sc-pagination-margin:  56px 0 0 0;

    --sc-placeholder-bg:    #E5E7EB;
    --sc-placeholder-icon:  #9CA3AF;
}

/* ── Container ──────────────────────────────────────────────── */
.sc-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Section ────────────────────────────────────────────────── */
.sc-showcase {
    padding: var(--sc-section-pad-top) 0 var(--sc-section-pad-bottom);
    background: var(--sc-bg);
    font-family: var(--sc-font-family);
}

/* ── Header ─────────────────────────────────────────────────── */
.sc-showcase__header {
    text-align: center;
    max-width: 600px;
    margin: var(--sc-header-margin);
}

.sc-showcase__title {
    color: var(--sc-heading-color);
    margin: 0 0 16px 0;
font-weight: 400;
font-size: 40px;
line-height: 140%;
text-align: center;
letter-spacing: 0.005em;

}

.sc-showcase__subtitle {
    font-size: 16px;
    font-weight: 400;
    color: var(--sc-body-color);
    margin: var(--sc-subtitle-margin);
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 18px;
    text-align: center;
}

/* ================================================================
   FILTER BUTTONS
   ================================================================
   Uses individual variables for each state:
     DEFAULT  → --sc-filter-{bg,text,border,radius}
     HOVER    → --sc-filter-hover-{bg,text,border,radius}
     ACTIVE   → --sc-filter-active-{bg,text,border,radius}
   ================================================================ */
.sc-showcase__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sc-filter-gap);
    margin: var(--sc-filters-margin);
    padding-bottom: 24px;
    border-bottom: 1px solid #E5E7EB;
}

/* -- DEFAULT state -- */
.sc-showcase__filter-btn {
    display: inline-flex;
    align-items: center;
    padding: var(--sc-filter-pad-y) var(--sc-filter-pad-x);
    border: 1.5px solid var(--sc-filter-border);
    border-radius: var(--sc-filter-radius);
    background: var(--sc-filter-bg);
    color: var(--sc-filter-text);
    font-family: var(--sc-font-family);
    font-size: var(--sc-filter-font);
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.25s ease, color 0.25s ease,
                border-color 0.25s ease, box-shadow 0.25s ease,
                transform 0.2s ease, border-radius 0.25s ease;


}

/* -- HOVER state -- */
.sc-showcase__filter-btn:hover {
    background: var(--sc-filter-hover-bg);
    color: var(--sc-filter-hover-text);
    border-color: var(--sc-filter-hover-border);
    border-radius: var(--sc-filter-hover-radius);
    transform: translateY(-1px);
}

.sc-showcase__filter-btn:focus-visible {
    box-shadow: 0 0 0 3px var(--sc-accent-glow);
}

/* -- ACTIVE state -- */
.sc-showcase__filter-btn--active,
.sc-showcase__filter-btn[aria-selected="true"] {
    background: var(--sc-filter-active-bg);
    border-color: var(--sc-filter-active-border);
    color: var(--sc-filter-active-text);
    font-weight: bold;
    border-radius: var(--sc-filter-active-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}

/* -- ACTIVE + HOVER -- */
.sc-showcase__filter-btn--active:hover,
.sc-showcase__filter-btn[aria-selected="true"]:hover {
    background: var(--sc-accent-hover);
    border-color: var(--sc-accent-hover);
    color: var(--sc-filter-active-text);
}

/* ── Masonry Grid ───────────────────────────────────────────── */
.sc-showcase__grid {
    column-count: var(--sc-grid-cols);
    column-gap: var(--sc-grid-gap);
    position: relative;
    min-height: 200px;
        display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

/* ── Card ───────────────────────────────────────────────────── */
.sc-showcase__item {
    break-inside: avoid;
    margin-bottom: 0;
    border-radius: var(--sc-card-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #E5E7EB;
    opacity: 0;
    width: calc(50% - 15px);
    transform: translateY(20px) scale(0.97);
    animation: scFadeSlideIn 0.45s ease forwards;
    transition: transform var(--sc-card-transition),
                box-shadow var(--sc-card-transition);
    

aspect-ratio: 392 / 248;
}
.sc-showcase__item:first-child{
    width: 100%;
}

.sc-showcase__item:hover {
    transform: scale(var(--sc-card-hover-scale));
    box-shadow: var(--sc-card-hover-shadow);
}

/* Stagger animation */
.sc-showcase__item:nth-child(1) { animation-delay: 0.03s; }
.sc-showcase__item:nth-child(2) { animation-delay: 0.08s; }
.sc-showcase__item:nth-child(3) { animation-delay: 0.13s; }
.sc-showcase__item:nth-child(4) { animation-delay: 0.18s; }
.sc-showcase__item:nth-child(5) { animation-delay: 0.23s; }
.sc-showcase__item:nth-child(6) { animation-delay: 0.28s; }

@keyframes scFadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Featured (first) item spans full width */
.sc-showcase__item--wide {
    column-span: all;
}

.sc-showcase__item--wide .sc-showcase__item-img {
    width: 100%;
    /*height: 240px;*/
}

/* ── Image ──────────────────────────────────────────────────── */
.sc-showcase__item-img {
    display: block;
    width: 100%;
    /* height: 160px; */
    object-fit: cover;
    transition: transform var(--sc-card-transition);
}

.sc-showcase__item:hover .sc-showcase__item-img {
    transform: scale(1.06);
}

/* ================================================================
   CATEGORY TAG
   ================================================================
   Uses individual variables for each state:
     DEFAULT  → --sc-tag-{bg,text,radius}
     HOVER    → --sc-tag-hover-{bg,text,radius}
     ACTIVE   → --sc-tag-active-{bg,text,radius}
   ================================================================ */
/* -- DEFAULT state -- */
.sc-showcase__item-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    background: var(--sc-tag-bg);
    color: var(--sc-tag-text);
    font-family: var(--sc-font-family);
    font-size: var(--sc-tag-font);
    letter-spacing: var(--sc-tag-spacing);
    text-transform: uppercase;
    border-radius: var(--sc-tag-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 4;
    pointer-events: none;
    line-height: 1.6;
    transition: background 0.25s ease, color 0.25s ease,
                border-radius 0.25s ease;
padding: 6px 12px;
height: 25px;
left: 16px;
top: 16px;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.101961);

font-weight: 700;
line-height: 13px;



}

/* -- HOVER state (when card is hovered) -- */
.sc-showcase__item:hover .sc-showcase__item-tag {
    background: var(--sc-tag-hover-bg);
    color: var(--sc-tag-hover-text);
    border-radius: var(--sc-tag-hover-radius);
}

/* ================================================================
   CAPTION / DESCRIPTION OVERLAY
   ================================================================
   Uses individual variables for each state:
     DEFAULT  → --sc-desc-text
     HOVER    → --sc-desc-hover-text
     ACTIVE   → --sc-desc-active-text
   ================================================================ */
.sc-showcase__item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--sc-overlay-pad);
    background: var(--sc-overlay-gradient);
    z-index: 2;
    pointer-events: none;
    text-align: left;
}

/* -- DEFAULT state -- */
.sc-showcase__item-caption {
    color: var(--sc-desc-text);
    font-family: var(--sc-font-family);
    font-size: var(--sc-overlay-font);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    opacity: 0.92;
    transition: color 0.25s ease;
}

/* -- HOVER state (when card is hovered) -- */
.sc-showcase__item:hover .sc-showcase__item-caption {
    color: var(--sc-desc-hover-text);
}

/* ── Loader ─────────────────────────────────────────────────── */
.sc-showcase__loader {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    column-span: all;
}

.sc-showcase__loader.is-active {
    display: flex;
}

.sc-showcase__loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #E5E7EB;
    border-top-color: var(--sc-accent);
    border-radius: 50%;
    animation: scSpin 0.7s linear infinite;
}

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

/* ── Empty State ────────────────────────────────────────────── */
.sc-showcase__empty {
    column-span: all;
    text-align: center;
    padding: 60px 20px;
    color: #9CA3AF;
    font-size: 16px;
}

/* ================================================================
   PAGINATION — NUMBER BUTTONS
   ================================================================
   Uses individual variables for each state:
     DEFAULT  → --sc-page-{bg,text,border,radius}
     HOVER    → --sc-page-hover-{bg,text,border,radius}
     ACTIVE   → --sc-page-active-{bg,text,border,radius}
   ================================================================ */
.sc-showcase__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: var(--sc-pagination-margin);
}

/* -- DEFAULT state (shared base for all page buttons) -- */
.sc-showcase__page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sc-page-size);
    height: var(--sc-page-size);
   /* border: 1.5px solid var(--sc-page-border);
    border-radius: var(--sc-page-radius);
    background: var(--sc-page-bg);
    color: var(--sc-page-arrow-color);*/
    font-family: var(--sc-font-family);
    font-size: var(--sc-page-font);
    font-weight: 500;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease,
                border-color 0.2s ease, transform 0.15s ease,
                border-radius 0.2s ease;
}
/* 
.sc-showcase__page-btn:hover:not(.sc-showcase__page-btn--active):not(:disabled) {
    border-color: var(--sc-accent);
    color: var(--sc-accent);
    transform: translateY(-1px);
}

.sc-showcase__page-btn:not(.sc-showcase__page-btn--arrow) {
    border: 1.5px solid var(--sc-page-border);
    border-radius: var(--sc-page-radius);
    background: var(--sc-page-bg);
    color: var(--sc-page-text);
}

.sc-showcase__page-btn:not(.sc-showcase__page-btn--arrow):hover:not(.sc-showcase__page-btn--active):not(:disabled) {
    background: var(--sc-page-hover-bg);
    color: var(--sc-page-hover-text);
    border-color: var(--sc-page-hover-border);
    border-radius: var(--sc-page-hover-radius);
    transform: translateY(-1px);
}

.sc-showcase__page-btn:not(.sc-showcase__page-btn--arrow).sc-showcase__page-btn--active {
    background: var(--sc-page-active-bg);
    border-color: var(--sc-page-active-border);
    color: var(--sc-page-active-text);
    border-radius: var(--sc-page-active-radius);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--sc-accent-glow);
}

.sc-showcase__page-btn:not(.sc-showcase__page-btn--arrow):focus-visible {
    box-shadow: 0 0 0 3px var(--sc-accent-glow);
}

.sc-showcase__page-btn--arrow {
    border: 1.5px solid var(--sc-arrow-border);
    border-radius: var(--sc-arrow-radius);
    background: var(--sc-arrow-bg);
    color: var(--sc-arrow-color);
}

.sc-showcase__page-btn--arrow:hover:not(:disabled) {
    background: var(--sc-arrow-hover-bg);
    color: var(--sc-arrow-hover-color);
    border-color: var(--sc-arrow-hover-border);
    border-radius: var(--sc-arrow-hover-radius);
    transform: translateY(-1px);
}

.sc-showcase__page-btn--arrow:focus-visible {
    box-shadow: 0 0 0 3px var(--sc-accent-glow);
}

.sc-showcase__page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sc-showcase__page-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
} */
.sc-showcase__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

/* All buttons base */
.sc-showcase__page-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;

  font-family: 'Almarai';
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border: 1px solid #E7E5E4;
  background: #fff;
  color: #020212;

  transition: all 0.3s ease;
}

/* Active page */
.sc-showcase__page-btn--active {
  background: #204BD8;
  color: #fff;
  border-color: #204BD8;
}

/* Hover */
.sc-showcase__page-btn:hover:not(:disabled) {
  background: #204BD8;
  color: #fff;
  border-color: #204BD8;
}

/* Arrow buttons (first & last) */
.sc-showcase__page-btn:first-child,
.sc-showcase__page-btn:last-child {
  width: 72px;
  height: 56px;
  border-radius: 30px;
  border: 1px solid #D7DADE;
    margin: 0 16px;
}

.sc-showcase__page-btn:not(:disabled):first-child,
.sc-showcase__page-btn:not(:disabled):last-child {
  background: #1032A1;
border: 1px solid #D7DADE;
border-radius: 30px;

}
.sc-showcase__page-btn:not(:disabled):first-child svg path,
.sc-showcase__page-btn:not(:disabled):last-child svg path{

    fill: #fff;

}
/* SVG arrows */
.sc-showcase__page-btn svg {

}

/* Disabled prev */
.sc-showcase__page-btn:disabled {
  /* opacity: 0.6; */
  cursor: not-allowed;
}

.sc-showcase__page-btn:not(:disabled){


}

/* NEXT button (last) */
/* .sc-showcase__page-btn:last-child {
  background: #1032A1;
  border-color: #1032A1;
} */

/* Next arrow white */
/* .sc-showcase__page-btn:last-child svg {
  stroke: #fff;
} */

/* Optional: spacing fix for numbers */
/* .sc-showcase__page-btn:not(:first-child):not(:last-child) {
  border: 1px solid #E7E5E4;
} */
.sc-showcase__item.is-exiting {
    animation: scFadeSlideOut 0.28s ease forwards;
}

@keyframes scFadeSlideOut {
    to {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Tablet: 2 columns */
@media (max-width: 900px) {
    .sc-showcase {
        padding: 40px 0 48px;
    }

    .sc-showcase__grid {
        column-count: 2;
    }

    .sc-showcase__title {
        font-size: 26px;
    }
}

/* Mobile: 1 column */
@media (max-width: 580px) {
    .sc-showcase {
        padding: 32px 0 40px;
    }

    .sc-showcase__grid {
        column-count: 1;
    }

    .sc-showcase__title {
        font-size: 22px;
    }

    .sc-showcase__subtitle {
        font-size: 14px;
    }

    .sc-showcase__filters {
        gap: 12px;
    }

    .sc-showcase__filter-btn {
        padding: 6px 14px;
        font-size: 13px;
    }

    .sc-showcase__item--wide .sc-showcase__item-img {
        /* height: 200px; */
    }

    .sc-showcase__pagination {
        gap: 6px;
    }
    .sc-showcase__item {
        width: 100%;
    }

}

@media (min-width: 991px) {
    .sc-showcase__grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 24px;
    }
    .sc-showcase__item{
        width: 100%;
    }
    .sc-showcase__item:first-child {
        grid-column: span 2 / span 2;
        grid-row: span 2 / span 2;
        aspect-ratio: inherit;
                height: 100%;
    }
}
