/* =========================================================
   TEQSPARQS GLOBAL DESIGN SYSTEM
   Light + Dark Mode
   Bootstrap Overrides + Custom Tokens
   ========================================================= */

/* ---------------------------------------------------------
   1. ROOT TOKENS (LIGHT MODE)
   --------------------------------------------------------- */
:root {
    /* --- Brand Colors --- */
    --brand-blue: #0A66FF;
    --brand-blue-dark: #004BCC;
    --brand-blue-light: #E7F2FF;
    --brand-neon-blue: #00A6FF;
    --brand-deep-navy: #001C48;

    /* --- Illustrations & Icons --- */
    --icon-blue-primary: #0A78FF;
    --icon-blue-medium: #1C8DFF;
    --icon-blue-light: #66B9FF;
    --icon-blue-ultralight: #D3E9FF;

    /* --- Neutral Palette --- */
    --gray-900: #000000;
    --gray-800: #1A1A1A;
    --gray-700: #3A3A3A;
    --gray-600: #5E5E5E;
    --gray-500: #8A8A8A;
    --gray-300: #E1E1E1;
    --gray-200: #F1F1F1;
    --gray-100: #FAFAFA;
    --white: #FFFFFF;

    /* --- Background Colors --- */
    --bg-base: #FFFFFF;
    --bg-soft: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-surface: #F5F8FF;
    /* sections with light blue tint */
    --bg-hero: #001C48;
    /* dark header banner */

    /* --- Text Colors (Light Mode) --- */
    --text-primary: #1A1A1A;
    /* On white */
    --text-secondary: #3A3A3A;
    /* Descriptions */
    --text-muted: #5E5E5E;
    /* Captions */
    --text-inverted: #FFFFFF;
    /* On dark backgrounds */
    --text-blue-accent: #0A66FF;

    /* --- Borders --- */
    --border-color: #E1E1E1;
    --border-radius: 12px;

    /* --- Shadows --- */
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-button: 0 4px 10px rgba(10, 102, 255, 0.3);
    --shadow-floating: 0 8px 20px rgba(0, 0, 0, 0.09);
    --card-shadow: 0 10px 30px rgba(3, 18, 37, 0.08);
    /* --- States --- */
    --success: #2CBF6D;
    --warning: #FFB84D;
    --error: #FF5A5A;
}

/* ---------------------------------------------------------
   2. DARK MODE TOKENS
   --------------------------------------------------------- */

html[data-theme="dark"] {
    --bg-base: #000E26;
    --bg-soft: #0A1D3C;
    --bg-card: #0D2547;
    --bg-surface: #0A1D3C;

    --text-primary: #FFFFFF;
    --text-secondary: #D7E2F2;
    --text-muted: #A9BCD3;

    --border-color: #1D2F46;

    --brand-blue: #3A8BFF;
    --brand-blue-dark: #1A6FFF;
}

:root {
    /* LIGHT THEME COLORS */
    --bg: #ffffff;
    --bg-alt: #f5f7fa;

    --text: #1a1f2c;
    --text-muted: #4b5565;

    --primary: #0a84ff;
    --primary-hover: #006be6;

    --border: rgba(0, 0, 0, 0.1);

    /* Navbar */
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-link: #1a1f2c;
    --nav-link-hover: var(--primary);
    --nav-link-active: var(--primary);
    --navbar-text: #0a1a3a;
    --brand-color: #0a1a3a;

    /* Dropdown */
    --dropdown-bg: #ffffff;
    --dropdown-hover-bg: var(--primary);
    --dropdown-hover-text: #ffffff;

    /* Cards */
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);

    /* Toggler icon for LIGHT mode */
    --toggler-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26,31,44,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

html[data-theme="dark"] {
    --bg: #0d1117;
    --bg-alt: #161b22;

    --text: #e6edf3;
    --text-muted: #9ba1b0;

    --primary: #58a6ff;
    --primary-hover: #1f6feb;

    --border: rgba(255, 255, 255, 0.12);

    --nav-bg: rgba(13, 17, 23, 0.85);
    --nav-link: #e6edf3;
    --nav-link-hover: var(--primary);
    --navbar-text: #ffffff;
    --brand-color: #ffffff;

    --dropdown-bg: #161b22;
    --dropdown-hover-bg: var(--primary);
    --dropdown-hover-text: #ffffff;

    --card-bg: #161b22;
    --card-border: rgba(255, 255, 255, 0.08);

    /* Dark mode toggler icon */
    --toggler-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------------------------------------------------------
   3. BOOTSTRAP OVERRIDES
   --------------------------------------------------------- */
:root {
    --bs-primary: var(--brand-blue);
    --bs-primary-hover: var(--brand-blue-dark);
    --bs-body-color: var(--text-primary);
    --bs-heading-color: var(--gray-900);
    --bs-border-color: var(--border-color);
    --bs-body-bg: var(--bg-base);
}

/* ---------------------------------------------------------
   4. GLOBAL RESETS
   --------------------------------------------------------- */
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* background: var(--bg-base);
  color: var(--text-primary); */
    background: var(--bg);
    color: var(--text);
}

