/* ===================================
   STACKCHANGES.COM - Optimized CSS

   Table of Contents:
   1. Variables & Base Settings
   2. Typography
   3. Layout & Structure
   4. Navigation Components
   5. Forms & Inputs
   6. Buttons & Interactive Elements
   7. Cards & Containers
   8. Tables
   9. Feature Sections & Homepage Components
   10. Interactive Features & Toggles
   11. Utility Classes
   12. Dark Mode & Themes
   13. Media Queries & Responsiveness
   =================================== */

/* ========== 1. Variables & Base Settings ========== */
:root {
    /* Typography */
    --bs-body-font-family: Helvetica, sans-serif;
    --bs-heading-font-weight: 600;
    --bs-nav-link-font-weight: 500;
    --bs-btn-font-weight: 600;

    /* Color system */
    --primary-color: #050840;
    --primary-light: rgba(5, 8, 64, 0.1);
    --primary-dark: #030626;
    --success-color: #28A745;
    --warning-color: #F9BC07;
    --danger-color: #dc3545;

    /* Text colors */
    --text-primary: #343a40;
    --text-secondary: #6c757d;
    --text-muted: #818898;

    /* Border & background */
    --border-color: #e9ecef;
    --bg-light: #f8f9fa;
    --bg-lighter: #F7F7F8;

    /* Component styling */
    --badge-padding: 0.35rem 0.65rem;
    --card-border-radius: 0.5rem;
    --btn-shadow: 0 2px 4px rgba(5, 8, 64, 0.15);

    /* Transition presets */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

    /* Form spacing */
    --form-label-margin-bottom: 0.5rem;
}

body {
    font-family: Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: normal;
    font-variation-settings: normal;
}

/* High-DPI display optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 2),
screen and (min-resolution: 192dpi) {
    html {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* Page load visibility */
html:not(.page-loaded) {
    visibility: visible;
}

html.page-loaded {
    visibility: visible;
    transition: visibility 0s;
}

/* ========== 2. Typography ========== */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.display-3 {
    font-size: 2.3rem;
    padding-top: 64px;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.5;
}

h5, h6 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.lead {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.badge {
    font-weight: 500;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
}

.legal-updated-at {
    color: #6C757D;
    font-weight: normal;
    font-size: 1.25rem;
}

/* ========== 3. Layout & Structure ========== */
main.main {
    margin-top: 0;
    padding-top: 0;
}

/* Navigation visibility control */
[data-bs-navigation-position="topnav"] #topnav-lg {
    display: block;
    visibility: visible;
    opacity: 1;
}

[data-bs-navigation-position="sidenav"] .aside,
[data-bs-navigation-position="sidenav"] #sidenav-lg {
    display: block;
    visibility: visible;
    opacity: 1;
}

[data-bs-navigation-position="topnav"] .aside,
[data-bs-navigation-position="topnav"] #sidenav-lg {
    display: none;
}

[data-bs-navigation-position="sidenav"] #topnav-lg {
    display: none;
}

/* Default visibility */
#topnav-lg {
    visibility: visible;
    opacity: 1;
    display: block;
}

.aside, #sidenav-lg {
    visibility: hidden;
    opacity: 0;
}

.page-loaded #topnav-lg,
.page-loaded .aside,
.page-loaded #sidenav-lg {
    visibility: visible;
    opacity: 1;
}

/* Page header styling */
.page-header {
    padding-top: 1.875rem;
    padding-bottom: 1.25rem;
}

.page-header h1 {
    margin-top: 2rem !important;
    margin-bottom: 1.5rem !important;
}

/* Breadcrumb styling */
.breadcrumb-container {
    background-color: transparent;
    margin-bottom: 3.00rem;
}

.breadcrumb-container .breadcrumb-item,
.breadcrumb-container .breadcrumb-item.active,
.breadcrumb-container .breadcrumb-item a {
    color: var(--text-primary) !important;
}

.breadcrumb-container .breadcrumb-item a:hover {
    color: var(--text-primary) !important;
    text-decoration: underline;
}

