/* AMDEES Core Brand Color Palette & Design System (from amdees.com) */
:root {
    --amdees-primary: #0a9396;
    --amdees-primary-hover: #087d80;
    --amdees-navy: #0b3d91;
    --amdees-blue: #1155cc;
    --amdees-light-bg: #ffffff;
    --amdees-card-border: #e2e8f0;
    --amdees-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
    --amdees-shadow-md: 0 4px 16px rgba(10, 147, 150, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    --amdees-shadow-hover: 0 6px 20px rgba(10, 147, 150, 0.1);
    --font-family-base: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    background-color: #ffffff !important;
}

body {
    font-family: var(--font-family-base);
    background-color: #ffffff !important;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

/* Fixed Faint Gray AMDEES Watermark (Visible on Every Page) */
body::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    max-width: 80vw;
    max-height: 80vh;
    background-image: url('watermark.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.06;
    pointer-events: none;
    z-index: 1030;
}

@media (min-width: 992px) {
    body.page-sidebar-layout::after,
    body:has(.col-lg-right-80)::after {
        left: 60%;
        width: 650px;
        height: 650px;
        max-width: 55vw;
    }
}

/* Fluid Images Utility Override */
.img-fluid {
    max-width: 100% !important;
    height: auto;
}

/* Sticky Header Bar (Pure White Background & Subtle Border) */
#mainHeader {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    padding-top: 0.9rem !important;
    padding-bottom: 0.9rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    z-index: 1040 !important;
    width: 100%;
    box-sizing: border-box;
}

.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    max-width: 135px;
    transition: transform 0.2s ease;
}

.header-logo:hover {
    transform: scale(1.02);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem !important;
    margin-right: 0.25rem;
}
tr.colored td {
    color: var(--amdees-primary) !important;
}
.clored-two {
    color: orange !important;
}
/* Desktop Width Split & Sticky Sidebar Positioning with Vertical Scroll */
@media (min-width: 992px) {
    .col-lg-left-20 {
        flex: 0 0 20% !important;
        max-width: 20% !important;
        width: 20% !important;
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 85px !important;
        max-height: calc(100vh - 100px) !important; /* Fits within viewport below header */
        overflow-y: auto !important;                /* Enables vertical scrolling for sidebar links */
        align-self: flex-start !important;
        z-index: 1020 !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .col-lg-right-80 {
        flex: 0 0 80% !important;
        max-width: 80% !important;
        width: 80% !important;
    }

    .side-nav-wrapper {
        position: relative !important;
        top: 0 !important;
        background: #ffffff !important;
        border: none;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .sidebar-inner {
        position: relative !important;
    }
}

/* Custom Sleek Scrollbar for Left Sidebar Navigation */
.col-lg-left-20::-webkit-scrollbar {
    width: 4px;
}

.col-lg-left-20::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.col-lg-left-20::-webkit-scrollbar-thumb {
    background: var(--amdees-primary);
    border-radius: 2px;
}

.col-lg-left-20::-webkit-scrollbar-thumb:hover {
    background: var(--amdees-primary-hover);
}

/* Section Card Wrappers (Pure White Background & Soft Borders) */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.content-section {
    scroll-margin-top: 105px;
    background: #ffffff !important;
    border: 1px solid var(--amdees-card-border);
    border-radius: 10px;
    box-shadow: var(--amdees-shadow-sm);
    padding: 1.75rem 2rem;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.content-section:hover {
    box-shadow: var(--amdees-shadow-hover);
    border-color: rgba(10, 147, 150, 0.3);
}

.content-section p {
    color: #334155;
    font-size: 0.975rem;
    line-height: 1.7;
}

/* Headings with Rich Accent Bar & Primary Brand Color (#0a9396) */
.amdees-heading {
    color: var(--amdees-primary) !important;
    font-weight: 700 !important;
    letter-spacing: -0.015em;
    position: relative;
    padding-left: 0.75rem;
    border-left: 4px solid var(--amdees-primary);
}

/* Primary Button Styling */
.btn-amdees-primary {
    background-color: var(--amdees-primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--amdees-primary) !important;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.45rem 1.15rem;
    box-shadow: 0 2px 6px rgba(10, 147, 150, 0.2) !important;
    transition: all 0.2s ease-in-out;
}

.btn-amdees-primary:hover {
    background-color: var(--amdees-primary-hover) !important;
    border-color: var(--amdees-primary-hover) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 147, 150, 0.3) !important;
}

/* Outline Button Styling */
.btn-amdees-outline {
    background-color: #ffffff !important;
    color: var(--amdees-primary) !important;
    border: 1px solid var(--amdees-primary) !important;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.45rem 1.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease-in-out;
}

.btn-amdees-outline:hover {
    background-color: var(--amdees-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(10, 147, 150, 0.2) !important;
}

/* Mobile Responsive Header Adjustments */
@media (max-width: 991.98px) {
    #mainHeader {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1050 !important;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    body {
        padding-top: 62px !important;
    }

    .header-logo {
        height: 28px !important;
        max-width: 95px !important;
    }

    .header-actions {
        gap: 0.35rem !important;
        margin-right: 0.15rem;
    }

    #mainHeader .header-actions .btn {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 480px) {
    #mainHeader {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }

    body {
        padding-top: 54px !important;
    }

    .header-logo {
        height: 24px !important;
        max-width: 80px !important;
    }

    .header-actions {
        gap: 0.25rem !important;
        margin-right: 0.1rem;
    }

    #mainHeader .header-actions .btn {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.4rem !important;
    }
}

/* Mobile Specific Typography & Spacing Overrides (< 768px) */
@media (max-width: 767.98px) {
    /* Page & Card Spacing */
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .content-section, .supp-card {
        padding: 1.25rem 1rem !important;
        border-radius: 8px !important;
    }

    .content-section {
        scroll-margin-top: 75px !important;
    }

    /* Mobile Headings Scaling */
    h1, .h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    h2, .h2, .amdees-heading {
        font-size: 1.2rem !important;
        line-height: 1.35 !important;
        padding-left: 0.6rem !important;
        border-left-width: 3px !important;
    }

    h3, .h3 {
        font-size: 1.1rem !important;
        line-height: 1.35 !important;
    }

    h4, .h4 {
        font-size: 1.025rem !important;
        line-height: 1.4 !important;
    }

    h5, .h5, h6, .h6 {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
    }

    /* Paragraphs & List Items */
    .content-section p, .supp-card p, body p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }

    ul, ol {
        padding-left: 1.1rem !important;
    }

    ul li, ol li {
        font-size: 0.875rem !important;
        line-height: 1.55 !important;
    }

    /* Table Typography & Compact Padding */
    .table th {
        font-size: 0.775rem !important;
        padding: 0.5rem 0.6rem !important;
        letter-spacing: 0.02em !important;
    }

    .table td {
        font-size: 0.825rem !important;
        padding: 0.5rem 0.6rem !important;
    }

    /* Badges & Monospace Code Elements */
    .badge {
        font-size: 0.725rem !important;
        padding: 0.35em 0.6em !important;
    }

    code, kbd, samp, pre, .font-monospace {
        font-size: 0.8rem !important;
    }
}

