/* ===================================
   ULTRABLOCK.ORG - 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 - UPDATED TO GREEN */
    --primary-color: #1B9E74;
    --primary-light: rgba(27, 158, 116, 0.1);
    --primary-dark: #1EA176;
    --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 - UPDATED SHADOW */
    --badge-padding: 0.35rem 0.65rem;
    --card-border-radius: 0.5rem;
    --btn-shadow: 0 2px 4px rgba(27, 158, 116, 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: 48px;
    font-weight: 700;
    line-height: 1.2;
}

.display-3 {
    font-size: 3.5rem;

}

.display-4 {
    font-size: 3.3rem;
}

h2 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
}

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

h5 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

h6 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

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

.lead {
    font-size: 1.2rem;
    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: 20px;
    margin: 14px 0 20px 0;
}

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

/* ADDED - Navigation logo */
nav .logo {
    margin-top: -4px;
    height: 32px;
}

/* ADDED - UltraBlock logo */
#ultrablock-logo {
    margin: -6px 0 0 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: 0rem;
    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: 2.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;
}

/* ADDED - Footer logo */
footer .logo {
    margin-top: -4px;
    height: 16px;
}

.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;
}

/* ADDED - Footer browser install buttons */
#install-chrome img {
    height: 32px;
    margin: 0 12px 0 8px;
}

#install-edge img {
    height: 32px;
    margin: 0 12px 0 0;
}

#install-firefox img {
    height: 32px;
    margin: 0 0 0 0;
}

/* ========== 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 */
.green-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");
}

/* 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(--text-primary);
    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;
}

/* ADDED - Homepage navbar */
.navbar-absolute {
    position: absolute;
    background-color: transparent!important;
}

/* ========== 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;
}

/* ADDED - Settings checkbox */
.checkbox-left .form-check {
    padding-left: 0!important;
}

.checkbox-left .form-check label {
    cursor: pointer;
}

/* ========== 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);
}

/* Primary color overrides */
.bg-primary,
.btn-primary {
    background-color: #1B9E74!important;
    border-color: #1B9E74!important;
}

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

/* ========== 7. Cards & Containers ========== */
/* Card styling */
.card {
    border-radius: var(--card-border-radius);
    border: 1px solid var(--border-color);
}

.card-header {
    background-color: var(--bg-lighter);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background-color: var(--bg-lighter);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

/* ADDED - Homepage sections */
#install-extension {
    margin: 0 0 -66px -12px;
}

#install-extension .btn {
    margin-top: 24px;
}

.statistics-separator {
    margin-bottom: 80px;
}

.counter {
    margin: -60px 0 -100px 0;
}

.browser-logos {
    padding: 40px 0 0 0;
}

.browser-logo {
    border-bottom: none;
}

/* ADDED - Carousel */
.carousel {
    display: flex;
    float: right;
    margin: -398px -30px 0 0;
}

video {
    display: none;
}

.carousel-indicators {
    margin-top: 100px;
}

.carousel-indicators li:after {
    background-color: #1EA176;
}

.carousel-control-prev {
    border-bottom: none;
}

.carousel-control-next {
    border-bottom: none;
}

/* ========== 8. Tables ========== */
/* Table styling */
.table {
    border-collapse: collapse;
    width: 100%;
}

.table thead th {
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    padding: 0.75rem;
    vertical-align: bottom;
}

.table tbody td {
    border-top: 1px solid var(--border-color);
    padding: 0.75rem;
    vertical-align: top;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Changelog table column widths */
.changelog-table thead th:nth-child(1) {
    width: 10%;
}

.changelog-table thead th:nth-child(2) {
    width: 16%;
}

/* ========== 9. Feature Sections & Homepage Components ========== */

.feature-icon {
    font-size: 48px;
}


/* 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;
}

/* Articles styling */
article h3 {
    margin-top: 40px;
}

.page-item.active .page-link {
    background-color: #1EA176;
    border-color: #1EA176;
}

/* ========== 10. Interactive Features & Toggles ========== */
/* 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);
}

/* ========== 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;
}

/* Remove underlines from browser logo links */
.browser-logo,
a.browser-logo {
    border-bottom: none !important;
}

/* Browser logos section - remove underlines from all links */
.browser-logos a {
    border-bottom: none !important;
}

/* Remove underlines from links that only contain images */
section a:has(> img:only-child) {
    border-bottom: none !important;
}

/* Green theme - also remove underlines from image-only links */
.green-theme section a:has(> img:only-child) {
    border-bottom: none !important;
}

/* ========== 12. Dark Mode & Themes ========== */
/* Logo theming and containers */
.logo-container {
    width: 2rem;
    height: 2.5rem;
    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);
}

