/* ==============================================
   ALERT SYSTEM
   ============================================== */
.alert {
    padding: var(--spacing-4);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    margin-bottom: var(--spacing-4);
}

.alert-success {
    background: var(--glass-white);
    border-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background: var(--glass-white);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: var(--glass-white);
    border-color: var(--danger);
    color: var(--danger);
}

.alert-info {
    background: var(--glass-white);
    border-color: var(--info);
    color: var(--info);
}

/* ==============================================
   BADGE SYSTEM
   ============================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-1) var(--spacing-3);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary);
}

.badge-secondary {
    background: var(--glass-white);
    color: var(--text-secondary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* ==============================================
   LOADING INDICATORS
   ============================================== */
.loading {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==============================================
   BACK TO TOP BUTTON
   ============================================== */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-6);
    left: var(--spacing-6);
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition-base);
    z-index: var(--z-fixed);
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    box-shadow: var(--shadow-lg);
}

.back-to-top i {
    display: block;
    line-height: 1;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */

/* Text Alignment */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Spacing - Top */
.spacing-top-1 {
    margin-top: 1rem;
}

.spacing-top-2 {
    margin-top: 2rem;
}

.spacing-top-3 {
    margin-top: 3rem;
}

/* Spacing - Bottom */
.spacing-bottom-1 {
    margin-bottom: 1rem;
}

.spacing-bottom-2 {
    margin-bottom: 2rem;
}

.spacing-bottom-3 {
    margin-bottom: 3rem;
}

/* Program Meta (used in training.html program cards) */
.program-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: auto;
}

/* Hero Badge Centered */
.hero-badge-centered {
    margin: 0 auto 1.5rem;
}

/* Subtitle Variations */
.subtitle-large {
    font-size: 1.125rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Text Containers */
.text-container-narrow {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.text-container-centered {
    text-align: center;
}

/* Quick Action Centered Card */

/* Icon Styles */
.icon-large {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.icon-xlarge {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.icon-red { color: #EF4444; }
.icon-orange { color: #F59E0B; }
.icon-blue { color: #3B82F6; }
.icon-green { color: #10B981; }
.icon-primary { color: var(--calc-primary); }

/* Text Styles */
.text-italic { font-style: italic; }
.text-large { font-size: 1.25rem; }
.text-medium { font-size: 1.125rem; }
.text-weight-600 { font-weight: 600; }

/* Badge Styles */
.badge-spacing { margin-right: 1rem; }

/* Box Styles */
.box-warning {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.1);
}

/* Animation Delays */

/* Link Styles */
.link-primary { color: var(--primary); }

/* ==============================================
   MOBILE TOUCH OPTIMIZATIONS
   ============================================== */
@media (max-width: 768px) {
    .btn, 
    .calculator-card, 
    .navbar-link, 
    .course-nav-link,
    .zone-card {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
        padding: 12px;
    }
    
    input, 
    select, 
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .calculator-form {
        padding: var(--spacing-lg);
    }
    
    .result-value {
        font-size: var(--font-size-3xl);
    }
    
    .quick-actions {
        justify-content: center;
    }
}

/* ==============================================
   PRIORITY 1 - MISSING BUTTON CLASSES (101% Quality)
   ============================================== */

/* Button Block */
.btn-block {
    display: block;
    width: 100%;
}

/* Button Large */
.btn-large {
    padding: var(--spacing-4) var(--spacing-8);
    font-size: var(--font-size-xl);
    min-height: 56px;
    border-radius: var(--radius-3xl);
}

/* Button White - Inverse style with perfect readability */
.btn-white {
    background-color: var(--white);
    color: var(--navy);
    border: 2px solid var(--gray-200);
    font-weight: var(--font-weight-semibold);
}

.btn-white:hover {
    background-color: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-white:active,
.btn-white.active {
    background-color: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(0);
}

.btn-white:focus {
    outline: 3px solid var(--primary-200);
    outline-offset: 2px;
}

/* Button Enhanced - Premium gradient style */
.btn-enhanced {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: var(--spacing-4) var(--spacing-8);
    border-radius: var(--radius-2xl);
    border: none;
    cursor: pointer;
    font-weight: var(--font-weight-semibold);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-enhanced:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.4);
    color: var(--white);
}

.btn-enhanced:active,
.btn-enhanced.active {
    background: var(--primary-dark);
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    color: var(--white);
}

.btn-enhanced:focus {
    outline: 3px solid var(--primary-300);
    outline-offset: 3px;
}

/* Button Group */
.btn-group {
    display: inline-flex;
    gap: var(--spacing-2);
    flex-wrap: wrap;
}

.btn-group .btn {
    margin: 0;
}

/* Filter Button - For calculators and tools */
.filter-btn {
    background: var(--white);
    color: var(--text-secondary);
    border: 2px solid var(--gray-300);
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--navy);
    transform: translateY(-1px);
}

.filter-btn:active,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(0);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.filter-btn:focus {
    outline: 3px solid var(--primary-200);
    outline-offset: 2px;
}

/* CTA Buttons Container */

/* ==============================================
   PRIORITY 1 - MISSING FORM CLASSES
   ============================================== */

/* Form Control - Enhanced input styling */

.form-control:hover {
    border-color: var(--gray-400);
}

.form-control:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 4px var(--primary-100);
    background-color: var(--white);
}

/* Form Row */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-4);
}

.form-row > * {
    flex: 1;
    min-width: 200px;
}

/* Input Wrapper */

/* Input Unit - Display unit labels inside inputs */

/* Form Checklist */

/* Chat Input Components */
.chat-input-container {
    position: sticky;
    bottom: 0;
    background: var(--white);
    padding: var(--spacing-4);
    border-top: 2px solid var(--gray-200);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.chat-input-wrapper {
    display: flex;
    gap: var(--spacing-3);
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: var(--spacing-3) var(--spacing-4);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-2xl);
    font-size: var(--font-size-md);
    resize: none;
    max-height: 120px;
    min-height: 48px;
    transition: all 0.2s ease;
}

.chat-input:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 4px var(--primary-100);
}

.send-button:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    color: var(--white);
}

.send-button:active {
    transform: translateY(0);
    color: var(--white);
}

/* Test Input Form */

/* ==============================================
   PRIORITY 1 - MISSING CARD CLASSES
   ============================================== */

/* Card Title */
.card-title {
    color: var(--navy);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-3);
    line-height: 1.3;
}

/* Card Content */
.card-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Cue Card - For course learning points */

.cue-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

