/* Index page specific styles */

.hero-bg {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    position: relative;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23D1D5DB" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.parallax-element {
    transition: transform 0.1s ease-out;
}

#particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #D20705 0%, #E63946 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: white;
}

.stats-counter {
    font-size: 3rem;
    font-weight: 800;
    color: #D20705;
}

.splide__arrow {
    background: #D20705;
    opacity: 0.8;
}

.splide__arrow:hover {
    opacity: 1;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(210, 7, 5, 0.9) 0%, rgba(230, 57, 70, 0.9) 100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.typing-text {
    border-right: 2px solid #D20705;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: #D20705; }
    51%, 100% { border-color: transparent; }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Service card hover effect with gallery overlay */
.service-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.service-card-content {
    transition: opacity 0.4s ease;
}

.service-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #D20705 0%, #E63946 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    z-index: 10;
}

.service-card:hover .service-card-overlay {
    opacity: 1;
}

.service-card:hover .service-card-content {
    opacity: 0;
}

.service-card-overlay-text {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

/* Gallery modal styles */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow-y: auto;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    margin: 20px;
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #D20705;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-modal-close:hover {
    background: #A00604;
    transform: rotate(90deg);
}

.gallery-modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #111827;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, cursor 0.1s ease;
    cursor: pointer !important;
}

.gallery-item:hover {
    transform: scale(1.05);
    cursor: pointer;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.gallery-item-caption {
    padding: 15px;
    background: white;
    font-size: 0.9rem;
    color: #6B7280;
}

/* ============================================
   Gallery Lightbox Styles
   ============================================ */

.lightbox-image-container {
    max-height: 80vh;
    max-width: 90vw;
}

.lightbox-image {
    max-height: 80vh;
    max-width: 90vw;
    object-fit: contain;
}

#lightbox-container {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#lightbox-image {
    max-width: 100%;
    max-height: 100%;
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#lightbox-prev,
#lightbox-next {
    -webkit-user-select: none;
    user-select: none;
    padding: 12px 18px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    transition: all 0.3s ease;
}

#lightbox-prev:hover:not(.cursor-not-allowed),
#lightbox-next:hover:not(.cursor-not-allowed) {
    background: rgba(220, 38, 38, 0.8);
    transform: scale(1.1);
}

#lightbox-prev.opacity-30,
#lightbox-next.opacity-30 {
    pointer-events: none;
}

#lightbox-close {
    transition: all 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
}

#lightbox-close:hover {
    transform: rotate(90deg);
}

#lightbox-counter {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lightbox-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    overflow: hidden;
}

.lightbox-thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: #DC2626;
}

.lightbox-thumbnail.border-red-500 {
    opacity: 1;
    border-color: #DC2626;
}

/* Responsywna szerokość thumbnaili */
@media (max-width: 768px) {
    .lightbox-thumbnail {
        width: 60px !important;
        height: 60px !important;
    }
    
    #lightbox-prev,
    #lightbox-next {
        font-size: 2rem;
        padding: 8px 12px;
    }
}