/* ========== GREEN THEME (Homepage) ========== */

/* Green theme - base body background */
.green-theme {
    background-color: #1B9E74 !important;
}

.btn-outline-primary {
    border-color: #FFFFFF !important;
    color: #FFFFFF !important;
}

.btn-outline-primary:hover {
    background-color: #FFFFFF;
    color: #1B9E74 !important;
}

/* Green theme - ALL headings white */
.green-theme h1,
.green-theme h2,
.green-theme h3,
.green-theme h4,
.green-theme h5,
.green-theme h6,
.green-theme .h1,
.green-theme .h2,
.green-theme .h3,
.green-theme .h4,
.green-theme .h5,
.green-theme .h6,
.green-theme .display-1,
.green-theme .display-2,
.green-theme .display-3,
.green-theme .display-4,
.green-theme .display-5,
.green-theme .display-6 {
    color: #FFFFFF !important;
}

/* Green theme - ALL text with softer white for paragraphs */
.green-theme p,
.green-theme .lead,
.green-theme li,
.green-theme span,
.green-theme div {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Green theme - links white */
.green-theme a {
    color: #FFFFFF !important;
}

.green-theme a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Green theme - section links */
.green-theme section a {
    color: #FFFFFF !important;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.green-theme section a:hover {
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

/* Green theme - footer */
.green-theme footer {
    background-color: #1B9E74 !important;
}

.green-theme footer,
.green-theme footer * {
    color: #FFFFFF !important;
}

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

.green-theme footer .footer-brand {
    color: #FFFFFF !important;
}

.green-theme footer .footer-links li a {
    color: rgba(255, 255, 255, 0.85) !important;
}

.green-theme footer .footer-links li a:hover {
    color: #FFFFFF !important;
}

.green-theme footer .text-body-secondary {
    color: rgba(255, 255, 255, 0.85) !important;
}

.green-theme footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Green theme - badges and other elements */
.green-theme .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #FFFFFF !important;
}

/* Green theme - disabled button should look like a button */
.green-theme .btn:disabled,
.green-theme .btn[disabled] {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #FFFFFF !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

/* Green theme - rating stars should be yellow */
.green-theme .text-warning {
    color: #ffc107 !important;
}

/* Green theme - primary buttons should be semi-transparent WHITE with white text */
.green-theme .btn-primary:not(:disabled):not([disabled]) {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #FFFFFF !important;
}

.green-theme .btn-primary:not(:disabled):not([disabled]):hover {
    background-color: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #FFFFFF !important;
}

/* Green theme - make sure links styled as buttons also get transparent background */
.green-theme a.btn-primary {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #FFFFFF !important;
    display: inline-block;
}

.green-theme a.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #FFFFFF !important;
    text-decoration: none;
}


/* Browser logos section - add more spacing */
.browser-section {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* Or adjust on mobile */
@media (max-width: 767.98px) {
    .browser-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* ========== 13. Media Queries & Responsiveness ========== */

/* Reducing from Bootstrap's default 1320px to 1140px */
@media (min-width: 1200px) {
    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl {
        max-width: 1140px !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;
    }
}

/* ADDED - Video and carousel responsive */
@media (min-width:992px) {
    video {
        display: flex;
    }
}

@media (max-width:992px) {
    .navbar-absolute {
        position: relative;
        background-color: #1B9E74!important;
        margin-bottom: -88px;
    }
    .carousel {
        display: none;
    }
    .hide-column-on-mobile {
        display: none;
    }
    .hide-image-on-mobile {
        display: none;
    }
}

/* 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;
    }
}

/* ========== 14. Page-Specific Styles (formerly in templates) ========== */

/* Homepage navigation with green theme */
#topnav-lg .navbar-brand {
    color: rgba(255, 255, 255, 1) !important;
}
#topnav-lg .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
}
#topnav-lg .nav-link:hover,
#topnav-lg .nav-link.active {
    color: rgba(255, 255, 255, 1) !important;
}