/* Checkbox Card - Interactive selection cards */
.checkbox-card {
    background: var(--white);
    border: 3px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--spacing-4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-card:hover {
    border-color: var(--primary-light);
    background: var(--gray-50);
    transform: translateY(-1px);
}

.checkbox-card.selected,
.checkbox-card:active {
    border-color: var(--primary);
    background: var(--primary-50);
    box-shadow: 0 0 0 4px var(--primary-100);
}

/* Related Card - For related content */

.related-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

/* ==============================================
   UTILITY TRANSITIONS & TRANSFORMS
   ============================================== */

.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-colors {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* ==============================================
   RELATED CONTENT COMPONENTS
   ============================================== */

/* ==============================================
   LAYOUT HELPER COMPONENTS
   ============================================== */
.container-narrow {
    max-width: 800px;
    margin: 0 auto;
}

.flex-center-min {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==============================================
   TYPOGRAPHY COMPOUND UTILITIES
   ============================================== */
.text-xs-muted {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}/* 
==============================================
UTILITY CLASSES
==============================================
*/

/* ==============================================
   DISPLAY UTILITIES
   ============================================== */
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.inline { display: inline !important; }
.flex { display: flex !important; }
.grid { display: grid !important; }
.hidden { display: none !important; }

/* Responsive display */

/* ==============================================
   SPACING UTILITIES
   ============================================== */

/* Margin utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--spacing-1) !important; }
.m-2 { margin: var(--spacing-2) !important; }
.m-3 { margin: var(--spacing-3) !important; }
.m-4 { margin: var(--spacing-4) !important; }
.m-5 { margin: var(--spacing-5) !important; }
.m-6 { margin: var(--spacing-6) !important; }
.m-8 { margin: var(--spacing-8) !important; }
.m-10 { margin: var(--spacing-10) !important; }
.m-12 { margin: var(--spacing-12) !important; }
.m-16 { margin: var(--spacing-16) !important; }
.m-20 { margin: var(--spacing-20) !important; }
.m-24 { margin: var(--spacing-24) !important; }
.m-32 { margin: var(--spacing-32) !important; }

.m-auto { margin: auto !important; }

/* Margin directional */
.mt-1 { margin-top: var(--spacing-1) !important; }
.mt-2 { margin-top: var(--spacing-2) !important; }
.mt-3 { margin-top: var(--spacing-3) !important; }
.mt-4 { margin-top: var(--spacing-4) !important; }
.mt-6 { margin-top: var(--spacing-6) !important; }
.mt-8 { margin-top: var(--spacing-8) !important; }
.mt-12 { margin-top: var(--spacing-12) !important; }
.mr-2 { margin-right: var(--spacing-2) !important; }
.mr-4 { margin-right: var(--spacing-4) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--spacing-2) !important; }
.mb-4 { margin-bottom: var(--spacing-4) !important; }
.mb-6 { margin-bottom: var(--spacing-6) !important; }
.mb-8 { margin-bottom: var(--spacing-8) !important; }
.mb-12 { margin-bottom: var(--spacing-12) !important; }
.ml-2 { margin-left: var(--spacing-2) !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.my-6 { margin-top: var(--spacing-6) !important; margin-bottom: var(--spacing-6) !important; }
.my-8 { margin-top: var(--spacing-8) !important; margin-bottom: var(--spacing-8) !important; }

/* Padding utilities */
.p-0 { padding: 0 !important; }
.p-1 { padding: var(--spacing-1) !important; }
.p-2 { padding: var(--spacing-2) !important; }
.p-3 { padding: var(--spacing-3) !important; }
.p-4 { padding: var(--spacing-4) !important; }
.p-5 { padding: var(--spacing-5) !important; }
.p-6 { padding: var(--spacing-6) !important; }
.p-8 { padding: var(--spacing-8) !important; }
.p-10 { padding: var(--spacing-10) !important; }
.p-12 { padding: var(--spacing-12) !important; }
.p-16 { padding: var(--spacing-16) !important; }
.p-20 { padding: var(--spacing-20) !important; }
.p-24 { padding: var(--spacing-24) !important; }

/* Padding directional */
.pt-2 { padding-top: var(--spacing-2) !important; }
.pt-6 { padding-top: var(--spacing-6) !important; }
.pt-8 { padding-top: var(--spacing-8) !important; }
.pb-2 { padding-bottom: var(--spacing-2) !important; }
.pl-6 { padding-left: var(--spacing-6) !important; }
.px-2 { padding-left: var(--spacing-2) !important; padding-right: var(--spacing-2) !important; }
.py-2 { padding-top: var(--spacing-2) !important; padding-bottom: var(--spacing-2) !important; }
.py-8 { padding-top: var(--spacing-8) !important; padding-bottom: var(--spacing-8) !important; }

/* ==============================================
   POSITION UTILITIES
   ============================================== */
.static { position: static !important; }
.fixed { position: fixed !important; }
.absolute { position: absolute !important; }
.relative { position: relative !important; }
.sticky { position: sticky !important; }

/* Position values */

/* Z-index utilities */

/* ==============================================
   SIZE UTILITIES
   ============================================== */
.w-auto { width: auto !important; }
.w-full { width: 100% !important; }
.w-screen { width: 100vw !important; }
.w-fit { width: fit-content !important; }

.h-auto { height: auto !important; }
.h-full { height: 100% !important; }
.h-screen { height: 100vh !important; }
.h-fit { height: fit-content !important; }
.max-w-xs { max-width: 320px !important; }
.max-w-2xl { max-width: 672px !important; }
.max-w-3xl { max-width: 768px !important; }
.max-w-4xl { max-width: 896px !important; }

/* ==============================================
   TEXT UTILITIES
   ============================================== */

/* Text alignment */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }

/* Text colors */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-light { color: var(--text-light) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--white) !important; }
.text-black { color: var(--black) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }

/* Text sizes */
.text-xs { font-size: var(--font-size-xs) !important; }
.text-sm { font-size: var(--font-size-sm) !important; }
.text-md { font-size: var(--font-size-md) !important; }
.text-lg { font-size: var(--font-size-lg) !important; }
.text-xl { font-size: var(--font-size-xl) !important; }
.text-2xl { font-size: var(--font-size-2xl) !important; }
.text-3xl { font-size: var(--font-size-3xl) !important; }
.text-4xl { font-size: var(--font-size-4xl) !important; }

/* Text weights */
.text-thin { font-weight: var(--font-weight-thin) !important; }
.text-light { font-weight: var(--font-weight-light) !important; }
.text-normal { font-weight: var(--font-weight-normal) !important; }
.text-medium { font-weight: var(--font-weight-medium) !important; }
.text-semibold { font-weight: var(--font-weight-semibold) !important; }
.text-bold { font-weight: var(--font-weight-bold) !important; }
.text-extrabold { font-weight: var(--font-weight-extrabold) !important; }
.text-black { font-weight: var(--font-weight-black) !important; }

/* Text decoration */
.underline { text-decoration: underline !important; }
.no-underline { text-decoration: none !important; }

/* Font style */
.italic { font-style: italic !important; }

/* Line height */
.leading-relaxed { line-height: var(--line-height-relaxed) !important; }

/* Text transform */
.uppercase { text-transform: uppercase !important; }
.capitalize { text-transform: capitalize !important; }

/* ==============================================
   BACKGROUND UTILITIES
   ============================================== */
.bg-transparent { background-color: transparent !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-white { background-color: var(--white) !important; }
.bg-black { background-color: var(--black) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-info { background-color: var(--info) !important; }

.bg-glass { background: var(--glass-white) !important; }
.bg-glass-light { background: var(--glass-white-light) !important; }
.bg-glass-strong { background: var(--glass-white-strong) !important; }

.bg-success-light { background: rgba(16, 185, 129, 0.1) !important; }
.bg-danger-light { background: rgba(239, 68, 68, 0.1) !important; }
.bg-warning-light { background: rgba(245, 158, 11, 0.1) !important; }
.bg-info-light { background: rgba(59, 130, 246, 0.1) !important; }

.bg-gradient-primary { background: var(--gradient-primary) !important; }
.bg-gradient-hero { background: var(--gradient-hero) !important; }

/* ==============================================
   BORDER UTILITIES
   ============================================== */
.border { border: 1px solid var(--glass-border) !important; }

.border-t { border-top: 1px solid var(--glass-border) !important; }
.border-b { border-bottom: 1px solid var(--glass-border) !important; }

.border-primary { border-color: var(--primary) !important; }
.border-white { border-color: var(--white) !important; }
.border-transparent { border-color: transparent !important; }
.border-glass { border-color: rgba(255, 255, 255, 0.1) !important; }

/* Border radius */
.rounded { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* ==============================================
   SHADOW UTILITIES
   ============================================== */
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* ==============================================
   OPACITY UTILITIES
   ============================================== */
.opacity-0 { opacity: 0 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* ==============================================
   OVERFLOW UTILITIES
   ============================================== */
.overflow-hidden { overflow: hidden !important; }

.overflow-x-auto { overflow-x: auto !important; }

/* ==============================================
   TRANSITION UTILITIES
   ============================================== */
.transition-all { transition: var(--transition-base) !important; }

/* ==============================================
   TRANSFORM UTILITIES
   ============================================== */
.transform { transform: translateZ(0) !important; }
.scale-105 { transform: scale(1.05) !important; }

/* ==============================================
   CURSOR UTILITIES
   ============================================== */
.cursor-pointer { cursor: pointer !important; }

/* ==============================================
   USER SELECT UTILITIES
   ============================================== */

/* ==============================================
   POINTER EVENTS UTILITIES
   ============================================== */

/* ==============================================
   ANIMATION UTILITIES
   ============================================== */

.animate-fadeIn {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

/* Animation keyframes */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==============================================
   RESPONSIVE UTILITIES
   ============================================== */

/* Mobile First Responsive Classes */

/* ==============================================
   LAZY LOADING UTILITIES
   ============================================== */
    /* Lazy loading styles */
    .lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .lazy-load.loaded {
    opacity: 1;
}

    /* Placeholder dok se slika učitava */
    .lazy-load:not(.loaded) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

    @keyframes loading-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ==============================================
   CALLOUT / ALERT BOX UTILITIES
   ============================================== *//* 
==============================================
PAGE-SPECIFIC STYLES
==============================================
*/

/* ==============================================
   CALCULATOR PAGES
   ============================================== */

.calculator-form {
    background: var(--glass-white);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.calculator-result {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--white);
    margin-top: var(--spacing-xl);
}

.calculator-result h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
}

.calculator-result .result-value {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
}

.calculator-result .result-unit {
    font-size: var(--font-size-lg);
    opacity: 0.9;
}

/* ==============================================
   COURSE PAGES
   ============================================== */
.course-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-2xl);
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-2xl);
}

.course-nav {
    position: sticky;
    top: calc(var(--navbar-height) + var(--spacing-xl));
    height: fit-content;
    background: var(--glass-white);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
}

.course-nav h3 {
    color: var(--white);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
}

.course-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.course-nav-item {
    margin-bottom: var(--spacing-2);
}

.course-nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3) var(--spacing-4);
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    font-size: var(--font-size-sm);
}