/* Footer styling */
.footer-brand {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.footer-logo-container {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    margin-right: 4px;
}

.footer-logo-container .logo {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
}

.footer-address {
    line-height: 2;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links li {
    margin-bottom: 0;
    line-height: 2;
}

.footer-links li a {
    display: inline-block;
    padding: 0;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-links li a:hover {
    color: var(--text-primary) !important;
    transform: none;
}

.footer .mb-2 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ========== 4. Navigation Components ========== */
/* Top navigation styling */
#topnav-lg {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 0;
    background-color: #F7F7F8;
}

#topnav-lg .navbar-brand {
    color: var(--text-primary);
    font-size: 1.50rem !important;
    margin-top: 0.5rem !important;
    font-weight: 800 !important;
}

#topnav-lg .logo-container {
    display: inline-flex;
    align-items: center;
}

/* Navigation links */
#topnav-lg .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 0.5rem 0.85rem;
    transition: color var(--transition-fast);
}

/* Default theme - hover state */
#topnav-lg .nav-link:hover {
    color: #000000 !important;
    text-decoration: none;
}

/* Default theme - active state */
#topnav-lg .nav-link.active {
    color: #000000 !important;
    text-decoration: none;
}

#topnav-lg .navbar-nav .nav-item {
    margin-left: 0.75rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Sign-in and sign-up buttons */
#topnav-lg .navbar-nav .nav-link.btn.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600!important;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

#topnav-lg .navbar-nav .nav-link.btn.btn-outline-primary:hover {
    background-color: var(--primary-light);
    color: var(--primary-color) !important;
}

/* Theme logo handling */
#topnav-lg .theme-logo-dark {
    display: block;
}

#topnav-lg .theme-logo-light {
    display: none;
}

#topnav-lg .navbar-toggler:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

#topnav-lg .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%280, 0, 0, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.75em;
    height: 1.75em;
    margin: 0;
}

/* Make navbar toggle icon light/white on homepage */
.blue-theme #topnav-lg .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
.blue-theme .lead {
    color: #A8BABE !important;
}

/* Sidebar navigation styling */
.navbar-vertical .nav-link {
    font-weight: var(--bs-nav-link-font-weight, 500);
    letter-spacing: -0.01em;
    padding: 0.5rem 0.85rem;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.navbar-vertical .navbar-nav .nav-link.active {
    font-weight: 600;
}

/* Nav-sticky and nav-sidebar classes */
.nav-sticky {
    position: sticky;
    flex-direction: column !important;
    margin-top: -0.40rem;
}

.nav-sidebar .nav-link {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    width: 100%;
    font-size: 1rem;
}

.nav-sidebar .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

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

.nav-sidebar .nav-link.disabled {
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Logo in the nav */
nav .logo {
    margin-top: -2px;
    height: 32px;
}

/* ========== 5. Forms & Inputs ========== */
/* Form label spacing */
form label {
    margin-bottom: var(--form-label-margin-bottom);
    display: block;
    font-weight: 500;
}

/* Form field styling */
.form .form-control,
.form .form-select,
.form-select {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    padding: 0.625rem 0.75rem;
}

.form .form-control[readonly] {
    background-color: var(--bs-secondary-bg);
}

.form .form-control:hover,
.form .form-select:hover,
.form-select:hover {
    border-color: var(--bs-primary);
}

.form .form-control:focus,
.form .form-select:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Form field help text */
.form-text {
    margin-top: 0.375rem;
    font-size: 0.875rem;
}

/* Form validation feedback */
.invalid-feedback {
    margin-top: 0.375rem;
    font-size: 0.875rem;
}

/* Form switch */
.form-switch .form-check-input {
    width: 2rem;
    height: 1rem;
    margin-left: 0.25rem;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.form-switch .form-check-input:checked {
    background-color: var(--success-color) !important;
    border-color: var(--success-color) !important;
}

/* Filter select styles */
.form-select.border-primary {
    border-width: 2px;
}

/* Form check spacing */
.form-check {
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    margin-left: -1.75rem;
}

/* Email signup form */
.email-signup-form {
    background-color: #f8f9fa;
}
.email-signup-input {
    background-color: #f8f9fa;
}

/* ========== 6. Buttons & Interactive Elements ========== */
/* Button styling */
.btn {
    font-weight: var(--bs-btn-font-weight);
    letter-spacing: -0.01em;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.35rem;
    transition: color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    line-height: 1.5;
    border-radius: 0.4rem;
}

.btn-primary {
    box-shadow: var(--btn-shadow);
}

/* Outline buttons */
.btn-outline-primary,
.btn-outline-danger,
.btn-outline-success {
    background-color: transparent;
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

.btn-outline-danger {
    color: var(--bs-danger);
    border-color: var(--bs-danger);
}

.btn-outline-danger:hover {
    background-color: var(--bs-danger);
    color: var(--bs-white);
}

.btn-outline-success {
    color: var(--bs-success);
    border-color: var(--bs-success);
}

.btn-outline-success:hover {
    background-color: var(--bs-success);
    color: var(--bs-white);
}

/* Button icons */
.btn-icon .material-symbols-outlined {
    color: var(--bs-gray-400);
    transition: color var(--transition-fast);
}

/* ========== 7. Cards & Containers ========== */
/* Card styling */
.card {
    border-radius: var(--card-border-radius);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card .material-symbols-outlined {
    font-size: 1.5rem;
}

.card-body {
    padding: 1.25rem;
}

.card-header, .card-footer {
    padding: 0.75rem 1.25rem;
}

/* Avatars */
.avatar img {
    width: 2rem;
    height: 2rem;
    margin-left: -0.5rem;
}

/* User avatar styles */
.user-avatar {
    width: 32px;
    height: 32px;
    border: 2px solid white;
    margin-right: -6px;
}

/* Add a container class to give some padding */
.avatar-group {
    padding-right: 8px;
}

/* Badges & Labels */
.badge.bg-light.text-body-secondary {
    background-color: var(--bg-light) !important;
    color: var(--text-secondary) !important;
}

/* Alerts */
.alert-primary strong {
    font-weight: 600;
}

/* Progress & Loaders */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Active filters display */
#activeFilters .badge {
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
}

#activeFilters .badge:hover {
    background-color: var(--border-color);
}

#activeFilters .material-symbols-outlined {
    cursor: pointer;
    color: #adb5bd;
    font-size: 1rem;
    transition: color var(--transition-fast);
}

#activeFilters .material-symbols-outlined:hover {
    color: var(--danger-color);
}

/* Accordion items */
.accordion-item,
.accordion-header,
.accordion-button,
.accordion-collapse,
.accordion-body {
    background-color: transparent !important;
}

.accordion-button {
    font-size: 1rem;
}

.accordion-body {
    font-size: 1rem;
}

.accordion-item {
    border: none !important;
}

.accordion-button:focus {
    box-shadow: none !important;
    border-color: transparent !important;
}

/* ========== 8. Tables ========== */
/* Table styling */
.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--bs-gray-100);
}

