/* Landing Page Styles - Modern Enterprise Portal Design */

:root {
    /* Color Palette - Enterprise Blue/Indigo Theme */
    --lp-primary: #4f46e5; /* Indigo */
    --lp-primary-hover: #4338ca;
    --lp-primary-light: #e0e7ff;
    --lp-secondary: #64748b; /* Neutral gray */
    --lp-accent: #10b981; /* Green/Teal for active services */
    --lp-accent-hover: #059669;
    
    /* Light Mode (Default) */
    --lp-background: #f8fafc;
    --lp-surface: #ffffff;
    --lp-surface-light: #ffffff;
    --lp-text-primary: #1e293b;
    --lp-text-secondary: #64748b;
    --lp-text-light: #1e293b;
    --lp-border: #e2e8f0;
    --lp-border-dark: #cbd5e1;
    --lp-navbar-bg: rgba(255, 255, 255, 0.8);
    --lp-navbar-border: #e2e8f0;
    --lp-hero-text: #1e293b;
    --lp-hero-description: #64748b;
    --lp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --lp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --lp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --lp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Environment Badge Colors */
    --env-dev: #10b981;
    --env-staging: #f59e0b;
    --env-prod: #ef4444;
    --env-production: #ef4444;
}

/* Dark Mode */
.dark-mode,
html[data-theme="dark"] {
    --lp-background: #0f172a;
    --lp-surface: #1e293b;
    --lp-surface-light: #1e293b;
    --lp-text-primary: #f1f5f9;
    --lp-text-secondary: #94a3b8;
    --lp-text-light: #f1f5f9;
    --lp-border: #334155;
    --lp-border-dark: #475569;
    --lp-navbar-bg: rgba(30, 41, 59, 0.8);
    --lp-navbar-border: #334155;
    --lp-hero-text: #ffffff;
    --lp-hero-description: #94a3b8;
    --lp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --lp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --lp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --lp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Auto dark mode based on system preference (only if no manual selection) */
@media (prefers-color-scheme: dark) {
    html:not([data-theme]) {
        --lp-background: #0f172a;
        --lp-surface: #1e293b;
        --lp-surface-light: #1e293b;
        --lp-text-primary: #f1f5f9;
        --lp-text-secondary: #94a3b8;
        --lp-text-light: #f1f5f9;
        --lp-border: #334155;
        --lp-border-dark: #475569;
        --lp-navbar-bg: rgba(30, 41, 59, 0.8);
        --lp-navbar-border: #334155;
        --lp-hero-text: #ffffff;
        --lp-hero-description: #94a3b8;
    }
}

/* Base Styles */
.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--lp-background) 0%, var(--lp-surface) 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    color: var(--lp-text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Top Navigation Bar */
.landing-navbar {
    background: var(--lp-navbar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lp-navbar-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.landing-navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.landing-navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--lp-text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.landing-navbar-brand img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.landing-navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Environment Badge */
.env-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--env-dev);
    color: white;
}

.env-badge.staging,
.env-badge.Staging {
    background: var(--env-staging);
}

.env-badge.production,
.env-badge.Production,
.env-badge.prod,
.env-badge.Prod {
    background: var(--env-prod);
}

/* Main Content Container */
.landing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Hero Section */
.landing-hero {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--lp-hero-text);
    transition: color 0.3s ease;
}

.landing-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--lp-primary) 0%, var(--lp-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: background 0.3s ease;
}

.landing-hero p {
    font-size: 1.25rem;
    color: var(--lp-hero-description);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    transition: color 0.3s ease;
}

/* Search Bar (Optional) */
.landing-search {
    max-width: 500px;
    margin: 2rem auto;
}

.landing-search-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--lp-border);
    border-radius: 0.5rem;
    background: var(--lp-surface);
    color: var(--lp-text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

.landing-search-input:focus {
    outline: none;
    border-color: var(--lp-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.landing-search-input::placeholder {
    color: #64748b;
}

/* Applications Grid */
.landing-apps-section {
    margin-top: 3rem;
}

.landing-apps-header {
    margin-bottom: 2rem;
    color: var(--lp-text-primary);
}

.landing-apps-header h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.landing-apps-header p {
    color: var(--lp-text-secondary);
    font-size: 1rem;
}

.landing-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Application Card */
.landing-app-card {
    background: var(--lp-surface-light);
    border: 1px solid var(--lp-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.landing-app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--lp-primary), var(--lp-accent));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.landing-app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lp-shadow-xl);
    border-color: var(--lp-primary);
}

.landing-app-card:hover::before {
    transform: scaleX(1);
}

.landing-app-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.landing-app-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 0.5rem;
    background: var(--lp-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.landing-app-card-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.landing-app-card-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lp-accent);
    flex-shrink: 0;
    margin-top: 0.5rem;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.landing-app-card-body {
    flex: 1;
}

.landing-app-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--lp-text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.landing-app-card-description {
    font-size: 0.875rem;
    color: var(--lp-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    min-height: 2.5rem;
}

.landing-app-card-url {
    font-size: 0.75rem;
    color: var(--lp-text-secondary);
    font-family: 'Courier New', monospace;
    margin-bottom: 1rem;
    word-break: break-all;
}

.landing-app-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--lp-border);
}

