/**
 * Experiture Help System - Common Styles
 * Centralized styles for all help documentation pages
 * For future theming and consistent design across all pages
 */

/* ===== GLOBAL RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BODY & BASE STYLES ===== */
body {
    background: linear-gradient(135deg, #f0f0f0 0%, #e8f4f8 50%, #f0f0f0 100%);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #666666;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(18, 170, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(12, 61, 98, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 193, 7, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    background-color: #f0f0f0;
    min-height: 100vh;
}

/* ===== COMPACT HEADER (REMOVED - Platform will provide header) ===== */
/* Old toolbar styles removed - using new compact header below */

/* ===== NEW COMPACT SECONDARY HEADER ===== */
.compact-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    -moz-backdrop-filter: blur(50px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    height: 50px;
    box-shadow: 0 2px 8px rgba(18, 170, 226, 0.08), 0 1px 3px rgba(18, 170, 226, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    isolation: isolate;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
}

/* ===== NAVIGATION MENU ===== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-item {
    position: relative;
    color: #0C3D62;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-item:hover {
    color: #12AAE2;
}

.nav-item::after {
    content: '▼';
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
    display: inline-block;
    transform: rotate(90deg);
    vertical-align: middle;
}

.nav-item.active::after {
    transform: rotate(0deg);
}

.nav-item.closing::after {
    transform: rotate(90deg);
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 6px);
    right: -12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(80px);
    -webkit-backdrop-filter: blur(80px);
    -moz-backdrop-filter: blur(80px);
    min-width: 290px;
    max-width: 320px;
    width: max-content;
    box-shadow: 0 8px 32px rgba(18, 170, 226, 0.15), 0 4px 16px rgba(18, 170, 226, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 20px;
    z-index: 1000;
    margin-top: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #0C3D62;
    text-align: left;
    font-weight: 600;
    isolation: isolate;
    transform: scale(0.95) translateY(0px);
    transition: visibility 0s, opacity 0.3s ease, transform 0.3s ease;
}

.toc-link {
    display: block;
    color: #0C3D62;
    text-decoration: none;
    padding: 8px 12px 8px 32px;
    margin: 4px 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 13px;
    text-indent: -1.5em;
    white-space: nowrap;
}

.toc-link:hover {
    background: rgba(12,61,98,0.5);
    color: #fff;
    transform: translateX(4px);
}

.nav-item.active .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: scale(1.02) translateY(6px);
}

.nav-item.closing .dropdown-content {
    opacity: 0;
    transform: scale(0.95) translateY(0px);
}

.nav-item.active {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ===== BLUR EFFECTS ===== */
body.dropdown-active .toolbar h1,
body.dropdown-active .nav-item:not(.active),
body.dropdown-active .content > * {
    filter: blur(2px);
    transition: filter 0.3s ease;
}

/* Remove blur immediately when closing starts */
body.dropdown-active .nav-item.closing,
body.dropdown-active .nav-item.closing .dropdown-content,
body.dropdown-active .nav-item.closing ~ * {
    filter: none !important;
}

/* ===== CONTENT STYLING ===== */
.content {
    padding: 20px;
    max-width: calc(100vw - 320px) !important; /* Prevent overflow - 280px sidebar + 40px padding */
    overflow-x: hidden !important; /* Prevent horizontal scroll */
    overflow-y: visible !important; /* Allow badges/labels to overflow vertically */
    box-sizing: border-box !important;
}

/* ===== CONTENT SECTIONS WRAPPER ===== */
.content-sections-wrapper {
    max-width: calc(100vw - 320px) !important; /* Account for sidebar */
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.hero-section {
    min-height: 50vh;
    height: auto;
    background: radial-gradient(circle at center, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.00) 70%), #0C3D62;
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    border: 1.5px solid rgba(255,255,255,0.10);
    border-radius: 20px;
    margin: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(18, 170, 226, 0.12), 0 2px 10px rgba(18, 170, 226, 0.08);
    position: relative;
    flex-wrap: wrap;
    gap: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
    transform: skewX(-15deg);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.hero-section:hover::before {
    left: 100%;
}

.hero-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(18, 170, 226, 0.2), 0 6px 20px rgba(18, 170, 226, 0.1);
    border-color: rgba(18, 170, 226, 0.4);
}

.hero-content {
    flex: 1;
    min-width: 300px;
    color: white;
}

.hero-subtitle {
    color: #12AAE2;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 32px;
    font-weight: 200;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(18, 170, 226, 0.15);
}

/* ===== SECTION CARDS ===== */
.section-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    -moz-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 40px;
    margin: 20px 20px;
    box-shadow: 0 2px 8px rgba(18, 170, 226, 0.08), 0 1px 3px rgba(18, 170, 226, 0.05);
    position: relative;
    isolation: isolate;
    overflow-x: hidden; /* Prevent horizontal overflow */
    overflow-y: visible; /* Allow badges/labels to overflow vertically */
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
    transform: skewX(-15deg);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.section-card:hover::before {
    left: 100%;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(18, 170, 226, 0.15), 0 4px 15px rgba(18, 170, 226, 0.1);
    border-color: rgba(18, 170, 226, 0.3);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #0C3D62;
    margin-bottom: 20px;
    border-bottom: 2px solid #12AAE2;
    padding-bottom: 10px;
}

.section-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #0C3D62;
    margin: 35px 0 20px 0;
}

/* ===== CONCEPT CARDS ===== */
.concept-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.5) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    -moz-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 28px;
    margin: 35px 0;
    position: relative;
    box-shadow: 0 8px 32px rgba(18, 170, 226, 0.1), 0 4px 16px rgba(18, 170, 226, 0.06);
    transition: all 0.3s ease;
    line-height: 1.7;
    overflow-x: hidden; /* Prevent horizontal overflow */
    overflow-y: visible; /* Allow badges (::before with top: -10px) to show */
}

