/* ========================================
   JJST - COMPLETE FIXED Stylesheet
   All Issues Resolved
   ======================================== */

:root {
    --saffron: #FF9933;
    --white: #FFFFFF;
    --green: #138808;
    --navy: #000080;
    --light-bg: #FFF8F0;
    --text-dark: #2c3e50;
    --text-light: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Devanagari', sans-serif;
    overflow-x: hidden;
    background: white;
    line-height: 1.6;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Splash Screen
   ======================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--saffron), var(--green));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 5px solid white;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.splash-content h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.splash-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.splash-loader {
    width: 200px;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar {
    width: 0;
    height: 100%;
    background: white;
    border-radius: 10px;
    animation: loading 2s ease-in-out;
}

@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

/* ========================================
   Marquee Bar
   ======================================== */
.marquee-bar {
    background: linear-gradient(90deg, var(--saffron), var(--green));
    color: white;
    padding: 12px 0;
    overflow: hidden;
    font-weight: 600;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.marquee-content span {
    padding: 0 50px;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   TOP BAR - FIXED
   ======================================== */
.top-bar {
    background: var(--navy);
    color: white;
    padding: 10px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info a {
    color: white;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.contact-info a:hover {
    color: var(--saffron);
}

.language-selector {
    display: flex;
    gap: 8px;
}

.lang-btn {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--saffron);
    border-color: var(--saffron);
    color: white;
}

/* ========================================
   NAVIGATION - DESKTOP FIXED
   ======================================== */
nav {
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    padding: 15px 0;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-brand img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.nav-brand-text h1 {
    font-size: 1.2rem;
    background: linear-gradient(to right, var(--saffron), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    white-space: nowrap;
}

.nav-brand-text p {
    font-size: 0.75rem;
    color: var(--green);
    font-weight: 600;
}

/* Desktop Navigation Menu */
.nav-menu {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
    margin: 0 20px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 153, 51, 0.1);
    color: var(--saffron);
}

/* Dropdown Menu */
.nav-item-with-dropdown {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 320px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    padding: 10px;
    margin-top: 10px;
    z-index: 1001;
}

.nav-item-with-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s;
    color: var(--navy);
}

.dropdown-item:hover {
    background: var(--light-bg);
}

.dropdown-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--saffron), var(--green));
    color: white;
    border-radius: 8px;
}

.dropdown-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

.dropdown-desc {
    display: block;
    font-size: 0.8rem;
    color: #666;
}

/* Right Side Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-login,
.btn-register {
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-login {
    background: var(--navy);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 128, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
}

.btn-register {
    background: linear-gradient(135deg, var(--saffron), var(--green));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 153, 51, 0.3);
}

.btn-register:hover {
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--saffron), var(--green));
    border: none;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1002;
    position: relative;
}

.nav-overlay {
    display: none;
}

.mobile-only {
    display: none !important;
}

.desktop-only {
    display: inline-flex !important;
}

/* ========================================
   Hero Section
   ======================================== */
/*.hero {*/
/*    min-height: 500px;*/
/*    background: linear-gradient(135deg, var(--saffron) 0%, var(--white) 50%, var(--green) 100%);*/
/*    display: flex;*/
/*    align-items: center;*/
/*    padding: 80px 20px;*/
/*}*/


.hero {
    min-height: 100vh;
    background-image: url('https://jjstrust.com/assets/images/background.png'); /* add your image path */
    /*background-size: auto;       /* makes image cover full area */
    background: url('https://jjstrust.com/assets/images/background.png') center center / cover no-repeat;
    display: flex;
    align-items: center;
    /*padding: 80px 20px;*/
}


.hero-content {
    text-align: center;
    color: white;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--saffron);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 153, 51, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.btn-secondary {
    background: var(--green);
    color: white;
    box-shadow: 0 5px 15px rgba(19, 136, 8, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
}

/* ========================================
   Stats Section
   ======================================== */
.stats {
    background: linear-gradient(135deg, var(--saffron), var(--green));
    color: white;
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.stat-card {
    background: rgba(255,255,255,0.15);
    padding: 35px 25px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.25);
}

.stat-card i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ========================================
   Services - CARD LAYOUT FIXED
   ======================================== */
.services-overview {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--navy);
    font-weight: 900;
    margin-bottom: 15px;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--saffron), var(--green));
    margin: 15px auto;
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 2px solid #f0f0f0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 153, 51, 0.25);
    border-color: var(--saffron);
}

