/**
 * HCA Frontend Styles - Modern Web 4 Design
 * @version 2.1.0
 */

/* ==========================================================================
   CSS Variables - Modern Color Palette
   ========================================================================== */
:root {
    --hca-primary: #3B82F6;
    --hca-primary-dark: #1E40AF;
    --hca-primary-light: #60A5FA;
    --hca-accent: #F97316;
    --hca-accent-light: #FDBA74;
    --hca-success: #10B981;
    --hca-bg-light: #F8FAFC;
    --hca-bg-highlight: #EFF6FF;
    --hca-text-dark: #1E293B;
    --hca-text-muted: #64748B;
    --hca-border: #E2E8F0;
    --hca-white: #FFFFFF;
    --hca-gradient-primary: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    --hca-gradient-accent: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    --hca-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --hca-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --hca-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --hca-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --hca-shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
    --hca-radius: 12px;
    --hca-radius-lg: 16px;
    --hca-radius-xl: 24px;
}

/* ==========================================================================
   Article Wrapper Layout
   ========================================================================== */
.hca-article-wrapper {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hca-article-content {
    flex: 1;
    min-width: 0;
}

.hca-article-sidebar {
    width: 300px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .hca-article-wrapper {
        flex-direction: column;
        padding: 15px;
    }
    .hca-article-sidebar {
        width: 100%;
        order: -1;
    }
}

/* ==========================================================================
   TOC Box (Sidebar) - Modern Glass Effect
   ========================================================================== */
.hca-toc-box {
    position: sticky;
    top: 100px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--hca-radius-lg);
    overflow: hidden;
    box-shadow: var(--hca-shadow-lg);
}

.hca-toc-header {
    background: var(--hca-gradient-primary);
    color: white;
    padding: 18px 22px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hca-toc-list {
    list-style: none;
    margin: 0;
    padding: 12px 0;
    max-height: 450px;
    overflow-y: auto;
}

.hca-toc-list::-webkit-scrollbar {
    width: 4px;
}

.hca-toc-list::-webkit-scrollbar-thumb {
    background: var(--hca-primary-light);
    border-radius: 4px;
}

.hca-toc-list li {
    margin: 0;
    padding: 0;
}

.hca-toc-list a {
    display: block;
    padding: 10px 22px;
    color: var(--hca-text-muted);
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.hca-toc-list a:hover {
    color: var(--hca-primary);
    background: var(--hca-bg-light);
}

.hca-toc-list a.active {
    color: var(--hca-primary);
    border-left-color: var(--hca-primary);
    background: var(--hca-bg-highlight);
    font-weight: 500;
}

.hca-toc-list .hca-toc-h3 a {
    padding-left: 38px;
    font-size: 13px;
}

/* ==========================================================================
   Key Highlights Box - Modern Card
   ========================================================================== */
.hca-highlights-box {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-radius: var(--hca-radius-xl);
    padding: 28px 32px;
    margin: 28px 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--hca-shadow-md);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.hca-highlights-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--hca-gradient-primary);
}

.hca-highlights-box::after {
    content: '✨';
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 24px;
    opacity: 0.5;
}

.hca-highlights-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--hca-primary-dark);
    margin: 0 0 16px 0;
}

.hca-highlights-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hca-highlights-list li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    font-size: 14px !important;
    color: var(--hca-text-dark) !important;
    line-height: 1.6 !important;
    margin-bottom: 12px !important;
    padding-left: 0 !important;
    position: relative !important;
}

.hca-highlights-list li:last-child {
    margin-bottom: 0 !important;
}

.hca-highlights-list li::before {
    content: '✓' !important;
    flex-shrink: 0 !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    background: var(--hca-gradient-primary) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: bold !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25) !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
}

/* ==========================================================================
   Article Content Styling - Refined Typography
   ========================================================================== */
.hca-article-content h2 {
    color: var(--hca-primary-dark);
    font-size: 24px;
    font-weight: 700;
    padding-bottom: 12px;
    margin-top: 42px;
    margin-bottom: 20px;
    position: relative;
}

.hca-article-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 3px;
    background: var(--hca-gradient-primary);
    border-radius: 3px;
}

.hca-article-content h3 {
    color: var(--hca-text-dark);
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 14px;
    padding-left: 14px;
    border-left: 3px solid var(--hca-primary-light);
}

.hca-article-content p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--hca-text-dark);
    margin-bottom: 18px;
}

.hca-article-content strong {
    color: var(--hca-primary-dark);
    font-weight: 600;
}