.concept-card::after {
    content: '';
    display: table;
    clear: both;
}

.concept-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(18, 170, 226, 0.15), 0 6px 20px rgba(18, 170, 226, 0.08);
    border-color: rgba(18, 170, 226, 0.4);
}

.concept-card::before {
    content: attr(data-step);
    position: absolute;
    top: -10px;
    left: 20px;
    background: #12AAE2;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.concept-card h4 {
    color: #0C3D62;
    margin-top: 20px;
    margin-bottom: 18px;
}

/* ===== INFO BOXES ===== */
.info-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    -moz-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 4px solid #12AAE2;
    padding: 22px;
    border-radius: 12px;
    margin: 35px 0;
    box-shadow: 0 4px 20px rgba(18, 170, 226, 0.08), 0 2px 10px rgba(18, 170, 226, 0.04);
    transition: all 0.3s ease;
    line-height: 1.6;
}

.info-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(18, 170, 226, 0.1), 0 3px 15px rgba(18, 170, 226, 0.06);
}

.info-box h3, .info-box h4 {
    color: #0C3D62;
}

.warning-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    -moz-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 4px solid #FFC107;
    padding: 22px;
    border-radius: 12px;
    margin: 35px 0;
    box-shadow: 0 4px 20px rgba(18, 170, 226, 0.08), 0 2px 10px rgba(18, 170, 226, 0.04);
    transition: all 0.3s ease;
    line-height: 1.6;
}

.warning-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(18, 170, 226, 0.1), 0 3px 15px rgba(18, 170, 226, 0.06);
}

.warning-box h3, .warning-box h4 {
    color: #0C3D62;
    margin-top: 20px;
    margin-bottom: 20px;
}

.success-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    -moz-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 4px solid #4CAF50;
    padding: 20px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(18, 170, 226, 0.08), 0 2px 10px rgba(18, 170, 226, 0.04);
    transition: all 0.3s ease;
}

.success-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(18, 170, 226, 0.1), 0 3px 15px rgba(18, 170, 226, 0.06);
}

.success-box h3, .success-box h4 {
    color: #0C3D62;
    margin-bottom: 20px;
}

/* ===== BOLD TEXT STYLING ===== */
strong {
    color: #0C3D62;
}

/* ===== TABLE OF CONTENTS ===== */
.toc {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    -moz-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 30px 30px 30px 10px; /* Reduced left padding to compensate for .step-indent margin (10px + 20px indent = 30px visual balance) */
    margin: 20px 20px;
    box-shadow: 0 2px 8px rgba(18, 170, 226, 0.08), 0 1px 3px rgba(18, 170, 226, 0.05);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition: all 0.3s ease;
}

