/* Custom Styles for PMP-TRANS Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #f97316;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus ring improvements */
*:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Active navigation link */
.nav-link.active {
    color: #fbbf24;
    font-weight: 600;
}

/* Floating pályázat image - bottom left corner */
.floating-palyazat {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 40;
    transition: transform 0.3s ease;
}

.floating-palyazat img {
    width: 400px;
    height: auto;
    display: block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.floating-palyazat:hover {
    transform: scale(1.05);
}

@media (max-width: 640px) {
    .floating-palyazat img {
        width: 180px;
    }
    .floating-palyazat {
        bottom: 10px;
        left: 10px;
    }
}

/* Form inputs focus state enhancement */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

/* Toast animation */
@keyframes slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

/* Gallery hover effects */
.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: rgba(249, 115, 22, 0.8);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 16px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    transition: background 0.3s;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(249, 115, 22, 0.8);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 4px;
}

/* Loading animation for images */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print styles */
@media print {
    .skip-to-content,
    header,
    footer,
    #mobile-menu-btn,
    .lightbox {
        display: none !important;
    }
}

/* Responsive image container */
.aspect-ratio-16-9 {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.aspect-ratio-16-9 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Improved button states */
button:disabled,
a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
