/*
 * Restilla Articles & Knowledge Base CSS
 * Dark-blue premium design, matching landing page aesthetics
 */

/* === ARTICLES HERO === */
.articles-hero {
    position: relative;
    padding: 160px 5% 80px;
    background: linear-gradient(135deg, #0b1528 0%, #172d54 50%, #0b1528 100%);
    color: white;
    text-align: center;
    overflow: hidden;
}

.articles-hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.articles-hero-shapes .shape-1 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    top: -150px;
    right: -100px;
    border-radius: 50%;
    filter: blur(80px);
}

.articles-hero-shapes .shape-2 {
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(244, 114, 182, 0.05));
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    filter: blur(80px);
}

.articles-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.articles-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.articles-hero-content p {
    font-size: 1.25rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* === ARTICLES INDEX CONTAINER === */
.articles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 5%;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

/* === ARTICLE CARD === */
.article-card-preview {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: var(--trans-base);
}

.article-card-preview:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}

.article-card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #172d54 0%, #2f549c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.article-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 10%, transparent 80%);
}

.article-card-icon {
    font-size: 3.5rem;
    color: white;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
    z-index: 2;
    transition: transform 0.3s ease;
}

.article-card-preview:hover .article-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.article-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card-meta {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
}

.article-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--clr-text-main);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color var(--trans-fast);
}

.article-card-preview:hover .article-card-title {
    color: #4f46e5;
}

.article-card-summary {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.article-card-link {
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.article-card-link svg {
    transition: transform 0.2s ease;
}

.article-card-preview:hover .article-card-link svg {
    transform: translateX(4px);
}

/* === DETAIL ARTICLE PAGE === */
.article-page-container {
    background-color: var(--clr-bg-page);
    min-height: 100vh;
}

.article-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 140px 5% 80px;
}

.article-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--clr-text-muted);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 32px;
    transition: color 0.2s ease;
}

.article-back-link:hover {
    color: var(--clr-text-main);
}

.article-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 48px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .article-card {
        padding: 24px;
    }
}

.article-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--clr-border);
    padding-bottom: 32px;
}

.article-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--clr-text-main);
    line-height: 1.25;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
}

.article-meta {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    display: flex;
    gap: 20px;
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.85;
    color: #334155;
}

.article-body p {
    margin-bottom: 24px;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clr-text-main);
    margin-top: 36px;
    margin-bottom: 16px;
}

.article-body blockquote {
    border-left: 4px solid #4f46e5;
    padding-left: 20px;
    font-style: italic;
    color: var(--clr-text-muted);
    margin: 32px 0;
    font-size: 1.25rem;
}

/* Fallback/Not Found styling */
.not-found-container {
    text-align: center;
    padding: 80px 0;
}

.not-found-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.not-found-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--clr-text-main);
    margin-bottom: 16px;
}

.not-found-text {
    color: var(--clr-text-muted);
    margin-bottom: 32px;
}

/* Responsive adjustments for Articles Index */
@media (max-width: 768px) {
    .articles-hero {
        padding: 120px 5% 60px;
    }
    .articles-hero-content h1 {
        font-size: 2.5rem;
    }
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