.hca-article-content a {
    color: var(--hca-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.hca-article-content a:hover {
    color: var(--hca-primary-dark);
    border-bottom-color: var(--hca-primary);
}

/* External link indicator - more specific selector */
.hca-article-content p a[target="_blank"]::after,
.hca-article-content li a[target="_blank"]::after {
    content: ' ↗';
    font-size: 10px;
    opacity: 0.7;
    vertical-align: super;
    margin-left: 2px;
}

/* ==========================================================================
   Lists - Modern Styling
   ========================================================================== */
.hca-article-content ul,
.hca-article-content ol {
    margin: 0 0 22px 0;
    padding: 0;
}

.hca-article-content ul {
    list-style: none;
}

.hca-article-content ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    line-height: 1.7;
    font-size: 15px;
}

.hca-article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background: var(--hca-gradient-primary);
    border-radius: 50%;
}

.hca-article-content ol {
    list-style: none;
    counter-reset: ol-counter;
}

.hca-article-content ol li {
    position: relative;
    padding-left: 38px;
    margin-bottom: 14px;
    line-height: 1.7;
    font-size: 15px;
}

.hca-article-content ol li::before {
    counter-increment: ol-counter;
    content: counter(ol-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--hca-gradient-primary);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Blockquote
   ========================================================================== */
.hca-article-content blockquote {
    border-left: 5px solid var(--hca-primary);
    margin: 32px 0;
    padding: 24px 32px;
    background: var(--hca-bg-light);
    font-style: italic;
    border-radius: 0 var(--hca-radius-lg) var(--hca-radius-lg) 0;
    position: relative;
}

.hca-article-content blockquote::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 48px;
    color: var(--hca-primary-light);
    opacity: 0.3;
}

/* ==========================================================================
   CTA Block - Modern Gradient Design
   ========================================================================== */
.hca-cta-block {
    margin: 40px 0;
    background: var(--hca-gradient-primary);
    border-radius: var(--hca-radius-xl);
    padding: 40px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--hca-shadow-xl), var(--hca-shadow-glow);
}

.hca-cta-block::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hca-cta-block::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.hca-cta-content {
    position: relative;
    z-index: 1;
}

.hca-cta-headline {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
}

.hca-cta-description {
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    margin: 0 auto 24px;
    max-width: 450px;
    line-height: 1.6;
}

.hca-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--hca-primary-dark) !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none !important;
}

.hca-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
    color: var(--hca-primary-dark) !important;
    text-decoration: none !important;
}

/* ==========================================================================
   FAQ Section - Modern Accordion
   ========================================================================== */
.hca-faq-section {
    background: var(--hca-bg-light);
    border-radius: var(--hca-radius-xl);
    padding: 36px;
    margin: 48px 0;
    box-shadow: var(--hca-shadow-md);
}

.hca-faq-section > h2,
.hca-faq-section h2:first-of-type {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 24px;
    font-weight: 700;
    color: var(--hca-primary-dark);
    margin: 0 0 28px 0 !important;
    padding: 0 !important;
    border: none !important;
}

.hca-faq-section > h2::after,
.hca-faq-section h2:first-of-type::after {
    display: none !important;
}

.hca-faq-section > h2::before,
.hca-faq-section h2:first-of-type::before {
    content: '❓';
    font-size: 26px;
}

.hca-faq-item {
    background: var(--hca-white);
    border-radius: var(--hca-radius);
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: var(--hca-shadow-sm);
    border: 1px solid var(--hca-border);
    transition: all 0.3s ease;
}

.hca-faq-item:hover {
    box-shadow: var(--hca-shadow-md);
    border-color: var(--hca-primary-light);
}

.hca-faq-item:last-child {
    margin-bottom: 0;
}