/* ---------------------------------------------------------
   5. TYPOGRAPHY
   --------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

p {
    color: var(--text-secondary);
    line-height: 1.55;
}

.text-muted,
small {
    color: var(--text-muted) !important;
}

.text-blue {
    color: var(--brand-blue);
}

/* Global Container */
.container {
    width: 90%;
    /* Adjust this to control the content width */
    max-width: 1200px;
    /* Max width to prevent content from stretching too wide on large screens */
    margin: 0 auto;
    /* Center the content horizontally */
    padding: 0 20px;
    /* 20px padding on both sides for spacing */
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        /* More space on small screens */
        padding: 0 15px;
        /* Less padding */
    }
}

/* ---------------------------------------------------------
   6. BUTTONS
   --------------------------------------------------------- */
.btn-primary {
    background: var(--brand-blue) !important;
    /* border-color: var(--brand-blue) !important; */
    color: var(--text-inverted) !important;
    box-shadow: var(--shadow-button);
}

.btn-primary:hover {
    background: var(--brand-blue-dark) !important;
    border-color: var(--brand-blue-dark) !important;
    color: var(--text-inverted) !important;
}

/* Outline button matching mockup */
.btn-outline-primary {
    border-color: var(--brand-blue) !important;
    color: var(--brand-blue) !important;
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--brand-blue-dark) !important;
    color: var(--text-inverted) !important;
}

/* ---------------------------------------------------------
   7. CARDS
   --------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-card);

    border: 1px solid #eef2f7;
    box-shadow: var(--card-shadow);
    padding: 22px;
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---------------------------------------------------------
   8. SECTIONS
   --------------------------------------------------------- */
.section-light {
    background: var(--bg-soft);
}

.section-surface {
    background: var(--bg-surface);
}

.section-dark {
    background: var(--brand-deep-navy);
    color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark p {
    color: var(--white) !important;
}

/* ---------------------------------------------------------
   9. HERO (Your Mockup's Header)
   --------------------------------------------------------- */
.hero {
    background: var(--brand-deep-navy);
    color: var(--text-inverted);
    padding: 80px 0;
}

.hero h1 {
    color: var(--text-inverted);
    font-weight: 800;
    font-size: 3rem;
}

/* ---------------------------------------------------------
   10. CUSTOM UTILITIES
   --------------------------------------------------------- */
.bg-blue-light {
    background: var(--brand-blue-light);
}

.bg-deep-navy {
    background: var(--brand-deep-navy);
}

.text-inverted {
    color: var(--text-inverted) !important;
}

/* Icon blue classes */
.icon-blue {
    color: var(--icon-blue-primary);
}

/* Spacing scale */
.spacing-xl {
    padding: 80px 0;
}

.spacing-lg {
    padding: 60px 0;
}

.spacing-md {
    padding: 40px 0;
}

/* Rounded */
.rounded-xl {
    border-radius: 20px;
}

.rounded-lg {
    border-radius: 14px;
}

/* ---------------------------------------------------------
   11. CARDS USED IN YOUR MOCKUP (Square Feature Cards)
   --------------------------------------------------------- */
.feature-card {
    border-radius: 14px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-card);
}

.feature-card:hover {
    transform: translateY(-3px);
    transition: 0.2s ease;
}

/* ---------------------------------------------------------
   12. RESPONSIVE TEXT COLORS (BASED ON BACKGROUND)
   --------------------------------------------------------- */

/* On white */
.bg-white *,
.bg-base * {
    color: var(--text-primary);
}

/* On dark (navy hero) */
.bg-dark *,
.bg-deep-navy *,
.section-dark * {
    color: var(--text-inverted) !important;
}

/* On blue-light */
.bg-blue-light * {
    color: var(--text-primary);
}

/* On gray/soft backgrounds */
.bg-soft * {
    color: var(--text-primary);
}


/* -----------------------------
  NAVBAR: TeqSparqs (light + dark)
  Requires your global tokens in styles.css
   ----------------------------- */

/* Container / base */
/* ============================
   DROPDOWN ON HOVER (DESKTOP)
=============================== */
@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navbar .dropdown-menu {
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: 0.25s ease;
    }
}