.course-nav-link:hover,
.course-nav-link.active {
    background: var(--glass-white-light);
    color: var(--white);
}

.course-nav-link.completed {
    color: var(--primary);
}

.course-nav-link.completed::before {
    content: '✓';
    margin-right: var(--spacing-1);
    color: var(--primary);
}

.course-content {
    background: var(--glass-white);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
}

.course-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--glass-border);
}

.course-progress {
    margin-bottom: var(--spacing-xl);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--glass-white-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.chapter {
    margin-bottom: var(--spacing-3xl);
    padding-bottom: var(--spacing-2xl);
    border-bottom: 1px solid var(--glass-border);
}

.chapter:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.chapter h2 {
    color: var(--primary);
    margin-bottom: var(--spacing-lg);
}

/* ==============================================
   PROGRAM PAGES
   ============================================== */
.program-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.program-details {
    background: var(--glass-white);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
}

.program-details h3 {
    color: var(--primary);
    margin-bottom: var(--spacing-lg);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
}

.schedule-day {
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.schedule-day.training {
    border-color: var(--primary);
    background: var(--primary-100);
}

.schedule-day.rest {
    border-color: var(--text-muted);
}

.schedule-day h4 {
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.workout-table {
    background: var(--glass-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin: var(--spacing-xl) 0;
}

.workout-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: transparent;
    border: none;
}

.workout-table th {
    background: var(--glass-white-strong);
    color: var(--white);
    font-weight: var(--font-weight-semibold);
    padding: var(--spacing-lg);
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.workout-table td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.workout-table tr:last-child td {
    border-bottom: none;
}

.workout-table .exercise-name {
    font-weight: var(--font-weight-semibold);
    color: var(--white);
}

.workout-notes {
    background: var(--glass-white-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.workout-notes h4 {
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.workout-notes ul {
    margin-left: var(--spacing-4);
}

.workout-notes li {
    color: var(--text-muted);
    font-style: italic;
}

/* ==============================================
   WORKOUT LOGGER SPECIFIC
   ============================================== */

.quick-start-card:hover {
    background: var(--glass-white-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.workout-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--glass-white);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exercise-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.exercise-item {
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exercise-name {
    font-weight: var(--font-weight-semibold);
    color: var(--white);
}

.exercise-details {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* ==============================================
   PROGRAM HEADER
   ============================================== */
.program-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.program-meta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.meta-icon {
    color: var(--primary);
}

/* ==============================================
   ARTICLE PAGES
   ============================================== */

.article-meta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.article-content {
    background: var(--glass-white);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    line-height: var(--line-height-relaxed);
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.article-content p {
    margin-bottom: var(--spacing-lg);
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--spacing-lg);
    margin-left: var(--spacing-6);
}

.article-content li {
    margin-bottom: var(--spacing-2);
}

.article-sidebar {
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.article-toc {
    margin-bottom: var(--spacing-lg);
}

.article-toc h4 {
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-md);
}

.article-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-toc li {
    margin-bottom: var(--spacing-1);
}

.article-toc a {
    color: var(--text-light);
    text-decoration: none;
    font-size: var(--font-size-sm);
    padding: var(--spacing-1) 0;
    display: block;
    transition: var(--transition-fast);
}

.article-toc a:hover {
    color: var(--primary);
}

/* ==============================================
   HOME PAGE SPECIFIC
   ============================================== */
.hero-home {
    background: var(--gradient-hero);
    text-align: center;
    padding: calc(var(--navbar-height) + var(--spacing-4xl)) 0 var(--spacing-4xl);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Hero Section - Full width container */
.hero-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-title {
    font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-4xl));
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--spacing-lg);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-light);
    margin-bottom: var(--spacing-2xl);
    line-height: var(--line-height-relaxed);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-top: var(--spacing-2xl);
}

.feature-card:hover {
    background: var(--glass-white-strong);
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* ==============================================
   CONTACT PAGE
   ============================================== */

/* ==============================================
   FOOTER
   ============================================== */
.footer {
    background: var(--glass-white);
    backdrop-filter: var(--glass-backdrop);
    border-top: 1px solid var(--glass-border);
    margin-top: var(--spacing-4xl);
    padding: var(--spacing-2xl) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: var(--spacing-lg);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-2);
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* ==============================================
   RESPONSIVE ADJUSTMENTS
   ============================================== */
@media (max-width: 1024px) {
    .course-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        padding: var(--spacing-lg);
    }
    
    .course-nav {
        position: relative;
        top: auto;
        margin-bottom: var(--spacing-xl);
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .program-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .workout-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .workout-table {
        font-size: var(--font-size-sm);
    }
    
    .workout-table th,
    .workout-table td {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    
    .calculator-form,
    .article-content,
    .course-content {
        padding: var(--spacing-lg);
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .workout-stats {
        grid-template-columns: 1fr;
    }
    
    .program-meta {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .article-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* ==============================================
   PRINT OPTIMIZATIONS
   ============================================== */
@media print {
    .calculator-form,
    .article-content,
    .course-content {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }
    
    .hero-home {
        background: white !important;
        color: black !important;
        min-height: auto !important;
        padding: var(--spacing-xl) 0 !important;
    }
    
    .workout-table {
        background: white !important;
        border: 1px solid #ccc !important;
    }
    
    .workout-table th {
        background: #f5f5f5 !important;
        color: black !important;
    }
}

/* ==============================================
   CUSTOM OVERRIDES (from master-styles.css)
   ============================================== */

/* Body Type Distribution (Calculator Pages) */

/* Note: back-to-top is now LEFT positioned in 04-components.css */

/* Active card selection styles */
.card.active {
    border-color: var(--primary);
    background: var(--primary-100);
}

.card.active .badge {
    background: var(--primary);
    color: var(--white);
}

.card.active h4 {
    color: var(--primary);
}

/* ==============================================
   PRIORITY 1 - MISSING PAGE-LEVEL CLASSES (101% Quality)
   ============================================== */

/* Calculator Page */
.calculator-page {
    /* Inherits default gradient background from body */
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

/* Program Page */
.program-page {
    /* Inherits default gradient background from body */
    padding-top: var(--navbar-height);
}

/* Article Page */
.article-page {
    /* Inherits default gradient background from body */
    padding-top: var(--navbar-height);
    font-size: var(--font-size-lg);
    line-height: 1.8;
}

.article-page h1,
.article-page h2,
.article-page h3 {
    color: var(--white);
}

.article-page p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-5);
}

/* About Page */

/* Contact Page */

/* Disclaimer Page */

/* Offline Page */

/* ==============================================
   AD CONTAINER (Priority 2)
   ============================================== */    /* ==============================================
   ENHANCED AI PROGRAM GENERATOR - CONTRAST OPTIMIZED CSS
   ============================================== */

/* Enhanced UI Components */

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    }
}

.option-card {
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.option-card:hover::before {
    left: 100%;
}

@media (min-width: 1024px) {
    .option-card {
        min-height: 140px;
        padding: var(--spacing-xl);
    }
}

.option-card:hover {
    background: var(--glass-white-strong);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-300);
}

.option-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
}

.option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.option-card.selected i {
    color: var(--primary) !important;
}

.option-card.selected h3 {
    color: var(--primary) !important;
}

.checkbox-card {
    display: block;
    cursor: pointer;
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-card:hover {
    background: var(--glass-white-strong);
    border-color: var(--primary-300);
    transform: translateY(-1px);
}

.checkbox-card.selected {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: var(--primary);
}

.step-card {
    background: var(--glass-white);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.program-phases .phase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) var(--value, 50%), var(--gray-300) var(--value, 50%), var(--gray-300) 100%);
    outline: none;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-enhanced {
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* ==============================================
   ENHANCED PROGRAM DISPLAY - DARK CONTRAST FIXES
   ============================================== */

/* Program display container optimizations */

.enhanced-program-display .card:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Text contrast improvements */

/* Headers */



/* Fix za bg-white bg-opacity-50 elemente (stats grid) */

/* Exercise lists */

/* Phase cards */

/* Badges */

/* Guidelines and recommendations */

/* Specific element styling */

/* First card special styling */

#program-details > .card:first-child {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    
    .option-card {
        min-height: 100px;
        padding: 1rem;
    }
}

/* High contrast mode support */

/* ==============================================
   ARTICLE PAGE - MAXIMUM READABILITY
   ============================================== */
.article-page .card {
    background: rgba(0, 0, 0, 0.5); /* Još tamnija pozadina */
}

.article-page .text-white {
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); /* Senka za dubinu */
}

.article-page p.text-white,
.article-page li.text-white {
    font-size: 1.05rem; /* Malo veći font */
    line-height: 1.75; /* Povećan razmak između redova */
}/**
 * Calculator Charts CSS
 * Styles for Chart.js history tracking in calculators
 */

/* Period Selector */

.period-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
}

.period-btn.active {
    background: var(--primary, #10b981);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* Chart Container */
.chart-container {
    background: var(--bg-card, rgba(255, 255, 255, 0.05));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-title i {
    color: var(--primary, #10b981);
}

.chart-subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-left: auto;
}

.chart-container canvas {
    max-height: 300px;
}

/* No History State */

/* History Table */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(31, 41, 55, 0.5);
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.data-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Icon Buttons */
.btn-icon {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
    border-radius: 0.375rem;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-remove:hover {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .chart-container {
        padding: 1rem;
    }

    .data-table {
        font-size: 0.8125rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    .chart-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-subtitle {
        margin-left: 0;
    }
}

/* Dark mode styles removed - now default (dark-only theme) */
/**
 * UX Polish & Quick Wins
 * PHASE 2: Small improvements with big impact
 *
 * @version 1.0.0
 */

/* ============================================
   SMOOTH SCROLL
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   FOCUS VISIBLE (Enhanced)
   Better keyboard navigation
   ============================================ */

:focus-visible {
    outline: 3px solid var(--primary, #10B981);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Remove default outline */
:focus:not(:focus-visible) {
    outline: none;
}

/* Special focus for buttons */
button:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--primary, #10B981);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* ============================================
   SKELETON LOADERS
   Loading states for better perceived performance
   ============================================ */

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   Modern alternative to alert()
   ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    pointer-events: all;
}

.toast-success {
    border-left: 4px solid #10B981;
}

.toast-error {
    border-left: 4px solid #EF4444;
}

.toast-warning {
    border-left: 4px solid #F59E0B;
}

.toast-info {
    border-left: 4px solid #3B82F6;
}

.toast-icon {
    font-size: 20px;
    line-height: 1;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary, #1E293B);
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    color: var(--text-secondary, #64748B);
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-primary, #1E293B);
}

.toast-hide {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Mobile toast positioning */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* ============================================
   FORM VALIDATION INLINE ERRORS
   ============================================ */

.input-error {
    border-color: #EF4444 !important;
    background-color: rgba(239, 68, 68, 0.05);
}

.error-message {
    display: none;
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    margin-left: 0.25rem;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   IMPROVED LOADING INDICATOR
   ============================================ */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(16, 185, 129, 0.3);
    border-top-color: #10B981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .loading-spinner {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

/* ============================================
   BETTER SCROLL INDICATOR
   ============================================ */

/* ============================================
   HOVER EFFECTS (Desktop only)
   ============================================ */

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        transition: all 0.3s ease;
    }

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        transition: all 0.2s ease;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    
    .navbar,
    .footer,
    .toast,
    .loading-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ============================================
   ACCESSIBILITY: Screen Reader Only
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   DARK MODE ONLY
   ============================================ */
/* Dark mode is enforced via theme-manager.js and main CSS */
/**
 * Modal Component Styles
 * Complete modal system with animations, backdrop, and responsive design
 *
 * @version 1.0.0
 * @requires 01-variables.css (for CSS custom properties)
 */

/* Modal Container */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal, 1060);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Prevent body scroll when modal is open (CSP-safe alternative to inline styles) */
body.modal-open {
    overflow: hidden !important;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop, 1050);
    animation: fadeIn 0.2s ease-in-out;
}

/* Modal Dialog */
.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    z-index: calc(var(--z-modal, 1060) + 10);
    animation: slideDown 0.3s ease-out;
}

.modal-dialog.modal-small {
    max-width: 400px;
}

.modal-dialog.modal-medium {
    max-width: 600px;
}

.modal-dialog.modal-large {
    max-width: 900px;
}

/* Modal Content */
.modal-content {
    position: relative;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: var(--glass-backdrop, blur(20px));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
    border-radius: var(--radius-2xl, 1rem);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.modal-title {
    margin: 0;
    font-size: var(--font-size-2xl, 1.5rem);
    font-weight: var(--font-weight-bold, 700);
    color: var(--white, #fff);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-light, #9CA3AF);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-lg, 0.5rem);
    transition: var(--transition-fast, all 0.15s ease-in-out);
}

.modal-close:hover {
    background: var(--glass-white-light, rgba(0, 0, 0, 0.2));
    color: var(--white, #fff);
}

.modal-close:focus {
    outline: 2px solid var(--primary, #10B981);
    outline-offset: 2px;
}

/* Modal Body */
.modal-body {
    padding: 2rem;
    color: var(--text-secondary, #D1D5DB);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: var(--line-height-relaxed, 1.75);
}

.modal-body ul,
.modal-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

.modal-body strong {
    color: var(--white, #fff);
}

.modal-body .badge {
    margin-bottom: 0.5rem;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.modal-footer .btn {
    min-width: 100px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-dialog {
        max-width: calc(100% - 2rem);
        margin: 1rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.25rem;
    }

    .modal-title {
        font-size: var(--font-size-xl, 1.25rem);
    }

    .modal-body {
        max-height: calc(100vh - 150px);
    }
}

/* Accessibility */
.modal[aria-hidden="true"] {
    display: none;
}

/* Focus trap for modals */
.modal.active * {
    outline-color: var(--primary, #10B981);
}

/* Scrollbar styling for modal body */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--glass-border, rgba(255, 255, 255, 0.2));
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--glass-border, rgba(255, 255, 255, 0.3));
}

/* Tool Card Modal Specific Styles */
.tool-preview-modal .modal-dialog {
    max-width: 800px;
}

.tool-modal-content {
    padding: 0;
}

.tool-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.tool-modal-header .badge {
    font-size: var(--font-size-sm, 0.875rem);
}

.tool-modal-header i {
    font-size: 3rem;
    color: var(--primary, #10B981);
}

.tool-modal-body {
    margin-bottom: 1.5rem;
}

.tool-modal-body p {
    margin-bottom: 1rem;
    line-height: var(--line-height-relaxed, 1.75);
}

.tool-modal-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.tool-modal-body ul li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.tool-modal-body ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary, #10B981);
    font-weight: bold;
    font-size: 1.25rem;
}

.tool-modal-features {
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.tool-modal-features h4 {
    font-size: var(--font-size-lg, 1.125rem);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--white, #fff);
    margin-bottom: 0.75rem;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: var(--primary-100, rgba(16, 185, 129, 0.1));
    border: 1px solid var(--primary, #10B981);
    border-radius: var(--radius-full, 9999px);
    color: var(--primary-light, #34D399);
    font-size: var(--font-size-xs, 0.75rem);
    font-weight: var(--font-weight-medium, 500);
    text-transform: capitalize;
}

.tool-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.tool-modal-actions .btn {
    min-width: 140px;
}

@media (max-width: 768px) {
    .tool-modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .tool-modal-actions .btn {
        width: 100%;
    }
}
/**
 * Navigation Styles - FIXED VERSION
 *
 * Unified navigation system:
 * - Desktop: Horizontal nav with dropdowns
 * - Mobile: Bottom tab bar + Drawer menu for full access
 *
 * FIXES:
 * - ✅ Mobile drawer for accessing all pages
 * - ✅ Improved color contrast (WCAG AA)
 * - ✅ Keyboard focus styles
 * - ✅ Touch-friendly targets (44x44px minimum)
 * - ✅ Smooth animations
 * - ✅ CSS variables for maintainability
 *
 * @version 2.0.0-fixed
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
    /* Colors - Improved contrast */
    --nav-bg: rgba(17, 24, 39, 0.95);
    --nav-border: rgba(255, 255, 255, 0.1);
    --nav-text-inactive: #CBD5E1; /* 🔧 FIX: Was #94A3B8 (3.8:1) - Now 5.2:1 contrast */
    --nav-text-active: #FFFFFF;
    --nav-text-hover: #FFFFFF;
    --nav-primary: #10B981;
    --nav-primary-hover: #059669;

    /* Spacing */
    --nav-height-desktop: 64px;
    --nav-height-mobile: 70px;
    --nav-padding: 1rem;

    /* Dropdown */
    --dropdown-min-width: 220px;
    --dropdown-max-width: 280px;
    --dropdown-gap: 0.5rem;

    /* Transitions */
    --nav-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --dropdown-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index */
    --z-nav: 100;
    --z-drawer: 9999;
    --z-overlay: 9998;
}

/* ==========================================================================
   Desktop Navigation
   ========================================================================== */

.desktop-nav,
.navbar {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
}

.nav-container,
.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height-desktop);
}

/* Brand */
.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--nav-text-active);
    font-weight: 700;
    font-size: 1.25rem;
    transition: var(--nav-transition);
}

.nav-brand a:hover {
    transform: translateY(-2px);
}

.nav-brand a:focus-visible {
    outline: 3px solid var(--nav-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.brand-logo-img {
    display: block;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.nav-brand a:hover .brand-logo-img {
    border-color: #10B981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6), 0 4px 8px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.brand-text {
    background: linear-gradient(135deg, var(--nav-primary), #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--nav-text-inactive); /* 🔧 FIX: Improved contrast */
    text-decoration: none;
    border-radius: 8px;
    transition: var(--nav-transition);
    font-weight: 500;
    font-size: 0.9375rem;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--nav-text-hover);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link:focus-visible {
    outline: 3px solid var(--nav-primary);
    outline-offset: 2px;
    color: var(--nav-text-active);
}

.nav-item.active .nav-link {
    color: var(--nav-primary);
    background: rgba(16, 185, 129, 0.1);
}

.nav-link i:first-child {
    font-size: 1rem;
}

.dropdown-arrow {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    transition: transform 0.2s;
}

.nav-item.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: var(--dropdown-gap);
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: var(--dropdown-min-width);
    max-width: var(--dropdown-max-width);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--dropdown-transition);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* Prevent dropdown from going off-screen on right */
.dropdown-menu.align-right {
    left: auto;
    right: 0;
}

.nav-item.dropdown-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--nav-text-inactive); /* 🔧 FIX: Improved contrast */
    text-decoration: none;
    border-radius: 8px;
    transition: var(--nav-transition);
    font-size: 0.9375rem;
}

.dropdown-item a:hover {
    color: var(--nav-text-hover);
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item a:focus-visible {
    outline: 3px solid var(--nav-primary);
    outline-offset: -2px;
    color: var(--nav-text-active);
}

.dropdown-item.active a {
    color: var(--nav-primary);
    background: rgba(16, 185, 129, 0.1);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 0.875rem;
}

/* ==========================================================================
   Mobile Navigation (Bottom Tab Bar)
   ========================================================================== */

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-top: 1px solid var(--nav-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: var(--z-nav);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    max-width: 100%;
}

/* 🔧 FIX: Improved touch targets (WCAG 2.1 AA) */
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    min-height: 60px; /* 🔧 FIX: Ensures 44px+ touch target */
    min-width: 60px;
    color: var(--nav-text-inactive); /* 🔧 FIX: Improved contrast */
    text-decoration: none;
    transition: var(--nav-transition);
    flex: 1;
    max-width: 80px;
    border-radius: 8px;
    position: relative;
}

.mobile-nav-item i {
    font-size: 1.25rem;
}

.mobile-nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    /* 🔧 FIX: Ensure labels are always visible */
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.mobile-nav-item.active {
    color: var(--nav-primary);
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-item:focus-visible {
    outline: 3px solid var(--nav-primary);
    outline-offset: 2px;
}

/* Mobile "More" button styling */
.mobile-nav-more {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    cursor: pointer;
    border-radius: 8px;
}

.mobile-nav-more:hover,
.mobile-nav-more:focus {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--nav-primary);
}

/* ==========================================================================
   Mobile Drawer Menu (NEW!)
   ========================================================================== */

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 85%;
    max-width: 360px;
    height: 100%;
    background: #1F2937;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: var(--z-drawer);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer.open {
    right: 0; /* Slide in from right */
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(16, 185, 129, 0.05);
}

.mobile-drawer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.mobile-drawer-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--nav-transition);
}

.mobile-drawer-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-drawer-close:focus-visible {
    outline: 3px solid var(--nav-primary);
    outline-offset: 2px;
}

.mobile-drawer-nav {
    padding: 1rem 0;
}

.drawer-section {
    margin-bottom: 0.5rem;
}

.drawer-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--nav-transition);
    min-height: 56px; /* Touch target */
}

.drawer-section-header:hover {
    background: rgba(16, 185, 129, 0.1);
}

.drawer-section-header:focus-visible {
    outline: 3px solid var(--nav-primary);
    outline-offset: -3px;
}

.drawer-section.active .drawer-section-header {
    color: var(--nav-primary);
    background: rgba(16, 185, 129, 0.1);
}

.drawer-section-header i {
    width: 24px;
    text-align: center;
    font-size: 1.125rem;
}

.drawer-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
}

.drawer-submenu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem 0.875rem 3.5rem;
    color: var(--nav-text-inactive);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: var(--nav-transition);
    min-height: 48px; /* Touch target */
}

.drawer-submenu-item:hover {
    color: #FFFFFF;
    background: rgba(16, 185, 129, 0.1);
}

.drawer-submenu-item:focus-visible {
    outline: 3px solid var(--nav-primary);
    outline-offset: -3px;
}

.drawer-submenu-item.active {
    color: var(--nav-primary);
    background: rgba(16, 185, 129, 0.15);
}

.drawer-submenu-item i {
    width: 20px;
    text-align: center;
    font-size: 0.875rem;
}

/* Drawer Overlay */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: calc(var(--z-drawer) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1200px) {
    .nav-menu {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .dropdown-menu {
        min-width: 200px;
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.25rem;
        flex-wrap: nowrap;
        overflow-x: visible;
    }

    .nav-link {
        padding: 0.5rem 0.625rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .dropdown-menu {
        min-width: 180px;
        right: 0;
        left: auto;
    }
}

@media (max-width: 768px) {
    /* Hide desktop nav on mobile */
    .desktop-nav {
        display: none;
    }

    /* Show mobile nav */
    .mobile-nav {
        display: block;
    }

    /* Add bottom padding to main content to prevent overlap */
    body {
        padding-bottom: calc(var(--nav-height-mobile) + env(safe-area-inset-bottom, 0));
    }

    /* Dashboard and other pages need bottom padding */
    
    main.container,
    main {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
    }
}

@media (max-width: 480px) {
    .mobile-nav-item {
        padding: 0.5rem 0.5rem;
        gap: 0.125rem;
        min-width: 56px;
    }

    .mobile-nav-item i {
        font-size: 1.125rem;
    }

    .mobile-nav-label {
        font-size: 0.6875rem;
        /* 🔧 FIX: Maintain visibility */
        opacity: 1 !important;
        display: block !important;
    }

    .mobile-drawer {
        width: 90%;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .mobile-nav-item {
        min-width: 48px;
        padding: 0.5rem 0.375rem;
    }

    .mobile-nav-label {
        font-size: 0.625rem;
    }

    .mobile-drawer {
        width: 95%;
    }
}

/* ==========================================================================
   Navigation Utilities
   ========================================================================== */

/* Add active page indicator (desktop) */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--nav-primary);
    border-radius: 2px 2px 0 0;
}

/* Mobile active indicator */
.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--nav-primary);
    border-radius: 0 0 3px 3px;
}

/* Focus states for accessibility */
.nav-link:focus-visible,
.mobile-nav-item:focus-visible,
.drawer-section-header:focus-visible,
.drawer-submenu-item:focus-visible {
    outline: 3px solid var(--nav-primary);
    outline-offset: 2px;
}

/* Smooth scrolling when nav is sticky */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height-desktop) + 20px);
}

/* Print styles */
@media print {
    .desktop-nav,
    .mobile-nav,
    .mobile-drawer,
    .mobile-drawer-overlay {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .mobile-drawer,
    .mobile-drawer-overlay,
    .dropdown-menu {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-link,
    .dropdown-item a,
    .mobile-nav-item,
    .drawer-section-header,
    .drawer-submenu-item {
        border: 1px solid currentColor;
    }

    .nav-item.active .nav-link,
    .dropdown-item.active a,
    .mobile-nav-item.active {
        border-color: var(--nav-primary);
        border-width: 2px;
    }
}
/**
 * Calculators Design System V2 - KOMPAKT VERZIJA
 * Premium unified design - smanjene veličine
 */

:root {
    --calc-primary: #10B981;
    --calc-primary-dark: #059669;
    --calc-bg-main: #0F172A;
    --calc-bg-card: #1E293B;
    --calc-bg-input: #334155;
    --calc-text-primary: #FFFFFF;
    --calc-text-secondary: #94A3B8;
    --calc-text-muted: #64748B;
    --calc-border: rgba(255, 255, 255, 0.1);
    --calc-border-focus: #10B981;
    --calc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --calc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --calc-radius-sm: 6px;
    --calc-radius-md: 10px;
}

/* CALCULATOR CONTAINER */
.calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.calculator-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.calculator-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--calc-text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.calculator-title i {
    color: var(--calc-primary);
}

.calculator-subtitle {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--calc-text-secondary);
}

/* CALCULATOR CARD */
.calc-card {
    background: var(--calc-bg-card);
    border: 1px solid var(--calc-border);
    border-radius: var(--calc-radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--calc-shadow-sm);
}

.calc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--calc-border);
}

.calc-card-title {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    color: var(--calc-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

/* UNIT TOGGLE */
.unit-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.05);
    border-radius: var(--calc-radius-sm);
}

.unit-toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--calc-text-secondary);
    text-transform: uppercase;
}

.unit-toggle-switch {
    display: inline-flex;
    background: var(--calc-bg-input);
    border-radius: 50px;
    padding: 3px;
    cursor: pointer;
    border: 2px solid var(--calc-border);
    transition: all 0.3s ease;
}

.unit-toggle-switch:hover {
    border-color: var(--calc-primary);
}

.unit-toggle-option {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--calc-text-secondary);
    transition: all 0.3s ease;
}