.landing-app-card-button {
    padding: 0.5rem 1.25rem;
    background: var(--lp-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-app-card-button:hover {
    background: var(--lp-primary-hover);
    transform: translateX(2px);
}

.landing-app-card-button:active {
    transform: translateX(0);
}

/* Empty State */
.landing-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--lp-text-primary);
}

.landing-empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.landing-empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.landing-empty-state p {
    color: var(--lp-text-secondary);
}

/* Language Dropdown Styling */
.landing-language-dropdown {
    background: var(--lp-surface);
    border: 1px solid var(--lp-border);
    border-radius: 0.5rem;
    color: var(--lp-text-primary);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.landing-language-dropdown button,
.landing-language-dropdown .dropdown-toggle {
    background: transparent !important;
    border: none !important;
    color: var(--lp-text-primary) !important;
    transition: color 0.3s ease;
}

.landing-language-dropdown button:hover,
.landing-language-dropdown .dropdown-toggle:hover {
    color: var(--lp-primary) !important;
}

/* User Actions */
.landing-user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.landing-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
}

.landing-btn-primary {
    background: var(--lp-primary);
    color: white;
    border-color: var(--lp-primary);
}

.landing-btn-primary:hover {
    background: var(--lp-primary-hover);
    border-color: var(--lp-primary-hover);
    color: white;
    text-decoration: none;
}

.landing-btn-outline {
    background: transparent;
    color: var(--lp-text-primary);
    border-color: var(--lp-border);
    transition: all 0.3s ease;
}

.landing-btn-outline:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--lp-primary);
    color: var(--lp-text-primary);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .landing-container {
        padding: 2rem 1rem;
    }

    .landing-hero h1 {
        font-size: 2rem;
    }

    .landing-hero p {
        font-size: 1rem;
    }

    .landing-navbar-content {
        padding: 0 1rem;
        flex-wrap: wrap;
    }

    .landing-apps-grid {
        grid-template-columns: 1fr;
    }

    .landing-user-actions {
        flex-direction: column;
        width: 100%;
    }

    .landing-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility */
.landing-app-card:focus-visible {
    outline: 2px solid var(--lp-primary);
    outline-offset: 2px;
}

.landing-btn:focus-visible {
    outline: 2px solid var(--lp-primary);
    outline-offset: 2px;
}

/* Loading State */
.landing-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    color: var(--lp-text-primary);
}

/* Dark Mode Toggle Button */
.landing-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: 1px solid var(--lp-border);
    background: var(--lp-surface);
    color: var(--lp-text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    position: relative;
}

.landing-theme-toggle:hover {
    background: var(--lp-primary-light);
    border-color: var(--lp-primary);
    color: var(--lp-primary);
}

.landing-theme-toggle:focus-visible {
    outline: 2px solid var(--lp-primary);
    outline-offset: 2px;
}

.landing-theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.landing-theme-toggle .theme-icon-sun {
    position: absolute;
    opacity: 0;
    transform: rotate(90deg);
}

.landing-theme-toggle .theme-icon-moon {
    position: absolute;
    opacity: 1;
    transform: rotate(0deg);
}

.dark-mode .landing-theme-toggle .theme-icon-sun,
html[data-theme="dark"] .landing-theme-toggle .theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg);
}

.dark-mode .landing-theme-toggle .theme-icon-moon,
html[data-theme="dark"] .landing-theme-toggle .theme-icon-moon {
    opacity: 0;
    transform: rotate(-90deg);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-app-card {
    animation: fadeIn 0.5s ease-out;
}

.landing-app-card:nth-child(1) { animation-delay: 0.1s; }
.landing-app-card:nth-child(2) { animation-delay: 0.2s; }
.landing-app-card:nth-child(3) { animation-delay: 0.3s; }
.landing-app-card:nth-child(4) { animation-delay: 0.4s; }
.landing-app-card:nth-child(5) { animation-delay: 0.5s; }
.landing-app-card:nth-child(6) { animation-delay: 0.6s; }

/* RTL Support */
html[dir="rtl"] .landing-navbar-content {
    flex-direction: row-reverse;
}

html[dir="rtl"] .landing-navbar-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .landing-user-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .landing-app-card-footer {
    flex-direction: row-reverse;
}

html[dir="rtl"] .landing-app-card-button svg {
    transform: scaleX(-1);
}

