/* Landing Page Styles - Elegant Sidebar Navigation */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #eff6ff 0%, #fff7ed 100%);
    color: #1e293b;
    min-height: 100vh;
    animation: fadeInBody 0.6s ease-out;
}

@keyframes fadeInBody {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.portal-container {
    display: flex;
    min-height: 100vh;
}

/* Elegant Sidebar Styles */
.portal-sidebar {
    width: 320px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s;
}

.sidebar-logo:hover {
    opacity: 0.8;
}

/* Main Search Container */
.main-search-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 1.5rem 2rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding-top: 2rem;
    padding-bottom: 1rem;
}

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

.main-search-box .search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.main-search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    color: #1e293b;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.main-search-input::placeholder {
    color: #94a3b8;
}

.main-search-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1), 0 4px 12px rgba(249, 115, 22, 0.15);
    transform: translateY(-1px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid #e2e8f0;
    animation: slideDown 0.2s ease-out;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8fafc;
}

.search-result-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.search-result-path {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.search-result-snippet {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

.search-highlight {
    background-color: #fef08a;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.hierarchy-nav {
    padding: 1.5rem 0;
}

.nav-category {
    margin-bottom: 0.25rem;
}

.nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 1rem 1.5rem;
}

.nav-category-header {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-category-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #2563eb, #f97316);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-category-header:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(249, 115, 22, 0.05));
    padding-left: 1.75rem;
    transform: translateX(4px);
}

.nav-category-header.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.15), rgba(249, 115, 22, 0.1));
    border-left-color: #f97316;
    animation: pulseActive 2s ease-in-out infinite;
}

@keyframes pulseActive {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(249, 115, 22, 0);
    }
}

.nav-category-header.active::before {
    transform: scaleY(1);
}

.nav-icon-wrapper {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.875rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.nav-category-header:hover .nav-icon-wrapper {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(249, 115, 22, 0.15));
    transform: scale(1.1) rotate(5deg);
}

.nav-category-header.active .nav-icon-wrapper {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(249, 115, 22, 0.2));
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.nav-icon-wrapper i {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
}

.nav-category-header.active .nav-icon-wrapper i {
    color: #fb923c;
}

.nav-label {
    flex: 1;
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.2px;
    transition: color 0.3s;
}

.nav-category-header.active .nav-label {
    color: white;
    font-weight: 600;
}

.nav-arrow {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.nav-category-header.expanded .nav-arrow {
    transform: rotate(180deg);
    color: rgba(255, 255, 255, 0.6);
}

.nav-badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.625rem;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 0.375rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.nav-subcategory {
    background: rgba(0, 0, 0, 0.2);
    display: none;
    padding-left: 0.5rem;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-subcategory.expanded {
    display: block;
    max-height: 2000px;
}

.nav-subcategory .nav-category-header {
    padding-left: 2.5rem;
    font-size: 0.875rem;
}

.nav-subcategory .nav-subcategory .nav-category-header {
    padding-left: 4rem;
}

.nav-subcategory .nav-subcategory .nav-subcategory .nav-category-header {
    padding-left: 5.5rem;
}

.nav-subcategory .nav-icon-wrapper {
    width: 1.75rem;
    height: 1.75rem;
    margin-right: 0.75rem;
}

.nav-subcategory .nav-icon-wrapper i {
    font-size: 0.875rem;
}

.nav-doc-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    padding-left: 5.5rem;
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-doc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #2563eb, #f97316);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-doc-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding-left: 6rem;
}

.nav-doc-link:hover::before {
    transform: scaleY(1);
}

.nav-doc-link.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.15), rgba(249, 115, 22, 0.1));
    border-left-color: #f97316;
    color: white;
    font-weight: 500;
}

.nav-doc-link.active::before {
    transform: scaleY(1);
}

.nav-doc-link.active .nav-icon-wrapper {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(249, 115, 22, 0.2));
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.nav-doc-link.active .nav-icon-wrapper i {
    color: #fb923c;
}

