/* FastPedia Critical CSS - Above the fold styles for mobile optimization */

/* Mobile-first critical path CSS for FastPedia */
:root {
    /* FastPedia Brand Colors */
    --fp-primary-blue: #2563EB;
    --fp-primary-blue-dark: #1E40AF;
    --fp-primary-blue-light: #60A5FA;
    --fp-accent-yellow: #FFB800;
    --fp-accent-yellow-dark: #F59E0B;
    --fp-accent-yellow-light: #FCD34D;

    /* Semantic Colors */
    --color-success: #10B981;
    --color-success-light: #D1FAE5;
    --color-warning: #F59E0B;
    --color-warning-light: #FEF3C7;
    --color-error: #EF4444;
    --color-error-light: #FEE2E2;
    --color-info: #3B82F6;
    --color-info-light: #DBEAFE;

    /* Surface Colors */
    --surface-background: #F8F9FA;
    --surface-card: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --surface-muted: #F1F5F9;

    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-disabled: #94A3B8;
    --text-inverse: #FFFFFF;

    /* Border Colors */
    --border-default: #E2E8F0;
    --border-muted: #F1F5F9;
    --border-focus: var(--fp-primary-blue);
    --border-hover: var(--fp-primary-blue-light);

    /* Spacing Scale */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Border Radius - Standardized */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows - Standardized */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 12px 40px rgba(15, 23, 42, 0.12);
    --shadow-2xl: 0 20px 60px rgba(15, 23, 42, 0.15);
    --shadow-primary: 0 4px 15px rgba(37, 99, 235, 0.25);
    --shadow-primary-lg: 0 8px 30px rgba(37, 99, 235, 0.30);
    --shadow-accent: 0 4px 15px rgba(255, 184, 0, 0.25);

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
}

/* Critical layout styles - Mobile first */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: transparent;
    background: var(--surface-background);
    color: var(--text-primary);
    font-size: var(--text-base);
    line-height: 1.5;
}

/* Critical navigation styles for immediate mobile interaction */
.navbar {
    background: var(--surface-card) !important;
    border-bottom: 2px solid var(--fp-primary-blue);
    padding: var(--space-2) 0;
    position: relative;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar-nav {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .navbar-nav {
        flex-direction: row;
    }
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    text-decoration: none;
}

.navbar-brand img {
    height: clamp(24px, 4vw, 32px);
    width: auto;
    max-width: 100%;
}

/* Critical mobile navigation */
.navbar-toggler {
    border: 2px solid var(--fp-primary-blue);
    padding: 0.5rem 0.75rem;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border-radius: 4px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    outline: none;
}

.navbar-collapse {
    margin-top: var(--space-4);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--border-default);
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: var(--font-medium);
    padding: var(--space-2) var(--space-3) !important;
    border-radius: var(--radius-sm);
    margin: var(--space-1) 0;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: var(--text-sm);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--fp-primary-blue) !important;
    background: rgba(37, 99, 235, 0.1);
}

/* Container for mobile-first responsive design */
.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

/* Critical main content area */
main {
    flex: 1;
    width: 100%;
}

/* Critical button styles for immediate interaction */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--fp-primary-blue), var(--fp-primary-blue-light));
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--fp-primary-blue-dark), var(--fp-primary-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    color: white;
}

.btn-outline-primary {
    color: var(--fp-primary-blue);
    border-color: var(--fp-primary-blue);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background: var(--fp-primary-blue);
    border-color: var(--fp-primary-blue);
    color: white;
}

.bookmark-button {
    background-color: #fff;
    color: var(--fp-primary-blue);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    font-weight: 600;
}

.bookmark-button:hover,
.bookmark-button:focus {
    background-color: #f8fafc;
    color: var(--fp-primary-blue);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.bookmark-toggle-btn[data-bookmarked="true"] {
    background-color: #fff;
    color: var(--fp-primary-blue);
    border-color: rgba(37, 99, 235, 0.35);
}

/* Critical form styles for immediate mobile use */
.form-control {
    display: block;
    width: 100%;
    padding: var(--space-2) var(--space-4);
    font-size: 16px; /* Prevents zoom on iOS */
    font-weight: var(--font-normal);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--surface-card);
    background-clip: padding-box;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    min-height: 44px;
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
    background: var(--surface-card);
}

