/* Custom CSS for Jansuvidha.com */
:root {
    --footer-bg: #04407a;
    --card-bg: #ffffff;
    --text-dark: #000000;
    --service-link-border: #2e4736; /* green-600 */
}
html { 
    scroll-behavior: smooth;
    height: 100%;
}
body {
    font-family: 'Roboto', 'Poppins', 'Segoe UI', sans-serif;
    background: linear-gradient(to right, #34D399, #22C55E);
    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, rgba(6,182,212,1) 0%, rgba(236,72,153,1) 50%, rgba(253,186,116,1) 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: #c51b1b; 
    padding: 0.25rem 0;
    font-family: 'Roboto', 'Outfit', 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: #d4d4d4; }

.dropdown-category-header {
    font-weight: bold;
    padding: 12px 16px;
    background-color: #f3f4f6;
    color: #1f2937;
    border-top: 1px solid #e5e7eb;
}
.dropdown-category-header:first-child {
    border-top: none;
}

/* Service Categories & Items */
.service-category {
    border-radius: 0.75rem; padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    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(0,0,0,0.15);
}
.service-category.visible {
    opacity: 1;
    transform: translateY(0);
}
.service-category h3 { font-size: 1.5rem; }
.category-red { background-color: #fee2e2; }
.category-red h3 { color: #991b1b; }
.category-green { background-color: #dcfce7; }
.category-green h3 { color: #166534; }
.category-blue { background-color: #dbeafe; }
.category-blue h3 { color: #1e40af; }
.category-yellow { background-color: #fef9c3; }
.category-yellow h3 { color: #854d0e; }
.category-purple { background-color: #f3e8ff; }
.category-purple h3 { color: #6b21a8; }
.category-orange { background-color: #ffedd5; }
.category-orange h3 { color: #9a3412; }
.category-pink { background-color: #fce7f3; }
.category-pink h3 { color: #9d174d; }
.category-brown { background-color: #ffeadb; }
.category-brown h3 { color: #8d5b4c; }
.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: #f7fafc;
    border-left-color: var(--service-link-border);
    transform: translateX(4px);
}
.service-item-link h4 { color: #1e3a8a; font-size: 1rem; font-weight: 600; }
.service-icon {
    margin-right: 0.75rem; width: 1.25rem; height: 1.25rem;
    flex-shrink: 0; color: #3b82f6;
}

/* Mobile Menu */
#mobile-menu { transition: transform 0.3s ease-in-out; }

/* --- Smooth Scrolling Animations --- */

/* Horizontal Marquee for Latest Updates */
.updates-marquee {
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}
.updates-content {
    display: flex;
    flex-shrink: 0;
    white-space: nowrap;
}
.updates-content a.update-item {
    padding: 0 1.5rem; /* 24px */
    flex-shrink: 0;
    display: inline-block;
    white-space: normal;
    max-width: 80vw;
    text-wrap: wrap;
    color: #1d4ed8; /* Blue color */
    font-weight: 700; /* Bold font */
}

/* Vertical Scroller for Side Columns */
.vertical-scroller {
    height: 250px;
    overflow-y: scroll; /* Changed for JS control */
    position: relative;
    -ms-overflow-style: none;  /* Hide scrollbar IE and Edge */
    scrollbar-width: none;  /* Hide scrollbar Firefox */
}
.vertical-scroller::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome, Safari and Opera */
}

/* Updates Bars */
.latest-updates-bar {
    display: flex; align-items: center; background-color: #e6fffa;
    padding: 0.5rem; border-radius: 0.5rem; margin-bottom: 1.5rem;
    overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.new-label {
    background-color: #ef4444; color: white; padding: 0.25rem 0.75rem;
    border-radius: 0.25rem; font-weight: bold; margin-right: 1rem;
    flex-shrink: 0; animation: blink-bg 1.2s infinite;
}
@keyframes blink-bg { 50% { opacity: 0.6; } }

/* Vertical Scrollers styles */
.important-services-container { background-color: rgba(255, 255, 255, 0.7); border: 1px solid #e2e8f0; }
.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;
}
.important-service-button:hover { transform: scale(1.03); filter: brightness(1.1); }
.latest-updates-dynamic { border: 3px solid; animation: blink-border 1.5s infinite; background-color: rgba(255, 255, 255, 0.7); }
@keyframes blink-border { 0% { border-color: #ef4444; } 50% { border-color: #3b82f6; } 100% { border-color: #ef4444; } }
.latest-updates-dynamic h2 { animation: blink-text 1.5s infinite; }
@keyframes blink-text { 0% { color: #b91c1c; } 50% { color: #1d4ed8; } 100% { color: #b91c1c; } }
.dynamic-update-item { display: block; padding: 0.5rem; margin-bottom: 0.5rem; color: #000000; font-weight: 700; border-bottom: 1px solid #dbeafe; transition: background-color 0.2s; }
.dynamic-update-item:hover { background-color: #dbeafe; }

/* ======== UTILITIES ======== */
/* 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: #04407a; 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: #04407a; 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: #0a5aab; transform: scale(1.1); }
#back-to-top.show { display: flex; }

/* Mobile & Tablet Fixes */
@media (max-width: 768px) {
    .latest-updates-bar { padding: 0.5rem; }
    .new-label { font-size: 0.75rem; padding: 0.25rem 0.5rem; margin-right: 0.5rem; }
    .updates-content a { font-size: 0.875rem; margin: 0 0.75rem; }
}

