/**
 * ARHIVIM d.o.o. - Reference Section Styles
 * Styles for reference gallery, stats cards, profile bio, and lightbox
 */

/* Reference Section */
.reference-section {
    background: var(--light-gray, #f5f5f5);
    padding: 4rem 0;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid #C4A747;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #1e3a8a;
    font-family: Georgia, serif;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1rem;
    line-height: 1.4;
}

/* Profile Bio */
.profile-bio {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    border-left: 4px solid #C4A747;
    margin: 3rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.profile-name {
    color: #1e3a8a;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.profile-title {
    color: #C4A747;
    font-size: 1.125rem;
    font-weight: 600;
}

.profile-bio p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #333;
}

.download-cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #1e3a8a;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-cv-btn:hover {
    background: #2d4ba6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30,58,138,0.3);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 3rem 0 2rem;
    padding: 1.5rem 0;
    background: white;
    border-radius: 8px;
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.category-tab {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.category-tab.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}

.category-tab:hover {
    border-color: #1e3a8a;
    transform: translateY(-2px);
}

/* Reference Gallery */
.reference-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.reference-item {
    transition: opacity 0.3s ease;
}

.reference-item.hidden {
    display: none;
}

.reference-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0;
}

.reference-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.reference-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.reference-card figcaption {
    padding: 1.25rem;
}

.reference-card h4 {
    font-size: 1rem;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.reference-year,
.reference-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #666;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 90%;
    max-height: 90vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    line-height: 1;
    transition: background 0.3s ease;
}

.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);
    border: none;
    color: white;
    font-size: 3rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
}

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

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Responsive */
@media (max-width: 767px) {
    .reference-section {
        padding: 3rem 0;
    }

    .reference-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-tabs {
        top: 60px;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .category-tab {
        width: 100%;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .download-cv-btn {
        width: 100%;
        justify-content: center;
    }

    .lightbox-nav {
        font-size: 2rem;
        padding: 0.75rem 1rem;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .reference-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .reference-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}
