/* Gallery Page Styles */
:root {
    --primary-color: #f5a623;
    --primary-dark: #e09213;
    --secondary-color: #3f4b5b;
    --secondary-dark: #1e2a3a;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shine {
    0% {
        background-position: -100px;
    }
    40%, 100% {
        background-position: 400px;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(245, 166, 35, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0);
    }
}

/* Page Banner */
.page-banner {
    position: relative;
    height: 350px;
    background: linear-gradient(135deg, rgba(63, 75, 91, 0.9) 0%, rgba(30, 42, 58, 0.9) 100%), url('school-banner.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('pattern.svg');
    opacity: 0.05;
    animation: fadeIn 1.5s ease-out;
}

.banner-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1.2s ease-out;
}

.page-banner h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.page-banner h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.breadcrumbs {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

/* Section Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    margin-bottom: 50px;
    position: relative;
}

.section-title.center {
    text-align: center;
}

.section-title .subtitle {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(245, 166, 35, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
    position: relative;
    animation: fadeInUp 0.8s ease both;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin: 0;
    position: relative;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-medium);
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Gallery Intro Section */
.gallery-intro {
    background-color: var(--white);
}

/* Gallery Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.category-tab {
    padding: 12px 25px;
    background-color: var(--light-bg);
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
    z-index: -1;
}

.category-tab:hover::before,
.category-tab.active::before {
    width: 100%;
}

.category-tab:hover,
.category-tab.active {
    color: var(--white);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* Category Grid - For Gallery Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    animation: fadeInUp 0.8s ease 0.5s both;
    padding: 20px 10px;
    margin-bottom: 40px;
    row-gap: 40px;
    column-gap: 40px;
}

/* Gallery Grid - Enhanced for Mobile/Tablet */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    animation: fadeInUp 0.8s ease 0.5s both;
    padding: 0 10px; /* Add padding for mobile */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px; /* Slightly more rounded for modern look */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); /* Enhanced shadow */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    height: 400px; /* Significantly increased from 250px to 400px */
    transform-origin: center;
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: calc(0.1s * var(--item-index, 1));
    /* Enhanced touch interactions */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.gallery-item:nth-child(1) { --item-index: 1; }
.gallery-item:nth-child(2) { --item-index: 2; }
.gallery-item:nth-child(3) { --item-index: 3; }
.gallery-item:nth-child(4) { --item-index: 4; }
.gallery-item:nth-child(5) { --item-index: 5; }
.gallery-item:nth-child(6) { --item-index: 6; }
.gallery-item:nth-child(7) { --item-index: 7; }
.gallery-item:nth-child(8) { --item-index: 8; }

/* Enhanced hover effects for desktop */
.gallery-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Touch-friendly active states for mobile */
.gallery-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .gallery-item:active {
        transform: scale(0.95);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7), transparent);
    color: white;
    transform: translateY(100%);
    transition: transform var(--transition-fast);
    z-index: 2;
    min-height: 120px; /* Significantly increased minimum height for title and buttons */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.gallery-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Ensure overlay is partially visible on desktop for better UX */
@media (min-width: 769px) {
    .gallery-overlay {
        transform: translateY(20px); /* Partially visible on desktop */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
    }
    
    .gallery-item:hover .gallery-overlay {
        transform: translateY(0);
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    transform: rotate(90deg);
    color: var(--primary-color);
}

.lightbox-image {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.9);
    transition: all var(--transition-medium);
    position: relative;
    z-index: 1;
}

.lightbox.active .lightbox-image {
    opacity: 1;
    transform: scale(1);
}

.lightbox-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-align: center;
    max-width: 80%;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.lightbox.active .lightbox-caption {
    opacity: 1;
}

.lightbox-navigation {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    z-index: 10;
}

.lightbox-nav-btn {
    color: white;
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.lightbox-nav-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Filtering Animation */
.gallery-item {
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Image Loading Animation */
.gallery-item {
    position: relative;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(245, 166, 35, 0.1), rgba(63, 75, 91, 0.1));
    z-index: 2;
    pointer-events: none;
}

.gallery-item.loading::before {
    opacity: 1;
}

/* Empty State */
.gallery-empty {
    grid-column: 1 / -1;
    padding: 60px 0;
    text-align: center;
    background: var(--light-bg);
    border-radius: 15px;
    border: 2px dashed rgba(245, 166, 35, 0.3);
    display: none;
}

.gallery-empty.visible {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.gallery-empty i {
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.5;
    margin-bottom: 20px;
}

.gallery-empty h3 {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.gallery-empty p {
    color: var(--text-medium);
}

/* Enhanced Responsive Adjustments for Mobile/Tablet */

/* Large Tablets (768px - 991px) */
@media (max-width: 991px) {
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 35px;
        padding: 20px 15px;
        row-gap: 35px;
        column-gap: 35px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 25px;
        padding: 0 15px;
    }
    
    .gallery-item {
        height: 380px; /* Significantly increased from 220px to 380px */
        border-radius: 10px;
    }
    
    .gallery-overlay h3 {
        font-size: 1.2rem;
    }
    
    .gallery-overlay p {
        font-size: 0.9rem;
    }
}

/* Tablets (577px - 767px) */
@media (max-width: 767px) {
    .page-banner {
        height: 250px;
    }
    
    .page-banner h1 {
        font-size: 2.8rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .intro-text {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .category-tabs {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin-bottom: 30px;
    }
    
    .category-tab {
        width: 100%;
        max-width: 300px;
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 18px;
        padding: 0 20px;
    }
    
    .gallery-item {
        height: 350px; /* Significantly increased from 180px to 350px */
        border-radius: 8px;
    }
    
    .gallery-overlay {
        padding: 15px;
        min-height: 125px; /* Significantly increased minimum height for tablets */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6), transparent);
        transform: translateY(0); /* Always visible on tablets */
        opacity: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }
    
    .gallery-overlay h3 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 8px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
        line-height: 1.3;
    }
    
    .gallery-overlay p {
        font-size: 0.85rem;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        opacity: 0.95;
    }
    
    .lightbox-navigation {
        padding: 0 20px;
    }
    
    .lightbox-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }
}

