/* Aesthetic Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    position: relative;
    padding: 30px;
}

.loader-logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
    animation: fadePulse 2s infinite ease-in-out;
}

.loader-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d47a1;
    /* Royal Blue */
    margin: 10px 0 5px;
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.loader-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 25px;
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e3f2fd;
    border-top: 3px solid #ff9800;
    /* Orange accent */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* Main Header */
.main-header {
    background: linear-gradient(to right, #fff1f7, #ffe6ef);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    padding: 8px 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.header-logo {
    height: 45px;
    flex-shrink: 0;
}

.header-title {
    margin: 0;
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    color: #000;
    font-weight: bold;
    white-space: nowrap;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #667eea;
    transform: translateY(-2px);
}

.nav-link.has-submenu::after {
    content: ' ▼';
    font-size: 0.7rem;
    margin-left: 5px;
}

/* Dropdown Submenu */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    padding: 10px 0;
    margin-top: 5px;
    z-index: 1001;
}

.nav-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-item {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.submenu-item:hover {
    background: #f8f9fa;
    border-left-color: #667eea;
    padding-left: 25px;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #000;
    margin: 4px 0;
    transition: all 0.3s;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100%;
    background: white;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.3);
    transition: left 0.4s;
    z-index: 1002;
    overflow-y: auto;
    padding-top: 60px;
}

.mobile-menu.active {
    left: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1001;
}

.mobile-overlay.active {
    display: block;
}

.mobile-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
}

.mobile-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.mobile-submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    background: #f8f9fa;
}

.mobile-submenu.active {
    max-height: 500px;
}

.mobile-submenu-item {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Footer */
.main-footer {
    background: linear-gradient(to right, #2c3e50, #34495e);
    color: white;
    padding: 40px 20px 20px;
    margin-top: 50px;
    font-family: 'Noto Sans Devanagari', sans-serif;
}

/* Note: Add <li><a href="sitemap.html">साइटमॅप</a></li> to footer quick links */

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin: 10px 0;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 1024px) {
    .desktop-nav {
        gap: 3px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
        flex-direction: column;
    }
}

/* ======================================== MOBILE RESPONSIVENESS - ENHANCED ======================================== */

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sidebar-box {
        display: none;
    }

    .desktop-nav {
        flex-wrap: wrap;
        gap: 5px;
    }

    .nav-item {
        font-size: 0.85rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .search-container {
        order: 3;
        margin-top: 10px;
    }

    .search-container form {
        max-width: 100% !important;
    }

    .weather-badge,
    .lang-switch {
        font-size: 0.8rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .site-title {
        font-size: 1.1rem;
    }

    .logo-img {
        width: 50px;
        height: 50px;
    }

    .search-container input {
        font-size: 0.85rem !important;
        padding: 6px 10px !important;
    }

    .search-container button {
        padding: 6px 15px !important;
    }

    .weather-badge {
        display: none;
    }

    .nav-link,
    .mobile-menu a {
        min-height: 44px;
        padding: 12px 15px;
    }
}