.hca-faq-question {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 16px;
    color: var(--hca-text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.hca-faq-question:hover {
    color: var(--hca-primary);
    background: var(--hca-bg-highlight);
}

.hca-faq-question::after {
    content: '+';
    font-size: 24px;
    font-weight: 300;
    color: var(--hca-primary);
    transition: transform 0.3s ease;
}

.hca-faq-answer {
    padding: 0 24px 22px;
    color: var(--hca-text-muted);
    font-size: 15px;
    line-height: 1.75;
    border-top: 1px solid var(--hca-border);
    padding-top: 18px;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.hca-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    border-radius: var(--hca-radius);
    overflow: hidden;
    box-shadow: var(--hca-shadow-md);
}

.hca-article-content th {
    background: var(--hca-gradient-primary);
    color: white;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.hca-article-content td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--hca-border);
    font-size: 15px;
}

.hca-article-content tr:nth-child(even) {
    background: var(--hca-bg-light);
}

.hca-article-content tr:hover {
    background: var(--hca-bg-highlight);
}

/* ==========================================================================
   Code
   ========================================================================== */
.hca-article-content code {
    background: var(--hca-bg-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    color: var(--hca-accent);
    border: 1px solid var(--hca-border);
}

.hca-article-content pre {
    background: #1E293B;
    color: #E2E8F0;
    padding: 24px;
    border-radius: var(--hca-radius);
    overflow-x: auto;
    margin: 28px 0;
}

.hca-article-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .hca-highlights-box {
        padding: 24px 20px;
        margin: 24px 0;
    }
    
    .hca-highlights-box::after {
        display: none;
    }
    
    .hca-cta-block {
        padding: 32px 24px;
        margin: 32px 0;
    }
    
    .hca-cta-headline {
        font-size: 22px;
    }
    
    .hca-article-content h2 {
        font-size: 24px;
        margin-top: 36px;
    }
    
    .hca-article-content h3 {
        font-size: 18px;
    }
    
    .hca-faq-section {
        padding: 24px 20px;
    }
    
    .hca-faq-question {
        padding: 16px 18px;
        font-size: 15px;
    }
}

/* ==========================================================================
   E-E-A-T Signals
   ========================================================================== */
.hca-eeat-experience {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border-left: 4px solid #10B981;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--hca-radius) var(--hca-radius) 0;
    font-style: italic;
    color: #065F46;
    font-size: 15px;
    line-height: 1.6;
}

.hca-eeat-expertise {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-left: 4px solid var(--hca-primary);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--hca-radius) var(--hca-radius) 0;
    color: var(--hca-primary-dark);
    font-size: 15px;
    line-height: 1.6;
}

.hca-article-meta {
    background: var(--hca-bg-light) !important;
    padding: 24px !important;
    border-radius: var(--hca-radius) !important;
    margin-top: 36px !important;
    border-left: 4px solid var(--hca-primary) !important;
    box-shadow: var(--hca-shadow-sm);
}

.hca-article-meta h4 {
    margin-top: 0 !important;
    color: var(--hca-primary-dark);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.hca-article-meta ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hca-article-meta ul li {
    padding: 6px 0 !important;
    margin: 0 !important;
    font-size: 14px;
    color: var(--hca-text-muted);
    border-bottom: 1px solid var(--hca-border);
}

.hca-article-meta ul li:last-child {
    border-bottom: none;
}

.hca-article-meta ul li::before {
    display: none !important;
}

.hca-article-meta ul li strong {
    color: var(--hca-text-dark);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes hcaFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hca-highlights-box,
.hca-cta-block,
.hca-faq-section {
    animation: hcaFadeInUp 0.5s ease forwards;
}

/* ==========================================================================
   Site-specific
   ========================================================================== */
/* Domain search box - now visible on blog posts */

/* ==========================================================================
   Rank Defender Shortcode Styles
   Matched to Hostbreak Bricks Theme
   ========================================================================== */
.rank-defender-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    background: #fff;
}

/* Headings - Match Hostbreak style */
.rank-defender-content h2 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin: 0 0 20px 0;
}

.rank-defender-content h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
    margin: 40px 0 15px 0;
}

.rank-defender-content h2:first-child {
    margin-top: 0;
}

.rank-defender-content h3:first-child {
    margin-top: 0;
}

/* Paragraphs - Match Hostbreak body text */
.rank-defender-content p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #4a5568;
    line-height: 1.8;
    margin: 0 0 20px 0;
}

/* Lists - Match Hostbreak style */
.rank-defender-content ul,
.rank-defender-content ol {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    color: #4a5568;
    line-height: 1.8;
    margin: 0 0 25px 0;
    padding-left: 25px;
}

.rank-defender-content li {
    margin-bottom: 10px;
}

.rank-defender-content li:last-child {
    margin-bottom: 0;
}

/* Strong/Bold text */
.rank-defender-content strong {
    font-weight: 600;
    color: #1a1a2e;
}

/* Links */
.rank-defender-content a {
    color: #3b82f6;
    text-decoration: none;
}

.rank-defender-content a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 991px) {
    .rank-defender-content {
        padding: 50px 30px;
    }
    .rank-defender-content h2 {
        font-size: 28px;
    }
    .rank-defender-content h3 {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .rank-defender-content {
        padding: 40px 20px;
    }
    .rank-defender-content h2 {
        font-size: 24px;
    }
    .rank-defender-content h3 {
        font-size: 20px;
    }
    .rank-defender-content p,
    .rank-defender-content li {
        font-size: 15px;
    }
}
