:root {
    --primary-color: #2a9d8f;
    --secondary-color: #e76f51;
    --dark-color: #264653;
    --light-color: #f1faee;
    --success-color: #2a9d8f;
    --error-color: #e63946;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-links a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* View Management */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Gallery Controls */
.gallery-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-options .view-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 0.5rem;
    padding: 0.5rem;
    color: #888;
    transition: var(--transition);
}

.view-options .view-btn:hover,
.view-options .view-btn.active {
    color: var(--primary-color);
}

/* Gallery Container */
.gallery-container {
    position: relative;
    min-height: 400px;
}

/* Grid View */
.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
    background-color: white;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item-info {
    padding: 0.75rem;
}

.gallery-item-info h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item-info p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1.4;
}

/* List View */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-view .gallery-item {
    display: flex;
    height: 150px;
}

.list-view .gallery-item img {
    width: 200px;
    height: 150px;
}

.list-view .gallery-item-info {
    flex: 1;
}

/* Loading Indicator */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 80vh;
    margin: 5% auto;
    object-fit: contain;
}

.modal-caption {
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 1.2rem;
    max-width: 80%;
    margin: 0 auto;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
}

.modal-nav {
    position: absolute;
    width: 100%;
    bottom: 15%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
}

.modal-nav button {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
}

.modal-nav button:hover {
    opacity: 1;
}

/* About Section */
.about-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.about-container h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-container p {
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .list-view .gallery-item {
        flex-direction: column;
        height: auto;
    }
    
    .list-view .gallery-item img {
        width: 100%;
    }
    
    .modal-content {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
    }
    
    .nav-links {
        margin-top: 1rem;
    }
    
    .nav-links a {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .grid-view {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