/* AUTO: Light Theme Toggler Icon */
html[data-theme="light"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(29,38,54,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

html[data-theme="light"] .navbar-toggler {
    border-color: rgba(29, 38, 54, 0.35);
}

/* AUTO: Dark Theme Toggler Icon */
html[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

html[data-theme="dark"] .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.navbar {
    /* background: var(--bg-card); */
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    border-bottom: 1px solid var(--border-color);
    padding: 0.6rem 0;
    transition: background .25s ease, box-shadow .25s ease;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 50px;
    box-shadow: var(--global-box-shadow)
}

.brand-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* centers h1 + p vertically */
}

.navbar-brand {
    font-weight: 700;
    color: var(--brand-color);
    letter-spacing: -0.2px;
    transition: color 0.3s ease, background 0.3s ease;
}

.nav-link {
    color: var(--navbar-text);
    transition: color 0.3s ease;
}


.custom-navbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: background .3s ease, box-shadow .3s ease;
}

.custom-navbar.hero-on-top {
    background: transparent !important;
    box-shadow: none;
}

.navbar-light .navbar-toggler-icon {
    filter: invert(0);
    /* black for light mode */
}

.dark .navbar-light .navbar-toggler-icon {
    filter: invert(1);
    /* white for dark mode */
}

.navbar-toggler {
    border-color: var(--text-muted);
}

/* Nav links row */
.navbar .nav-link {
    /* color: var(--text-primary); */
    color: var(--nav-link);
    position: relative;
    padding: 0.6rem 0.9rem;
    transition: color .22s ease;
    font-weight: 500;
}

/* underline effect (left -> right) */
.navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 12px;
    /* leave small left offset so underline doesn't start at 0 */
    right: 12px;
    bottom: 6px;
    height: 2px;
    /* background: linear-gradient(90deg, var(--brand-neon-blue), var(--brand-blue)); */
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .28s cubic-bezier(.2, .9, .3, 1);
    border-radius: 2px;
    opacity: 0.95;
}

/* show underline on hover / focus / active */
.navbar .nav-link:hover::after,
.navbar .nav-link:focus::after,
.navbar .nav-link.active::after {
    transform: scaleX(1);
}

/* change link color on hover */
.navbar .nav-link:hover,
.navbar .nav-link:focus {
    /* color: var(--brand-blue); */
    color: var(--nav-link-hover);
}

/* active link style */
.navbar .nav-link.active {
    /* color: var(--brand-blue); */
    color: var(--nav-link-active);
    font-weight: 600;
}

/* enlarge buttons on the right */
.navbar .btn {
    padding: .45rem .9rem;
    border-radius: 10px;
}

/* Dropdown menu styling (use tokens so dark-mode works) */
.dropdown-menu {
    /* background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card); */
    background: var(--dropdown-bg);
    border: 1px solid var(--border);
    min-width: 12rem;
}

/* Dropdown items default */
.dropdown-item {
    color: var(--text-primary);
    transition: background .18s ease, color .18s ease;
}

/* Invert colors on hover for dropdown items (text/background invert) */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    /* background: linear-gradient(90deg, rgba(10, 102, 255, 0.08), rgba(10, 102, 255, 0.06));
    color: var(--brand-blue-dark); */
    background: var(--dropdown-hover-bg);
    color: var(--dropdown-hover-text);
}

/* If you want full invert (solid blue bg + white text), use this variant */
.dropdown-menu .dropdown-item.dropdown-invert:hover,
.dropdown-menu .dropdown-item.dropdown-invert:focus {
    background: var(--brand-blue);
    color: var(--white);
}

/* For smaller screens: make underlines less wide so they fit */
@media (max-width: 767px) {
    .navbar .nav-link::after {
        left: 8px;
        right: 8px;
        bottom: 4px;
    }

    .navbar {
        padding: .45rem 0;
    }
}

/* Remove default Bootstrap focus outlines but keep accessible outline */
.navbar .nav-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 102, 255, 0.12);
    border-radius: 6px;
}

/* slightly different look when navbar sits on dark hero */
.navbar.hero-on-top {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    backdrop-filter: blur(6px);
}

/* ensure dropdown caret color matches */
.navbar .dropdown-toggle::after {
    color: var(--text-primary);
}

/* override bootstrap icon color inside nav (if any) */
.navbar .bi {
    color: var(--brand-blue);
}

/* Optional: make dropdown items invert on click as well */
.dropdown-menu .dropdown-item:active {
    background: rgba(10, 102, 255, 0.12);
}


/* TOGGLER */
.navbar-toggler {
    border-color: var(--text-muted);
}

.navbar-toggler-icon {
    background-image: var(--toggler-icon);
}

/* BUTTONS */
/* .btn-outline-primary {
    color: var(--text);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--text);
} */

.theme-toggle-btn {
    background: var(--primary);
}

/* CARDS */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(10,132,255,0.12);
  border-radius: 6px;
}

/* Ensure links get a visible focus */
a:focus, button:focus, .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(10,132,255,0.18);
}


/* ---------------------------------------------------------
   END OF FILE
   --------------------------------------------------------- */