/* Critical card styles for content display */
.card {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.card-body {
    padding: var(--space-5);
}

/* Critical responsive grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.col, .col-6, .col-md-6, .col-lg-2, .col-lg-3, .col-lg-4 {
    position: relative;
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Critical typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
}

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3.5vw, 1.75rem); }
h4 { font-size: clamp(1.125rem, 3vw, 1.5rem); }
h5 { font-size: clamp(1rem, 2.5vw, 1.25rem); }

p {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.6;
}

/* Critical loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* Skeleton Loading States */
.skeleton {
    background: #f0f0f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

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

.tool-card-skeleton {
    background: white;
    border-radius: 20px;
    border: 1px solid #e9ecef;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tool-card-skeleton .image-skeleton {
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    background: #f0f0f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.tool-card-skeleton .content-skeleton {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-card-skeleton .title-skeleton {
    height: 24px;
    width: 70%;
    background: #f0f0f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.tool-card-skeleton .text-skeleton {
    height: 16px;
    width: 100%;
    background: #f0f0f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.tool-card-skeleton .text-skeleton:last-child {
    width: 60%;
}

.tool-card-skeleton .footer-skeleton {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

.tool-card-skeleton .badge-skeleton {
    height: 24px;
    width: 60px;
    border-radius: 12px;
    background: #f0f0f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.tool-image-container.skeleton-loader {
    background: #f0f0f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    min-height: 200px; /* Approximate height of tool card image */
}

.tool-image-container.skeleton-loader img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-image-container img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Live Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    margin-top: 0.5rem;
    display: none; /* Hidden by default */
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.search-dropdown.show {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    transition: background-color 0.2s;
    text-decoration: none;
    color: #212529; /* Fallback if var not available */
    color: var(--text-primary, #212529);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

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

.search-result-item:hover, .search-result-item:focus {
    background-color: #f8fafc;
    color: var(--fp-primary-blue);
}

.search-result-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.75rem;
    color: #94A3B8; /* Fallback */
    color: var(--text-secondary, #94A3B8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile Search Modal Style */
@media (max-width: 768px) {
    .search-dropdown {
        position: fixed;
        top: 60px; /* Below navbar */
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        border-radius: 0;
        max-height: none;
        border: none;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding-bottom: 2rem;
    }
}

/* Extra-small phone breakpoint (< 480px) */
@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Compact navbar on tiny screens */
    .navbar-brand img {
        height: 24px;
    }

    .navbar-collapse {
        padding: 0.5rem 0;
    }

    /* Reduce card body padding */
    .card-body {
        padding: 1rem;
    }

    /* Form controls need touch-friendly sizing */
    .form-control {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 48px;
        padding: 0.75rem 1rem;
    }

    /* Ensure all buttons meet touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.625rem 1rem;
    }

    /* Typography adjustments for tiny screens */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }

    /* Reduce row gutters */
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .col, .col-6, .col-md-6, .col-lg-3, .col-lg-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Mobile utility classes */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

.fluid-padding {
    padding: clamp(1rem, 3vw, 2rem);
}

.fluid-margin {
    margin: clamp(1rem, 3vw, 2rem);
}

/* Horizontal scroll container for filters/chips */
.scroll-x-mobile {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .scroll-x-mobile {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.5rem;
        margin: 0 -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .scroll-x-mobile::-webkit-scrollbar {
        display: none;
    }

    .scroll-x-mobile > * {
        scroll-snap-align: start;
        flex-shrink: 0;
    }

    /* Stack on mobile utility */
    .stack-mobile {
        flex-direction: column;
    }

    .stack-mobile > * {
        width: 100%;
    }

    /* Full width on mobile */
    .full-width-mobile {
        width: 100%;
    }
}

/* Critical responsive breakpoints */
@media (min-width: 576px) {
    .container { max-width: 540px; }
    .navbar-brand img { height: 36px; }
}

@media (min-width: 768px) {
    .container { max-width: 720px; }
    
    .navbar-brand img { height: 40px; }
    
    .navbar-collapse {
        margin-top: 0;
        padding: 0;
        border-top: none;
        display: flex !important;
        flex-basis: auto;
    }
    
    .navbar-nav {
        display: flex;
        flex-direction: row;
        margin-left: auto;
    }
    
    .nav-link {
        padding: 0.5rem 1rem !important;
        margin: 0;
        border-radius: 4px;
        min-height: auto;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .form-control {
        font-size: 1rem;
    }
}

@media (min-width: 992px) {
    .container { max-width: 960px; }

    .col-lg-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }

    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

/* Critical reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Scroll Indicators for horizontal scroll areas */
.scroll-container {
    position: relative;
}

.scroll-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.scroll-container.scroll-end::after {
    opacity: 0;
}

.scroll-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.95));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.scroll-container.scroll-start::before {
    opacity: 1;
}

/* Scroll hint animation (pulsing arrow) */
.scroll-hint {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fp-primary-blue);
    font-size: 1.25rem;
    animation: scroll-hint-pulse 2s ease-in-out infinite;
    z-index: 20;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    cursor: pointer;
}

.scroll-hint i {
    pointer-events: none;
}

@keyframes scroll-hint-pulse {
    0%, 100% { opacity: 0.4; transform: translateY(-50%) translateX(0); }
    50% { opacity: 1; transform: translateY(-50%) translateX(4px); }
}

.scroll-container.scrolled .scroll-hint {
    display: none;
}

/* Touch Feedback Animations */
.touch-feedback {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.touch-feedback::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(37, 99, 235, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
}

.touch-feedback:active::after {
    width: 200%;
    height: 200%;
    opacity: 1;
    transition: width 0s, height 0s, opacity 0s;
}

/* Button press effect */
.btn-press {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-press:active {
    transform: scale(0.97);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Card tap feedback */
.card-tap {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-tap:active {
    transform: scale(0.98);
}

/* Touch-friendly link styles */
@media (hover: none) and (pointer: coarse) {
    /* Styles for touch devices */
    .card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .card:active {
        transform: scale(0.99);
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    }

    .btn:hover {
        transform: none;
    }

    .btn:active {
        transform: scale(0.97);
    }

    /* Increase tap targets on touch devices */
    a, button {
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
    }
}

/* Loading button state */
.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.25rem;
    height: 1.25rem;
    margin: -0.625rem 0 0 -0.625rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.75s linear infinite;
}

.btn-loading::before {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: inherit;
    font-size: 0;
    visibility: hidden;
}

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

/* Smooth page transitions */
.page-transition {
    animation: fadeIn 0.3s ease-out;
}

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

/* Critical print styles */
@media print {
    .navbar,
    .btn,
    .card-hover-effects {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* ========================================
   FastPedia Component System
   Standardized reusable components
   ======================================== */

/* FP Cards - Standardized card styles */
.fp-card {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.fp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.fp-card-elevated {
    box-shadow: var(--shadow-md);
}

.fp-card-elevated:hover {
    box-shadow: var(--shadow-xl);
}

.fp-card-flat {
    box-shadow: none;
    border: 1px solid var(--border-default);
}

.fp-card-flat:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.fp-card-body {
    padding: var(--space-6);
}

.fp-card-body-sm {
    padding: var(--space-4);
}

.fp-card-body-lg {
    padding: var(--space-8);
}

/* FP Hero - Standardized hero sections */
.fp-hero {
    background: linear-gradient(135deg, var(--fp-primary-blue) 0%, var(--fp-primary-blue-dark) 50%, #0F172A 100%);
    min-height: 50vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: var(--space-12) 0;
}

.fp-hero-compact {
    min-height: 35vh;
    padding: var(--space-8) 0;
}

.fp-hero-full {
    min-height: 85vh;
}

.fp-hero-light {
    background: linear-gradient(135deg, var(--surface-background) 0%, var(--surface-card) 100%);
    color: var(--text-primary);
}

.fp-hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-inverse);
}

.fp-hero-light .fp-hero-content {
    color: var(--text-primary);
}

.fp-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--font-bold);
    line-height: 1.2;
    margin-bottom: var(--space-4);
}

.fp-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    max-width: 600px;
}

/* FP Sections - Standardized page sections */
.fp-section {
    padding: var(--space-16) 0;
}

.fp-section-sm {
    padding: var(--space-12) 0;
}

.fp-section-lg {
    padding: var(--space-20) 0;
}

.fp-section-muted {
    background: var(--surface-background);
}

.fp-section-white {
    background: var(--surface-card);
}

.fp-section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.fp-section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
}

/* FP Buttons - Standardized button styles */
.fp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
    min-height: 44px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.fp-btn-primary {
    background: linear-gradient(135deg, var(--fp-primary-blue), var(--fp-primary-blue-light));
    color: var(--text-inverse);
    box-shadow: var(--shadow-primary);
}

.fp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-lg);
    color: var(--text-inverse);
}

.fp-btn-accent {
    background: linear-gradient(135deg, var(--fp-accent-yellow), var(--fp-accent-yellow-dark));
    color: var(--text-primary);
    box-shadow: var(--shadow-accent);
}

.fp-btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 184, 0, 0.35);
    color: var(--text-primary);
}

.fp-btn-outline {
    background: transparent;
    color: var(--fp-primary-blue);
    border: 2px solid var(--fp-primary-blue);
    box-shadow: none;
}

.fp-btn-outline:hover {
    background: var(--fp-primary-blue);
    color: var(--text-inverse);
}

.fp-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    box-shadow: none;
}