/* Mobile Landscape (481px - 576px) */
@media (max-width: 576px) {
    .page-banner {
        height: 220px;
    }
    
    .page-banner h1 {
        font-size: 2.4rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }
    
    .gallery-item {
        height: 320px; /* Significantly increased from 160px to 320px */
        border-radius: 6px;
    }
    
    .gallery-overlay {
        padding: 12px;
    }
    
    .gallery-overlay h3 {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .gallery-overlay p {
        font-size: 0.75rem;
    }
    
    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
}

/* Mobile Portrait (320px - 480px) */
@media (max-width: 480px) {
    .page-banner {
        height: 200px;
    }
    
    .page-banner h1 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 1.7rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
    
    .gallery-item {
        height: 400px; /* Significantly increased from 220px to 400px */
        border-radius: 8px;
    }
    
    .gallery-overlay {
        padding: 15px;
    }
    
    .gallery-overlay h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .gallery-overlay p {
        font-size: 0.85rem;
    }
    
    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .lightbox-close {
        font-size: 1.8rem;
        top: 15px;
        right: 20px;
    }
}

/* Extra Small Mobile (320px - 360px) */
@media (max-width: 360px) {
    .page-banner {
        height: 180px;
    }
    
    .page-banner h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .gallery-grid {
        padding: 0 5px;
    }
    
    .gallery-item {
        height: 380px; /* Significantly increased from 200px to 380px */
    }
    
    .gallery-overlay h3 {
        font-size: 1rem;
    }
    
    .gallery-overlay p {
        font-size: 0.8rem;
    }
}

/* Category grid styles */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    text-decoration: none;
    display: block;
    background-color: #fff;
    height: 250px;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.category-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 30px 20px 20px;
    color: #fff;
    transition: all 0.3s ease;
}

.category-overlay h3 {
    font-size: 1.5rem;
    margin: 0 0 8px;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.category-overlay p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s, gap 0.3s;
}

.category-card:hover .category-overlay p {
    opacity: 1;
    gap: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .category-card {
        height: 200px;
    }
    
    .category-overlay h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        height: 180px;
    }
}

/* Animation for category cards */
.category-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
.category-card:nth-child(7) { animation-delay: 0.7s; }

/* Back to gallery link */
.back-to-gallery {
    text-align: center;
    margin: 20px 0 0;
}