.unit-toggle-option.active {
    background: var(--calc-primary);
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

/* FORM INPUTS */
.calc-form-group {
    margin-bottom: 1rem;
}

.calc-form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--calc-text-primary);
    margin-bottom: 0.4rem;
}

.calc-form-label i {
    color: var(--calc-primary);
    margin-right: 0.4rem;
}

.calc-form-label .required {
    color: #EF4444;
}

.calc-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--calc-text-primary);
    background: var(--calc-bg-input);
    border: 2px solid var(--calc-border);
    border-radius: var(--calc-radius-sm);
    transition: all 0.3s ease;
    min-height: 44px;
}

.calc-input:focus {
    outline: none;
    border-color: var(--calc-border-focus);
    background: #475569;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.calc-input::placeholder {
    color: var(--calc-text-muted);
}

.calc-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--calc-text-primary);
    background: var(--calc-bg-input);
    border: 2px solid var(--calc-border);
    border-radius: var(--calc-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.calc-select:focus {
    outline: none;
    border-color: var(--calc-border-focus);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.calc-input-help {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--calc-text-muted);
}

.calc-input-unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--calc-text-secondary);
    pointer-events: none;
}

.calc-input-wrapper {
    position: relative;
}

/* BUTTONS */
.calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--calc-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    text-decoration: none;
}

