/* Custom CSS for ArcaQ Site */

/* ── Nav Links — prevent wrap (e.g. "À propos") ── */
.nav-links {
    gap: 1.25rem !important;
}

.nav-links a {
    white-space: nowrap;
    font-size: 0.9rem;
}

/* ── Nav Actions ── */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: var(--space-md);
}

[dir="rtl"] .nav-actions {
    margin-left: 0;
    margin-right: var(--space-md);
}

/* WhatsApp button in nav — ArcaQ brand gradient */
.nav-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}
.nav-whatsapp:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.5);
}
.nav-whatsapp svg {
    display: block;
}

.nav-cta {
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    gap: 6px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6366f1 100%);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
    transition: all 0.25s ease;
}

.nav-cta:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.45);
    transform: translateY(-1px);
}

.nav-cta svg {
    opacity: 0.85;
    flex-shrink: 0;
}

/* Hide nav CTA when contact section is in view */
.nav-cta.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

/* ── Language dropdown enhanced ── */
.lang-dropdown-menu {
    max-height: min(450px, 70vh);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.5) transparent;
    padding: 6px 0;
}

.lang-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.lang-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.lang-dropdown-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.6), rgba(59, 130, 246, 0.6));
    border-radius: 3px;
}

.lang-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.8), rgba(59, 130, 246, 0.8));
}

/* Improved language buttons */
.lang-btn {
    position: relative;
    padding: 10px 16px;
    margin: 2px 6px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateX(3px);
}

.lang-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.2));
    border-left: 3px solid var(--color-primary);
    padding-left: 13px;
}

.lang-btn.active::before {
    content: '✓';
    position: absolute;
    right: 12px;
    color: var(--color-primary);
    font-size: 0.8rem;
}

/* RTL support */
[dir="rtl"] .lang-btn:hover {
    transform: translateX(-3px);
}

[dir="rtl"] .lang-btn.active {
    border-left: none;
    border-right: 3px solid var(--color-primary);
    padding-left: 16px;
    padding-right: 13px;
}

[dir="rtl"] .lang-btn.active::before {
    right: auto;
    left: 12px;
}

/* ══════════════════════════════════════════════════════════════
   Trust Bar — Compact scrolling bar (tb-* namespace to avoid conflicts)
   ══════════════════════════════════════════════════════════════ */
.tb-compact {
    position: fixed;
    top: var(--navbar-height, 60px);
    left: 0;
    right: 0;
    z-index: 998;
    height: 32px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(90deg, #0c1222 0%, #111a30 50%, #0c1222 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.tb-track {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: max-content;
    animation: tbScroll 28s linear infinite;
    will-change: transform;
}

.tb-track:hover {
    animation-play-state: paused;
}

@keyframes tbScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

[dir="rtl"] .tb-track {
    animation-name: tbScrollRTL;
}

@keyframes tbScrollRTL {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}

.tb-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.01em;
    transition: background 0.2s, border-color 0.2s;
}

.tb-pill:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.tb-pill svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.tb-dot {
    color: rgba(99, 102, 241, 0.4);
    font-size: 0.6rem;
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 768px) {
    .tb-compact {
        top: 56px;
        height: 28px;
    }
    .tb-pill {
        padding: 2px 8px;
        font-size: 0.68rem;
        gap: 4px;
    }
    .tb-pill svg {
        width: 11px;
        height: 11px;
    }
    .tb-track {
        gap: 1.25rem;
        animation-duration: 20s;
    }
}

/* ── Mobile Navigation Extra Links ── */
.mobile-nav-extra {
    display: none;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    /* Hide desktop nav-actions on mobile (CTA + WhatsApp are in hamburger menu) */
    .nav-actions {
        display: none !important;
    }

    /* Make mobile menu scrollable */
    .nav-links {
        overflow-y: auto;
        max-height: calc(100vh - 70px);
        padding-bottom: var(--space-xl) !important;
    }

    /* Show extra links section in mobile menu */
    .mobile-nav-extra {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding-top: var(--space-md);
        margin-top: var(--space-md);
        border-top: 1px solid var(--color-border);
    }

    .mobile-nav-label {
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--color-text-muted);
        padding: var(--space-xs) 0;
        margin-bottom: var(--space-xs);
    }

    .mobile-nav-extra a {
        color: var(--color-text-secondary);
        font-weight: 500;
        padding: 0.55rem 0;
        transition: color var(--transition-fast);
        text-decoration: none;
        font-size: 0.95rem;
    }

    .mobile-nav-extra a:hover,
    .mobile-nav-extra a.active {
        color: var(--color-primary);
    }

    .mobile-nav-ctas {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-top: var(--space-lg);
        padding-top: var(--space-md);
        border-top: 1px solid var(--color-border);
    }

    .mobile-nav-cta {
        flex: 1;
        text-align: center;
        justify-content: center;
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
        border-radius: 8px;
    }

    .mobile-nav-ctas .nav-whatsapp {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
    }
}