/* Extra Small Mobile Devices (< 480px) */
@media (max-width: 480px) {
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .content-section, .supp-card {
        padding: 1rem 0.85rem !important;
    }

    h1, .h1 {
        font-size: 1.35rem !important;
    }

    h2, .h2, .amdees-heading {
        font-size: 1.125rem !important;
    }

    .content-section p, .supp-card p, body p {
        font-size: 0.875rem !important;
        line-height: 1.55 !important;
    }

    .table th, .table td {
        font-size: 0.775rem !important;
        padding: 0.45rem 0.5rem !important;
    }
}

/* Sidebar Navigation Links */
.sidebar-nav .nav-link {
    color: #475569 !important;
    font-size: 0.9rem;
    padding-left: 0.5rem;
    padding-right: 0;
    margin-bottom: 0.15rem;
    border-left: 3px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: all 0.15s ease-in-out;
}

.sidebar-nav .nav-link.level-1 {
    font-size: 0.95rem;
    color: #1e293b !important;
    font-weight: 600;
}

.sidebar-nav .nav-link.level-2 {
    font-size: 0.85rem;
    color: #64748b !important;
}

.sidebar-nav .nav-link:hover {
    color: var(--amdees-primary) !important;
    text-decoration: none;
    background-color: rgba(10, 147, 150, 0.04);
    border-left-color: rgba(10, 147, 150, 0.4);
}

/* ScrollSpy Active Link (Rich Primary Highlight & Left Indicator Border) */
.sidebar-nav .nav-link.active {
    color: var(--amdees-primary) !important;
    font-weight: 700 !important;
    border-left: 3px solid var(--amdees-primary) !important;
    background-color: rgba(10, 147, 150, 0.08) !important;
    text-decoration: none !important;
}

/* Supplements Links */
.supplements-menu a {
    color: #334155 !important;
    font-size: 0.875rem;
    display: inline-block;
    transition: color 0.15s ease;
}

.supplements-menu a:hover {
    color: var(--amdees-primary) !important;
    text-decoration: underline;
}