.nav-link-arrow {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s;
    margin-left: 0.5rem;
}

.nav-doc-link:hover .nav-link-arrow {
    color: #f97316;
    transform: translateX(4px);
}

/* Main Content */
.portal-main {
    flex: 1;
    margin-left: 320px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.welcome-section {
    animation: fadeIn 0.6s ease-out;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-section.centered-content {
    text-align: center;
}

.welcome-section.centered-content .featured-section,
.welcome-section.centered-content .quick-links {
    text-align: left;
}

.welcome-section.centered-content .featured-cards,
.welcome-section.centered-content .quick-links-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-section h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    letter-spacing: -1px;
}

.welcome-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 3rem;
    font-weight: 400;
}

.featured-section {
    margin-bottom: 3rem;
}

.featured-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.featured-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.featured-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    min-height: 100%;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.featured-icon {
    font-size: 3.5rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2563eb 0%, #f97316 100%);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-content h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.875rem;
    letter-spacing: -0.5px;
}

.featured-content p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    position: relative;
}

.featured-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #f97316);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-link:hover {
    color: #f97316;
    gap: 0.75rem;
}

.featured-link:hover::after {
    width: 100%;
}

.featured-link::after {
    content: '→';
    transition: transform 0.3s;
}

.featured-link:hover::after {
    transform: translateX(4px);
}

.quick-links {
    margin-top: 3rem;
}

.quick-links h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.quick-link-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.quick-link-card:nth-child(1) { animation-delay: 0.1s; }
.quick-link-card:nth-child(2) { animation-delay: 0.2s; }
.quick-link-card:nth-child(3) { animation-delay: 0.3s; }
.quick-link-card:nth-child(4) { animation-delay: 0.4s; }

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.quick-link-card:hover:not(.disabled) {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
    border-color: rgba(249, 115, 22, 0.3);
}

.quick-link-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quick-link-icon {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-link-card:hover:not(.disabled) .quick-link-icon {
    transform: scale(1.2) rotate(5deg);
    background: linear-gradient(135deg, #2563eb 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: iconBounce 0.6s ease-in-out;
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1.2) rotate(5deg);
    }
    50% {
        transform: scale(1.3) rotate(-5deg);
    }
}

.quick-link-text {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.quick-link-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.6875rem;
    padding: 0.375rem 0.625rem;
    background: #e2e8f0;
    border-radius: 0.375rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Scrollbar Styling */
.portal-sidebar::-webkit-scrollbar {
    width: 8px;
}

.portal-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.portal-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.portal-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    background-clip: padding-box;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Styles */
.portal-footer {
    margin-left: 320px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.8);
    transition: opacity 0.3s;
}

.footer-logo-img:hover {
    opacity: 1;
}

.footer-info {
    flex: 1;
    text-align: right;
}

.footer-company {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.footer-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile Menu Button for Landing Page */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background-color: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 12px 10px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    position: fixed;
    top: 1rem;
    left: 1rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.mobile-menu-btn:hover {
    background-color: #0f172a;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background-color: #ffffff;
    transition: all 0.3s;
    display: block;
    border-radius: 2px;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portal-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .portal-sidebar.open {
        transform: translateX(0);
    }
    
    .mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        background-color: #1e293b !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    }
    
    .mobile-menu-btn span {
        background-color: #ffffff !important;
        width: 24px !important;
        height: 3px !important;
        display: block !important;
    }
    
    .mobile-overlay {
        display: block;
    }

    .portal-main {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: 4.5rem; /* Space for mobile menu button */
        align-items: stretch;
    }
    
    .main-search-container {
        max-width: 100%;
        padding: 1rem;
    }
    
    .welcome-section {
        max-width: 100%;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }

    .featured-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .featured-card {
        flex-direction: column;
        text-align: center;
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
    }

    .portal-footer {
        margin-left: 0;
        padding: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-info {
        text-align: center;
    }
}