.service-card-header {
    background: linear-gradient(135deg, var(--saffron), var(--green));
    padding: 35px 25px;
    text-align: center;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.2rem;
    color: var(--saffron);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.service-card-header h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 12px;
    font-weight: 800;
}

.service-amount {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 50px;
    display: inline-block;
}

.service-card-body {
    padding: 30px 25px;
}

.service-card-body p {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-features {
    margin-bottom: 25px;
}

.service-features li {
    padding: 8px 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-features li i {
    color: var(--green);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--saffron), var(--green));
    color: white;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s;
}

.service-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 153, 51, 0.4);
}

/* ========================================
   Footer - HORIZONTAL FIXED
   ======================================== */
footer {
    background: var(--navy);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--saffron);
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255,153,51,0.3);
}

.footer-section p,
.footer-section ul li {
    line-height: 1.9;
    opacity: 0.9;
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: white;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li a:hover {
    color: var(--saffron);
    transform: translateX(5px);
}

.footer-section ul li i {
    color: var(--saffron);
    width: 18px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--saffron);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--green);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* ========================================
   MOBILE RESPONSIVE - COMPLETE FIX
   ======================================== */
@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 0 20px;
        box-shadow: 5px 0 30px rgba(0,0,0,0.2);
        transition: left 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 1001;
        margin: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 14px 20px;
        justify-content: flex-start;
    }

    .nav-dropdown {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        margin: 0 0 0 20px !important;
        background: #f8f8f8 !important;
        border-radius: 8px !important;
        display: none;
    }

    .nav-item-with-dropdown.open .nav-dropdown {
        display: block !important;
    }

    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }

    .contact-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .nav-brand-text p {
        display: none;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .service-card-header {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--saffron), var(--green));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 999;
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    transform: translateY(-5px);
}

/* ========================================
   CRITICAL FIX: Prevent Overlay from Blocking Menu Clicks
   ======================================== */
@media (max-width: 1024px) {
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 999; /* MUST be lower than nav-menu */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        pointer-events: none; /* Disabled by default */
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto; /* Only clickable when active */
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 0 20px;
        box-shadow: 5px 0 30px rgba(0,0,0,0.2);
        transition: left 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 1001; /* MUST be higher than overlay */
        margin: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Ensure menu items are clickable */
    .nav-item,
    .nav-link,
    .dropdown-item {
        position: relative;
        z-index: 1002; /* Higher than everything */
        pointer-events: auto;
        cursor: pointer;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 14px 20px;
        justify-content: flex-start;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .nav-dropdown {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        margin: 0 0 0 20px !important;
        background: #f8f8f8 !important;
        border-radius: 8px !important;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item-with-dropdown.open .nav-dropdown {
        display: block !important;
        max-height: 500px;
    }

    .dropdown-item {
        padding: 12px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 1003; /* Highest - always clickable */
    }

    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

/* Language Button Visual Feedback */
.lang-btn {
    position: relative;
    transition: all 0.3s ease;
}

.lang-btn.active::after {
    content: '✓';
    position: absolute;
    right: -8px;
    top: -8px;
    width: 18px;
    height: 18px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    font-weight: bold;
}

/* Ensure clicks work */
* {
    -webkit-tap-highlight-color: transparent;
}

a, button, .nav-link, .dropdown-item, .lang-btn {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}