/* 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: 250px;
    background: #1e293b;
    color: #e2e8f0;
    position: fixed;
    height: 100vh;
    overflow: hidden;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
}

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

.sidebar-header {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    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: 36px;
    object-fit: contain;
    transition: opacity 0.2s;
}

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

/* Main Search Container */
.main-search-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, #eff6ff 0%, #fff7ed 100%); /* Same as page background */
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.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: 0.6rem 1rem 0.6rem 3rem;
    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: 0.5rem 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 0.6rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.12);
    margin-top: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer-quote {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}

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

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.5rem 0.75rem;
}

.nav-divider-bottom {
    margin-top: auto;
}

.nav-category-soon {
    margin-top: 0.25rem;
}

.nav-category-header {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem 0.4rem 0.875rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    user-select: none;
    border-left: 2px solid transparent;
}

.nav-category-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-category-header.active {
    background: rgba(59, 130, 246, 0.18);
    border-left-color: #3b82f6;
}

.nav-icon-wrapper {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.nav-category-header:hover .nav-icon-wrapper {
    background: rgba(255, 255, 255, 0.1);
}

.nav-category-header.active .nav-icon-wrapper {
    background: rgba(59, 130, 246, 0.25);
}

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

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

.nav-label {
    flex: 1;
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.9);
    min-width: 0;
}

.nav-category-header.active .nav-label {
    color: #fff;
}

.nav-arrow {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.45);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

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

.nav-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.45rem;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 0.25rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nav-subcategory {
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 0.75rem;
}

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

.nav-subcategory .nav-category-header {
    padding: 0.35rem 0.5rem 0.35rem 0.65rem;
    font-size: 0.8rem;
}

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

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

.nav-subcategory .nav-icon-wrapper {
    width: 1.35rem;
    height: 1.35rem;
    margin-right: 0.45rem;
}

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

.nav-doc-link {
    display: flex;
    align-items: center;
    padding: 0.35rem 0.65rem 0.35rem 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    font-size: 0.8rem;
    border-left: 2px solid transparent;
}

.nav-doc-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-doc-link.active {
    background: rgba(59, 130, 246, 0.18);
    border-left-color: #3b82f6;
    color: #fff;
    font-weight: 500;
}

.nav-doc-link.active .nav-icon-wrapper {
    background: rgba(59, 130, 246, 0.25);
}

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

.nav-link-arrow {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 0.35rem;
    flex-shrink: 0;
}

.nav-doc-link:hover .nav-link-arrow {
    color: #93c5fd;
}

/* Main Content */
.portal-main {
    flex: 1;
    margin-left: 250px;
    padding: 0;
    padding-bottom: 90px; /* Space for fixed footer */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
}

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

.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: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.35rem;
    letter-spacing: -0.5px;
}

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

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

.featured-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 640px;
    margin: 0 auto;
}

.featured-card {
    width: 200px;
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    min-height: 140px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(249, 115, 22, 0.25);
}

.featured-icon {
    font-size: 2rem;
    line-height: 1;
}

.featured-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

.featured-action {
    font-size: 0.8125rem;
    color: #2563eb;
    font-weight: 500;
}

.featured-card:hover .featured-action {
    color: #f97316;
}

/* Coming soon section – blurred items */
.coming-soon-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.coming-soon-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-align: center;
}

.coming-soon-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 640px;
    margin: 0 auto;
}

.featured-card-soon {
    opacity: 0.7;
    filter: blur(1px);
    pointer-events: none;
    cursor: default;
    background: #f8fafc;
    border-style: dashed;
}

.featured-card-soon .featured-icon {
    opacity: 0.8;
}

.featured-card-soon .featured-title {
    color: #94a3b8;
}

.featured-badge-soon {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    padding: 0.2rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    background: #f1f5f9;
}

.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 {
    position: fixed;
    bottom: 0;
    left: 250px;
    right: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 3rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 100;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.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: 32px;
    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: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.125rem;
    letter-spacing: 0.5px;
}

.footer-copyright {
    font-size: 0.8125rem;
    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 */
        padding-bottom: 90px; /* Space for fixed footer on mobile */
        align-items: stretch;
    }
    
    .main-search-container {
        max-width: 100%;
        padding: 0.75rem 1rem;
        margin-left: 0;
        margin-right: 0;
    }
    
    .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 {
        left: 0;
        padding: 0.75rem 1rem;
    }
    
    .portal-main {
        padding-bottom: 90px; /* Space for fixed footer on mobile */
    }
    
    .footer-logo-img {
        height: 28px;
    }
    
    .footer-company {
        font-size: 0.875rem;
    }
    
    .footer-copyright {
        font-size: 0.75rem;
    }

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

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