/* Cloud Tech Tallinn Photo Gallery Styles */
/* Brand Colors: #0072ce (primary blue), #FF8400 (orange), white, black */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0072ce;
    --accent-orange: #FF8400;
    --text-white: #ffffff;
    --text-black: #000000;
    --shadow: rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--primary-blue);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #005aa3 100%);
    padding: 40px 0;
    box-shadow: 0 4px 6px var(--shadow);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    max-height: 80px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
    margin-top: 5px;
    text-align: center;
    width: 100%;
}

/* Main Content */
main {
    flex: 1;
    padding: 60px 20px;
}

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.album-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-orange);
}

.album-cover {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.album-info {
    padding: 25px;
}

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

.album-photographer {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.album-photographer a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: color 0.2s ease;
}

.album-photographer a:hover {
    color: #ffaa4d;
    text-decoration: underline;
}

/* Album Page Styles */
.back-button {
    display: inline-block;
    margin-bottom: 30px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-button:hover {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    transform: translateX(-5px);
}

.album-header {
    text-align: center;
    margin-bottom: 50px;
}

.album-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.album-credit {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.album-credit a {
    color: var(--accent-orange);
    text-decoration: none;
}

.album-credit a:hover {
    text-decoration: underline;
}

/* Photo Gallery Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: rgba(0, 0, 0, 0.3);
}

.photo-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-thumbnail {
    transform: scale(1.05);
}

.photo-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.photo-item:hover::after {
    background: rgba(0, 0, 0, 0.2);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10000;
}

.lightbox-button {
    background: var(--accent-orange);
    color: var(--text-white);
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.lightbox-button:hover {
    background: #ffaa4d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 6px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-white);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .albums-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .album-header h1 {
        font-size: 1.8rem;
    }

    .lightbox-nav {
        padding: 15px 10px;
        font-size: 20px;
    }

    .lightbox-controls {
        top: 10px;
        right: 10px;
        flex-direction: column;
    }

    .lightbox-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .logo {
        max-height: 60px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