.table td, .table th {
    padding: 0.75rem;
}

td a.text-decoration-none {
    color: var(--bs-body-color);
    font-weight: 500;
    transition: color var(--transition-fast);
}

td a.text-decoration-none:hover {
    color: var(--bs-primary);
}

/* Table selection styles */
.table-selectable td:first-child,
.table-selectable th:first-child {
    width: 48px;
    text-align: center;
    vertical-align: middle;
    padding: 8px 4px;
}

.table .form-check {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.table .form-check-input {
    margin: 0;
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ========== 9. Feature Sections & Homepage Components ========== */
/* Hero section styling */
.hero-section-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0 !important;
}

.hero-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.75rem 0.75rem 0 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3),
    -4px 0 15px -5px rgba(31, 38, 135, 0.15),
    4px 0 15px -5px rgba(31, 38, 135, 0.15),
    0 -4px 15px -5px rgba(31, 38, 135, 0.15);
    padding: 1px 1px 0 1px;
    margin-bottom: 0;
}

.hero-image-top {
    width: 100%;
    height: 225px;
    overflow: hidden;
    border-radius: 0.75rem 0.75rem 0 0;
    position: relative;
}

.hero-image-top img {
    width: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 0.75rem 0.75rem 0 0;
    box-shadow: none;
}

/* Add a subtle gradient overlay for premium look */
.hero-image-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%);
    z-index: 1;
    border-radius: 0.75rem 0.75rem 0 0;
    pointer-events: none;
}

/* Add side reflection */
.hero-image-top::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 1px;
    background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 100%);
    z-index: 1;
}

.hero-divider {
    width: 100vw;
    height: 16px;
    background-color: var(--bg-lighter);
    position: relative;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 0;
}

/* Hide hero form on mobile */
@media (max-width: 767px) {
    .hero-form {
        display: none !important;
    }
}

/* Features section styling */
.features-section {
    margin-top: -1.25rem !important;
    padding-top: 3rem;
}
.features-section h2 {
    margin-top: 0;
}

.feature-icon {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    margin-bottom: 1rem;
}