.calc-btn-primary {
    background: linear-gradient(135deg, var(--calc-primary) 0%, var(--calc-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.calc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.calc-btn-secondary {
    background: var(--calc-bg-input);
    color: var(--calc-text-primary);
    border: 2px solid var(--calc-border);
}

.calc-btn-secondary:hover {
    border-color: var(--calc-primary);
}

.calc-btn-full {
    width: 100%;
}

.calc-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

/* RESULTS */
.calc-result-main {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: var(--calc-radius-md);
    border: 2px solid rgba(16, 185, 129, 0.2);
}

.calc-result-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--calc-text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.calc-result-value {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--calc-primary);
    line-height: 1;
    margin: 0.5rem 0;
}

.calc-result-category {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--calc-text-primary);
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    display: inline-block;
    margin-top: 0.5rem;
}

.calc-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.calc-result-item {
    background: var(--calc-bg-input);
    border: 1px solid var(--calc-border);
    border-radius: var(--calc-radius-sm);
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.calc-result-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--calc-shadow-md);
    border-color: var(--calc-primary);
}

.calc-result-item-label {
    font-size: 0.8rem;
    color: var(--calc-text-secondary);
    margin-bottom: 0.3rem;
}

.calc-result-item-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--calc-primary);
}

/* INFO BOXES */
.calc-info-box, .calc-tip-box, .calc-warning-box {
    border-radius: var(--calc-radius-sm);
    padding: 1rem;
    margin: 1rem 0;
}