/* Page header and breadcrumb styles for pages with primary background */
.page-header .lead {
    color: rgba(255, 255, 255, 1) !important;
}
.breadcrumb-container {
    padding-bottom: 2.5rem;
}
.breadcrumb-container .breadcrumb {
    margin-bottom: 0;
}
.breadcrumb-container .breadcrumb-item a {
    color: rgba(255, 255, 255, 1) !important;
    text-decoration: underline;
}
.breadcrumb-container .breadcrumb-item a:hover {
    color: rgba(255, 255, 255, 1) !important;
    text-decoration: underline;
}
.breadcrumb-container .breadcrumb-item.active {
    color: rgba(255, 255, 255, 1) !important;
}
.breadcrumb-container .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 1) !important;
}

/* Form check input styling for settings and uninstall pages */
.form-check-input:checked {
    background-color: #22c55e;
    border-color: #22c55e;
}
.form-check-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 0.25rem rgba(34, 197, 94, 0.25);
}

/* Sticky navigation and content links for legal pages */
.nav-sticky {
    position: sticky;
    top: 20px;
    align-self: flex-start;
}
.col-md-9 a {
    color: inherit;
    text-decoration: underline;
}
.col-md-9 a:hover {
    color: inherit;
    text-decoration: underline;
}

/* ========== 15. FAQ Styles (Homepage) ========== */

/* Bootstrap Accordion Styles for FAQ */
.accordion-button {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;
    padding: 1.5rem 0;
}

.accordion-button:not(.collapsed) {
    box-shadow: none;
}

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

.accordion-body {
    font-size: 1rem;
    line-height: 1.7;
    padding-top: 0;
    padding-bottom: 1.5rem;
}

/* Green theme - accordion styling */
.green-theme .accordion-button {
    color: #FFFFFF !important;
}

.green-theme .accordion-button:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.green-theme .accordion-button::after {
    filter: brightness(0) invert(1);
}

.green-theme .accordion-body {
    color: rgba(255, 255, 255, 0.85) !important;
}

.green-theme .accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.green-theme .accordion-item:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 767.98px) {
    .accordion-button {
        padding: 1.25rem 0;
        font-size: 1rem;
    }

    .accordion-body {
        font-size: 0.9375rem;
        padding-bottom: 1.25rem;
    }
}

/* ========== 16. Shield Animation (Homepage Hero) ========== */

/* Shield animation styles */
.shield-container {
    position: relative;
    display: inline-block;
}

.shield-image {
    position: relative;
    z-index: 2;
}

.orbit {
    position: absolute;
    border: 4px dotted rgba(34, 197, 94, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    pointer-events: none;
}

.orbit-1 {
    width: 120%;
    height: 80%;
    animation: rotate1 6s linear infinite;
}

.orbit-2 {
    width: 130%;
    height: 70%;
    animation: rotate2 8s linear infinite reverse;
    border-color: rgba(34, 197, 94, 0.25);
}

.orbit-3 {
    width: 140%;
    height: 85%;
    animation: rotate3 10s linear infinite;
    border-color: rgba(34, 197, 94, 0.2);
}

.orbit-4 {
    width: 150%;
    height: 75%;
    animation: rotate4 12s linear infinite reverse;
    border-color: rgba(34, 197, 94, 0.18);
}

.orbit-5 {
    width: 160%;
    height: 90%;
    animation: rotate5 14s linear infinite;
    border-color: rgba(34, 197, 94, 0.15);
}

.orbit-6 {
    width: 170%;
    height: 80%;
    animation: rotate6 16s linear infinite reverse;
    border-color: rgba(34, 197, 94, 0.12);
}

@keyframes rotate1 {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotate2 {
    from { transform: translate(-50%, -50%) rotate(30deg); }
    to { transform: translate(-50%, -50%) rotate(390deg); }
}

@keyframes rotate3 {
    from { transform: translate(-50%, -50%) rotate(-20deg); }
    to { transform: translate(-50%, -50%) rotate(340deg); }
}

@keyframes rotate4 {
    from { transform: translate(-50%, -50%) rotate(45deg); }
    to { transform: translate(-50%, -50%) rotate(405deg); }
}

@keyframes rotate5 {
    from { transform: translate(-50%, -50%) rotate(-10deg); }
    to { transform: translate(-50%, -50%) rotate(350deg); }
}

@keyframes rotate6 {
    from { transform: translate(-50%, -50%) rotate(60deg); }
    to { transform: translate(-50%, -50%) rotate(420deg); }
}

/* Pulse effect on shield */
.shield-image {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.6));
    }
}