.feature-icon .material-symbols-outlined {
    font-size: 2rem;
    color: var(--primary-color);
    position: relative;
}

.feature-block {
    cursor: pointer;
    padding: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    transition: background-color var(--transition-fast);
}

.feature-block:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.feature-block-active {
    background-color: rgba(0, 0, 0, 0.02);
}

.feature-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    box-shadow: none;
    padding: 0;
    background-color: #fff;
}

.feature-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 0% 0%;
    transform-origin: center;
    transition: transform var(--transition-normal);
}

/* Payment logos in subscription section */
.payment-logos {
    height: 25px;
}

/* Star icon styling */
.star-icon {
    font-size: 1rem;
}

.stars-row {
    display: flex;
    gap: 2px;
}

.rating-group {
    line-height: 1.2;
}

/* ========== 10. Interactive Features & Toggles ========== */
/* Directory favorite toggle */
.toggle-favorite-star {
    cursor: pointer;
    text-decoration: none;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    transition: transform var(--transition-fast);
    color: var(--text-muted);
}

.toggle-favorite-star:hover {
    transform: scale(1.2);
}

.toggle-favorite-star .material-symbols-outlined {
    font-size: 1.125rem;
}

.toggle-favorite-star .material-symbols-outlined.text-warning {
    color: var(--warning-color) !important;
}

/* Directory details styling */
.directory-details {
    margin-top: 0.75rem !important;
    opacity: 0.8;
}

.directory-details .text-body-secondary {
    color: #a0a8b0 !important;
}

.directory-details .d-inline-flex {
    margin-right: 1rem !important;
    margin-bottom: 0.25rem;
}

.directory-details .material-symbols-outlined.fs-xs {
    font-size: 0.7rem !important;
    margin-right: 0.3rem !important;
}

.directory-details .fs-xs {
    font-size: 0.9rem !important;
}

/* Directory exclusion functionality */
.exclude-link {
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
    font-weight: 500;
    text-decoration: underline;
}

.directory-details .exclude-link {
    color: #b0b8c0 !important;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.directory-details .exclude-link:hover {
    color: var(--danger-color) !important;
    opacity: 1;
    text-decoration: underline;
}

.exclude-link:hover {
    color: var(--danger-color);
}

.directory-description {
    display: block;
    transition: opacity var(--transition-fast);
}

.excluded-message {
    display: none !important;
    font-style: italic;
    font-weight: normal;
    font-size: 0.8rem;
    height: 22px;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
}

.include-link {
    cursor: pointer;
    text-decoration: underline;
    color: #0d6efd;
    font-weight: 500;
    margin-right: 12px;
    transition: color var(--transition-fast);
}

.include-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.include-link .material-symbols-outlined {
    vertical-align: middle;
    font-size: 14px !important;
}

/* Excluded directory styling */
.directory-excluded {
    background-color: rgba(0, 0, 0, 0.02);
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    transition: padding var(--transition-fast);
}

.directory-excluded .excluded-message {
    display: flex !important;
    color: #6c757d;
    font-size: 0.875rem;
}

.directory-excluded .directory-description,
.directory-excluded .exclude-link,
.directory-excluded .directory-details {
    display: none !important;
}

.directory-excluded td {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Toggle classes for read/unread posts */
.post-read {
    opacity: 0.25;
    transition: opacity 0.2s ease;
}
.post-read:hover {
    opacity: 0.9;
}

/* Dropdown menus */
.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
}

.dropdown-menu.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.dropdown-toggle-no-caret::after {
    display: none;
}

/* Form switch toggle styling */
.form-switch {
    padding-left: 2.5em;
    min-height: 24px;
}

