/* ================================================
   MoneyValue.ai - Premium Numismatic Design System
   ================================================ */

/* ==============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================== */
:root {
    /* Primary: Deep Money Green */
    --mv-primary: #1B4332;
    --mv-primary-light: #2D5A45;
    --mv-primary-dark: #143326;
    --mv-primary-rgb: 27, 67, 50;
    
    /* Secondary: Classic Gold */
    --mv-secondary: #D4AF37;
    --mv-secondary-light: #E5C45D;
    --mv-secondary-dark: #B8962F;
    --mv-secondary-rgb: 212, 175, 55;
    
    /* Accent: Patina Green */
    --mv-accent: #40916C;
    --mv-accent-light: #52B788;
    --mv-accent-dark: #2D6A4F;
    
    /* Metallics */
    --mv-gold: #FFD700;
    --mv-silver: #C0C0C0;
    --mv-copper: #B87333;
    --mv-bronze: #CD7F32;
    --mv-platinum: #E5E4E2;
    
    /* Neutrals */
    --mv-background: #FDFBF7;
    --mv-surface: #FFFFFF;
    --mv-dark: #1a1a1a;
    --mv-text: #1F2937;
    --mv-text-muted: #6B7280;
    --mv-text-light: #9CA3AF;
    --mv-border: #E5E7EB;
    --mv-border-light: #F3F4F6;
    
    /* Semantic */
    --mv-success: #15803D;
    --mv-success-light: #22C55E;
    --mv-warning: #D97706;
    --mv-warning-light: #F59E0B;
    --mv-error: #DC2626;
    --mv-error-light: #EF4444;
    --mv-info: #0369A1;
    --mv-info-light: #0EA5E9;
    
    /* Shadows */
    --mv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --mv-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --mv-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --mv-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --mv-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --mv-shadow-gold: 0 10px 40px rgba(212, 175, 55, 0.3);
    --mv-shadow-green: 0 10px 40px rgba(27, 67, 50, 0.2);
    
    /* Transitions */
    --mv-transition-fast: 150ms ease;
    --mv-transition: 200ms ease;
    --mv-transition-slow: 300ms ease;
    
    /* Border Radius */
    --mv-radius-sm: 4px;
    --mv-radius: 8px;
    --mv-radius-md: 12px;
    --mv-radius-lg: 16px;
    --mv-radius-xl: 24px;
    --mv-radius-full: 9999px;
    
    /* Spacing Scale */
    --mv-space-xs: 0.25rem;
    --mv-space-sm: 0.5rem;
    --mv-space-md: 1rem;
    --mv-space-lg: 1.5rem;
    --mv-space-xl: 2rem;
    --mv-space-2xl: 3rem;
    --mv-space-3xl: 4rem;
}

/* ==============================================
   BASE STYLES
   ============================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--mv-text);
    background-color: var(--mv-background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums;
}

main {
    flex: 1;
}

/* ==============================================
   TYPOGRAPHY
   ============================================== */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    color: var(--mv-primary);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--mv-text-muted);
}

@media (min-width: 768px) {
    .lead { font-size: 1.25rem; }
}

a {
    color: var(--mv-accent);
    text-decoration: none;
    transition: color var(--mv-transition);
}

a:hover {
    color: var(--mv-accent-dark);
}

/* ==============================================
   BUTTONS
   ============================================== */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--mv-radius);
    transition: all var(--mv-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    line-height: 1.5;
}

/* Touch-friendly on mobile */
@media (max-width: 767.98px) {
    .btn {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
    }
}

/* Primary Button (Green) */
.btn-primary {
    background-color: var(--mv-primary);
    border-color: var(--mv-primary);
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--mv-primary-light);
    border-color: var(--mv-primary-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--mv-shadow-green);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Gold Button (Call to Action) */
.btn-gold {
    background: linear-gradient(135deg, var(--mv-secondary) 0%, var(--mv-secondary-dark) 100%);
    border-color: var(--mv-secondary);
    color: var(--mv-dark);
    font-weight: 700;
}

.btn-gold:hover, .btn-gold:focus {
    background: linear-gradient(135deg, var(--mv-secondary-light) 0%, var(--mv-secondary) 100%);
    border-color: var(--mv-secondary-light);
    color: var(--mv-dark);
    transform: translateY(-2px);
    box-shadow: var(--mv-shadow-gold);
}