/* Rich Table Styling */
.table {
    border-color: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.table-responsive {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
}

.table-dark-primary {
    background-color: var(--amdees-primary) !important;
    color: #ffffff !important;
}

.table-dark-primary th {
    background-color: var(--amdees-primary) !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem;
    border: none;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: rgba(10, 147, 150, 0.025) !important;
}

.table tbody td {
    padding: 0.75rem 1rem;
    color: #334155;
    font-size: 0.925rem;
}

/* Container Max Width for Supplement & Credentials Pages */
.max-w-960 {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.supp-card {
    background: #ffffff !important;
    border: 1px solid var(--amdees-card-border);
    border-radius: 10px;
    box-shadow: var(--amdees-shadow-sm);
    padding: 2rem;
}

/* Offcanvas customization for mobile overlay & z-index */
.offcanvas-backdrop {
    z-index: 1055 !important;
}

.offcanvas, .offcanvas-lg {
    background-color: #ffffff !important;
    z-index: 1060 !important;
}

/* Fully Responsive Badge Utility Overrides */
.badge {
    white-space: normal !important;
    text-wrap: wrap !important;
    word-break: break-word !important;
    max-width: 100% !important;
    line-height: 1.4 !important;
    display: inline-block !important;
    text-align: left;
}

/* Section Listen Speaker Button (Top Right of Section Cards) */
.section-audio-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 0.28rem 0.75rem;
    font-size: 0.775rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.section-audio-btn:hover {
    background-color: rgba(10, 147, 150, 0.08);
    color: var(--amdees-primary);
    border-color: var(--amdees-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(10, 147, 150, 0.15);
}

.section-audio-btn.is-playing {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
    animation: fab-pulse-green 1.8s infinite;
}

.section-audio-btn.is-paused {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border-color: #f59e0b !important;
}

/* Active Reading Section Visual Highlight */
.audio-reading-active {
    border-color: var(--amdees-primary) !important;
    box-shadow: 0 0 0 2px rgba(10, 147, 150, 0.25), 0 8px 24px rgba(10, 147, 150, 0.1) !important;
    transition: all 0.3s ease;
}

/* Floating Audio Reader Widget (FAB Container) */
.amdees-fab-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.amdees-fab-badge {
    background-color: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.45rem 0.95rem;
    border-radius: 20px;
    font-size: 0.775rem;
    font-weight: 600;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-dot {
    font-size: 0.65rem;
}

.amdees-fab-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    border-radius: 50px;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    outline: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.amdees-fab-main {
    background-color: var(--amdees-primary);
    box-shadow: 0 4px 16px rgba(10, 147, 150, 0.35);
}

.amdees-fab-main:hover {
    background-color: var(--amdees-primary-hover);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(10, 147, 150, 0.45);
    color: #ffffff;
}

.amdees-fab-selection {
    background-color: #8b5cf6 !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35) !important;
}

.amdees-fab-selection:hover {
    background-color: #7c3aed !important;
}

.amdees-fab-pause {
    background-color: #f59e0b !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35) !important;
}

.amdees-fab-pause:hover {
    background-color: #d97706 !important;
    transform: translateY(-2px);
}

.amdees-fab-resume {
    background-color: #10b981 !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35) !important;
    animation: fab-pulse-green 1.8s infinite;
}

.amdees-fab-resume:hover {
    background-color: #059669 !important;
    transform: translateY(-2px);
}

.amdees-fab-restart {
    background-color: #3b82f6 !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35) !important;
    padding: 0.65rem 0.95rem !important;
}

.amdees-fab-restart:hover {
    background-color: #2563eb !important;
    transform: translateY(-2px);
}

.amdees-fab-stop {
    background-color: #ef4444 !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35) !important;
    padding: 0.65rem 0.95rem !important;
}

.amdees-fab-stop:hover {
    background-color: #dc2626 !important;
    transform: translateY(-2px);
}

@keyframes fab-pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@media (max-width: 767.98px) {
    .section-audio-btn {
        top: 0.85rem;
        right: 0.85rem;
        padding: 0.2rem 0.55rem;
        font-size: 0.725rem;
    }

    .amdees-fab-badge {
        display: none !important;
    }

    .amdees-fab-container {
        bottom: 18px;
        right: 18px;
        gap: 0.35rem;
    }

    .amdees-fab-btn {
        padding: 0.55rem 0.95rem;
        font-size: 0.8rem;
    }
}

/* Print Support for Watermark & Clean PDF Export */
@media print {
    body::after {
        opacity: 0.05 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .section-audio-btn,
    .amdees-fab-container,
    #mainHeader .header-actions {
        display: none !important;
    }
}