.calc-info-box {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3B82F6;
}

.calc-tip-box {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--calc-primary);
}

.calc-warning-box {
    background: rgba(251, 146, 60, 0.1);
    border-left: 4px solid #FB923C;
}

.calc-info-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--calc-text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.calc-info-text {
    font-size: 0.9rem;
    color: var(--calc-text-secondary);
    line-height: 1.5;
}

.calc-info-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
}

.calc-info-list li {
    padding: 0.4rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--calc-text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.calc-info-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--calc-primary);
    font-weight: bold;
}

/* UTILITIES */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* RESPONSIVE */
@media (max-width: 640px) {
    .calc-card {
        padding: 1rem;
    }

    .calc-btn-group {
        flex-direction: column;
    }

    .calc-btn {
        width: 100%;
    }

    .unit-toggle-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media print {
    .calc-btn, .unit-toggle-container {
        display: none;
    }
}

/* ==========================================================================
   CUSTOM OVERRIDES - All fixes
   ========================================================================== */

/* Footer - FORCE grid layout and centering */
.app-footer .app-container,
footer .app-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 3rem 1.5rem !important;
    width: 100% !important;
}

.app-footer .footer-content,
.footer-content {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 0 10% !important;  /* Shift right on desktop */
}

.footer-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-links li {
    list-style: none !important;
    margin-bottom: 0.5rem !important;
}