/* Accent Button */
.btn-accent {
    background-color: var(--mv-accent);
    border-color: var(--mv-accent);
    color: #fff;
}

.btn-accent:hover, .btn-accent:focus {
    background-color: var(--mv-accent-light);
    border-color: var(--mv-accent-light);
    color: #fff;
}

/* Outline Variants */
.btn-outline-primary {
    border-color: var(--mv-primary);
    color: var(--mv-primary);
    background: transparent;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--mv-primary);
    border-color: var(--mv-primary);
    color: #fff;
}

.btn-outline-gold {
    border: 2px solid var(--mv-secondary);
    color: var(--mv-secondary);
    background: transparent;
    font-weight: 600;
}

.btn-outline-gold:hover, .btn-outline-gold:focus {
    background-color: var(--mv-secondary);
    border-color: var(--mv-secondary);
    color: var(--mv-dark);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.btn-outline-light:hover, .btn-outline-light:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

/* Button Sizes */
.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.125rem;
    border-radius: var(--mv-radius-md);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--mv-radius-sm);
}

/* ==============================================
   NAVIGATION
   ============================================== */
.navbar-mv {
    background: var(--mv-primary) !important;
    box-shadow: var(--mv-shadow-md);
    padding: 0.75rem 0;
}

.navbar-mv .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--mv-secondary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-mv .navbar-brand:hover {
    color: var(--mv-secondary-light) !important;
}

.navbar-mv .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color var(--mv-transition);
    position: relative;
}

.navbar-mv .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--mv-secondary);
    transition: width var(--mv-transition);
}

.navbar-mv .nav-link:hover::after,
.navbar-mv .nav-link.active::after {
    width: calc(100% - 2rem);
}

.navbar-mv .nav-link:hover,
.navbar-mv .nav-link.active {
    color: var(--mv-secondary) !important;
}

/* Mobile Nav */
@media (max-width: 991.98px) {
    .navbar-mv .navbar-collapse {
        background: var(--mv-primary);
        padding: 1rem;
        margin-top: 0.75rem;
        border-radius: var(--mv-radius-md);
        box-shadow: var(--mv-shadow-lg);
    }
    
    .navbar-mv .nav-link {
        padding: 0.875rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-mv .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-mv .nav-link::after {
        display: none;
    }
}

/* ==============================================
   CARDS
   ============================================== */
.card {
    background: var(--mv-surface);
    border: 1px solid var(--mv-border);
    border-radius: var(--mv-radius-md);
    box-shadow: var(--mv-shadow-sm);
    overflow: hidden;
}

.card-hover {
    transition: transform var(--mv-transition), box-shadow var(--mv-transition);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--mv-shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--mv-primary), var(--mv-primary-light));
    color: #fff;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-bottom: none;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--mv-border-light);
    border-top: 1px solid var(--mv-border);
    padding: 1rem 1.25rem;
}

/* Premium Card Variant */
.card-premium {
    border: 2px solid var(--mv-secondary);
    position: relative;
    overflow: visible;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--mv-secondary), var(--mv-gold));
    z-index: -1;
    border-radius: calc(var(--mv-radius-md) + 2px);
    opacity: 0;
    transition: opacity var(--mv-transition);
}

.card-premium:hover::before {
    opacity: 1;
}

/* ==============================================
   GRADE BADGES (Premium Coin-Like Design)
   ============================================== */
.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    position: relative;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.3),
        0 8px 25px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.grade-badge::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.grade-badge-sm {
    width: 50px;
    height: 50px;
    font-size: 0.875rem;
}

.grade-badge-lg {
    width: 140px;
    height: 140px;
    font-size: 2rem;
}

.grade-badge-xl {
    width: 180px;
    height: 180px;
    font-size: 2.5rem;
}

