/* ==========================================================================
   Servitec Badajoz - Knowledge Base Premium Styles
   ========================================================================== */

:root {
    --kb-primary: #1F2E1A; /* brand-dark */
    --kb-accent: #48793C; /* brand-primary */
    --kb-accent-hover: #3d6633;
    --kb-bg: #F6F9FC;
    --kb-surface: #FFFFFF;
    --kb-text-main: #32325D;
    --kb-text-muted: #8898AA;
    --kb-border: rgba(0, 0, 0, 0.05);
    --kb-glass-bg: rgba(255, 255, 255, 0.7);
    --kb-glass-border: rgba(255, 255, 255, 0.5);
    --kb-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    --kb-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.kb-page {
    font-family: var(--kb-font);
    background-color: var(--kb-bg);
    color: var(--kb-text-main);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

/* Header & Hero Area */
.kb-hero {
    position: relative;
    background: linear-gradient(135deg, var(--kb-primary) 0%, #2f4527 100%);
    padding: 120px 20px 80px;
    text-align: center;
    color: white;
    overflow: hidden;
}

.kb-hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--kb-bg);
    transform: skewY(-3deg);
    z-index: 1;
}

.kb-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.kb-badge {
    display: inline-block;
    background: rgba(72, 121, 60, 0.2); /* brand-primary with opacity */
    color: var(--kb-accent);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(72, 121, 60, 0.3);
}

/* Glassmorphism Article Container */
.kb-container {
    max-width: 900px;
    margin: -40px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.kb-article {
    background: var(--kb-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--kb-glass-border);
    border-radius: 24px;
    padding: 50px;
    box-shadow: var(--kb-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kb-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(50, 50, 93, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Article Content */
.kb-content h2 {
    color: var(--kb-primary);
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--kb-border);
    padding-bottom: 10px;
}

.kb-content p {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 24px;
}

.kb-content ul, .kb-content ol {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 24px;
    padding-left: 20px;
}

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

/* Technical Data Blocks */
.kb-tech-block {
    background: rgba(10, 37, 64, 0.03);
    border-left: 4px solid var(--kb-accent);
    padding: 20px 25px;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
}

.kb-tech-block h3 {
    margin-top: 0;
    color: var(--kb-primary);
    font-size: 1.2rem;
}

/* Related Content Grid */
.kb-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.kb-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--kb-border);
    transition: all 0.3s ease;
    display: block;
}

.kb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: var(--kb-accent);
}

.kb-card h4 {
    color: var(--kb-primary);
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.kb-card p {
    color: var(--kb-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

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

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }

/* Responsive */
@media (max-width: 768px) {
    .kb-hero h1 { font-size: 2.2rem; }
    .kb-article { padding: 30px 20px; }
}


/* iFixit Style Upgrades */
.kb-metadata-bar {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.kb-meta-badge {
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
}
.kb-meta-badge i {
    color: var(--kb-accent-hover);
}
.kb-difficulty-dificil { border-left: 4px solid #ef4444; }
.kb-difficulty-moderada { border-left: 4px solid #f59e0b; }
.kb-difficulty-facil { border-left: 4px solid #10b981; }

.kb-tools-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}
.kb-tools-box h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}
.kb-tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.kb-tools-list li {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #334155;
}

/* Steps */
.kb-step {
    border-top: 2px solid #e2e8f0;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.kb-step-header {
    display: flex;
    align-items: center;
    gap: 15px;
}
.kb-step-number {
    background: var(--kb-primary);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.kb-step-title {
    margin: 0;
    font-size: 1.4rem;
    color: var(--kb-primary);
}
.kb-step-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) {
    .kb-step-content { grid-template-columns: 1fr 1fr; }
}
.kb-step-text {
    font-size: 1.1rem;
    line-height: 1.8;
}
.kb-step-warning {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 15px;
    margin-top: 15px;
    border-radius: 0 8px 8px 0;
    color: #991b1b;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.kb-step-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
\ n . k b - m e t a - p r i c e   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 2 c 5 5 e   0 % ,   # 1 6 a 3 4 a   1 0 0 % ) ;   c o l o r :   w h i t e ;   b o r d e r - c o l o r :   # 1 5 8 0 3 d ;   b o x - s h a d o w :   0   4 p x   6 p x   - 1 p x   r g b a ( 3 4 ,   1 9 7 ,   9 4 ,   0 . 2 ) ;   f o n t - w e i g h t :   8 0 0 ;   } \ n . k b - m e t a - p r i c e   i   {   c o l o r :   # f f f ;   }  
 