/* Custom styles for Chaingang */

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

.home-slide,
.about-slide {
    opacity: 0;
    transition: opacity 1.1s ease, transform 7s ease;
    transform: scale(1.05);
}

.home-slide.active,
.about-slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Navbar scrolled state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled .nav-link {
    color: #166534;
}

#navbar.scrolled .nav-link:hover {
    background: #dcfce7;
    color: #14532d;
}

#navbar.scrolled a.group span {
    color: #166534;
}

#navbar.scrolled a.group span:last-child {
    color: #16a34a;
}

/* Hero gradient overlay */
.hero-overlay {
    background: linear-gradient(135deg, rgba(5, 46, 22, 0.85) 0%, rgba(22, 101, 52, 0.7) 50%, rgba(5, 46, 22, 0.6) 100%);
}

/* Card hover effects */
.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(22, 101, 52, 0.25);
    border-color: rgba(34, 197, 94, 0.35);
}

.feature-card img {
    transition: transform 0.5s ease;
}

.feature-card:hover img {
    transform: scale(1.06);
}

/* Value cards */
.value-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.value-card:hover {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 22px 42px -22px rgba(22, 101, 52, 0.35);
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #f8fafc;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px rgba(22, 101, 52, 0.14);
    border-color: rgba(34, 197, 94, 0.5);
}

.gallery-item img {
    transition: transform 0.5s ease, filter 0.4s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.08);
    filter: saturate(1.1);
}

.gallery-item-overlay {
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    border-radius: 9999px;
    background: rgba(5, 46, 22, 0.75);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-item:hover .gallery-item-overlay,
.gallery-item:focus-visible .gallery-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.gallery-modal.is-open {
    display: flex;
}

.gallery-modal-content {
    position: relative;
    max-width: min(90vw, 1000px);
    width: 100%;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45);
    background: #fff;
}

.gallery-modal-content img {
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    background: #0f172a;
}

.gallery-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-close:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.32);
}

/* Activity timeline */
.activity-dot {
    position: relative;
}

.activity-dot::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    width: 2px;
    height: 100%;
    background: #bbf7d0;
    transform: translateX(-50%);
}

/* Smooth fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stats counter */
.stat-number {
    font-variant-numeric: tabular-nums;
}

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

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

::-webkit-scrollbar-thumb {
    background: #16a34a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button pulse for CTA */
.cta-pulse {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }
}

/* Section dividers */
.section-divider {
    height: 4px;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
    width: 80px;
    margin: 0 auto 2rem;
}

/* Form focus */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