/* Grade Badge Colors - Mint State (Gold) */
.grade-badge-mint,
.grade-badge.grade-mint {
    background: linear-gradient(145deg, #FFD700, var(--mv-secondary), var(--mv-secondary-dark));
    color: var(--mv-dark);
}

/* Grade Badge Colors - About Uncirculated (Silver) */
.grade-badge-au,
.grade-badge.grade-au {
    background: linear-gradient(145deg, #E8E8E8, var(--mv-silver), #A8A8A8);
    color: var(--mv-dark);
}

/* Grade Badge Colors - Extremely Fine (Copper) */
.grade-badge-ef,
.grade-badge.grade-ef {
    background: linear-gradient(145deg, #D4945A, var(--mv-copper), #8B5A2B);
    color: #fff;
}

/* Grade Badge Colors - Very Fine and below */
.grade-badge-vf,
.grade-badge.grade-vf {
    background: linear-gradient(145deg, var(--mv-accent), var(--mv-accent-dark));
    color: #fff;
}

.grade-badge-lower,
.grade-badge.grade-lower {
    background: linear-gradient(145deg, #6B7280, #4B5563);
    color: #fff;
}

/* Inline Grade Badge (for text) */
.grade-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mv-primary), var(--mv-accent));
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--mv-radius);
    box-shadow: var(--mv-shadow-sm);
}

/* ==============================================
   VALUE DISPLAY
   ============================================== */
.value-display {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--mv-primary);
}

.value-display-lg {
    font-size: 2.5rem;
}

.value-range {
    font-size: 0.875rem;
    color: var(--mv-text-muted);
}

.value-positive {
    color: var(--mv-success);
}

.value-negative {
    color: var(--mv-error);
}

/* Confidence Meter */
.confidence-meter {
    height: 8px;
    background: var(--mv-border);
    border-radius: var(--mv-radius-full);
    overflow: hidden;
}

.confidence-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mv-accent), var(--mv-secondary));
    border-radius: var(--mv-radius-full);
    transition: width 1s ease-out;
}

/* ==============================================
   UPLOAD ZONE
   ============================================== */
.upload-zone {
    border: 3px dashed var(--mv-border);
    border-radius: var(--mv-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--mv-background);
    transition: all var(--mv-transition);
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--mv-accent);
    background: rgba(64, 145, 108, 0.05);
}

.upload-zone.has-file {
    border-color: var(--mv-success);
    background: rgba(21, 128, 61, 0.05);
}

.upload-zone .upload-icon {
    font-size: 4rem;
    color: var(--mv-text-light);
    margin-bottom: 1rem;
    transition: color var(--mv-transition);
}

.upload-zone:hover .upload-icon,
.upload-zone.dragover .upload-icon {
    color: var(--mv-accent);
}

.upload-zone.has-file .upload-icon {
    color: var(--mv-success);
}

/* ==============================================
   FORMS
   ============================================== */
.form-control,
.form-select {
    border: 1px solid var(--mv-border);
    border-radius: var(--mv-radius);
    padding: 0.625rem 1rem;
    transition: border-color var(--mv-transition), box-shadow var(--mv-transition);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--mv-accent);
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.15);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--mv-text);
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--mv-text-muted);
    font-size: 0.875rem;
}

/* Touch-friendly inputs on mobile */
@media (max-width: 767.98px) {
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents iOS zoom */
        min-height: 48px;
    }
}

/* Input Groups */
.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child,
.input-group .input-group-text:first-child {
    border-top-left-radius: var(--mv-radius);
    border-bottom-left-radius: var(--mv-radius);
}

.input-group .form-control:last-child,
.input-group .input-group-text:last-child,
.input-group .btn:last-child {
    border-top-right-radius: var(--mv-radius);
    border-bottom-right-radius: var(--mv-radius);
}

/* ==============================================
   HERO SECTIONS
   ============================================== */
.hero {
    background: linear-gradient(135deg, var(--mv-primary) 0%, var(--mv-primary-dark) 100%);
    color: #fff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4AF37' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='15'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero h1,
.hero h2 {
    color: #fff;
}

.hero .text-gold {
    color: var(--mv-secondary);
}

/* ==============================================
   FEATURE CARDS
   ============================================== */
.feature-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
}

.feature-card .feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(64, 145, 108, 0.1), rgba(27, 67, 50, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--mv-accent);
    transition: all var(--mv-transition);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--mv-accent), var(--mv-primary));
    color: #fff;
    transform: scale(1.1);
}

.feature-icon-lg {
    font-size: 2.5rem;
}

/* ==============================================
   PRICING CARDS
   ============================================== */
.pricing-card {
    text-align: center;
    padding: 2rem;
}

