.sf--zoom-hover {
    overflow: hidden;
}

.sf--zoom-hover img {
    transition: all 600ms ease-out;
}

.sf--zoom-hover:hover img {
    transform: scale(1.1);
}

/* Image Gallery Grid Styles */
.image-gallery__grid {
    display: grid;
    gap: 1.5rem;
    grid-auto-flow: dense;
}

/* Column configurations */
.image-gallery__grid--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

.image-gallery__grid--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.image-gallery__grid--cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.image-gallery__grid--cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Mobile responsive columns */
@media (max-width: 768px) {
    .image-gallery__grid--cols-3,
    .image-gallery__grid--cols-4,
    .image-gallery__grid--cols-5,
    .image-gallery__grid--cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .image-gallery__grid--cols-2,
    .image-gallery__grid--cols-3,
    .image-gallery__grid--cols-4,
    .image-gallery__grid--cols-5,
    .image-gallery__grid--cols-6 {
        grid-template-columns: 1fr;
    }
}

/* Aspect ratio styles */
.image-gallery__grid--square .image-gallery__item--wrapper {
    position: relative;
    padding-bottom: 100%;
}

.image-gallery__grid--landscape .image-gallery__item--wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
}

.image-gallery__grid--portrait .image-gallery__item--wrapper {
    position: relative;
    padding-bottom: 133.33%; /* 3:4 */
}

.image-gallery__grid--square .image-gallery__item--wrapper img,
.image-gallery__grid--landscape .image-gallery__item--wrapper img,
.image-gallery__grid--portrait .image-gallery__item--wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Auto aspect ratio */
.image-gallery__grid--auto .image-gallery__item--wrapper {
    position: relative;
}

.image-gallery__grid--auto .image-gallery__item--wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gallery item styles */
.image-gallery__item {
    position: relative;
}

.image-gallery__item--wrapper {
    background: #f0f0f0;
    cursor: pointer;
    transition: all 300ms ease;
}

.image-gallery__item--wrapper.loading {
    background: #ccc;
}

.image-gallery__item--wrapper.loading * {
    opacity: 0;
    transition: opacity 300ms ease;
}

.image-gallery__item--wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

.image-gallery__item--wrapper img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Hover overlay effect */
.image-gallery__item--wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 300ms ease;
    pointer-events: none;
}

.image-gallery__item--wrapper:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

/* Table Styles for .layout-content containers */
.layout-content table {
    border-collapse: collapse;
    border-spacing: 0;
    margin: 1.5rem 0;
    font-size: 16px;
    line-height: 1.5;
    width: 100%;
}

/* Table header styles */
.layout-content table thead {
    background-color: #f8f9fa;
    font-weight: 600;
}

.layout-content table thead th {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
}

/* Table cell styles */
.layout-content table td,
.layout-content table th {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
}

/* Zebra striping for alternating rows */
.layout-content table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Hover effect for better accessibility */
.layout-content table tbody tr:hover {
    background-color: #e9ecef;
    transition: background-color 0.2s ease;
}

/* Remove bottom border from last row */
.layout-content table tbody tr:last-child td {
    border-bottom: none;
}

/* Simple responsive table wrapper */
.table--responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
}

/* Ensure table maintains its layout */
.table--responsive table {
    margin: 0;
    width: 100%;
    min-width: 600px; /* Minimum width to ensure readability */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .layout-content table {
        font-size: 14px;
    }

    .layout-content table td,
    .layout-content table th {
        padding: 8px 12px;
    }

    /* Visual hint for scrollable tables on mobile */
    .table--responsive {
        box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1);
    }
}

/* Accessibility improvements */
.layout-content table caption {
    padding: 0.75rem;
    color: #6c757d;
    text-align: left;
    caption-side: top;
}

/* Focus styles for better keyboard navigation */
.layout-content table a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/*--------------------------------------------------------------
5.0 Statistics Component – Utility classes
--------------------------------------------------------------*/

/* Font‐size utilities for titles, subtitles, etc. */
.fs-xs    { font-size: 0.75rem; }  /* 12px */
.fs-sm    { font-size: 0.875rem; } /* 14px */
.fs-md    { font-size: 1rem; }     /* 16px */
.fs-lg    { font-size: 1.125rem; } /* 18px */
.fs-xl    { font-size: 1.25rem; }  /* 20px */
.fs-2xl   { font-size: 1.5rem; }   /* 24px */
.fs-3xl   { font-size: 1.875rem; } /* 30px */
.fs-4xl   { font-size: 2.25rem; }  /* 36px */
.fs-5xl   { font-size: 3rem; }     /* 48px */

/* Counter styling */
.counter-prefix,
.counter-suffix {
  display: inline-block;
  vertical-align: middle;
}

.counter-number {
  display: inline-block;
  vertical-align: middle;
  font-weight: 700;
}

/* Optional: tweak spacing */
.counter-prefix { margin-right: 0.25em; }
.counter-suffix { margin-left:  0.25em; }

