/**
 * Gallery Styles - STQC 3.0 Compliant
 * Includes accessibility enhancements and responsive design
 */

/* Common Gallery Styles */
.gallery-grid,
.gallery-albums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Album Styling */
.gallery-album {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    height: 100%;
}

.gallery-album:hover,
.gallery-album:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-album-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.gallery-album-thumbnail {
    position: relative;
    height: 200px;
    background-color: #f8f8f8;
    overflow: hidden;
}

.gallery-album-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-album:hover .gallery-album-image,
.gallery-album:focus-within .gallery-album-image {
    transform: scale(1.05);
}

.gallery-album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(27, 67, 50, 0.7); /* TCL green with opacity */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-album:hover .gallery-album-overlay,
.gallery-album:focus-within .gallery-album-overlay {
    opacity: 1;
}

.gallery-album-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.image-count {
    font-size: 0.9rem;
    font-weight: 600;
}

.gallery-album-info {
    padding: 1rem;
}

.gallery-album-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1B4332;
}

.gallery-album-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

/* Individual Gallery Item Styling */
.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    height: 100%;
}

.gallery-item:hover,
.gallery-item:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-image-wrapper {
    position: relative;
    height: 200px;
    background-color: #f8f8f8;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image,
.gallery-item:focus-within .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(27, 67, 50, 0.7); /* TCL green with opacity */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-within .gallery-overlay {
    opacity: 1;
}

.zoom-icon {
    font-size: 1.5rem;
}

.gallery-caption {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: #333;
    background-color: #fff;
}

/* Accessibility Focus Styles */
.gallery-album a:focus,
.gallery-item a:focus {
    outline: 3px solid #1B4332;
    outline-offset: -3px;
}

.gallery-back-link .btn:focus {
    outline: 3px solid #1B4332;
    outline-offset: 3px;
    box-shadow: 0 0 0 0.25rem rgba(27, 67, 50, 0.25);
}

/* Breadcrumb Styling */
.gallery-breadcrumb {
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: #1B4332;
    text-decoration: none;
}

.breadcrumb-item a:hover,
.breadcrumb-item a:focus {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #555;
}

/* Alert and Instructions Styling */
.alert-info {
    background-color: #e8f4f1;
    border-color: #c6e6de;
    color: #1B4332;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .gallery-album-overlay,
    .gallery-overlay {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .gallery-caption,
    .gallery-album-title {
        color: #000;
    }
    
    .gallery-album:hover,
    .gallery-item:hover {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .gallery-album,
    .gallery-item,
    .gallery-album-image,
    .gallery-image,
    .gallery-album-overlay,
    .gallery-overlay {
        transition: none;
    }
    
    .gallery-album:hover,
    .gallery-item:hover,
    .gallery-album:hover .gallery-album-image,
    .gallery-item:hover .gallery-image {
        transform: none;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .gallery-grid,
    .gallery-albums {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .gallery-image-wrapper,
    .gallery-album-thumbnail {
        height: 180px;
    }
    
    .gallery-album-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .gallery-grid,
    .gallery-albums {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .gallery-image-wrapper,
    .gallery-album-thumbnail {
        height: 150px;
    }
    
    .gallery-album-info {
        padding: 0.75rem;
    }
    
    .gallery-album-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .gallery-caption {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Gallery Single Page Styles */
.gallery-single {
    background: var(--bg-light);
    min-height: 100vh;
    padding: 0;
    margin-top: -2rem;
}

/* Header Styles */
.gallery-single .gallery-page-header {
    background: var(--white);
    padding: 3rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}

.gallery-single .gallery-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gallery-single .gallery-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Breadcrumb Styles */
.gallery-single .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.gallery-single .breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.gallery-single .breadcrumb-item.active {
    color: var(--text-secondary);
}

/* Main Content Area */
.gallery-single .entry-content {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Meta Information */
.gallery-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.gallery-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #555;
    font-size: 1rem;
}

.gallery-meta i {
    color: #1B4332;
    font-size: 1.2rem;
}

/* Gallery Content */
.gallery-content {
    margin: 2rem 0;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

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

/* Gallery Container */
.gallery-container {
    margin: 2rem 0;
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-light);
}

.gallery::-webkit-scrollbar {
    height: 8px;
}

.gallery::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.gallery::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.gallery::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Gallery Main Layout */
.gallery-main {
    margin-bottom: 2rem;
}

.gallery-main-image {
    margin-bottom: 1rem;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
    aspect-ratio: 16/9;
}

.main-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.main-image-wrapper:hover img {
    transform: scale(1.02);
}

/* Gallery Sidebar */
.gallery-sidebar {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    position: sticky;
    top: 2rem;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--neutral-200);
}

.widget-header i {
    color: var(--primary);
    font-size: 1.25rem;
}

.widget-header h3 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 600;
    color: var(--heading-primary);
}

/* Sidebar Menu */
.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: 0.75rem;
}

.menu-item:last-child {
    margin-bottom: 0;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.menu-item a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.menu-item a i {
    color: var(--primary);
    font-size: 0.875rem;
}

/* Tag Section */
.tag-section {
    margin-top: 1rem;
}

.tag-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid var(--neutral-300);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.tag-badge:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Related Galleries */
.related-galleries {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-gallery-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
    transition: all 0.3s ease;
}

.related-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.related-gallery-thumbnail {
    flex: 0 0 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.related-gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-gallery-item:hover .related-gallery-thumbnail img {
    transform: scale(1.05);
}

.related-gallery-info {
    flex: 1;
    min-width: 0;
}

.related-gallery-info h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.related-gallery-info h4 a {
    color: var(--heading-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-gallery-info h4 a:hover {
    color: var(--primary);
}

.related-gallery-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-date i {
    color: var(--primary);
    font-size: 0.875rem;
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
    .gallery-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .gallery-sidebar {
        padding: 1.5rem;
    }

    .sidebar-section {
        padding: 1.25rem;
    }

    .related-gallery-thumbnail {
        flex: 0 0 80px;
        height: 60px;
    }
}

@media (max-width: 575.98px) {
    .gallery-sidebar {
        padding: 1rem;
    }

    .sidebar-section {
        padding: 1rem;
    }

    .widget-header h3 {
        font-size: 1.125rem;
    }

    .tag-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .related-gallery-thumbnail {
        flex: 0 0 60px;
        height: 45px;
    }

    .related-gallery-info h4 {
        font-size: 0.875rem;
    }

    .related-gallery-meta {
        font-size: 0.75rem;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .gallery-single .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-single {
        padding: 1rem 0;
    }

    .gallery-single .gallery-page-header {
        padding: 2rem 0;
    }

    .gallery-single .entry-content {
        padding: 1.5rem;
    }

    .gallery-meta {
        gap: 1rem;
        padding: 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-sidebar {
        padding: 1.5rem;
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .gallery-single .gallery-title {
        font-size: 1.75rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .related-galleries li {
        flex-direction: column;
    }

    .related-gallery-thumbnail {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    .gallery-caption {
        font-size: 0.8125rem;
    }
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Gallery Card */
.gallery-card {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-card-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.gallery-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.05);
}

.gallery-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-overlay .overlay-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.gallery-card-overlay i {
    color: var(--white);
    font-size: 2rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-overlay i {
    transform: scale(1);
}

.gallery-card-content {
    padding: 1.5rem;
}

.gallery-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.gallery-card-title a {
    color: var(--heading-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.gallery-card-title a:hover {
    color: var(--primary);
}

.gallery-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.gallery-card-meta i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.gallery-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gallery-card-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.gallery-card-button i {
    font-size: 0.875rem;
}

/* Gallery Archive Sidebar */
.gallery-archive-sidebar {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    position: sticky;
    top: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.gallery-archive-sidebar .widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
}

.gallery-archive-sidebar .widget:last-child {
    margin-bottom: 0;
}

.gallery-archive-sidebar .widget-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--neutral-200);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-primary);
}

.gallery-archive-sidebar .widget-title i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Sidebar Menu */
.gallery-archive-sidebar .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gallery-archive-sidebar .menu-item {
    margin-bottom: 0.75rem;
}

.gallery-archive-sidebar .menu-item:last-child {
    margin-bottom: 0;
}

.gallery-archive-sidebar .menu-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.gallery-archive-sidebar .menu-item a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.gallery-archive-sidebar .menu-item a i {
    color: var(--primary);
    font-size: 0.875rem;
}

/* Tag Section */
.gallery-archive-sidebar .tag-section {
    margin-top: 1rem;
}

.gallery-archive-sidebar .tag-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gallery-archive-sidebar .tag-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid var(--neutral-300);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.gallery-archive-sidebar .tag-badge:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Related Galleries */
.gallery-archive-sidebar .related-galleries {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery-archive-sidebar .related-gallery-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
    transition: all 0.3s ease;
}

.gallery-archive-sidebar .related-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gallery-archive-sidebar .related-gallery-thumbnail {
    flex: 0 0 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-archive-sidebar .related-gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-archive-sidebar .related-gallery-item:hover .related-gallery-thumbnail img {
    transform: scale(1.05);
}

.gallery-archive-sidebar .related-gallery-info {
    flex: 1;
    min-width: 0;
}

.gallery-archive-sidebar .related-gallery-info h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.gallery-archive-sidebar .related-gallery-info h4 a {
    color: var(--heading-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-archive-sidebar .related-gallery-info h4 a:hover {
    color: var(--primary);
}

.gallery-archive-sidebar .related-gallery-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.gallery-archive-sidebar .meta-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-archive-sidebar .meta-date i {
    color: var(--primary);
    font-size: 0.875rem;
}

/* Responsive Archive Sidebar */
@media (max-width: 991.98px) {
    .gallery-archive-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .gallery-archive-sidebar {
        padding: 1.5rem;
    }

    .gallery-archive-sidebar .widget {
        padding: 1.25rem;
    }

    .gallery-archive-sidebar .related-gallery-thumbnail {
        flex: 0 0 80px;
        height: 60px;
    }
}

@media (max-width: 575.98px) {
    .gallery-archive-sidebar {
        padding: 1rem;
    }

    .gallery-archive-sidebar .widget {
        padding: 1rem;
    }

    .gallery-archive-sidebar .widget-title {
        font-size: 1.125rem;
    }

    .gallery-archive-sidebar .tag-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .gallery-archive-sidebar .related-gallery-thumbnail {
        flex: 0 0 60px;
        height: 45px;
    }

    .gallery-archive-sidebar .related-gallery-info h4 {
        font-size: 0.875rem;
    }

    .gallery-archive-sidebar .related-gallery-meta {
        font-size: 0.75rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: var(--spacing-xl);
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-numbers.current {
    background: var(--primary);
    color: var(--white);
}

.pagination .page-numbers:hover:not(.current) {
    background: var(--primary-light);
    color: var(--white);
}

/* No Galleries Message */
.no-galleries {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.no-galleries p {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    margin: 0;
}

/* Remove white space between navigation and hero */
.site-header {
    margin-bottom: 0;
}

.site-header + .site-main {
    margin-top: 0;
}

.site-main.gallery-archive {
    margin-top: 0;
}

.gallery-social-share .share-button:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1B4332;
}

.gallery-social-share .social-share-link:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.1);
    color: #1B4332;
}

/* Social Share Styling */
.gallery-social-share {
    margin-top: auto;
    position: relative;
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.gallery-social-share .share-button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #1B4332; /* TCL green for better brand identity */
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Keyboard focus styles */
.gallery-social-share .share-button:focus-visible {
    outline: 3px solid #1B4332;
    outline-offset: 2px;
}

.gallery-social-share .share-button:hover {
    background: #1B4332; /* TCL green */
    color: white;
    border-color: #1B4332;
}

.gallery-social-share .share-options {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    display: none;
    flex-direction: row;
    gap: 8px;
    z-index: 1000;
    margin-bottom: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 160px;
    white-space: nowrap;
}

/* Visible state for keyboard navigation */
.gallery-social-share .share-button[aria-expanded="true"] + .share-options {
    display: flex !important;
}

/* Arrow pointing down to button */
.gallery-social-share .share-options::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 18px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
    z-index: 1001;
}

/* Show on hover */
.gallery-social-share:hover .share-options {
    display: flex !important;
}

.gallery-social-share .social-share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 8px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    color: #1B4332; /* TCL green for better brand identity */
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Keyboard focus styles for social links */
.gallery-social-share .social-share-link:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
}

.gallery-social-share .social-share-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Social platform colors with minimum 4.5:1 contrast ratio for accessibility */
.gallery-social-share .social-share-link.facebook:hover {
    background: #1877f2;
    color: white; /* WCAG AA compliant contrast */
    border-color: #1877f2;
}

.gallery-social-share .social-share-link.twitter:hover {
    background: #1da1f2;
    color: white; /* WCAG AA compliant contrast */
    border-color: #1da1f2;
}

.gallery-social-share .social-share-link.linkedin:hover {
    background: #0a66c2;
    color: white; /* WCAG AA compliant contrast */
    border-color: #0a66c2;
}

.gallery-social-share .social-share-link.whatsapp:hover {
    background: #25d366;
    color: black; /* Better contrast (4.6:1) than white on this green */
    border-color: #25d366;
}

.gallery-social-share .social-share-link span {
    display: none;
}

.gallery-social-share .social-share-link i {
    font-size: 14px;
}

/* Mobile styles for social sharing */
@media screen and (max-width: 768px) {
    .gallery-social-share .share-button {
        width: 44px;
        height: 44px;
        padding: 10px;
    }

    .gallery-social-share .share-options {
        bottom: auto;
        top: 100%;
        right: 0;
        margin-bottom: 0;
        margin-top: 8px;
        min-width: 180px;
    }

    /* Arrow pointing up to button on mobile */
    .gallery-social-share .share-options::after {
        top: -6px;
        right: 18px;
        border-top: none;
        border-bottom: 6px solid white;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
    }

    /* On mobile, we need to show on click instead of hover */
    .gallery-social-share:hover .share-options {
        display: none;
    }

    /* Use aria-expanded instead for mobile */
    .gallery-social-share .share-button[aria-expanded="true"] + .share-options {
        display: flex !important;
    }

    /* Larger touch targets for accessibility */
    .gallery-social-share .social-share-link {
        width: 44px;
        height: 44px;
        padding: 12px;
    }

    .gallery-social-share .social-share-link i {
        font-size: 18px;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .gallery-social-share .share-button {
        width: 44px;
        height: 44px;
        padding: 12px;
    }
    
    .gallery-social-share .social-share-link {
        width: 40px;
        height: 40px;
        padding: 10px;
    }

    .gallery-social-share .social-share-link i {
        font-size: 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gallery-social-share .share-button {
        border: 3px solid currentColor;
        background: ButtonFace;
        color: ButtonText;
    }
    
    .gallery-social-share .share-button:hover,
    .gallery-social-share .share-button:focus {
        background: Highlight;
        color: HighlightText;
        border-color: HighlightText;
    }
    
    .gallery-social-share .share-options {
        border: 2px solid currentColor;
        background: Canvas;
        color: CanvasText;
        box-shadow: none;
    }

    .gallery-social-share .social-share-link {
        border: 2px solid currentColor;
        background: ButtonFace;
        color: ButtonText;
    }

    .gallery-social-share .social-share-link:hover,
    .gallery-social-share .social-share-link:focus {
        background: Highlight;
        color: HighlightText;
        border-color: HighlightText;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .gallery-social-share .share-button,
    .gallery-social-share .share-options,
    .gallery-social-share .social-share-link {
        transition: none !important;
    }
    
    .gallery-social-share .social-share-link:hover {
        transform: none !important;
    }
}