/* ══════════════════════════════════════════════════════════════
   Interactive SVG World Map - Investor Edition
   ══════════════════════════════════════════════════════════════ */

.interactive-map-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    background: linear-gradient(145deg, rgba(10, 10, 26, 0.98), rgba(15, 15, 37, 0.98));
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

/* ── Header Stats for Investors ── */
.map-header-stats {
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.map-header-stats .header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.map-header-stats .header-title h4 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.map-header-stats .header-badge {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.map-header-stats .header-metrics {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.map-header-stats .metric {
    text-align: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.map-header-stats .metric:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.map-header-stats .metric.highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(34, 197, 94, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
}

.map-header-stats .metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.map-header-stats .metric.highlight .metric-value {
    color: #10b981;
}

.map-header-stats .metric-label {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.interactive-map-container .map-title {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.interactive-map-container .map-title h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.world-map-svg {
    width: 100%;
    height: auto;
    min-height: 280px;
    max-height: 400px;
    border-radius: 12px;
}

/* Map Legend */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
}

.map-legend .legend-section {
    flex: 1;
    min-width: 200px;
}

.map-legend h5 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legend-items.offices {
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

.legend-item:hover,
.legend-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-flag {
    font-size: 1.1rem;
}

.legend-text {
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
}

.legend-count {
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
}

/* Investor legend - market & growth badges */
.legend-market {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: auto;
}

.legend-growth {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.legend-status {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Investor Tooltip styles */
.map-tooltip {
    position: absolute;
    background: rgba(10, 10, 26, 0.98);
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 12px;
    padding: 0;
    color: #fff;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    max-width: 280px;
    min-width: 220px;
    overflow: hidden;
}

.map-tooltip .tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map-tooltip .tooltip-header.investor strong {
    font-size: 1rem;
    font-weight: 700;
}

.map-tooltip .tooltip-badge {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.map-tooltip .tooltip-body {
    padding: 12px 16px;
}

.map-tooltip .tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map-tooltip .tooltip-row:last-child {
    border-bottom: none;
}

.map-tooltip .row-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.map-tooltip .row-value {
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
}

.map-tooltip .row-value.highlight {
    color: #10b981;
    font-size: 1rem;
    font-weight: 700;
}

.map-tooltip .row-value.growth {
    color: #22c55e;
    font-weight: 700;
}

.map-tooltip .row-value.small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
    max-width: 140px;
}

.map-tooltip .tooltip-compliance {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.map-tooltip .compliance-label {
    font-weight: 600;
    margin-right: 4px;
}

.map-tooltip .tooltip-flag {
    font-size: 1.2rem;
}

.map-tooltip .tooltip-header strong {
    color: #fff;
    font-size: 0.95rem;
}

.map-tooltip .tooltip-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}

.map-tooltip .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1;
}

.map-tooltip .stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.map-tooltip .tooltip-compliance {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-tooltip .tooltip-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-top: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.map-tooltip .tooltip-cta-button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: #fff;
}

.map-tooltip .compliance-icon {
    font-size: 1rem;
}

/* Legend code badge for patent offices */
.legend-code {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    min-width: 28px;
    text-align: center;
}

/* Patent offices row */
.legend-item.office {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
}

.legend-item.office:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* ── Investor CTA Banner ── */
.map-investor-cta {
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.08));
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.map-investor-cta .cta-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.map-investor-cta .cta-icon {
    font-size: 1.5rem;
}

.map-investor-cta .cta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.map-investor-cta .cta-text strong {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.map-investor-cta .cta-text span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.map-investor-cta .cta-button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.map-investor-cta .cta-button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

/* ── Interactive Map Responsive ── */
@media (max-width: 768px) {
    .interactive-map-container {
        margin: 0 -10px;
        border-radius: 12px;
    }
    
    .map-header-stats {
        padding: 16px;
    }
    
    .map-header-stats .header-title h4 {
        font-size: 1.1rem;
    }
    
    .map-header-stats .header-metrics {
        gap: 12px;
    }
    
    .map-header-stats .metric {
        padding: 6px 12px;
        min-width: 80px;
    }
    
    .map-header-stats .metric-value {
        font-size: 1.2rem;
    }
    
    .map-header-stats .metric-label {
        font-size: 0.6rem;
    }
    
    .world-map-svg {
        min-height: 220px;
    }
    
    .map-legend {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .legend-items {
        flex-wrap: wrap;
    }
    
    .legend-item {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .map-investor-cta .cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .map-investor-cta .cta-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .world-map-svg {
        min-height: 180px;
    }
    
    .map-legend h5 {
        font-size: 0.7rem;
    }
    
    .legend-text {
        font-size: 0.75rem;
    }
    
    .legend-count {
        font-size: 0.65rem;
        padding: 1px 6px;
    }
}