/* Generic Component Grid System */
.component-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(3, 1fr); /* Default 3 columns */
}

.component-grid--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

.component-grid--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.component-grid--cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.component-grid--cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .component-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .component-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Aspect ratio modifiers */
.component-grid--square .grid-item__image {
    aspect-ratio: 1;
}

.component-grid--landscape .grid-item__image {
    aspect-ratio: 16/9;
}

.component-grid--portrait .grid-item__image {
    aspect-ratio: 3/4;
}

.component-grid--auto .grid-item__image {
    aspect-ratio: auto;
}
.grid-item__image {
    position: relative;
}

.grid-item__image img {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    object-fit: cover;
}

.component-grid--auto .grid-item__image img {
    position: relative;
    inset: initial;
    object-fit: initial;
    width: auto;
    height: auto;
}

/* Statistics Component Specific Styles */

.statistics__title {
    font-weight: bold;
}

.statistics__item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.statistic__item--inner {
    display: flex;
    flex-direction: column;
    row-gap: .7rem;
}

.statistic__item--inner * {
    line-height: normal;
}

.sp-comp-posts-output__single__content__date {
    margin: 0;
}

.sp-comp-posts-output__single__content {
    padding-top: 0;
}

.sp-comp-mast {
    background: none;
}

.sp-comp-mast .sp-comp-mast__inner__image {
    background: #00395b;
}

.sp-comp-mast .container--mobile-full {
    max-width: none;
}

.sp-comp-mast .sp-comp-mast__inner__content {
    background: rgba(0, 57, 91, .95);
    width: 100%;
    margin: -120px 1rem 0 1rem;
}

@media (max-width: 768px) {
    .sp-comp-subjects {
        margin: 0 1rem;
        background-color: rgba(0, 57, 91, .95) !important;
    }
    .sp-comp-subjects {
        padding: 1.5rem 1rem 2rem 1rem;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    .sp-comp-subjects .select {
        max-width: 80%;
        margin: 0 auto;
    }
    .sp-comp-subjects select {
        text-align: center;
    }
    .sp-comp-mast__inner__content {
        padding: 2rem;
        text-align: center;
    }
    .sp-comp-mast__inner__content__buttons {
        margin-top: 1rem;
    }
    .sp-comp-mast__inner__content__buttons .btn--large {
        font-size: 1rem;
        margin-top: 1rem;
        padding: .75rem 1rem;
    }
    .sp-comp-mast__inner__content__buttons {
        margin-top: 0;
    }
    .sp-comp-mast__inner__content__header {
        margin-bottom: 1rem;
    }
}

/* Table Component Styles */
.table-component {
    position: relative;
}

.table-component__scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.table-component__table {
    display: grid;
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    background: #fff;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Table rows */
.table-component__row {
    display: contents;
}

/* Table cells */
.table-component__cell {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    min-height: 48px;
    display: flex;
    align-items: center;
}

/* Header styles */
.table-component__row--header .table-component__cell {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
}

/* Striped rows */
.table-component__row--even .table-component__cell {
    background-color: #f8f9fa;
}

.table-component__row--odd .table-component__cell {
    background-color: #fff;
}

/* Hover effect */
.table-component__row--data:hover .table-component__cell {
    background-color: #e9ecef;
    transition: background-color 0.2s ease;
}

/* Remove bottom border from last row */
.table-component__row:last-child .table-component__cell {
    border-bottom: none;
}

/* Mobile responsive - Default behavior */
@media (max-width: 768px) {
    .table-component__scroll-wrapper {
        box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1);
    }

    .table-component__table {
        min-width: 600px;
    }

    .table-component__cell {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Mobile stacked view - always applied on mobile */
@media (max-width: 768px) {
    .table-component__table {
        display: block;
        min-width: 100%;
    }

    .table-component__row {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        overflow: hidden;
    }

    .table-component__row--header {
        display: none;
    }

    .table-component__cell {
        display: block;
        padding: 10px 15px;
        border-bottom: 1px solid #dee2e6;
        min-height: auto;
        position: relative;
        padding-left: 40%;
    }

    .table-component__cell:last-child {
        border-bottom: none;
    }

    /* Add labels before each cell in stack view */
    .table-component__cell[data-label]::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        font-weight: 600;
        color: #495057;
        width: 35%;
        text-align: left;
    }

    /* Adjust striping for stacked view */
    .table-component__row--even {
        background-color: #f8f9fa;
    }

    .table-component__row--even .table-component__cell {
        background-color: transparent;
    }

    .table-component__row--odd {
        background-color: #fff;
    }

    .table-component__row--odd .table-component__cell {
        background-color: transparent;
    }
}

/* Focus styles for accessibility */
.table-component__cell a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .table-component__table {
        min-width: 100%;
    }

    .table-component__cell {
        padding: 8px;
        font-size: 12px;
    }

    .table-component__row--data:hover .table-component__cell {
        background-color: inherit;
    }
}
