/* Photography Management System Frontend */
body.qgallery-frontend-body {
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.qgallery-frontend {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    background: #f8fafc;
    min-height: 100vh;
}

/* Header Section */
.qgallery-frontend-header {
    background: #b0252e;
    color: #ffffff;
    padding: 20px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.qgallery-frontend-header h1 {
    color: #ffffff;
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.qgallery-frontend-header .gallery-meta {
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
    font-size: 14px;
}

/* Navigation Bar */
.qgallery-frontend-nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.qgallery-nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.qgallery-nav-link {
    color: #808080;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

.qgallery-nav-link:hover,
.qgallery-nav-link.active {
    background: #b0252e;
    color: #ffffff;
}

/* Content Area */
.qgallery-content {
    padding: 0 30px 30px;
}

/* Management Cards */
.qgallery-management-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.qgallery-management-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease;
}

.qgallery-management-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.qgallery-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.qgallery-card-icon {
    width: 40px;
    height: 40px;
    background: #b0252e;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #ffffff;
    font-size: 18px;
}

.qgallery-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.qgallery-card-description {
    color: #808080;
    margin-bottom: 20px;
    line-height: 1.5;
}

.qgallery-card-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.qgallery-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qgallery-btn-primary {
    background: #b0252e;
    color: #ffffff;
}

.qgallery-btn-primary:hover {
    background: #8f1e26;
    color: #ffffff;
}

.qgallery-btn-secondary {
    background: #808080;
    color: #ffffff;
}

.qgallery-btn-secondary:hover {
    background: #6b6b6b;
    color: #ffffff;
}

.qgallery-btn-outline {
    background: transparent;
    color: #b0252e;
    border: 1px solid #b0252e;
}

.qgallery-btn-outline:hover {
    background: #b0252e;
    color: #ffffff;
}

/* Photo Grid Section */
.qgallery-photos-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.qgallery-section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.qgallery-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.qgallery-section-meta {
    color: #808080;
    font-size: 14px;
}

/* Photo Grid */
.qgallery-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.qgallery-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.qgallery-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.qgallery-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.qgallery-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1024px) {
    .qgallery-grid[data-columns="4"],
    .qgallery-grid[data-columns="5"] { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .qgallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .qgallery-content { padding: 0 20px 20px; }
    .qgallery-frontend-header { padding: 20px; }
    .qgallery-frontend-nav { padding: 15px 20px; }
}

@media (max-width: 480px) {
    .qgallery-grid { grid-template-columns: 1fr !important; }
}

/* Photo Items */
.qgallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.qgallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #b0252e;
}

.qgallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qgallery-item:hover img {
    transform: scale(1.03);
}

.qgallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.qgallery-item:hover .qgallery-item-overlay {
    opacity: 1;
}

.qgallery-item-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.qgallery-item-meta {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.qgallery-item-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qgallery-item:hover .qgallery-item-actions {
    opacity: 1;
}

.qgallery-action-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #b0252e;
}

.qgallery-action-btn:hover {
    background: #b0252e;
    color: #ffffff;
}

/* Empty State */
.qgallery-empty-state {
    text-align: center;
    padding: 60px 40px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
    color: #808080;
}

.qgallery-empty-icon {
    width: 64px;
    height: 64px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: #808080;
}

.qgallery-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.qgallery-empty-description {
    color: #808080;
    margin-bottom: 20px;
}

/* Statistics Bar */
.qgallery-stats-bar {
    display: flex;
    gap: 30px;
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
}

.qgallery-stat {
    text-align: center;
}

.qgallery-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #b0252e;
    display: block;
}

.qgallery-stat-label {
    color: #808080;
    font-size: 14px;
    margin-top: 4px;
}

/* Lightbox */
.qgallery-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    text-align: center;
}

.qgallery-lightbox img {
    max-width: 90%;
    max-height: 90%;
    margin-top: 5%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.qgallery-lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.qgallery-lightbox-close:hover {
    background: #b0252e;
}

/* Loading States */
.qgallery-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #808080;
}

.qgallery-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #b0252e;
    border-radius: 50%;
    animation: qgallery-spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes qgallery-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filters and Search */
.qgallery-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.qgallery-search-input {
    flex: 1;
    min-width: 250px;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.qgallery-search-input:focus {
    outline: none;
    border-color: #b0252e;
    box-shadow: 0 0 0 3px rgba(176, 37, 46, 0.1);
}

.qgallery-filter-select {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    cursor: pointer;
}

/* Responsive Management Cards */
@media (max-width: 768px) {
    .qgallery-management-cards {
        grid-template-columns: 1fr;
    }
    
    .qgallery-stats-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .qgallery-nav-links {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .qgallery-filters {
        flex-direction: column;
        align-items: stretch;
    }
}
