/* ==========================================================================
   Blog Detail Page Styles - Autohaus Herndon
   Compatible with Tailwind CSS Layout
   ========================================================================== */

/* --------------------------------------------------------------------------
   Typography Base
   -------------------------------------------------------------------------- */
.blog-content {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

/* --------------------------------------------------------------------------
   Headings - Numbered Sections (1. Title, 2. Title, etc.)
   -------------------------------------------------------------------------- */
.blog-content h2,
.blog-content h3 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.blog-content h2 {
    font-size: 1.75rem;
    line-height: 1.3;
}

.blog-content h3 {
    font-size: 1.375rem;
    line-height: 1.4;
}

/* Centered headings (from the HTML structure) */
.blog-content h3 center,
.blog-content center {
    display: block;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Numbered section headings with decorative styling */
.blog-content h3 center::after,
.blog-content center::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #1e3a5f, #d97706);
    border-radius: 2px;
}

/* Style for numbered titles like "1. Regular Tire Inspections" */
.blog-content p:has(strong:first-child),
.blog-content strong:first-child {
    color: #1e3a5f;
}

/* --------------------------------------------------------------------------
   Paragraphs
   -------------------------------------------------------------------------- */
.blog-content p {
    margin-bottom: 1.25rem;
    text-align: justify;
    text-justify: inter-word;
}

.blog-content p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph (first paragraph) */
.blog-content > p:first-of-type {
    font-size: 1.25rem;
    color: #4b5563;
    line-height: 1.9;
}

/* --------------------------------------------------------------------------
   Lists - Bullet Points
   -------------------------------------------------------------------------- */
.blog-content ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.blog-content ul li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

/* Custom bullet point */
.blog-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #1e3a5f 0%, #3b82f6 100%);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(30, 58, 95, 0.3);
}

/* Bold labels in list items (e.g., "Tread Wear:", "Check Pressure Regularly:") */
.blog-content ul li strong,
.blog-content ul li b {
    color: #1e3a5f;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Nested lists */
.blog-content ul ul {
    margin-top: 0.75rem;
    margin-bottom: 0;
    padding-left: 1rem;
}

.blog-content ul ul li::before {
    width: 6px;
    height: 6px;
    background: #d97706;
    top: 0.6rem;
}

/* Ordered lists */
.blog-content ol {
    list-style: none;
    counter-reset: item;
    padding: 0;
    margin: 1.5rem 0;
}

.blog-content ol li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.25rem;
    counter-increment: item;
}

.blog-content ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Customer Testimonials / Quotes
   -------------------------------------------------------------------------- */
.blog-content ul li i,
.blog-content blockquote,
.blog-content i {
    display: block;
    font-style: italic;
    color: #4b5563;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-left: 4px solid #d97706;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    position: relative;
}

.blog-content ul li i::before,
.blog-content blockquote::before {
    content: '"';
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-size: 4rem;
    color: #d97706;
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Author name in testimonials */
.blog-content ul li i + b,
.blog-content ul li i ~ b,
.blog-content blockquote + p b,
.blog-content i + b,
.blog-content i ~ b {
    display: block;
    text-align: right;
    color: #1e3a5f;
    font-weight: 600;
    margin-top: 0.5rem;
    font-style: normal;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
.blog-content a {
    color: #1e3a5f;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #d97706;
    transition: all 0.2s ease;
}

.blog-content a:hover {
    color: #d97706;
    border-bottom-color: #1e3a5f;
}

/* Phone and email links */
.blog-content a[href^="tel:"],
.blog-content a[href^="mailto:"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-content a[href^="tel:"]:hover,
.blog-content a[href^="mailto:"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
    color: white;
}

/* --------------------------------------------------------------------------
   Images
   -------------------------------------------------------------------------- */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin: 2rem auto;
    display: block;
}

.blog-content figure {
    margin: 2rem 0;
}

.blog-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.75rem;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Call to Action Sections
   -------------------------------------------------------------------------- */
.blog-content h3 center:last-of-type,
.blog-content h3:last-of-type center {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 1rem;
    border: 1px solid #bae6fd;
}

.blog-content h3 center:last-of-type::after,
.blog-content h3:last-of-type center::after {
    display: none;
}

/* CTA paragraph styling */
.blog-content > p:last-of-type {
    text-align: center;
    font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   Section Dividers
   -------------------------------------------------------------------------- */
.blog-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 2.5rem 0;
}

.blog-content br + br {
    display: block;
    content: '';
    margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Hashtags / Tags
   -------------------------------------------------------------------------- */
.blog-content .hashtag,
.blog-content span.hashtag {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Individual tag styling - when tags are space-separated */
.hashtag {
    font-size: 0.875rem;
    color: #6b7280;
}

/* --------------------------------------------------------------------------
   Featured Image Header
   -------------------------------------------------------------------------- */
.blog-featured-image {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.blog-featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 58, 95, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Info Boxes / Callouts
   -------------------------------------------------------------------------- */
.blog-content .info-box,
.blog-content .tip-box,
.blog-content .warning-box {
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.blog-content .info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.blog-content .tip-box {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.blog-content .warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

/* --------------------------------------------------------------------------
   Tables (if used)
   -------------------------------------------------------------------------- */
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.blog-content th,
.blog-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.blog-content th {
    background: #f9fafb;
    font-weight: 600;
    color: #1e3a5f;
}

.blog-content tr:hover td {
    background: #f9fafb;
}

/* --------------------------------------------------------------------------
   Mobile Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .blog-content {
        font-size: 1rem;
        line-height: 1.75;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.25rem;
    }
    
    .blog-content > p:first-of-type {
        font-size: 1.125rem;
    }
    
    .blog-content ul li {
        padding-left: 1.5rem;
    }
    
    .blog-content ul li::before {
        width: 8px;
        height: 8px;
    }
    
    .blog-content ol li {
        padding-left: 2.5rem;
    }
    
    .blog-content ol li::before {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
    
    .blog-content ul li i,
    .blog-content blockquote {
        padding: 1rem 1.25rem;
    }
    
    .blog-content a[href^="tel:"],
    .blog-content a[href^="mailto:"] {
        display: block;
        text-align: center;
        margin: 0.5rem 0;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .blog-content {
        font-size: 12pt;
        color: black;
    }
    
    .blog-content a {
        color: black;
        text-decoration: underline;
    }
    
    .blog-content a[href^="tel:"],
    .blog-content a[href^="mailto:"] {
        background: none;
        color: black;
        padding: 0;
    }
    
    .blog-content img {
        box-shadow: none;
    }
}

/* --------------------------------------------------------------------------
   Animation Classes (for scroll reveal)
   -------------------------------------------------------------------------- */
.blog-content.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.blog-content.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for list items */
.blog-content ul li {
    opacity: 0;
    transform: translateX(-10px);
    animation: slideInLeft 0.4s ease-out forwards;
}

.blog-content ul li:nth-child(1) { animation-delay: 0.1s; }
.blog-content ul li:nth-child(2) { animation-delay: 0.2s; }
.blog-content ul li:nth-child(3) { animation-delay: 0.3s; }
.blog-content ul li:nth-child(4) { animation-delay: 0.4s; }
.blog-content ul li:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
