/* Global reset & base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1f2933;
    line-height: 1.6;
}

/* Layout */
.page-container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 60px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* NAVIGATION */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
}

/* Nav links */
.main-nav {
    position: relative;
}

.nav-links-wrapper {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-links > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #111827;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-links > li > a i {
    font-size: 0.9rem;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    background: #16a34a1a;
    color: #065f46;
    transform: translateY(-1px);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: #e5e7eb;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    color: #111827;
    transition: background 0.2s ease, transform 0.15s ease;
}

.nav-dropdown-toggle .dropdown-caret {
    font-size: 0.75rem;
}

.nav-dropdown-toggle:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

.nav-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 260px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
    list-style: none;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 1500;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    text-decoration: none;
    font-size: 0.9rem;
    color: #374151;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-dropdown-menu li a i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

.nav-dropdown-menu li a:hover,
.nav-dropdown-menu li a.active {
    background: #f3f4ff;
    color: #4f46e5;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 12px;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    width: 40px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #16a34a;
    padding: 6px 8px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle-bar {
    height: 2px;
    border-radius: 999px;
    background: #ecfdf5;
}

/* Overlay for mobile menu */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 900;
}

.nav-overlay.overlay-active {
    opacity: 1;
    visibility: visible;
}

/* SITEMAP CONTENT */
.sitemap-content {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    padding: 40px 32px 40px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

/* Header & hero */
.sitemap-header {
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.sitemap-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #16a34a 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sitemap-subtitle {
    max-width: 800px;
    margin: 0 auto;
    font-size: 0.98rem;
    color: #4b5563;
}

.sitemap-subtitle a {
    color: #2563eb;
    text-decoration: none;
}

.sitemap-subtitle a:hover {
    text-decoration: underline;
}

.last-updated {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 0.88rem;
    color: #4b5563;
}

/* Search section */
.search-container {
    margin-bottom: 28px;
    padding: 22px 20px;
    border-radius: 16px;
    background: #f3f4ff;
    border: 1px solid #e0e7ff;
    text-align: center;
}

.search-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.search-box {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    border-radius: 999px;
    border: 2px solid #e5e7eb;
    padding: 11px 40px 11px 14px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #4f46e5;
    font-size: 1rem;
}

.search-helper {
    margin-top: 10px;
    font-size: 0.86rem;
    color: #4b5563;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: #ffffff;
    padding: 18px 16px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    text-align: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.stat-number {
    font-size: 1.9rem;
    font-weight: 800;
    color: #4f46e5;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.88rem;
    color: #4b5563;
}

/* Quick nav */
.quick-nav {
    margin-bottom: 30px;
    padding: 24px 20px;
    border-radius: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.quick-nav-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: #111827;
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.quick-nav-item {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.quick-nav-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
    font-size: 0.9rem;
    color: #374151;
}

.quick-nav-item i {
    font-size: 0.95rem;
}

.quick-nav-item:hover {
    border-color: #4f46e5;
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.18);
    transform: translateY(-1px);
}

.quick-nav-item:hover a {
    color: #111827;
}

/* Sitemap sections grid */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 22px;
}

/* Section card */
.sitemap-section {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    padding: 22px 20px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    animation: fadeInUp 0.45s ease forwards;
}

/* Section header */
.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 16px;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
}

/* Icon color variations */
.calculator-icon {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

.finance-icon {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.business-icon {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.health-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.education-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.legal-icon {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.section-count {
    font-size: 0.86rem;
    color: #6b7280;
}

/* Page links */
.page-list {
    list-style: none;
    margin-top: 6px;
}

.page-item + .page-item {
    margin-top: 6px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    color: #374151;
    transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.page-link i {
    font-size: 0.7rem;
    color: #cbd5e1;
}

.page-link:hover {
    background: #f3f4ff;
    color: #4f46e5;
    transform: translateX(3px);
}

/* Highlighted search result */
.highlight {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.35) 0%, rgba(251, 191, 36, 0.35) 100%);
    border-radius: 4px;
    padding: 0 2px;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Extra info */
.sitemap-info {
    margin-top: 30px;
    padding: 22px 20px;
    border-radius: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.sitemap-info h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
}

.sitemap-info h2 i {
    color: #4f46e5;
    margin-right: 6px;
}

.sitemap-info p {
    font-size: 0.92rem;
    color: #4b5563;
    margin-bottom: 8px;
}

.sitemap-info a {
    color: #2563eb;
    text-decoration: none;
}

.sitemap-info a:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background: rgba(17, 24, 39, 0.97);
    color: #e5e7eb;
    padding: 32px 0 20px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.footer-col h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #f9fafb;
}

.footer-col p {
    font-size: 0.86rem;
    color: #9ca3af;
}

.footer-col ul {
    list-style: none;
    margin-top: 4px;
}

.footer-col li + li {
    margin-top: 4px;
}

.footer-col a {
    font-size: 0.86rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.18s ease;
}

.footer-col a:hover {
    color: #a5b4fc;
}

.footer-text {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding-inline: 16px;
    }

    .nav-links-wrapper {
        position: fixed;
        left: 0;
        right: 0;
        top: 60px;
        max-height: 0;
        overflow: hidden;
        background: #16a34a;
        transition: max-height 0.22s ease;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
        z-index: 950;
    }

    .nav-links-wrapper.nav-open {
        max-height: 75vh;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 14px 12px;
    }

    .nav-links > li > a,
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: flex-start;
        background: transparent;
        border-radius: 10px;
        color: #ecfdf5;
    }

    .nav-links > li > a:hover,
    .nav-links > li > a.active {
        background: rgba(15, 118, 110, 0.6);
        color: #ecfdf5;
    }

    .nav-dropdown-toggle {
        background: rgba(15, 118, 110, 0.7);
        color: #ecfdf5;
    }

    .nav-dropdown-toggle:hover {
        background: rgba(15, 118, 110, 0.9);
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 10px;
        margin-top: 6px;
        background: rgba(6, 95, 70, 0.9);
        transform: none;
        opacity: 0;
        visibility: hidden;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        opacity: 1;
        visibility: visible;
    }

    .nav-dropdown-menu li a {
        color: #ecfdf5;
    }

    .dropdown-divider {
        background: rgba(148, 163, 184, 0.6);
    }

    .nav-toggle {
        display: flex;
    }

    .sitemap-content {
        padding: 28px 18px 32px;
    }

    .sitemap-title {
        font-size: 1.7rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sitemap-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .last-updated {
        display: block;
        border-radius: 14px;
    }

    .search-container {
        padding-inline: 14px;
    }

    .quick-nav-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