.form-switch .form-check-input {
    height: 1.25em;
    width: 2.5em;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Interactions accordion */
.interaction .accordion-button::after {
    display: none;
}

.interaction .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.interaction .accordion-item {
    background-color: transparent;
}



/* ========== 11. Utility Classes ========== */
/* Bootstrap core overrides for proper display */
.collapse:not(.show) {
    display: none;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

/* For navbar collapse */
.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
    transition: height 0.35s ease;
}

/* Show dropdown menu when active */
.dropdown-menu.show {
    display: block;
}

/* Text utility classes */
.text-success .material-symbols-outlined {
    color: var(--bs-success);
}

/* Border utilities */
.border-bottom {
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
}

/* External link icon */
.external-link-icon {
    font-size: 0.8rem;
    vertical-align: middle;
}

/* Hyperlink styling with grey underline */
section a {
    color: inherit !important;
    text-decoration: none;
    border-bottom: 2px solid #e9ecef;
    transition: border-color var(--transition-fast);
}

section a:hover {
    border-bottom-color: #adb5bd;
}

/* Don't apply the styling to navigation links */
.nav-link, .navbar-brand, .breadcrumb-item a, .footer a {
    border-bottom: none !important;
}

/* ========== 12. Dark Mode & Themes ========== */
/* Logo theming and containers */
.logo-container {
    width: 3.5rem;
    height: 2rem;
    display: inline-block;
    vertical-align: middle;
    position: relative;
}

.logo-image {
    position: absolute;
    top: 0;
    left: 0;
    height: 2rem;
}

/* Theme toggling visibility */
[data-bs-theme="light"] .theme-logo-light { display: block; }
[data-bs-theme="light"] .theme-logo-dark { display: none; }
[data-bs-theme="dark"] .theme-logo-light { display: none; }
[data-bs-theme="dark"] .theme-logo-dark { display: block; }

/* Ensure logo text is visible in all themes */
[data-bs-theme="dark"] #topnav-lg {
    background-color: #17191C;
}

[data-bs-theme="dark"] #topnav-lg .navbar-brand {
    color: #ffffff;
}

/* Dark mode compatibility */
[data-bs-theme="dark"] .form .form-control,
[data-bs-theme="dark"] .form .form-select,
[data-bs-theme="dark"] .form-select {
    background-color: #17191C;
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .btn-icon:hover {
    background-color: var(--bs-gray-700);
}

[data-bs-theme="dark"] .directory-excluded {
    background-color: rgba(255, 255, 255, 0.02);
}

[data-bs-theme="dark"] .border-bottom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: var(--bs-gray-800);
}

/* Dark mode toggle icon */
[data-bs-theme="dark"] #topnav-lg .navbar-toggler {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] #topnav-lg .navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] #topnav-lg .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%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Theme selector styling */
.theme-selector-container {
    position: relative;
    z-index: 10;
    margin-right: 8px;
    margin-bottom: 12px;
}

.theme-selector-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Icon buttons styling */
.theme-selector-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.theme-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--bs-border-color);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-fast);
}

.theme-icon-btn .material-symbols-outlined {
    font-size: 16px;
    color: var(--text-secondary);
}

.theme-icon-btn:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

.theme-icon-btn.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-icon-btn.active .material-symbols-outlined {
    color: white;
}

/* Light mode icon */
.theme-icon-btn[data-theme="light"] .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* Dark mode icon */
.theme-icon-btn[data-theme="dark"] .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* Image transition effect */
#dashboardScreenshot {
    transition: opacity 0.3s ease;
}

/* Dark mode theme selector compatibility */
[data-bs-theme="dark"] .theme-selector-label {
    color: var(--bs-gray-400);
}

[data-bs-theme="dark"] .theme-icon-btn:not(.active) {
    border-color: var(--bs-gray-600);
}

[data-bs-theme="dark"] .theme-icon-btn:not(.active) .material-symbols-outlined {
    color: var(--bs-gray-400);
}

[data-bs-theme="dark"] .theme-icon-btn:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========== 13. Media Queries & Responsiveness ========== */
/* Mobile Button Width Fix */
@media (max-width: 767.98px) {
    .btn.w-25,
    form button[type="submit"].w-25 {
        width: 50% !important;
    }
}

@media (max-width: 575.98px) {
    .btn.w-25,
    form button[type="submit"].w-25 {
        width: 100% !important;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4, h5, h6 {
        font-size: 1.25rem;
    }

    .theme-selector-container {
        justify-content: center !important;
        margin-bottom: 0.75rem;
    }

    .theme-selector-label {
        font-size: 0.75rem;
    }

    .theme-icon-btn {
        width: 28px;
        height: 28px;
    }

    .theme-icon-btn .material-symbols-outlined {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    .hero-image-top {
        height: 445px;
    }

    .feature-image-container {
        height: 400px;
        display: flex;
    }
}

@media (min-width: 992px) {
    /* On larger screens, hide the toggler and show the full navigation */
    #topnav-lg .navbar-toggler {
        display: none !important;
    }

    /* Show full navbar menu on desktop */
    #topnav-lg .navbar-collapse {
        display: flex !important;
    }

    /* Show the proper navigation type based on the page attribute */
    [data-bs-navigation-position="topnav"] #topnav-lg {
        display: block !important;
    }

    [data-bs-navigation-position="topnav"] .aside,
    [data-bs-navigation-position="topnav"] #sidenav-lg {
        display: none !important;
    }

    [data-bs-navigation-position="sidenav"] #topnav-lg {
        display: none !important;
    }

    [data-bs-navigation-position="sidenav"] .aside,
    [data-bs-navigation-position="sidenav"] #sidenav-lg {
        display: block !important;
    }

    .feature-image-container {
        height: 460px;
    }
}