.back-to-gallery a {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color, #f5a623);
    font-weight: 500;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid var(--primary-color, #f5a623);
    transition: all 0.3s ease;
    gap: 8px;
}

.back-to-gallery a:hover {
    background-color: var(--primary-color, #f5a623);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(245, 166, 35, 0.3);
}

.back-to-gallery a i {
    transition: transform 0.3s ease;
}

.back-to-gallery a:hover i {
    transform: translateX(-3px);
}

/* Remove all the following watermark and protection related styles */
.protected-image-container,
.image-watermark,
.protected-image-container:hover .image-watermark,
.protection-message,
.protection-message i,
.protection-message h3,
.protection-message p,
.protection-message small {
    display: none !important;
}

/* Disable selection */
.gallery-grid, .lightbox {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Enhanced Responsive Gallery Page Styles */
@media (max-width: 1200px) {
    .page-banner {
        height: 300px;
    }
    
    .page-banner h1 {
        font-size: 3.2rem;
    }
    
    .section-title h2 {
        font-size: 2.4rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .gallery-item {
        height: 300px; /* Increased from 240px to 300px */
    }
    
    .category-tabs {
        gap: 15px;
    }
    
    .category-tab {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 991px) {
    .page-banner {
        height: 280px;
    }
    
    .page-banner h1 {
        font-size: 2.8rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 22px;
    }
    
    .gallery-item {
        height: 280px; /* Increased from 220px to 280px */
    }
    
    .category-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .category-tab {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
    
    .lightbox-content {
        width: 85%;
        max-width: 700px;
    }
    
    .lightbox-image {
        max-height: 65vh;
    }
    
    .lightbox-nav {
        font-size: 1.8rem;
    }
}

@media (max-width: 767px) {
    .page-banner {
        height: 250px;
    }
    
    .page-banner h1 {
        font-size: 2.8rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .category-tabs {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .category-tab {
        width: 100%;
        max-width: 300px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 30px;
        padding: 20px 10px;
        row-gap: 30px;
        column-gap: 30px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px 5px;
        row-gap: 25px;
        column-gap: 25px;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .gallery-item img {
        object-fit: cover;
    }
    
    .gallery-item:hover .gallery-overlay {
        opacity: 0.9;
    }
    
    .gallery-overlay h3 {
        font-size: 1.1rem;
    }
    
    .gallery-overlay p {
        font-size: 0.9rem;
    }
    
    .lightbox-content {
        width: 90%;
        max-width: 600px;
    }
    
    .lightbox-image {
        max-height: 60vh;
    }
    
    .lightbox-nav {
        font-size: 1.5rem;
    }
    
    .lightbox-close {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .page-banner {
        height: 220px;
    }
    
    .page-banner h1 {
        font-size: 2.4rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .category-tabs {
        gap: 8px;
    }
    
    .category-tab {
        max-width: 280px;
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 18px;
    }
    
    .gallery-item {
        height: 180px;
    }
    
    .gallery-overlay h3 {
        font-size: 1rem;
    }
    
    .gallery-overlay p {
        font-size: 0.85rem;
    }
    
    .lightbox-content {
        width: 92%;
        max-width: 550px;
    }
    
    .lightbox-image {
        max-height: 55vh;
    }
    
    .lightbox-nav {
        font-size: 1.3rem;
    }
    
    .lightbox-close {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .page-banner {
        height: 200px;
    }
    
    .page-banner h1 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 1.7rem;
    }
    
    .category-tabs {
        gap: 6px;
    }
    
    .category-tab {
        max-width: 260px;
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        height: 280px; /* Increased from 220px to 280px */
    }
    
    .gallery-overlay h3 {
        font-size: 0.95rem;
    }
    
    .gallery-overlay p {
        font-size: 0.8rem;
    }
    
    .lightbox-content {
        width: 95%;
        max-width: 500px;
    }
    
    .lightbox-image {
        max-height: 50vh;
    }
    
    .lightbox-nav {
        font-size: 1.2rem;
    }
    
    .lightbox-close {
        font-size: 1.4rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .page-banner {
        height: 180px;
    }
    
    .page-banner h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .category-tab {
        max-width: 240px;
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .gallery-overlay h3 {
        font-size: 0.9rem;
    }
    
    .gallery-overlay p {
        font-size: 0.75rem;
    }
    
    .lightbox-content {
        width: 98%;
        max-width: 450px;
    }
    
    .lightbox-image {
        max-height: 45vh;
    }
    
    .lightbox-nav {
        font-size: 1.1rem;
    }
    
    .lightbox-close {
        font-size: 1.2rem;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .page-banner {
        height: 200px;
    }
    
    .page-banner h1 {
        font-size: 2.4rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .gallery-item {
        height: 160px;
    }
    
    .lightbox-image {
        max-height: 70vh;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gallery-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .lightbox-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    /* Improve touch scrolling */
    .gallery-grid {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Optimize images for mobile */
    .gallery-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Better touch targets */
    .gallery-item {
        min-height: 44px; /* Minimum touch target */
        min-width: 44px;
    }
    
    /* Reduce animations on mobile for better performance */
    .gallery-item {
        animation-duration: 0.5s;
    }
    
    /* Optimize hover effects for touch devices */
    .gallery-item:hover {
        transform: none; /* Disable hover effects on touch devices */
    }
    
    /* Better overlay visibility on mobile */
    .gallery-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
        transform: translateY(0); /* Always visible on mobile */
        opacity: 1;
        min-height: 130px; /* Significantly increased minimum height for mobile */
        padding: 15px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }
    
    /* Ensure title is always visible on mobile */
    .gallery-overlay h3 {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
        margin-bottom: 8px !important;
        line-height: 1.3;
    }
    
    .gallery-overlay p {
        font-size: 0.9rem !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        opacity: 0.95 !important;
    }
}

/* Landscape orientation optimizations */
@media (max-width: 767px) and (orientation: landscape) {
    .page-banner {
        height: 180px;
    }
    
    .page-banner h1 {
        font-size: 2.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .gallery-item {
        height: 140px;
    }
    
    .gallery-overlay {
        padding: 8px;
    }
    
    .gallery-overlay h3 {
        font-size: 0.8rem;
    }
    
    .gallery-overlay p {
        font-size: 0.7rem;
    }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gallery-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .lightbox-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .page-banner {
        height: 150px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
    }
    
    .gallery-item {
        height: 150px;
    }
    
    .category-tabs {
        display: none;
    }
    
    .lightbox {
        display: none;
    }
} 