.footer-links a,
.footer-section a {
    color: #FFFFFF !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.footer-links a:hover,
.footer-section a:hover {
    color: #10B981 !important;
}

.footer-section h3,
.footer-section h3 a {
    color: #FFFFFF !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.footer-section h3:hover,
.footer-section h3 a:hover {
    color: #10B981 !important;
}

/* Mobile footer centering */
@media (max-width: 767px) {
    .app-footer .footer-content,
    .footer-content {
        grid-template-columns: 1fr !important;  /* Stack vertically on mobile */
        gap: 2rem !important;
        text-align: center !important;
        padding: 0 !important;  /* Remove left padding on mobile */
    }
    .footer-section {
        text-align: center !important;
        align-items: center !important;
    }
}

/* Drawer menu vertical layout */
.mobile-drawer-nav {
    display: flex !important;
    flex-direction: column !important;
    padding: 1rem 0 !important;
    width: 100% !important;
}

.mobile-drawer-link,
.drawer-section-header {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1rem 1.5rem !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    min-height: 56px !important;
    width: 100% !important;
}

.mobile-drawer-link:hover,
.drawer-section-header:hover {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10B981 !important;
}

.mobile-drawer-link i {
    width: 24px !important;
    text-align: center !important;
    font-size: 1.125rem !important;
}

.mobile-drawer-cta {
    background: #10B981 !important;
    color: white !important;
    font-weight: 700 !important;
    margin: 0.5rem 1rem !important;
    border-radius: 8px !important;
}

.mobile-drawer-cta:hover {
    background: #059669 !important;
}

/* Navbar brand link hover effect */
.navbar-brand,
.navbar-brand strong {
    color: #FFFFFF !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.navbar-brand:hover,
.navbar-brand:hover strong {
    color: #10B981 !important;
}

/* Keep logo image unchanged on hover */
.navbar-brand img {
    transition: none !important;
}

/* NAVBAR MENU LINKS - Green hover effect */
.navbar-menu a,
.nav-menu a,
.navbar-link {
    color: #CBD5E1 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.navbar-menu a:hover,
.nav-menu a:hover,
.navbar-link:hover {
    color: #10B981 !important;
}

/* ==================================
   APP CARDS - TOP-TIER DESIGN
   ================================== */

/* Main app card - TOP-TIER visual hierarchy */
.app-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--calc-primary), rgba(16, 185, 129, 0.5));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.app-card:hover {
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.app-card:hover::before {
    opacity: 1;
}

/* Card icon - large, prominent */
.card-icon {
    font-size: 3rem;
    color: var(--calc-primary, #10B981);
    margin-bottom: 1.25rem;
    transition: transform 0.25s ease;
}

.app-card:hover .card-icon {
    transform: scale(1.1);
}

/* Card header - badge + icon */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Card badge */
.card-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Card title */
.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary, #FFFFFF);
}

/* Card text */
.card-text {
    color: var(--text-secondary, #94A3B8);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

/* Card link - full card clickable */
.app-card a {
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-card a:hover {
    text-decoration: none;
}

/* Stats Grid - Horizontal layout */
.stats-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.stat-item i {
    color: var(--calc-primary, #10B981);
    font-size: 1.25rem;
}

.stat-value {
    font-weight: 700;
    color: var(--text-primary, #FFFFFF);
}

/* Hero Badge - Styled with border */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #10B981;
    margin-bottom: 1.5rem;
}

.hero-badge i {
    font-size: 1rem;
}

/* Quick Action Buttons */
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-3);
    padding: var(--spacing-6);
    background: var(--glass-white) !important;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    cursor: pointer;
    min-height: 120px;
}

.action-btn:hover {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 2rem;
    transition: var(--transition-fast);
}

.action-btn:hover i {
    transform: scale(1.1);
}

.action-btn span {
    font-weight: 600;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .action-btn {
        min-height: 100px;
        padding: var(--spacing-4);
        gap: var(--spacing-2);
    }
    
    .action-btn i {
        font-size: 1.5rem;
    }
    
    .action-btn span {
        font-size: 0.85rem;
    }
}

/* ==============================================
   APP CONTAINER STANDARDIZATION
   ============================================== */

/* Standard app page containers - mobile-first with proper padding */

.planner-container,
.recipes-container,
.results-container,
.settings-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: var(--spacing-4);
}

/* Specific width overrides for different page types */

.planner-container {
    max-width: var(--container-md); /* Narrower for forms/wizards */
}


.results-container,
.settings-container {
    max-width: var(--container-lg);
}


.recipes-container {
    max-width: var(--container-xl);
}

/* Mobile responsive padding */
@media (min-width: 768px) {
    
    .planner-container,
    .recipes-container,
    .results-container,
    .settings-container {
        padding: var(--spacing-8);
    }
}

/* ========================================================================
   SETTINGS PAGE STYLES
   ======================================================================== */

.settings-section {
    background: var(--glass-white);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-6);
}

.settings-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-6);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-5) 0;
    border-bottom: 1px solid var(--glass-border);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
    margin-right: var(--spacing-4);
}