@media (min-width: 1200px) {
    .hero-image-top {
        height: 534px;
    }
}

@media (max-width: 1199.98px) {
    #sidenav-sm {
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #sidenav-sm.aside {
        position: absolute !important;
        width: 0 !important;
    }
}

/* Reducing from Bootstrap's default 1320px to 1140px */
@media (min-width: 1400px) {
    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        max-width: 1140px !important;
    }
}

/* Mobile optimization for tables */
@media (max-width: 767.98px) {
    /* Ensure wrapping */
    .row [class*="col-"] + [class*="col-"] {
        margin-top: 1rem;
    }

    /* Hide the sidebar on mobile */
    .hide-column-on-mobile {
        display: none;
    }

    .footer-links {
        display: flex !important;
        flex-direction: column !important;
    }

    .footer .row > div {
        margin-bottom: 1.5rem;
    }

    .footer .col-md-2.col-6 {
        width: 100% !important;
    }

    /* Only make table horizontally scrollable on mobile */
    .table-responsive {
        overflow-x: auto !important;
        overflow-y: visible !important;
    }
}

/* Mobile optimization for hero heading */
@media (max-width: 575.98px) {
    .display-3 {
        font-size: 2.2rem !important;
        line-height: 1.2;
        padding-top: 0;
    }
}

/* For slightly larger mobile screens */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-3 {
        font-size: 2.8rem !important;
    }
}

/* ========== Homepage Hero Section ========== */

#topnav-lg .btn {
    font-weight: 600 !important;
}

.blue-theme {
    background-color: #041734 !important;
}
.blue-theme #topnav-lg {
    background-color: #041734;
}
.blue-theme .navbar-brand {
    color: #FFFFFF !important;
}

.blue-theme .btn-outline-primary {
    border-color: #FFFFFF !important;
    color: #FFFFFF !important;
}
.blue-theme .btn-outline-primary:hover {
    background-color: #FFFFFF;
    color: #041734 !important;
}

/* Blue theme - hover state (already exists around line 1330) */
.blue-theme #topnav-lg .nav-link:hover {
    color: #FFFFFF !important;
}

/* Blue theme - active state (add this new rule) */
.blue-theme #topnav-lg .nav-link.active {
    color: #FFFFFF !important;
    text-decoration: none;
}

/* Optional: Add more visual distinction for active state */
.blue-theme #topnav-lg .nav-link.active {
    color: #FFFFFF !important;
    text-decoration: none;
    opacity: 1;
    font-weight: 700;
}

/* Make sure the nav-link has position relative for the pseudo-element */
.blue-theme #topnav-lg .nav-link {
    position: relative;
}

.blue-theme .footer .mb-2 {
    color: #FFFFFF !important;
}

.blue-theme .footer-links li a {
    color: #A8BABE !important;
}
.blue-theme .footer-address {
    color: #A8BABE !important;
}

.hero-title {
    font-size: 3rem;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.2;
    margin: 5rem 0 1.5rem 0;
    letter-spacing: -0.02em;
}

.hero-form {
    max-width: 460px;
    box-shadow: 0 4px 20px rgba(7, 79,170, 0.2);
    margin: 0 auto 2.5rem;
}

.hero-form .input-group {
    background-color: #001027;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid #163050;
}

.hero-input {
    background-color: transparent !important;
    color: #FFFFFF !important;
    font-size: 1.125rem;
    padding: 0.75rem 1.5rem;
}

.hero-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hero-input:focus {
    box-shadow: none !important;
    outline: none !important;
}

.hero-form .btn-primary {
    background-color: #0474FF;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
}

/* Social Proof */
.social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.user-avatars {
    display: flex;
    margin: 4px -8px 0 0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #041734;
    margin-right: -8px;
    position: relative;
}

