/**
 * UsedNC.com - Main Stylesheet
 * ============================
 * All custom styles for the UsedNC website.
 * Tailwind CSS handles utility classes; this file handles:
 * - Font declarations
 * - Global resets and base styles
 * - Custom component styles
 * - Utility classes not covered by Tailwind
 */

/* ==========================================================================
   FONT DECLARATIONS
   ========================================================================== */

/* Poppins - Used for headings */
@font-face {
    font-family: 'Poppins';
    src: url('/web/fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/web/fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/web/fonts/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/web/fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Montserrat - Used for accents */
@font-face {
    font-family: 'Montserrat';
    src: url('/web/fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/web/fonts/Montserrat-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/web/fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/web/fonts/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Roboto - Used for body text */
@font-face {
    font-family: 'Roboto';
    src: url('/web/fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/web/fonts/Roboto-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/web/fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   GLOBAL STYLES & RESETS
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

.accent-font {
    font-family: 'Montserrat', sans-serif;
}

/* ==========================================================================
   SCROLLBAR STYLING
   ========================================================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #003d7a;
}

/* ==========================================================================
   ACCESSIBILITY - FOCUS STYLES
   ========================================================================== */

*:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* ==========================================================================
   SECTION BACKGROUNDS
   ========================================================================== */

#vehicle-inventory {
    background-image: url('/images/pattern-background.jpg');
    background-size: contain;
    background-position: top;
    background-repeat: no-repeat;
}

#cta-section {
    background-image: url('/images/pattern-background-cta.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ==========================================================================
   PLACEHOLDER STYLES
   ========================================================================== */

/* Article image placeholder */
.article-image-placeholder {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    margin: 30px 0;
}

.article-image-placeholder i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 15px;
}

.article-image-placeholder p {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* Advertisement placeholder */
.ad-placeholder {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.ad-placeholder::before {
    content: 'ADVERTISEMENT';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #9ca3af;
    letter-spacing: 1px;
    font-weight: 600;
}

.ad-placeholder p {
    color: #9ca3af;
    font-size: 14px;
}

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

/* Main container */
.nc-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 640px) {
    .nc-container {
        padding: 0 16px;
    }
}

/* Trust badges */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.trust-badge i {
    color: #0066cc;
}

/* ==========================================================================
   RESPONSIVE QUICK SUMMARY
   ========================================================================== */

/* Mobile-first: shows after first paragraph on mobile */
.quick-summary-mobile {
    display: block;
    margin: 2rem 0;
}

.quick-summary-desktop {
    display: none;
}

/* Desktop: hide mobile version, show sidebar version */
@media (min-width: 1024px) {
    .quick-summary-mobile {
        display: none;
    }
    .quick-summary-desktop {
        display: block;
    }
}

/* ==========================================================================
   ARTICLE COMPONENT STYLES
   ========================================================================== */

/**
 * Article Content Wrapper
 * Use inside the article card for consistent padding
 */
.article-content {
    padding: 2rem;
}

@media (min-width: 768px) {
    .article-content {
        padding: 2rem;
    }
}

/**
 * Article Hero Image
 * Full-width image at top of article card
 */
.article-hero {
    width: 100%;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    display: block;
}

/**
 * Article Hero with Blur Background
 * For images that don't fill the space well
 */
.article-hero-blur {
    position: relative;
    aspect-ratio: 1200 / 630;
    overflow: hidden;
}

.article-hero-blur__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    filter: blur(20px);
    opacity: 0.6;
}

.article-hero-blur__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.article-hero-blur__img {
    position: relative;
    z-index: 10;
    height: 100%;
    width: 100%;
    object-fit: contain;
}

/**
 * Article Meta (date, source badge)
 * Flex container for article metadata
 */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.article-meta__item {
    display: flex;
    align-items: center;
}

.article-meta__item i {
    margin-right: 0.5rem;
}

/**
 * Article Title (H1)
 * Main headline styling
 */
.article-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .article-title {
        font-size: 2.25rem;
    }
}

/**
 * Article Lead Paragraph
 * Opening paragraph with larger text
 */
.article-lead {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 2rem;
}

/**
 * Article Section Heading (H2)
 */
.article-h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

/**
 * Article Subsection Heading (H3)
 */
.article-h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/**
 * Article Paragraph
 */
.article-p {
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

/**
 * Article Link
 * Inline links within article content
 */
.article-link {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.15s ease;
}

.article-link:hover {
    text-decoration: underline;
}

/**
 * Article Highlight Box
 * Colored box for key information (tips, warnings, summaries)
 * Variants: --blue, --green, --yellow, --gray
 */
.article-box {
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.article-box--blue {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
}

.article-box--blue .article-box__title {
    color: #334155;
}

.article-box--green {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.article-box--green .article-box__title {
    color: #166534;
}

.article-box--yellow {
    background-color: #fefce8;
    border: 1px solid #fef08a;
}

.article-box--yellow .article-box__title {
    color: #a16207;
}

.article-box--gray {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

.article-box--gray .article-box__title {
    color: #374151;
}

.article-box--nc-blue {
    background-color: #0066cc;
    color: white;
}

.article-box--nc-blue .article-box__title {
    color: white;
}

.article-box--nc-blue a {
    color: white;
    text-decoration: underline;
}

.article-box__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.article-box__title i {
    margin-right: 0.75rem;
}

/**
 * Article Vehicle Card
 * Highlight box for individual vehicle recommendations
 */
.article-vehicle-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-vehicle-card__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 1rem;
}

/**
 * Article List
 * Styled unordered list
 */
.article-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.article-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.article-list li i {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/**
 * Article Numbered List
 */
.article-list--numbered {
    counter-reset: article-counter;
}

.article-list--numbered li {
    counter-increment: article-counter;
}

.article-list--numbered li::before {
    content: counter(article-counter) ".";
    font-weight: 600;
    margin-right: 0.75rem;
    color: #0066cc;
}

/* ==========================================================================
   LIFESTYLE PROFILE COMPONENTS
   ========================================================================== */

/**
 * Profile Header
 * Gradient background area containing avatar and identity info
 */
.lifestyle-profile__header {
    background: linear-gradient(135deg, #e6f2ff 0%, #f0f6ff 40%, #f9fafb 100%);
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .lifestyle-profile__header {
        padding: 2.5rem;
    }
}

/**
 * Profile Avatar
 * Square 1:1 image with border and shadow
 */
.lifestyle-profile__avatar {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    border-radius: 1rem;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
    .lifestyle-profile__avatar {
        width: 180px;
        height: 180px;
    }
}

@media (min-width: 1024px) {
    .lifestyle-profile__avatar {
        width: 200px;
        height: 200px;
        border-radius: 1.25rem;
    }
}

/**
 * Profile Tags / Badges
 * Pill-shaped identity tags
 */
.lifestyle-profile__tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.lifestyle-profile__tag--primary {
    background-color: #e6f2ff;
    color: #003d7a;
}

.lifestyle-profile__tag--outline {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

/**
 * Quick Stats Grid
 * 6-cell grid showing key specs
 */
.lifestyle-profile__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
    .lifestyle-profile__stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .lifestyle-profile__stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.lifestyle-profile__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 0.75rem;
    border-right: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.lifestyle-profile__stat:last-child {
    border-right: none;
}

/* Center the lone orphan stat on mobile (2-col grid with odd count) */
@media (max-width: 639px) {
    .lifestyle-profile__stat:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 640px) {
    .lifestyle-profile__stat:nth-child(3n) {
        border-right: none;
    }
}

@media (min-width: 1024px) {
    .lifestyle-profile__stat {
        border-bottom: none;
    }
    .lifestyle-profile__stat:nth-child(3n) {
        border-right: 1px solid #f3f4f6;
    }
    .lifestyle-profile__stat:last-child {
        border-right: none;
    }
}

.lifestyle-profile__stat-icon {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.lifestyle-profile__stat-value {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.9375rem;
    color: #111827;
    margin-bottom: 0.125rem;
}

.lifestyle-profile__stat-label {
    font-size: 0.6875rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/**
 * Editorial Image
 * Floated right within the About section, same style as avatar but larger
 */
.lifestyle-profile__editorial-img {
    float: right;
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    border-radius: 1rem;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    margin: 0 0 1.5rem 1.5rem;
}

@media (min-width: 768px) {
    .lifestyle-profile__editorial-img {
        width: 340px;
        height: 340px;
        border-radius: 1.25rem;
        margin: 0 0 2rem 2rem;
    }
}

@media (max-width: 639px) {
    .lifestyle-profile__editorial-img {
        float: none;
        width: 100%;
        max-width: 360px;
        height: auto;
        aspect-ratio: 1 / 1;
        margin: 0 auto 1.5rem auto;
        border-radius: 1rem;
    }
}

/**
 * Make Chips
 * Brand/manufacturer badges
 */
.lifestyle-profile__make-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #111827;
    color: white;
    text-decoration: none;
    transition: all 0.15s ease;
}

.lifestyle-profile__make-chip:hover {
    background-color: #0066cc;
    transform: translateY(-1px);
}

/**
 * Model Chips
 * Clickable model tags that filter inventory
 */
.lifestyle-profile__model-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    background-color: white;
    color: #374151;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.15s ease;
}

.lifestyle-profile__model-chip:hover {
    border-color: #0066cc;
    color: #003d7a;
    background-color: #e6f2ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/**
 * Stat Badges (inline within profile header)
 * Compact white rounded cards for specs inside the header area
 */
.lifestyle-profile__stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .lifestyle-profile__stat-badge {
        width: 90px;
        height: 90px;
    }
}

.lifestyle-profile__stat-badge i {
    font-size: 0.8125rem;
    margin-bottom: 0.125rem;
}

.lifestyle-profile__stat-badge-value {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    color: #111827;
    line-height: 1.2;
}

.lifestyle-profile__stat-badge-label {
    font-size: 0.5625rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
    margin-top: 0.0625rem;
}

/**
 * Avatar - Large Variant
 * Bigger profile image for profiles that feature it more prominently
 */
.lifestyle-profile__avatar--lg {
    width: 200px;
    height: 200px;
}

@media (min-width: 640px) {
    .lifestyle-profile__avatar--lg {
        width: 260px;
        height: 260px;
    }
}

@media (min-width: 1024px) {
    .lifestyle-profile__avatar--lg {
        width: 300px;
        height: 300px;
    }
}

/**
 * Stats Grid - Compact Variant (3 columns x 2 rows)
 * Used when 6-across feels too spread out
 */
.lifestyle-profile__stats--compact {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 640px) {
    .lifestyle-profile__stats--compact {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .lifestyle-profile__stats--compact {
        grid-template-columns: repeat(3, 1fr);
    }

    .lifestyle-profile__stats--compact .lifestyle-profile__stat {
        border-bottom: 1px solid #f3f4f6;
    }

    .lifestyle-profile__stats--compact .lifestyle-profile__stat:nth-last-child(-n+3) {
        border-bottom: none;
    }
}