/* Custom CSS for JS GLOBAL Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Animation for scroll indicator */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Lightbox styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

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

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 16px;
    transition: opacity 0.2s;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.lightbox-nav:hover {
    opacity: 0.7;
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

/* YouTube video container for responsive embed */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Vertical video container (9:16) */
.video-container-vertical {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 568px;
    margin: 0 auto;
    overflow: hidden;
}

.video-container-vertical iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (min-width: 768px) {
    .video-container-vertical {
        max-width: 360px;
        height: 640px;
    }
}


/* Timeline styles */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 3px solid #dcfce7;
}

/* Image gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Certificate gallery - rectangular items */
.cert-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.cert-gallery-item {
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cert-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.cert-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Print styles */
@media print {

    header,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .lightbox-nav {
        display: none;
    }

    .cert-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}