/* Enhanced Luxury Variables */
:root {
    --gold: #D4AF37;
    --gold-light: #F4CD68;
    --gold-dark: #B4941F;
    --gold-gradient: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
    --dark-overlay: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.4));
    --glass-effect: rgba(255, 255, 255, 0.1);
    --blur-effect: blur(10px);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.15);
    --shadow-xl: 0 25px 50px rgba(0,0,0,0.2);
}

/* Enhanced Gallery Hero Section */
.gallery-hero {
    min-height: 70vh;
    background: var(--dark-overlay), url('../Images/DR.jpg') center/cover fixed;
    padding: 180px 0 120px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    box-shadow: 0 0 30px var(--gold);
}

.gallery-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(212,175,55,0.1) 0%, transparent 60%);
    animation: rotateGradient 20s linear infinite;
}

.gallery-hero h1 {
    font-size: 4.5rem;
    margin-bottom: 30px;
    font-family: 'Cormorant Garamond', serif;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.gallery-hero .lead {
    font-size: 1.6rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.3s backwards;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Enhanced Gallery Filter */
.gallery-filter {
    padding: 40px 0;
    background: linear-gradient(135deg, var(--light) 0%, var(--white) 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: var(--blur-effect);
    box-shadow: var(--shadow-md);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    padding: 0 30px;
}

.filter-btn {
    padding: 16px 35px;
    border: none;
    background: var(--white);
    color: var(--text);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.filter-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.filter-btn.active {
    background: var(--gold-gradient);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

/* Enhanced Gallery Grid */
.gallery-grid {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--white) 0%, var(--light) 100%);
    position: relative;
}

.gallery-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gold-gradient);
    opacity: 0.5;
}

.gallery-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 60px;
    padding: 30px;
    max-width: 1800px;
    margin: 0 auto;
}

.gallery-item {
    background: var(--white);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
    position: relative;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 40px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    pointer-events: none;
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.gallery-item:hover::before {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

/* Before After Slider */
.before-after-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.before, .after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease-out;
}

.before {
    z-index: 1;
    width: 50%;
    overflow: hidden;
}

.before::after, .after::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent);
}

.before img, .after img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .before img,
.gallery-item:hover .after img {
    transform: scale(1.1);
}

.handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    z-index: 2;
    cursor: ew-resize;
    transition: all 0.3s ease;
}

.handle-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--gold);
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--gold);
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.handle-circle i {
    font-size: 14px;
    color: var(--gold);
    transition: all 0.3s ease;
}

.handle:hover .handle-circle {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.slider-labels {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .slider-labels {
    opacity: 1;
}

.before-label, .after-label {
    background: rgba(0,0,0,0.8);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Gallery Caption */
.gallery-caption {
    padding: 30px;
    background: linear-gradient(135deg, var(--white) 0%, var(--light) 100%);
}

.gallery-caption h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-family: 'Cormorant Garamond', serif;
}

.gallery-caption p {
    color: var(--text);
    margin-bottom: 25px;
    line-height: 1.6;
}

.case-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.treatment-time {
    color: var(--text);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.treatment-time i {
    color: var(--gold);
}

.view-details-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid var(--gold);
}

.view-details-btn:hover {
    background: var(--gold-gradient);
    color: var(--white);
    transform: translateX(5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
    }
}

/* Modal Styles */
.case-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.case-details-modal.active {
    display: block;
    animation: modalFadeIn 0.4s ease-out;
}

.modal-content {
    background: linear-gradient(135deg, var(--white) 0%, var(--light) 100%);
    max-width: 1000px;
    margin: 40px auto;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--white);
    border: none;
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.close-btn:hover {
    transform: rotate(90deg);
    background: var(--gold-gradient);
    color: var(--white);
}

.case-details-content {
    padding: 50px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-items {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 3rem;
    }

    .gallery-items {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }

    .before-after-slider {
        height: 400px;
    }

    .case-details-content {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .gallery-hero h1 {
        font-size: 2.5rem;
    }

    .filter-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .before-after-slider {
        height: 300px;
    }

    .gallery-caption {
        padding: 20px;
    }

    .gallery-caption h3 {
        font-size: 1.5rem;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    text-align: center;
}

.spinner-circle {
    width: 60px;
    height: 60px;
    border: 3px solid var(--gold-light);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.spinner-text {
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 500;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Add these styles for error and no items messages */
.error-message,
.no-items {
    text-align: center;
    padding: 40px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin: 20px;
}

.error-message i {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 20px;
}

.error-message p {
    font-size: 18px;
    color: var(--text);
}

.no-items {
    color: var(--text);
    font-size: 18px;
}

/* Single Image Styles */
.single-image {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .single-image img {
    transform: scale(1.1);
}

/* Add hover effect for single images */
.single-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .single-image::after {
    opacity: 1;
}

/* Modal styles for single image */
.modal-slider .single-image {
    height: 600px;
    border-radius: 0;
} 