.setting-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-1);
}

.setting-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.setting-control {
    flex-shrink: 0;
}

/* Danger Zone Styling */
.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.danger-zone h2 {
    color: #ef4444;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 34px;
    border: 2px solid var(--glass-border);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Form Select */
.form-select {
    width: 100%;
    padding: var(--spacing-3);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* ========================================================================
   CALCULATOR RESULTS PAGE STYLES
   ======================================================================== */

.page-header {
    text-align: center;
    margin-bottom: var(--spacing-12);
    padding-bottom: var(--spacing-6);
    border-bottom: 2px solid var(--glass-border);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-3);
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.category-section {
    margin-bottom: var(--spacing-12);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-6);
    padding-bottom: var(--spacing-4);
    border-bottom: 2px solid var(--glass-border);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--glass-white);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    color: var(--primary);
    font-size: 1.25rem;
}

.recalculate-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.recalculate-link:hover {
    color: var(--primary-light);
    transform: translateX(4px);
}

.result-card {
    background: var(--glass-white);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    text-align: center;
    transition: var(--transition-fast);
}

.result-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.result-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-2);
    line-height: 1;
}

.result-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: var(--spacing-2);
}

.result-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-1);
}

.empty-state {
    text-align: center;
    padding: var(--spacing-12) var(--spacing-6);
    background: var(--glass-white);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-xl);
    margin: var(--spacing-12) auto;
    max-width: 600px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: var(--spacing-6);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
}

.empty-state p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-6);
    line-height: 1.6;
}

.export-section {
    text-align: center;
    margin-top: var(--spacing-12);
    padding-top: var(--spacing-8);
    border-top: 2px solid var(--glass-border);
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-4) var(--spacing-8);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.export-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

/* ========================================================================
   PROGRAM LIBRARY CARD STYLES
   ======================================================================== */

.program-card {
    background: var(--glass-white);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
}

.program-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.program-level {
    display: inline-block;
    padding: var(--spacing-1) var(--spacing-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.program-level.beginner {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.program-level.intermediate {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.program-level.advanced {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.program-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.program-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.program-meta {
    display: flex;
    gap: var(--spacing-4);
    padding-top: var(--spacing-3);
    border-top: 1px solid var(--glass-border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--primary);
    font-size: 1rem;
}

.program-goals {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
}

.goal-badge {
    padding: var(--spacing-1) var(--spacing-2);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.program-actions {
    display: flex;
    gap: var(--spacing-3);
    margin-top: var(--spacing-2);
}

.btn-view {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3) var(--spacing-4);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-view:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-info {
    padding: var(--spacing-3);
    background: var(--glass-white);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.btn-info:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
}

/* ========================================================================
   WORKOUT SESSION PAGE STYLES
   ======================================================================== */

.session-timer {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: var(--spacing-6);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

.session-controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-8);
    flex-wrap: wrap;
}

.exercise-log {
    background: var(--glass-white);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-6);
}

.rest-timer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid var(--primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-12);
    text-align: center;
    z-index: 1000;
    min-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.rest-timer.hidden {
    display: none;
}

.rest-timer h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-6);
}

.rest-timer .timer-display {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    margin-bottom: var(--spacing-6);
    line-height: 1;
}

.session-summary {
    display: none;
}

.session-summary.active {
    display: block;
}

.exercise-selector {
    display: none;
}

.exercise-selector.active {
    display: block;
}

/* ========================================================================
   NUTRITION TRACKER STYLES
   ======================================================================== */

.stat-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value-large {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-target {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* ========================================================================
   SESSION INSTRUCTION STYLES
   ======================================================================== */

.instruction-header {
    text-align: center;
    margin-bottom: 2rem;
}

.instruction-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.instruction-grid {
    display: grid;
    gap: 1rem;
}

.instruction-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.step-description {
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

.instruction-tip {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
}

.instruction-tip p {
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .session-timer {
        font-size: 2rem;
    }

    .session-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .rest-timer {
        min-width: 90vw;
        padding: var(--spacing-8);
    }

    .rest-timer .timer-display {
        font-size: 3.5rem;
    }
}

/* ========================================================================
   BREADCRUMB SECTION
   ======================================================================== */

.breadcrumb-section {
    padding: 0.75rem 0 0.5rem 0;
}


/* ========================================================================
   PROGRAM CTA SECTION
   ======================================================================== */

.section-cta-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.btn-outline-white {
    border-color: white !important;
    color: white !important;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================================================
   FLEX HEADER LAYOUT
   ======================================================================== */

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-header-spacer {
    flex: 1;
}

.flex-header-title {
    flex: 2;
    text-align: center;
}

.flex-header-actions {
    flex: 1;
    text-align: right;
}