.user-avatar:first-child {
    z-index: 5;
}
.user-avatar:nth-child(2) {
    z-index: 4;
}
.user-avatar:nth-child(3) {
    z-index: 3;
}
.user-avatar:nth-child(4) {
    z-index: 2;
}
.user-avatar:last-child {
    z-index: 1;
}

.rating-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 12px;
}

.stars {
    color: #FFB800;
    font-size: 1rem;
    display: flex;
    gap: 2px;
}

.stars .material-symbols-outlined {
    font-size: 1rem;
    font-variation-settings: 'FILL' 1;
    color: #FFB800;
}

.rating-info p {
    color: #666F7E;
    font-size: 0.875rem;
    margin: 0;
}

.rating-info strong {
    color: #FFFFFF;
}

/* Works With Section */
.works-with-section {
    padding: 120px 0 80px;
}

.monitor-servers-text {
    text-align: center;
    color: #A8BABE;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.company-logos {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.company-logos:hover {
    opacity: 1;
}

.company-logos img {
    height: 30px;
    filter: grayscale(100%) brightness(2);
    transition: filter 0.3s ease;
}

.company-logos:hover img {
    filter: grayscale(100%) brightness(2.5);
}

/* Features Section */
.features-section {
    padding: 80px 0;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-content {
    flex: 1;
}

.feature-visual {
    flex: 1;
    text-align: center;
}

.feature-icon img {
    height: 40px;
    width: 40px;
}

.feature-content h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.feature-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.feature-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #A8BABE;
}

.feature-content strong {
    font-weight: 600;
}

.feature-screenshot {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(7, 79,170, 0.2);
    border: 1px solid #132A45;
    background-color: #000F26;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1000px;
    margin: 80px auto 0;
}

/* Notifications Section */
.notifications-section {
    padding: 60px 0 80px;
}

.notification-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.notification-icon {
    width: 80px;
    height: 80px;
}

.notification-text {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
    color: #6C757D;
    line-height: 1.6;
}

.coming-soon {
    color: #ADB5BD;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .feature-row,
    .feature-row.reverse {
        flex-direction: column;
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .company-logos {
        gap: 2rem;
    }
}



@media (max-width: 767px) {
    .hero-section {
        padding: 60px 0 40px;
    }

    .hero-title {
        margin-top: 2rem;
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-subtitle br {
        display: none;
    }

    .hero-form .input-group {
        flex-direction: column;
        padding: 0.5rem;
    }

    .hero-input {
        border-radius: 0.375rem;
        margin-bottom: 0.5rem;
    }

    .hero-form .btn-primary {
        width: 100%;
        border-radius: 0.375rem;
    }

    .social-proof {
        flex-direction: column;
        gap: 1rem;
    }

    .company-logos img {
        height: 24px;
    }

    .notification-icon {
        width: 60px;
        height: 60px;
    }

    .features-section {
        padding: 60px 0;
    }

    .feature-row {
        margin-bottom: 4rem;
    }
}

/* Remove old styles that conflict */
.bg-blue-dark {
    display: none;
}

/* Override any conflicting dark theme styles for homepage */
[data-bs-theme="dark"] .hero-section {
    background-color: #041734;
}

[data-bs-theme="dark"] .features-section,
[data-bs-theme="dark"] .notifications-section {
    background-color: #FFFFFF;
}

[data-bs-theme="dark"] .feature-content h2,
[data-bs-theme="dark"] .feature-item h3 {
    color: #212529;
}

[data-bs-theme="dark"] .feature-content p,
[data-bs-theme="dark"] .feature-item p,
[data-bs-theme="dark"] .notification-text {
    color: #6C757D;
}

[data-bs-theme="dark"] .feature-content strong {
    color: #212529;
}


/* Fix for the intro section on docs pages */
/* Add this to your stackchanges.com.css file */

/* First, override the display: none issue */
.intro {
    display: block !important;
    position: relative;
    background-image: url('../img/background-white.svg');
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: auto 20px;
}

/* Ensure proper styling for the docs intro section */
.intro {
    padding-top: 4rem !important;
    padding-bottom: 3rem !important;
    margin-bottom: 0;
    background-color: #f8f9fa; /* Bootstrap's bg-light color */
}

/* Ensure the h1 has proper spacing */
.intro h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: #343a40;
}

/* Style the lead paragraph */
.intro .lead {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.6;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Breadcrumb styling to match */
.intro .breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.intro .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #6c757d;
}

.intro .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
}

