﻿:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-dark: #333;
    --text-light: #666;
    --background-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow-light: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.15);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
/* Gallery Grid System */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.photo-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

    .photo-item:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-medium);
    }

.img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--background-light);
}

.photo-thumbnail {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.photo-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Text Elements */
.photo-caption {
    font-size: 13px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
   }

.photo-mahal {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    line-height: 1.4;
    background: var(--background-light);
}

/* Modal Enhancements */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    /*position: relative;
    top: 50%;
    transform: translateY(-50%);
    width: 60%;
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 20px;*/
}
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.modal-title {
    font-weight: 500;
    color: #2c3e50;
}
.modal-body {
    padding: 1.5rem;
    background-color: #f8f9fa;
    /*display: flex;
    gap: 1rem;
    justify-content: center;*/ /* Center content horizontally */
    /*align-items: center;*/ /* Center vertically */
    /*padding: 20px;*/
}

.image-section {
    flex: 1;
    max-width: 80%; /* Prevent excessive empty space */
    position: relative;
}

.image-wrapper {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.main-image {
    width: 100%;
    height: 70vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #aaa;
    cursor: pointer;
}

    .close:hover {
        color: #000;
    }

.photo-container {
    display: flex;
    gap: 20px;
    align-items: center;
   
}
.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    background-color: #f8f9fa;
}

.modal-image-wrapper {
    flex: 1;
    min-width: 0;
}
.modal-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    min-height: 60vh;
  
}


.modal-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.zoom-controls .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.zoom-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

    .zoom-btn:hover {
        background: rgba(255, 255, 255, 1);
    }

.modal-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 20px;
}

    .modal-controls button {
        width: 40px;
        height: 40px;
        border: none;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        transition: all 0.2s ease;
  
    }

        .modal-controls button:hover {
            background: rgba(255, 255, 255, 1);
        }

.image-overlay {
    background: linear-gradient(#0000009c, rgba(0,0,0,0.8));
    color: white; /* Changed from yellow */
    padding: 15px;
    font:bold;
    /*position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 60px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    display: flex;
    flex-direction: column;
    gap: 5px;*/
}
.overlay-header, .overlay-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.overlay-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .overlay-line:nth-child(1) {
        font-weight: 500;
        font-size: 14px;
    }

    .overlay-line:nth-child(2) {
        font-size: 12px;
        opacity: 0.9;
    }

    .overlay-line:nth-child(3) {
        font-size: 11px;
        opacity: 0.8;
    }

.control-panel {
    position: absolute;
    right: 20px;
    top: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 1rem;
    z-index: 1001;
}

.action-buttons {
    flex-direction: row;
    gap: 0.5rem;
}

.btn-rotate, .btn-save {
    width: auto;
    padding: 8px;
    border-radius: 50%;
    /*width: 15%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;*/
}

.filter-row {
    direction: rtl;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 1rem;
}

.form-select, .form-control {
    width: auto;
    max-width: 200px;
    padding: 6px 12px;
    font-size: 14px;
}

    .form-select:focus {
        border-color: var(--accent-color);
        outline: none;
    }

/* Pagination Modernization */
.pagination {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-link {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-item.active .page-link {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* Loading States */
.spinner-border {
    width: 1.75rem;
    height: 1.75rem;
    border-width: 0.2em;
}

/* Error Handling */
.error-message {
    padding: 2rem;
    text-align: center;
    background: #fee;
    border-radius: 12px;
    color: #dc3545;
    border: 2px solid #dc3545;
}

/* Rotation Controls */
.rotate-btn-thumbnail {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    color: var(--text-dark);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

    .rotate-btn-thumbnail:hover {
        background: #fff;
        transform: rotate(90deg) scale(1.1);
    }
#overlayTitle {
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: bold;
}

#overlayDescription {
    font-size: 12px;
    opacity: 0.9;
}

#overlayDate {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.8;
}

.btn-rotate:hover, .btn-save:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.zoom-control {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 1002;
    font-size: 28px;
     font-weight: bold;
    cursor: pointer;
    /* position: absolute;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);*/
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .control-panel {
        width: 100%;
    }

    .main-image {
        height: 50vh;
    }
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }

    .modal-image-container {
        max-width: 90%;
    }

    .modal-controls {
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        margin: 1% auto;
        padding: 10px;
    }

    .photo-container {
        flex-direction: column;
        gap: 10px;
    }

    .modal-controls {
        flex-direction: row;
        margin-left: 0;
        margin-top: 10px;
    }
}
/*@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .modal-content {
        width: 70%;
        margin: 1rem auto;
    }

    .image-overlay {
        padding: 1rem;
    }

    #overlayTitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .form-select {
        width: 100%;
    }
}*/