.pricing-card.featured {
    border: 2px solid var(--mv-secondary);
    position: relative;
}

@media (min-width: 992px) {
    .pricing-card.featured {
        transform: scale(1.05);
        z-index: 1;
    }
}

.pricing-card .price {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--mv-primary);
}

.pricing-card .price .currency {
    font-size: 1.5rem;
    vertical-align: top;
}

.pricing-card .period {
    color: var(--mv-text-muted);
}

/* ==============================================
   COLLECTION / ITEM CARDS
   ============================================== */
.collection-card {
    position: relative;
    overflow: hidden;
}

.collection-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--mv-background);
}

.collection-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--mv-transition-slow);
}

.collection-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.collection-card .grade-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1;
}

.collection-card .card-body {
    padding: 1rem;
}

.collection-card .item-title {
    font-weight: 600;
    color: var(--mv-text);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-card .item-value {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--mv-primary);
}

/* ==============================================
   PROGRESS STEPS
   ============================================== */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

/* Connector Line */
.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: var(--mv-border);
    z-index: 0;
}

.progress-step.active:not(:last-child)::after,
.progress-step.completed:not(:last-child)::after {
    background: linear-gradient(90deg, var(--mv-accent), var(--mv-accent-light));
}

.progress-step .step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mv-border);
    color: var(--mv-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    position: relative;
    z-index: 1;
    font-weight: 600;
    transition: all var(--mv-transition);
}

.progress-step.active .step-icon {
    background: var(--mv-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(64, 145, 108, 0.2);
    animation: pulse-ring 1.5s infinite;
}

.progress-step.completed .step-icon {
    background: var(--mv-success);
    color: #fff;
}

.progress-step .step-label {
    font-size: 0.875rem;
    color: var(--mv-text-muted);
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: var(--mv-text);
    font-weight: 500;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(64, 145, 108, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(64, 145, 108, 0); }
    100% { box-shadow: 0 0 0 0 rgba(64, 145, 108, 0); }
}

/* ==============================================
   STATUS BADGES
   ============================================== */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    border-radius: var(--mv-radius-full);
}

.badge-pending,
.bg-pending {
    background-color: var(--mv-warning-light);
    color: var(--mv-dark);
}

.badge-processing,
.bg-processing {
    background-color: var(--mv-accent);
    color: #fff;
}

.badge-completed,
.bg-completed {
    background-color: var(--mv-success);
    color: #fff;
}

.badge-failed,
.bg-failed {
    background-color: var(--mv-error);
    color: #fff;
}

/* ==============================================
   STAT CARDS (Admin Dashboard)
   ============================================== */
.stat-card {
    border-left: 4px solid var(--mv-accent);
    padding: 1.5rem;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--mv-radius);
    background: linear-gradient(135deg, rgba(64, 145, 108, 0.1), rgba(27, 67, 50, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--mv-accent);
}

.stat-card .stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--mv-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--mv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-card .stat-change.positive {
    color: var(--mv-success);
}

.stat-card .stat-change.negative {
    color: var(--mv-error);
}

/* ==============================================
   BLOG STYLES
   ============================================== */
.blog-card {
    height: 100%;
}

.blog-card .card-img-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--mv-transition-slow);
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

.blog-card .category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--mv-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--mv-radius-full);
}

.blog-meta {
    font-size: 0.875rem;
    color: var(--mv-text-muted);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.blog-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.blog-content img {
    max-width: 100%;
    border-radius: var(--mv-radius-md);
    margin: 1.5rem 0;
}

/* ==============================================
   FOOTER
   ============================================== */
.footer-mv {
    background: var(--mv-primary);
    color: rgba(255, 255, 255, 0.9);
    padding: 3rem 0 1.5rem;
}

.footer-mv h5,
.footer-mv h6 {
    color: var(--mv-secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-mv a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--mv-transition);
}

.footer-mv a:hover {
    color: var(--mv-secondary);
}

.footer-mv .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all var(--mv-transition);
}

.footer-mv .social-links a:hover {
    background: var(--mv-secondary);
    color: var(--mv-dark);
    transform: translateY(-3px);
}

/* ==============================================
   ALERTS & NOTIFICATIONS
   ============================================== */
