/* Gallery Header */
.gallery-header {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #fd910d 0%, #cfdfe2 100%);
    color: white;
}

.gallery-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #64748b;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #0d6efd;
    color: white;
}


.service-card {
    position: relative;
    margin: 10px 0;
    height: 320px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 94, 20, 0.1);
}

.service-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This makes it zoomed in */
    object-position: center;
    z-index: 1;
    transition: all 0.6s ease;
    transform: scale(1);
}

/* If you want the full image visible (not zoomed in), use contain instead */
.service-bg.contain {
    object-fit: contain;
    background: white;
    /* Add white background for transparent areas */
}

/* Or better: Use scale-down which shows image at natural size */
.service-bg.scale-down {
    object-fit: scale-down;
    background: white;
}

/* On hover effect */
.service-card:hover .service-bg {
    transform: scale(1.05);
    filter: brightness(0.95);
}


/* Loading state */
.service-bg.loading {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.service-content {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: white;
    transition: all 0.4s ease;
}

.service-title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1.3rem;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
    padding: 0 0.5rem;
    color: white;
}

.service-description {
    margin-bottom: 20px;
    opacity: 0.9;
    text-align: center;
    line-height: 1.4;
    font-size: 0.85rem;
    padding: 0 0.5rem;
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.service-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 42px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 21px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    cursor: pointer;
}

.service-btn:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 94, 20, 0.3);
}

.row.gx-4.gy-2 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

@media (max-width: 768px) {
    .service-card {
        height: 300px;
        margin: 30px 0;
    }

    .service-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .service-description {
        font-size: 0.8rem;
        margin-bottom: 15px;
        max-height: 55px;
    }

    .service-btn {
        width: 130px;
        height: 40px;
        font-size: 0.85rem;
    }

    .service-content {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .service-card {
        height: 280px;
        margin: 20px 0;
    }

    .service-title {
        font-size: 0.95rem;
    }

    .service-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .service-btn {
        width: 120px;
        height: 38px;
        font-size: 0.8rem;
    }
}

@media (min-width: 992px) {
    .col-lg-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }

    @media (min-width: 1200px) {
        .col-xxl-3 {
            flex: 0 0 auto;
            width: 25%;
        }
    }
}




/* Loading states */
.loading-spinner {
    display: inline-block;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

/* Lightbox styles are in /css/lightbox.css */

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 1rem;
}

#pagination-container {
    display: none;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.pagination-info strong {
    color: var(--primary);
}

.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.page-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 36, 91, 0.2);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(2, 36, 91, 0.3);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.page-item.disabled .page-link:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #333;
    transform: none;
    box-shadow: none;
}

.page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: #666;
    font-weight: bold;
    user-select: none;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-size-selector label {
    font-weight: 500;
    color: var(--primary);
    white-space: nowrap;
}

.page-size-selector select {
    width: auto;
    min-width: 80px;
    padding: 0.5rem 2rem 0.5rem 1rem;
    background-color: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-size-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 36, 91, 0.1);
}

.page-size-selector select:hover {
    border-color: var(--primary);
}

/* Results info */
.results-info {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Mobile responsiveness for pagination */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .pagination-info {
        text-align: center;
        order: 3;
    }

    .pagination {
        order: 1;
        justify-content: center;
        flex-wrap: wrap;
    }

    .page-size-selector {
        order: 2;
        justify-content: center;
        margin-top: 0;
    }

    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 0.5rem;
        font-size: 0.875rem;
    }

    .page-ellipsis {
        min-width: 36px;
        height: 36px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .service-card {
        height: 350px;
        margin: 70px 0 40px 0;
    }

    .service-title {
        font-size: 1.1rem;
    }

    .service-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .page-header {
        min-height: 250px;
        padding: 3rem 0;
    }

    /* Back button mobile states */
    .button.expanded {
        width: 160px;
        border-radius: 50px;
        background-color: var(--primary);
    }

    .button.expanded .svgIcon {
        transform: translateY(-200%);
    }

    .button.expanded::before {
        font-size: 13px;
        opacity: 1;
        bottom: unset;
    }

    .button.collapsed {
        width: 60px;
        border-radius: 50%;
        background-color: var(--primary);
    }

    .button.collapsed .svgIcon {
        transform: translateY(0%) rotate(-90deg);
    }

    .button.collapsed::before {
        font-size: 0px;
        opacity: 0;
    }

    /* Default state for mobile - start with text */
    .button {
        width: 160px;
        border-radius: 50px;
        background-color: var(--primary);
    }

    .button .svgIcon {
        transform: translateY(-200%);
    }

    .button::before {
        font-size: 13px;
        opacity: 1;
        bottom: unset;
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .button:hover {
        width: 160px;
        border-radius: 50px;
        background-color: var(--primary);
    }

    .button:hover .svgIcon {
        transform: translateY(-200%);
    }

    .button:hover::before {
        font-size: 13px;
        opacity: 1;
        bottom: unset;
    }
}

/* Footer improvements */
.footer .text-primary {
    color: var(--secondary) !important;
}

.footer .btn-link {
    color: var(--secondary) !important;
}

.footer .btn-link:hover {
    color: white !important;
}

/* Enhanced sections */
.section-header {
    margin-bottom: 3rem;
}

.section-tagline {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem;
    }
}

/* Image optimization */
.service-bg.loading {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Accessibility */
.btn-item:focus-visible,
.service-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(2, 36, 91, 0.3);
}