/* Estilos adicionais para as melhorias implementadas */

/* Skip Links para Acessibilidade */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 1000;
    text-decoration: none;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Breadcrumbs */
.breadcrumb-nav {
    background-color: rgba(18, 18, 18, 0.9);
    padding: 1rem 0;
    margin-top: 76px; /* Espaço para navbar fixa */
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #adb5bd;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #fff;
}

.breadcrumb-item.active {
    color: #fff;
}

/* Barra de Progresso de Scroll */
.scroll-progress {
    position: fixed;
    top: 76px; /* Abaixo da navbar */
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    z-index: 1000;
    transition: width 0.1s;
}

/* Cabeçalho do Álbum */
.album-header {
    padding: 2rem 0;
    border-bottom: 1px solid #333;
    margin-bottom: 2rem;
}

.album-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #adb5bd;
}

/* Filtros */
.filters-section {
    position: sticky;
    top: 76px;
    background: rgba(18, 18, 18, 0.95);
    padding: 1rem 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.filter-btn {
    border-color: #495057;
    color: #adb5bd;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
    transform: translateY(-2px);
}

/* Galeria */
.gallery-section {
    min-height: 400px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #2d2d2d;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-select {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.photo-item.selected .photo-select {
    background: #007bff;
    border-color: #007bff;
}

.photo-item.selected .photo-select::after {
    content: "✓";
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.photo-item.selected {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Indicador de Carregamento */
.loading-indicator {
    padding: 3rem 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Lightbox Melhorado */
.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.modal-body img {
    border-radius: 8px;
}

.image-counter {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* Botões de Download */
.download-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.download-btn {
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Informações de Contacto */
.contact-info {
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.contact-info a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #007bff !important;
}

/* Toast Notifications */
.toast {
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.toast-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animações de Entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-item {
    animation: fadeInUp 0.6s ease forwards;
}

.photo-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.photo-item:nth-child(even) {
    animation-delay: 0.2s;
}

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

    .photo-item img {
        height: 200px;
    }

    .download-btn {
        min-width: auto;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .breadcrumb-nav {
        margin-top: 56px; /* Navbar mais pequena em mobile */
    }

    .scroll-progress {
        top: 56px;
    }

    .filters-section {
        top: 56px;
    }
}

/* Estados de Foco para Acessibilidade */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Redução de Movimento para Utilizadores com Preferências */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Alto Contraste */
@media (prefers-contrast: high) {
    .photo-overlay {
        background: rgba(0, 0, 0, 0.9);
    }

    .filter-btn {
        border-width: 2px;
    }

    .photo-item.selected {
        outline-width: 4px;
    }
}

/* Tema Escuro Forçado */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #1a1a1a !important;
    }
}