/* Custom CSS for Jansuvidha.com */
:root {
    --theme-primary: #4ade80; /* Green 400 */
    --theme-dark: #166532;    /* Green 800 */
    --theme-light: #ecfdf5;   /* Green 50 */
    --text-dark: #14532d;     /* Green 900 */
    --footer-bg: #14532d;     /* Green 900 */
    --card-bg: #ffffff;
    --service-link-border: var(--theme-primary);
}
html { 
    scroll-behavior: smooth;
    height: 100%;
}
body {
    font-family: 'Roboto', 'Poppins', 'Segoe UI', sans-serif;
    background-color: #fafffa; /* Very Light Green Background */
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }
body.lang-hi { font-family: 'Noto Sans Devanagari', sans-serif; }
[data-hi] { display: none; }
body.lang-hi [data-en] { display: none; }
body.lang-hi [data-hi] { display: inline; }

/* ======== UI Components & Animations ======== */

.gradient-text {
    background: linear-gradient(90deg, #16a34a 0%, #4ade80 50%, #bbf7d0 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; text-fill-color: transparent;
}
.sticky-nav {
    position: -webkit-sticky; position: sticky;
    top: 0; z-index: 50;
    background-color: var(--theme-dark); 
    padding: 0.25rem 0;
    font-family: 'Roboto', sans-serif;
}

.nav-item .dropdown {
    display: none; position: absolute; background-color: white;
    min-width: 240px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1; border-radius: 0 0 0.5rem 0.5rem;
}
.nav-item:hover .dropdown { display: block; }
.dropdown a {
    color: black; padding: 12px 16px; text-decoration: none;
    display: block; text-align: left; font-weight: 600;
}
.dropdown a:hover { background-color: #d1fae5; }

/* Service Categories & Items */
.service-category {
    border-radius: 0.75rem; padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex; flex-direction: column;
    opacity: 0; /* Initially hidden for animation */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease;
}
.service-category:hover {
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.2);
}
.service-category.visible {
    opacity: 1;
    transform: translateY(0);
}
.service-category h3 { font-size: 1.5rem; }
.category-red { background-color: #fef2f2; } .category-red h3 { color: #991b1b; }
.category-green { background-color: #f0fdf4; } .category-green h3 { color: #15803d; }
.category-blue { background-color: #eff6ff; } .category-blue h3 { color: #1e40af; }
.category-yellow { background-color: #fefce8; } .category-yellow h3 { color: #854d0e; }
.category-purple { background-color: #faf5ff; } .category-purple h3 { color: #6b21a8; }
.category-orange { background-color: #fff7ed; } .category-orange h3 { color: #9a3412; }
.category-pink { background-color: #fdf2f8; } .category-pink h3 { color: #9d174d; }
.category-brown { background-color: #fef3c7; } .category-brown h3 { color: #92400e; }

.service-item-link {
    display: flex; align-items: center; padding: 0.75rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease; border-radius: 0 8px 8px 0;
}
.service-item-link:hover {
    background-color: var(--theme-light);
    border-left-color: var(--service-link-border);
    transform: translateX(4px);
}
.service-item-link h4 { color: var(--text-dark); font-size: 1rem; font-weight: 600; }
.service-icon {
    margin-right: 0.75rem; width: 1.25rem; height: 1.25rem;
    flex-shrink: 0; color: var(--theme-primary);
}

/* Mobile Menu */
#mobile-menu { transition: transform 0.3s ease-in-out; }

/* New Sections Styling */
#latest-update-section {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 0 15px 5px rgba(74, 222, 128, 0.4);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    display: flex;
    flex-direction: column;
}
#latest-update-section::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -3px; /* Size of the border */
    border-radius: inherit;
    background: linear-gradient(to right, #6ee7b7, #34d399, #10b981, #059669, #10b981, #34d399, #6ee7b7);
    background-size: 200% 200%;
    animation: rgb-glow 4s linear infinite;
}

@keyframes rgb-glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.info-box {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-top: 5px solid;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.info-box h2 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    flex-shrink: 0;
}
.info-box-content {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}
.info-box-content a {
    display: block;
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
    color: var(--text-dark);
}
.info-box-content a:last-child {
    border-bottom: none;
}
.info-box-content a:hover {
    background-color: var(--theme-light);
    color: var(--text-dark);
}
.info-box-content a.new-link {
    color: #be185d; /* Pink for new links */
    font-weight: 700;
}

/* Auto Scrolling Animation */
.scrolling-content.is-scrolling {
    animation: scroll-up var(--scroll-duration, 30s) linear infinite;
}
@keyframes scroll-up {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Important Service Buttons */
.important-service-button {
    display: block; width: 100%; text-align: center;
    padding: 0.75rem 1rem; margin-bottom: 0.75rem;
    color: white; font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.important-service-button:hover { transform: scale(1.03); filter: brightness(1.1); }
.important-service-button:last-child { margin-bottom: 0; }

.btn-blue { background-color: #3b82f6; } /* Blue 500 */
.btn-green { background-color: #22c55e; } /* Green 500 */
.btn-purple { background-color: #8b5cf6; } /* Violet 500 */
.btn-red { background-color: #ef4444; } /* Red 500 */
.btn-yellow { background-color: #f59e0b; } /* Amber 500 */
.btn-orange { background-color: #f97316; } /* Orange 500 */


/* Preloader */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fff; z-index: 9999; display: flex; justify-content: center; align-items: center; }
.spinner { border: 5px solid rgba(0, 0, 0, 0.1); width: 50px; height: 50px; border-radius: 50%; border-left-color: var(--theme-dark); animation: spin 1s ease infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Back to Top Button */
#back-to-top {
    position: fixed; bottom: 20px; right: 20px;
    background-color: var(--theme-dark); color: white;
    border: none; border-radius: 50%;
    width: 50px; height: 50px;
    display: none; align-items: center; justify-content: center;
    cursor: pointer; z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: opacity 0.3s, transform 0.3s;
}
#back-to-top:hover { background-color: var(--theme-primary); transform: scale(1.1); }
#back-to-top.show { display: flex; }

