/* 
 * Before-After Slider CSS
 * Consolidated from before-after-slider.css and before-after-gallery.css
 * This file contains all styles needed for the before-after image comparison feature
 */

:root {
    --primary-color: #dc3545;
    --secondary-color: #6c757d;
    --accent-color: #60a5fa;
    --dark-color: #333333;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* ==================================
   Page Header
   ================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), #b02a37);
    color: white;
    padding: 80px 0 60px;
    margin-bottom: 0;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: white;
}

/* ==================================
   Gallery Page
   ================================== */
.before-after-gallery-page {
    padding: 80px 0;
    background: #f8f9fa;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
}

/* ==================================
   Gallery Stats
   ================================== */
.gallery-stats {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 50px;
}

.stat-item {
    padding: 20px;
    text-align: center;
}

.stat-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.stat-item p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* ==================================
   Comparison Wrapper
   ================================== */
.comparison-wrapper {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    margin-bottom: 30px;
}

.comparison-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.comparison-header {
    padding: 25px 25px 15px;
}

.comparison-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.comparison-description {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* ==================================
   Comparison Container
   ================================== */
.comparison-container {
    position: relative;
    width: 100%;
    height: 400px;
    cursor: ew-resize;
    user-select: none;
    overflow: hidden;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.before-image {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.after-image {
    z-index: 1;
}

/* ==================================
   Labels
   ================================== */
.label {
    font-size: 15px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-radius: 25px;
    position: absolute;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.before-label {
    left: 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.after-label {
    right: 20px;
    background: linear-gradient(135deg, var(--success-color), #059669);
}

/* ==================================
   Divider
   ================================== */
.divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #ffffff, #e0e0e0, #ffffff);
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.divider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    transition: var(--transition);
    border: 3px solid var(--primary-color);
}

.divider-handle:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(0,0,0,0.35);
}

.divider-arrows {
    color: var(--primary-color);
    font-size: 18px;
}

/* ==================================
   Action Buttons
   ================================== */
.comparison-actions {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn-reset,
.btn-fullscreen {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-reset:hover,
.btn-fullscreen:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* ==================================
   Loading Skeleton
   ================================== */
.loading-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f0f0f0;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.comparison-container.loaded .loading-skeleton {
    opacity: 0;
    pointer-events: none;
}

.skeleton-shimmer {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================================
   Image Quality Badge
   ================================== */
.image-info {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 8;
}

.quality-badge {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ==================================
   Load More Button
   ================================== */
.btn-load-more {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.3);
}

/* ==================================
   Empty State
   ================================== */
.empty-state {
    padding: 80px 0;
    text-align: center;
}

.empty-icon {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 30px;
}

.empty-state h3 {
    color: var(--dark-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
    text-decoration: none;
    color: white;
}

/* ==================================
   CTA Section
   ================================== */
.cta-section {
    background: linear-gradient(135deg, var(--dark-color), #374151);
    color: white;
    padding: 60px 0;
}

.cta-section h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.btn-cta {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.3);
    text-decoration: none;
    color: white;
}

/* ==================================
   Fullscreen Modal
   ================================== */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.fullscreen-modal.active {
    display: flex;
}

.fullscreen-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
}

.btn-close-fullscreen {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-close-fullscreen:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.fullscreen-slider {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: var(--border-radius);
}

/* ==================================
   Responsive Design
   ================================== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .before-after-gallery-page {
        padding: 40px 0;
    }
    
    .comparison-container {
        height: 300px;
    }
    
    .comparison-header {
        padding: 20px 20px 10px;
    }
    
    .comparison-title {
        font-size: 1.2rem;
    }
    
    .comparison-description {
        font-size: 0.9rem;
    }
    
    .label {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .divider-handle {
        width: 50px;
        height: 50px;
    }
    
    .comparison-actions {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .btn-reset,
    .btn-fullscreen {
        justify-content: center;
    }
    
    .gallery-stats {
        padding: 30px 15px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-item i {
        font-size: 2.5rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .cta-section {
        text-align: center;
    }
    
    .cta-section .text-right {
        text-align: center !important;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 60px 0 40px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .comparison-container {
        height: 250px;
    }
    
    .comparison-header {
        padding: 15px 15px 10px;
    }
    
    .comparison-title {
        font-size: 1.1rem;
    }
    
    .label {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .divider-handle {
        width: 45px;
        height: 45px;
    }
    
    .divider-arrows {
        font-size: 16px;
    }
    
    .comparison-actions {
        padding: 15px;
    }
    
    .btn-reset,
    .btn-fullscreen {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ==================================
   Print Styles
   ================================== */
@media print {
    .page-header,
    .comparison-actions,
    .btn-load-more,
    .cta-section {
        display: none;
    }
    
    .comparison-wrapper {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .before-after-gallery-page {
        padding: 20px 0;
    }
}