.toc::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
    transform: skewX(-15deg);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.toc:hover::before {
    left: 100%;
}

.toc:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(18, 170, 226, 0.15), 0 4px 15px rgba(18, 170, 226, 0.1);
    border-color: rgba(18, 170, 226, 0.3);
}

.toc h3 {
    color: #0C3D62;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 10px;
}

.toc a {
    color: #12AAE2;
    text-decoration: none;
    padding: 8px 0;
    display: block;
    transition: color 0.3s;
    font-weight: 500;
}

.toc a:hover {
    color: #0C3D62;
}

/* ===== SCREENSHOT PLACEHOLDERS ===== */
.screenshot-placeholder {
    background-color: #12AAE2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(18, 170, 226, 0.3);
    font-size: 72px;
    overflow: hidden;
}

.screenshot-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* ===== PARTICLES ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: floatUp 8s linear infinite;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    60% {
        opacity: 1;
    }
    80% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(20px) translateX(0);
        opacity: 0;
    }
}

/* ===== SECTION HIGHLIGHT ANIMATION ===== */
.section-highlight {
    animation: sectionBounce 1.2s ease-out;
}

.concept-card.section-highlight {
    animation: conceptCardBounce 1.2s ease-out;
}

@keyframes sectionBounce {
    0% {
        background: rgba(18, 170, 226, 0.05);
        border: 1px solid rgba(18, 170, 226, 0.05);
        transform: scale(1);
    }
    15% {
        background: rgba(18, 170, 226, 0.15);
        border: 1px solid rgba(18, 170, 226, 0.15);
        transform: scale(1.02);
    }
    35% {
        background: rgba(18, 170, 226, 0.12);
        border: 1px solid rgba(18, 170, 226, 0.12);
        transform: scale(1.015);
    }
    60% {
        background: rgba(18, 170, 226, 0.08);
        border: 1px solid rgba(18, 170, 226, 0.08);
        transform: scale(1.01);
    }
    80% {
        background: rgba(18, 170, 226, 0.05);
        border: 1px solid rgba(18, 170, 226, 0.05);
        transform: scale(1.005);
    }
    100% {
        background: transparent;
        border: 1px solid transparent;
        transform: scale(1);
    }
}

@keyframes conceptCardBounce {
    0% {
        background: linear-gradient(135deg, rgba(18, 170, 226, 0.25) 0%, rgba(18, 170, 226, 0.15) 100%);
        border: 1px solid rgba(18, 170, 226, 0.3);
        transform: translateY(0) scale(1);
        box-shadow: 0 8px 32px rgba(18, 170, 226, 0.2), 0 4px 16px rgba(18, 170, 226, 0.15);
    }
    15% {
        background: linear-gradient(135deg, rgba(18, 170, 226, 0.35) 0%, rgba(18, 170, 226, 0.25) 100%);
        border: 1px solid rgba(18, 170, 226, 0.4);
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 12px 40px rgba(18, 170, 226, 0.25), 0 6px 20px rgba(18, 170, 226, 0.2);
    }
    35% {
        background: linear-gradient(135deg, rgba(18, 170, 226, 0.3) 0%, rgba(18, 170, 226, 0.2) 100%);
        border: 1px solid rgba(18, 170, 226, 0.35);
        transform: translateY(-3px) scale(1.015);
        box-shadow: 0 10px 36px rgba(18, 170, 226, 0.22), 0 5px 18px rgba(18, 170, 226, 0.17);
    }
    60% {
        background: linear-gradient(135deg, rgba(18, 170, 226, 0.25) 0%, rgba(18, 170, 226, 0.15) 100%);
        border: 1px solid rgba(18, 170, 226, 0.3);
        transform: translateY(-2px) scale(1.01);
        box-shadow: 0 9px 34px rgba(18, 170, 226, 0.18), 0 4px 17px rgba(18, 170, 226, 0.12);
    }
    80% {
        background: linear-gradient(135deg, rgba(18, 170, 226, 0.2) 0%, rgba(18, 170, 226, 0.1) 100%);
        border: 1px solid rgba(18, 170, 226, 0.25);
        transform: translateY(-1px) scale(1.005);
        box-shadow: 0 8px 32px rgba(18, 170, 226, 0.15), 0 4px 16px rgba(18, 170, 226, 0.1);
    }
    100% {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.5) 100%);
        border: 1px solid rgba(255, 255, 255, 0.6);
        transform: translateY(0) scale(1);
        box-shadow: 0 8px 32px rgba(18, 170, 226, 0.1), 0 4px 16px rgba(18, 170, 226, 0.06);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        padding: 12px 10px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .section-card {
        margin: 8px 0;
        padding: 16px 10px;
    }
    
    .toolbar {
        padding: 0 10px;
    }
    
    /* Fix content width on mobile - override desktop calc() */
    /* Reduced padding on mobile to maximize screen real estate */
    .content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px 8px !important;
    }
    
    .content-sections-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 8px !important;
    }
}

