/* Scoped Modern Theme (safe for public site only) */

/* Variables */
.theme-modern {
    --tm-bg: #0b1220;
    --tm-surface: #111827;
    --tm-glass: rgba(255, 255, 255, 0.06);
    --tm-glass-border: rgba(255, 255, 255, 0.12);
    --tm-text: #e5e7eb;
    --tm-text-dim: #9ca3af;
    --tm-accent: #3b82f6;
    --tm-accent-2: #22d3ee;
    --tm-warn: #f59e0b;
}

/* Base */
body.theme-modern {
    background: radial-gradient(1200px 600px at 10% -10%, rgba(59,130,246,.2), transparent 40%),
                radial-gradient(1100px 700px at 110% -20%, rgba(34,211,238,.15), transparent 45%),
                var(--tm-bg);
    color: var(--tm-text);
}

/* Navbar */
.theme-modern .navbar {
    background: rgba(11,18,32,.65) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--tm-glass-border);
    transition: background .25s ease, padding .25s ease, box-shadow .25s ease;
    padding: .9rem 0;
}
.theme-modern .navbar.scrolled {
    background: rgba(11,18,32,.92) !important;
    padding: .4rem 0;
    box-shadow: 0 12px 30px -12px rgba(0,0,0,.5);
    border-bottom-color: rgba(255,255,255,.08);
}
.theme-modern .navbar .nav-link {
    color: var(--tm-text-dim) !important;
    border-radius: 10px;
    position: relative;
}
.theme-modern .navbar .nav-link:hover,
.theme-modern .navbar .nav-link.active {
    color: var(--tm-accent) !important;
    background: var(--tm-glass);
}
.theme-modern .navbar .nav-link::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 6px;
    height: 2px;
    background: linear-gradient(90deg, var(--tm-accent), var(--tm-accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
    opacity: .85;
}
.theme-modern .navbar .nav-link:hover::after,
.theme-modern .navbar .nav-link.active::after {
    transform: scaleX(1);
}
.theme-modern .navbar-brand {
    color: var(--tm-text) !Important;
}
.theme-modern .navbar-brand img { filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }

/* Dropdown */
.theme-modern .dropdown-menu {
    background: rgba(17,24,39,.92);
    border: 1px solid var(--tm-glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: .5rem;
}
.theme-modern .dropdown-item {
    color: var(--tm-text-dim);
    border-radius: 10px;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}
.theme-modern .dropdown-item:hover {
    background: var(--tm-glass);
    color: var(--tm-accent);
    transform: translateX(4px);
}

/* Hero */
.theme-modern .hero-section {
    position: relative;
    background: linear-gradient(180deg, rgba(17,24,39,.7), rgba(17,24,39,.9)),
                radial-gradient(1000px 500px at -10% -10%, rgba(34,211,238,.18), transparent 40%),
                radial-gradient(900px 600px at 120% -10%, rgba(59,130,246,.2), transparent 45%);
    overflow: hidden;
}
.theme-modern .hero-section::after {
    content: '';
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 260px;
    background: radial-gradient(closest-side, rgba(34,211,238,.15), transparent);
    filter: blur(40px);
    pointer-events: none;
}
.theme-modern .hero-section .display-4 { color: #f3f4f6; }
.theme-modern .hero-section p.lead { color: var(--tm-text-dim); }
.theme-modern .hero-section .btn { border-radius: 12px; }
.theme-modern .hero-section .btn-warning { color: #111827; font-weight: 700; }
.theme-modern .hero-section .btn-outline-light { border-width: 2px; }

/* Cards (markets, generic) */
.theme-modern .card {
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid var(--tm-glass-border);
    box-shadow: 0 20px 40px -20px rgba(0,0,0,.45);
}
.theme-modern .card .card-title { color: #e5e7eb; }
.theme-modern .card .text-primary { color: var(--tm-accent) !important; }

/* Sections */
.theme-modern section { padding: 4.5rem 0; }
.theme-modern section.bg-light { background: rgba(255,255,255,.02) !important; }

/* CTA */
.theme-modern .bg-primary.text-white {
    background: linear-gradient(135deg, rgba(59,130,246,.25), rgba(34,211,238,.2)) !important;
    border-top: 1px solid var(--tm-glass-border);
    border-bottom: 1px solid var(--tm-glass-border);
}
.theme-modern .bg-primary .btn-warning { color: #111827; font-weight: 700; }

/* Footer */
.theme-modern footer.bg-light {
    background: rgba(255,255,255,.02) !important;
    border-top: 1px solid var(--tm-glass-border) !important;
}
.theme-modern footer a { color: var(--tm-text-dim) !important; }
.theme-modern footer a:hover { color: var(--tm-accent) !important; }

/* Buttons */
.theme-modern .btn { transition: transform .2s ease, box-shadow .2s ease; }
.theme-modern .btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px rgba(0,0,0,.55); }
.theme-modern .btn-outline-light:hover { background: rgba(255,255,255,.08); }

/* Utilities */
@media (max-width: 768px) {
    .theme-modern .display-4 { font-size: 2.25rem; }
}

/* -------- Accessibility & Contrast fixes (global text) -------- */
.theme-modern h1,
.theme-modern h2,
.theme-modern h3,
.theme-modern h4,
.theme-modern h5,
.theme-modern h6 { color: var(--tm-text); }
.theme-modern p,
.theme-modern li,
.theme-modern .lead { color: var(--tm-text-dim); }
.theme-modern a { color: var(--tm-accent); }
.theme-modern a:hover { color: var(--tm-accent-2); }

/* Forms: labels, inputs, placeholders, help text */
.theme-modern .form-label { color: var(--tm-text); font-weight: 600; }
.theme-modern .form-control,
.theme-modern .form-select,
.theme-modern textarea.form-control {
    background: rgba(255,255,255,.06);
    color: var(--tm-text);
    border: 1px solid var(--tm-glass-border);
}
.theme-modern .form-control::placeholder,
.theme-modern textarea.form-control::placeholder { color: rgba(229,231,235,.7); }
.theme-modern .form-text,
.theme-modern small,
.theme-modern .text-muted { color: var(--tm-text-dim) !important; }
.theme-modern .input-group-lg .form-control { background: rgba(255,255,255,.08); }
.theme-modern .input-group .btn { border-color: #1d4ed8; }
.theme-modern .input-group .btn.btn-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.theme-modern .input-group .btn.btn-primary:hover { background: linear-gradient(135deg, #1d4ed8, #1e40af); }

/* Utility overrides to ensure readability on dark surfaces */
.theme-modern .text-dark { color: var(--tm-text) !important; }
.theme-modern .text-muted { color: var(--tm-text-dim) !important; }
.theme-modern .text-primary { color: var(--tm-accent) !important; }

/* Background harmonization on dark theme */
.theme-modern .bg-light { background-color: rgba(255,255,255,0.04) !important; }
.theme-modern .bg-white { background-color: rgba(255,255,255,0.06) !important; }
.theme-modern .border,
.theme-modern .card,
.theme-modern .bg-light,
.theme-modern .bg-white { border-color: var(--tm-glass-border) !important; }

/* Buttons for better contrast */
.theme-modern .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #1d4ed8;
}
.theme-modern .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    border-color: #1e40af;
}

/* -------- Line Card page specific harmonization -------- */
/* Breadcrumb */
.theme-modern .breadcrumb { background: rgba(255,255,255,.04); border-bottom: 1px solid var(--tm-glass-border); }
.theme-modern .breadcrumb .breadcrumb-item,
.theme-modern .breadcrumb .breadcrumb-item a { color: var(--tm-text-dim); }
.theme-modern .breadcrumb .breadcrumb-item.active { color: var(--tm-text); }

/* Section headers */
.theme-modern section .h1,
.theme-modern section .h2,
.theme-modern section .h3,
.theme-modern section .h4 { color: var(--tm-text); }

/* Company cards & logos */
.theme-modern .company-card {
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)) !important;
    border: 1px solid var(--tm-glass-border) !important;
}
.theme-modern .company-name { color: var(--tm-text) !important; }
.theme-modern .company-description { color: var(--tm-text-dim) !important; }
.theme-modern .company-logo {
    background: rgba(255,255,255,.04) !important;
    border: 1px solid var(--tm-glass-border) !important;
}
.theme-modern .company-website { color: var(--tm-accent) !important; }

/* Contact CTA card in Line Card */
.theme-modern .card.bg-light { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03)) !important; }
.theme-modern .card.bg-light .card-title { color: var(--tm-accent) !important; }
.theme-modern .card.bg-light .card-text { color: var(--tm-text-dim) !important; }
