/* ===========================
   DataScan - Professional Styles
   =========================== */

/* Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-light: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 6px 10px rgba(0,0,0,0.07);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Navigation */
.navbar-custom {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: var(--transition-base);
    padding: 1rem 0;
}

.navbar-custom.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-dark) !important;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    border-radius: 20%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    margin: 0 1rem;
    transition: var(--transition-base);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

.navbar-nav .nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:not(.dropdown-toggle):hover::after {
    width: 100%;
}

/* Fix dropdown toggle appearance */
.navbar-nav .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.navbar-nav .dropdown-toggle::after {
    display: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: #0f172a;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    opacity: 0.9;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234f46e5' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.badge-hero {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: #60a5fa;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 1.5rem 0;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-buttons .btn {
    padding: 0.875rem 2.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn-outline-light {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Hero Stats */
.hero-stats {
    margin-top: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-base);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2rem;
    color: #60a5fa;
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
}

.hero-image {
    filter: drop-shadow(0 25px 50px rgba(0,0,0,0.3));
    max-width: 100%;
    height: auto;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.floating-card i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.card-1 {
    top: 10%;
    right: -20px;
    animation: float 3s ease-in-out infinite;
}

.card-2 {
    bottom: 30%;
    left: -40px;
    animation: float 3s ease-in-out infinite 0.5s;
}

.card-3 {
    bottom: 10%;
    right: 20%;
    animation: float 3s ease-in-out infinite 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Hero Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Integration Banner */
.integration-banner {
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

.integration-logos {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.integration-item {
    font-weight: 600;
    color: var(--text-light);
    padding: 0.25rem 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

/* Features Section */
.features-section {
    background-color: #ffffff;
}

.feature-card-advanced {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card-advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card-advanced:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.feature-card-advanced:hover::before {
    transform: scaleX(1);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.feature-card-advanced h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Integration Scenarios */
.integration-scenarios {
    background-color: var(--light-color);
    padding: 3rem;
    border-radius: 16px;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.scenario-item {
    text-align: center;
}

.scenario-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.scenario-item h5 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.scenario-item p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Scan Modes Section */
.scan-modes-section {
    background-color: var(--light-color);
}

.scan-mode-detail {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.mode-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.scan-mode-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.scan-mode-content .lead {
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mode-features {
    margin: 2rem 0;
}

.mode-features h5 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.mode-features ul {
    list-style: none;
    padding: 0;
}

.mode-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

.mode-features strong {
    color: var(--text-dark);
}

.use-cases {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.use-case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.mode-visual {
    position: relative;
}

.mode-visual img {
    width: 100%;
    height: auto;
}

.mode-stats {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-around;
}

.mode-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.mode-stats i {
    color: var(--primary-color);
}

/* Export Section */
.export-section {
    background-color: white;
}

.export-format-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.format-card {
    display: flex;
    align-items: start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.format-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.format-content h5 {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.format-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.format-content li {
    padding: 0.25rem 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

.export-method-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    background: var(--light-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.method-item {
    text-align: center;
    padding: 1.25rem;
    background: white;
    border-radius: 8px;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
}

.method-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.method-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.method-item h6 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.method-item p {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
}

/* File Naming System */
.file-naming-section {
    background: var(--gradient-light);
    padding: 3rem;
    border-radius: 16px;
    margin-top: 3rem;
}

.naming-demo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.naming-example {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.naming-example .label {
    font-weight: 600;
    color: var(--text-dark);
}

.naming-example .value {
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: var(--text-light);
}

.naming-example .value.highlight {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Integration Examples */
.integrations-section {
    background-color: var(--light-color);
}

.integration-example {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.integration-logo h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.integration-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.flow-step i {
    font-size: 2rem;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flow-step span {
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 500;
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--text-light);
}

.integration-note {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    color: var(--text-light);
    margin-top: 1rem;
}

/* Customization Section */
.customization-section {
    background-color: white;
}

.customization-card {
    text-align: center;
    padding: 2rem;
    background: var(--light-color);
    border-radius: 16px;
    height: 100%;
    transition: var(--transition-base);
}

.customization-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.custom-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.customization-card h4 {
    margin-bottom: 1rem;
}

.customization-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.customization-card li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.customization-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
}

.config-export {
    margin-top: 3rem;
}

.config-feature {
    background: var(--gradient-light);
    padding: 3rem;
    border-radius: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.config-feature i {
    color: var(--primary-color);
}

/* Pricing Section */
.pricing-section {
    background-color: var(--light-color);
}

.pricing-comparison {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    padding: 0.75rem 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.check-list i {
    color: var(--success-color);
    margin-right: 1rem;
    font-size: 1.25rem;
}

.pricing-cta {
    background: var(--gradient-light);
    padding: 2rem;
    border-radius: 12px;
}

.trial-info {
    color: var(--text-light);
}

/* CTA Section */
.cta-section {
    background: var(--gradient-dark);
    color: white;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.cta-content .lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.btn-light {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
}

.btn-light:hover {
    background-color: var(--light-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.footer-section {
    background-color: #0f172a;
    color: #94a3b8;
}

.footer-brand h5 {
    color: white;
}

.footer-brand img {
    border-radius: 20%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.footer-section h5 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition-base);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: white;
}

.footer-section hr {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .floating-card {
        display: none;
    }
    
    .integration-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-stats .col-4 {
        margin-bottom: 1rem;
    }
    
    .scan-mode-detail {
        padding: 2rem;
    }
    
    .mode-stats {
        position: static;
        margin-top: 1rem;
    }
    
    .scenario-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .integration-logos {
        justify-content: center;
    }
    
    .naming-demo {
        flex-direction: column;
    }
}

/* Language Switcher Styles - Match other nav items */
.navbar-nav .dropdown-toggle#language-switcher {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 1rem !important;
    font-weight: 500 !important;
    color: var(--text-dark) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: inherit !important;
}

.navbar-nav .dropdown-toggle#language-switcher:hover,
.navbar-nav .dropdown-toggle#language-switcher:focus,
.navbar-nav .dropdown-toggle#language-switcher:active,
.navbar-nav .dropdown-toggle#language-switcher.show,
.navbar-nav .dropdown-toggle#language-switcher:focus-visible {
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    color: var(--primary-color) !important;
}

/* Remove Bootstrap's dropdown arrow */
.navbar-nav .dropdown-toggle#language-switcher::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Remove any focus box-shadow that Bootstrap adds */
.btn-check:focus + .btn, 
.btn:focus,
.navbar-nav .dropdown-toggle:focus {
    box-shadow: none !important;
}

/* Additional overrides for Bootstrap button styling */
.navbar-nav .dropdown-toggle {
    --bs-btn-padding-x: 0;
    --bs-btn-padding-y: 0;
    --bs-btn-font-size: inherit;
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-focus-shadow-rgb: none;
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: transparent;
}

/* Force remove any blue backgrounds or outlines */
.dropdown-toggle:focus,
.dropdown-toggle:active,
.dropdown-toggle.show,
.dropdown-item:focus,
.dropdown-item:active,
.dropdown-menu,
.dropdown-menu.show,
.btn:focus,
.btn:active {
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Ensure dropdown doesn't have dividers */
.navbar-nav .dropdown-divider {
    display: none !important;
}

/* Only show backgrounds on hover for dropdown items */
.navbar-nav .dropdown-item:hover {
    background-color: #f8f9fa !important;
}

.lang-display {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    vertical-align: middle;
}

/* Flag icons */
.flag-icon {
    width: 20px;
    height: 12px;
    display: inline-block;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 0.4rem;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.flag-icon.flag-en {
    background-image: url('../images/flags/gb.svg');
}

.flag-icon.flag-de {
    background-image: url('../images/flags/de.svg');
}

/* Alternative US flag if needed */
.flag-icon.flag-us {
    background-image: url('../images/flags/us.svg');
}

.navbar-nav .dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

/* Hide dropdown menu completely when not shown */
.navbar-nav .dropdown-menu:not(.show) {
    display: none !important;
}

.navbar-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 120px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    border-radius: 4px !important;
    margin-top: 0.25rem !important;
    padding: 0.25rem 0 !important;
    background-color: #ffffff !important;
    z-index: 1000;
}

.navbar-nav .dropdown-item {
    padding: 0.4rem 1rem !important;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-dark) !important;
    transition: var(--transition-base);
    text-align: center;
    text-decoration: none !important;
    display: block !important;
    width: 100%;
    clear: both;
    background-color: transparent !important;
    border: 0 !important;
    outline: none !important;
}

.navbar-nav .dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.navbar-nav .dropdown-item:focus,
.navbar-nav .dropdown-item:active,
.navbar-nav .dropdown-item.active {
    background-color: transparent !important;
    color: var(--text-dark) !important;
    outline: none !important;
    box-shadow: none !important;
}

.lang-option {
    padding: 0.75rem 1.25rem;
    transition: var(--transition-base);
    font-weight: 500;
}

.lang-option:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.lang-option.active {
    background-color: var(--primary-color);
    color: white;
}

.lang-option.active:hover {
    background-color: var(--primary-dark);
    color: white;
}

.flag-icon {
    font-size: 1.2rem;
    line-height: 1;
}