.alert {
    border: none;
    border-radius: var(--mv-radius-md);
    padding: 1rem 1.25rem;
}

.alert-success {
    background: rgba(21, 128, 61, 0.1);
    color: var(--mv-success);
    border-left: 4px solid var(--mv-success);
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--mv-error);
    border-left: 4px solid var(--mv-error);
}

.alert-warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--mv-warning);
    border-left: 4px solid var(--mv-warning);
}

.alert-info {
    background: rgba(3, 105, 161, 0.1);
    color: var(--mv-info);
    border-left: 4px solid var(--mv-info);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1055;
}

.toast {
    border-radius: var(--mv-radius-md);
    box-shadow: var(--mv-shadow-lg);
}

/* ==============================================
   LOADING STATES
   ============================================== */
.spinner-gold {
    color: var(--mv-secondary);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, 
        var(--mv-border-light) 25%, 
        var(--mv-border) 50%, 
        var(--mv-border-light) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--mv-radius);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    width: 75%;
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */
/* Colors */
.text-gold { color: var(--mv-secondary) !important; }
.text-primary-dark { color: var(--mv-primary) !important; }
.text-accent { color: var(--mv-accent) !important; }
.text-copper { color: var(--mv-copper) !important; }
.text-silver { color: var(--mv-silver) !important; }

.bg-primary-dark { background-color: var(--mv-primary) !important; }
.bg-cream { background-color: var(--mv-background) !important; }
.bg-gold { background-color: var(--mv-secondary) !important; }
.bg-accent { background-color: var(--mv-accent) !important; }

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--mv-primary) 0%, var(--mv-accent) 100%) !important;
}

.border-gold { border-color: var(--mv-secondary) !important; }
.border-accent { border-color: var(--mv-accent) !important; }

/* Shadows */
.shadow-gold { box-shadow: var(--mv-shadow-gold) !important; }
.shadow-green { box-shadow: var(--mv-shadow-green) !important; }

/* Spacing */
.gap-xs { gap: var(--mv-space-xs); }
.gap-sm { gap: var(--mv-space-sm); }
.gap-md { gap: var(--mv-space-md); }
.gap-lg { gap: var(--mv-space-lg); }

/* ==============================================
   ACCESSIBILITY
   ============================================== */
/* Focus States */
:focus-visible {
    outline: 3px solid var(--mv-accent);
    outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.25);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--mv-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    transition: top var(--mv-transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
    .btn,
    .badge,
    .grade-badge {
        border: 2px solid currentColor;
    }
}

/* ==============================================
   RESPONSIVE IMAGES (Global)
   ============================================== */
img {
    max-width: 100%;
    height: auto;
}

/* ==============================================
   SAFE AREA SUPPORT (Notched Phones)
   ============================================== */
body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.footer-mv {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

.navbar-mv {
    padding-top: env(safe-area-inset-top);
}

/* ==============================================
   MOBILE TOUCH TARGETS
   ============================================== */
@media (max-width: 767.98px) {
    /* Footer links need adequate touch targets */
    .footer-mv a {
        display: inline-block;
        min-height: 44px;
        line-height: 44px;
    }
    
    .footer-mv .list-unstyled li {
        margin-bottom: 0;
    }
    
    /* Pagination touch targets */
    .page-link,
    .page-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Accordion buttons */
    .accordion-button {
        min-height: 48px;
        font-size: 16px;
    }
    
    /* Dropdown items */
    .dropdown-item {
        padding: 0.625rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* List group items as nav */
    .list-group-item-action {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Tabs */
    .nav-tabs .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ==============================================
   RESPONSIVE UTILITIES
   ============================================== */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .grade-badge-xl {
        width: 120px;
        height: 120px;
        font-size: 1.75rem;
    }
    
    /* Prevent horizontal overflow */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Stack filter forms better on small screens */
    .input-group {
        flex-wrap: wrap;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .grade-badge-xl {
        width: 140px;
        height: 140px;
        font-size: 2rem;
    }
}

/* ==============================================
   PRINT STYLES
   ============================================== */
@media print {
    .navbar,
    .footer-mv,
    .btn,
    .no-print {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .grade-badge {
        border: 2px solid currentColor;
        box-shadow: none;
    }
}

/* ==============================================
   ANIMATION KEYFRAMES
   ============================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}