.fp-btn-ghost:hover {
    background: var(--surface-muted);
    color: var(--text-primary);
}

.fp-btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    min-height: 36px;
}

.fp-btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
    min-height: 52px;
}

/* FP Badges - Standardized badge styles */
.fp-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.fp-badge-primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--fp-primary-blue);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.fp-badge-accent {
    background: linear-gradient(135deg, var(--fp-accent-yellow), var(--fp-accent-yellow-dark));
    color: var(--text-primary);
}

.fp-badge-success {
    background: var(--color-success-light);
    color: var(--color-success);
}

.fp-badge-warning {
    background: var(--color-warning-light);
    color: var(--color-warning);
}

.fp-badge-error {
    background: var(--color-error-light);
    color: var(--color-error);
}

.fp-badge-muted {
    background: var(--surface-muted);
    color: var(--text-secondary);
}

/* FP Inputs - Standardized form input styles */
.fp-input {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 16px;
    font-weight: var(--font-normal);
    color: var(--text-primary);
    background: var(--surface-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    min-height: 48px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fp-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.fp-input::placeholder {
    color: var(--text-disabled);
}

.fp-input-lg {
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-lg);
    min-height: 56px;
    border-radius: var(--radius-lg);
}

/* FP Text - Standardized text styles */
.fp-text-primary {
    color: var(--text-primary);
}

.fp-text-secondary {
    color: var(--text-secondary);
}

.fp-text-muted {
    color: var(--text-muted);
}

.fp-text-success {
    color: var(--color-success);
}

.fp-text-warning {
    color: var(--color-warning);
}

.fp-text-error {
    color: var(--color-error);
}

/* FP Backgrounds - Standardized background utilities */
.fp-bg-card {
    background: var(--surface-card);
}

.fp-bg-muted {
    background: var(--surface-background);
}

.fp-bg-elevated {
    background: var(--surface-elevated);
}

/* FP Grid - Tool card grid */
.fp-tool-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-6);
}

@media (min-width: 576px) {
    .fp-tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .fp-tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .fp-tool-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* FP Divider */
.fp-divider {
    height: 1px;
    background: var(--border-default);
    margin: var(--space-8) 0;
}

.fp-divider-sm {
    margin: var(--space-4) 0;
}

/* FP Spacers */
.fp-space-4 { height: var(--space-4); }
.fp-space-8 { height: var(--space-8); }
.fp-space-12 { height: var(--space-12); }
.fp-space-16 { height: var(--space-16); }
