.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}
.gallery-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}
.gallery-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}
.filter-btn:hover,
.filter-btn.active {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.gallery-item-image {
    width: 100%;
    height: 250px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.gallery-item-placeholder {
    font-size: 3rem;
    opacity: 0.5;
}
.gallery-item-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #333;
}
.gallery-item-content {
    padding: 1.5rem;
}
.gallery-item-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}
.gallery-item-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.gallery-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.gallery-item-degree {
    color: #3498db;
    font-weight: 500;
    font-size: 0.9rem;
}
.gallery-item-action {
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.gallery-item-action:hover {
    background: #2980b9;
    transform: scale(1.05);
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}
.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 95vw;  /* Changed from 200px - uses 95% of viewport width */
    width: 100%;
    max-height: 95vh;  /* Changed from 90vh - uses 95% of viewport height */
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Removed: width: 90%; */
}

.modal-image {
    width: 100%;
    height: 50vh;  /* Changed from 600px - uses 50% of viewport height */
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;  /* Prevents image from shrinking */
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;  /* Only the body scrolls if needed */
    flex: 1;
}

.modal-large-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 10;
}
.modal-close:hover {
    background: #f0f0f0;
}
.modal-title {
    font-size: 1.75rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}
.modal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}
.modal-detail-item {
    display: flex;
    flex-direction: column;
}
.modal-detail-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}
.modal-detail-value {
    font-weight: bold;
    color: #2c3e50;
}
.modal-description {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.modal-actions {
    display: flex;
    gap: 1rem;
}
.modal-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}
.modal-btn-primary {
    background: #3498db;
    color: white;
}
.modal-btn-primary:hover {
    background: #2980b9;
}
.modal-btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}
.modal-btn-secondary:hover {
    background: #bdc3c7;
}
@media (max-width: 768px) {
    .gallery-header h1 {
        font-size: 2rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .modal-details {
        grid-template-columns: 1fr;
    }
    .modal-actions {
        flex-direction: column;
    }
}

