/* Custom Styles for Koch Rajbongshi Development Council Website */

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

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply fade-in animation to sections */
section {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea {
    transition: all 0.3s ease;
}

/* Custom focus styles for better accessibility */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(163, 247, 8, 0.2);
}

/* Enhanced button hover effects */
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
}

/* Card hover effects */
.shadow-lg:hover {
    transform: translateY(-4px);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #629405;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #416303;
}

/* Print styles */
@media print {
    header, footer, nav {
        display: none;
    }

    body {
        background: white;
    }

    section {
        page-break-inside: avoid;
    }
}

/* Additional responsive adjustments */
@media (max-width: 768px) {
    /* Ensure navigation links are easily tappable on mobile */
    nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Adjust heading sizes for mobile */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

/* Loading animation for forms (optional enhancement) */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #629405;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom gradient backgrounds */
.gradient-olive-golden {
    background: linear-gradient(135deg, #f6fee6 0%, #fffde6 50%, #edfdce 100%);
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Enhanced link underline effect */
a:not(.no-underline) {
    position: relative;
}

a:not(.no-underline):hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    animation: slideIn 0.3s ease;
}

/* Accessible skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #213102;
    color: #fee901;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