.intro .breadcrumb-item a:hover {
    color: #343a40;
    text-decoration: underline;
}

.intro .breadcrumb-item.active {
    color: #6c757d;
}

/* Alternative: If the background image is missing or you want to ensure it works */
.intro::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background-image: url('../img/background-white.svg');
    background-repeat: repeat-x;
    background-size: auto 20px;
    z-index: 0;
}

/* DOCS */

#docs-navigation .nav-link.text-uppercase .material-symbols-outlined {
    margin-left: auto;
    margin-right: 4rem; /* Adjust how far from the right edge */
}


/* ========== Code Snippets with Copy Button ========== */
.snippet-container {
    position: relative;
    margin: 1rem 0;
}

.snippet {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem 3.5rem 1rem 1rem;
    overflow-x: auto;
}

.snippet code {
    font-size: 0.875rem;
    background: transparent;
}

.copy-button {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.375rem 0.5rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.copy-button:hover {
    background: #fff;
    border-color: #adb5bd;
    color: #495057;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.copy-button .material-symbols-outlined {
    font-size: 1rem;
}

.nav-sticky {
    position: sticky;
    top: 20px;
    flex-direction: column !important;
    margin-top: -0.40rem;
}


/* ========== Terms in Short Summary Styling ========== */
.terms-in-short {
    background-color: rgba(5, 8, 64, 0.03);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0 !important;
    border-radius: 0.375rem;
    font-style: italic;
    font-weight: 500;
    position: relative;
    transition: background-color var(--transition-fast);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .terms-in-short {
        padding: 0.875rem 1rem;
        margin-left: 0.5rem !important;
    }

    .terms-in-short::before {
        display: none;
    }
}

/* ========== Logo Size Adjustments for Logged-in Users ========== */

/* Reduce logo size in the side navigation (logged-in state) */
#sidenav-lg .logo-container,
#sidenav-sm .logo-container {
    width: 1.5rem;
    height: 1.0rem;
}

#sidenav-lg .logo-image,
#sidenav-sm .logo-image {
    height: 1.0rem;
    margin-left: -0.3rem;
}

#sidenav-lg .navbar-brand,
#sidenav-sm .navbar-brand {
    padding-top: 0.25rem;
    padding-bottom: 0.4rem;
}

/* Dashboard additions */
.pagination {
    --bs-pagination-active-bg: #05f;
    --bs-pagination-active-border-color: #05f;
    --bs-pagination-active-color: #fff;
}

/* Alert bell icon styling */
.alert-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: color 0.15s ease-in-out;
    position: relative;
    vertical-align: middle;
}

.alert-bell .material-symbols-outlined {
    font-size: 12px;
    font-variation-settings: 'FILL' 0;
    line-height: 1;
}


/* Port badges responsive */
.port-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

/* Dark mode tooltip styling for ApexCharts */
[data-bs-theme="dark"] .apexcharts-tooltip {
    background: #2c3034 !important;
    color: #ffffff !important;
    border: 1px solid #495057 !important;
}

[data-bs-theme="dark"] .apexcharts-tooltip-title {
    background: #495057 !important;
    color: #ffffff !important;
    border-bottom: 1px solid #6c757d !important;
}

[data-bs-theme="dark"] .apexcharts-tooltip-text {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .apexcharts-tooltip-series-group {
    background: #2c3034 !important;
}

/* Dark mode snippet styling */
[data-bs-theme="dark"] .snippet-container {
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    padding: 0;
}

[data-bs-theme="dark"] .snippet {
    background: #1a1d20 !important;
    border: 1px solid #3a3f44 !important;
    color: #e9ecef !important;
}

[data-bs-theme="dark"] .snippet pre {
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

[data-bs-theme="dark"] .snippet code {
    background: transparent !important;
    color: #e9ecef !important;
    white-space: pre-wrap;
    padding: 0;
}

[data-bs-theme="dark"] .snippet a {
    color: #66b3ff !important;
}

[data-bs-theme="dark"] .snippet a:hover {
    color: #80c7ff !important;
}

/* Light mode snippet styling for consistency */
.snippet-container {
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    padding: 0;
}

.snippet {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
}

.snippet pre {
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.snippet code {
    font-size: 0.875rem;
    background: transparent;
    color: #495057;
    white-space: pre-wrap;
    padding: 0;
}