/* ===== UTILITY CLASSES ===== */
ul, ol {
    padding-left: 0;
    list-style-position: outside;
    margin: 20px 0 20px 20px;
}

ol {
    padding-left: 0;
}

li {
    margin-bottom: 12px;
}

p {
    margin-bottom: 18px;
}

.concept-card p + p {
    margin-top: 20px;
}

/* ===== CLEARFIX FOR FLOATING ELEMENTS ===== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== OVERFLOW PREVENTION - Images, Tables, Code Blocks ===== */
/* Prevent all content elements from overflowing the viewport */
.content img,
.section-card img,
.concept-card img {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Fix images with inline width styles */
.content img[style*="width"],
.section-card img[style*="width"],
.concept-card img[style*="width"] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
}

/* Tables should scroll horizontally if too wide */
.content table,
.section-card table,
.concept-card table {
    max-width: 100% !important;
    overflow-x: auto !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Code blocks should scroll horizontally */
.content pre,
.content .code-block,
.section-card pre,
.section-card .code-block {
    max-width: 100% !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
}

/* Info boxes, warning boxes, concept cards */
.content .info-box,
.content .warning-box,
.section-card .info-box,
.section-card .warning-box {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Concept cards - allow overflow for badges/labels positioned outside */
.content .concept-card,
.section-card .concept-card {
    max-width: 100% !important;
    box-sizing: border-box !important;
    /* DO NOT set overflow-x: hidden - badges use ::before with top: -10px */
    overflow: visible !important; /* Allow badges to show outside card bounds */
}

/* Screenshot placeholders */
.content .screenshot-placeholder,
.section-card .screenshot-placeholder {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.content .screenshot-placeholder.float-left,
.content .screenshot-placeholder.float-right {
    max-width: min(500px, calc(50% - 30px)) !important;
}

/* Ensure all direct children of content respect width */
.content > *,
.section-card > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Allow concept card badges to overflow - badges use ::before with top: -10px */
.content .concept-card::before,
.section-card .concept-card::before {
    overflow: visible !important;
    z-index: 10 !important; /* Ensure badge appears above other content */
}

/* Reduce spacing for image captions in concept cards */
.concept-card img + p[style*="font-style: italic"],
.concept-card p[style*="font-style: italic"][style*="text-align: center"] {
    margin-top: 0 !important;
    margin-bottom: 5px !important;
}

/* Reduce spacing between caption and heading - force clear to prevent text flowing around images */
.concept-card p[style*="font-style: italic"] + div[style*="clear: both"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 0 !important;
}

.concept-card p[style*="font-style: italic"] + div[style*="clear: both"] + h4 {
    margin-top: 10px !important;
}

/* Fallback for h4 directly after caption */
.concept-card p[style*="font-style: italic"] + h4 {
    margin-top: 10px !important;
    clear: both !important; /* Force heading below floated images */
}

.cross-link-box {
    background-color: #e7f6fd;
    border-left: 4px solid #12AAE2;
    padding: 15px 20px;
    margin-top: 25px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
}

.cross-link-box a {
    color: #0C3D62;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cross-link-box a:hover {
    color: #12AAE2;
    text-decoration: underline;
}

