/* IA Pulse - Custom Styles */

:root {
    --ia-primary: #667eea;
    --ia-secondary: #764ba2;
    --ia-accent: #00d4ff;
    --ia-dark: #1a1a2e;
    --ia-darker: #0f0f1a;
    --ia-light: #f8fafc;
    --ia-gradient: linear-gradient(135deg, var(--ia-primary) 0%, var(--ia-secondary) 100%);
}

/* SVG Icons */
.icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.25rem;
    flex-shrink: 0;
}

h2 .icon,
h3 .icon {
    margin-right: 0.5rem;
}

/* Hero Section */
.hero-section {
    background: var(--ia-gradient);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 50px 50px;
    animation: pulse 20s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

/* Hero Premium (Homepage) */
.hero-premium {
    background: var(--ia-gradient);
    padding: 2rem 0 4rem;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

.hero-premium .container {
    position: relative;
    z-index: 2;
}

.hero-premium .hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-premium .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: white;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.hero-premium .hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-premium .gradient-text {
    background: linear-gradient(135deg, #00d4ff 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-premium .hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-premium .hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-premium .tech-stack {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-premium .tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
}

.hero-orb-1 {
    width: 300px;
    height: 300px;
    background: #00d4ff;
    top: -100px;
    right: -100px;
}

.hero-orb-2 {
    width: 200px;
    height: 200px;
    background: #764ba2;
    bottom: -50px;
    left: -50px;
}

.hero-orb-3 {
    width: 150px;
    height: 150px;
    background: #667eea;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mobile hero adjustments */
@media (max-width: 768px) {
    .hero-premium {
        padding: 1.5rem 0 2.5rem;
    }

    .hero-premium .hero-title {
        font-size: 1.75rem;
    }

    .hero-premium .hero-description {
        font-size: 1rem;
    }
}

/* Navigation */
nav.nav {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

nav a {
    color: var(--ia-light) !important;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--ia-accent) !important;
}

/* Cards - Background and Animation */
.article-card,
.article-card.glass-card {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
}

.article-card:hover,
.article-card.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.4);
}

.article-card .card-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.article-card .card-content {
    padding: 1.5rem;
}

.article-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ia-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-card .card-excerpt {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

.article-card .card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Article Card Text Colors - Light text for dark cards */
.article-card {
    --card-text-primary: #f8fafc;
    --card-text-secondary: #cbd5e1;
    --card-text-muted: #94a3b8;
}

.article-card .article-title a,
.article-card h3 a {
    color: var(--card-text-primary);
}

.article-card .article-excerpt,
.article-card p {
    color: var(--card-text-secondary);
}

.article-card .article-meta,
.article-card .meta-item {
    color: var(--card-text-muted);
}

.article-card .read-more {
    color: var(--ia-primary);
    font-weight: 600;
}

/* Article Card Body styles */
.article-card-body {
    color: var(--card-text-primary);
}

.article-card-body h3 a,
.article-card-body .article-title a {
    color: var(--card-text-primary);
}

.article-card-body p,
.article-card-body .article-excerpt {
    color: var(--card-text-secondary);
}

.article-card-body .article-footer,
.article-card-body .article-meta,
.article-card-body .meta-item {
    color: var(--card-text-muted);
}

.article-card-body .read-more {
    color: var(--ia-primary);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    background: var(--ia-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer */
footer {
    background: var(--ia-darker);
    color: var(--ia-light);
}

footer a {
    color: var(--ia-accent);
}

/* Article Page */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.article-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ia-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ia-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ia-primary);
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ia-dark);
    margin-top: 2rem;
}

.article-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Code blocks */
.article-content pre {
    background: var(--ia-darker);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* Blockquote */
.article-content blockquote {
    border-left: 4px solid var(--ia-primary);
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 12px 12px 0;
}

/* Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive */
@media (max-width: 768px) {

    /* Container et article - mobile margins */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .article-page {
        padding: 0 0.5rem !important;
    }

    .article-body {
        padding: 0 0.5rem;
    }

    .article-body p,
    .article-body li {
        font-size: 1rem;
        line-height: 1.7;
    }

    .article-body h2 {
        font-size: 1.3rem;
        margin-top: 1.5rem;
    }

    .article-body h3 {
        font-size: 1.1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .article-content h1 {
        font-size: 1.75rem;
    }

    /* Share buttons - mobile */
    .share-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .share-buttons span {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .share-buttons a {
        flex: 1;
        text-align: center;
        min-width: 80px;
    }

    /* Author box - mobile */
    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-box .author-avatar {
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }

    .author-box .author-info h4 {
        font-size: 1.1rem;
    }

    .author-box .author-info p {
        font-size: 0.9rem;
    }

    /* Related articles grid - mobile: single column */
    .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .articles-grid .glass-card {
        padding: 1rem !important;
    }

    .articles-grid h4 {
        font-size: 0.9rem !important;
    }

    /* Navigation prev/next - mobile */
    nav.flex.justify-between {
        flex-direction: column;
        gap: 1rem;
    }

    nav.flex.justify-between a {
        width: 100%;
        text-align: center;
        margin-left: 0 !important;
    }

    /* TOC - mobile */
    .toc {
        padding: 1rem !important;
    }

    .toc h2 {
        font-size: 1rem;
    }

    /* Article header - mobile */
    .article-header h1 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }

    .article-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Featured image - mobile */
    .article-featured-image img {
        border-radius: 8px;
    }

    /* Glass cards - mobile padding */
    .glass-card {
        padding: 1rem !important;
    }

    /* Footer - mobile centered */
    .site-footer .footer-brand,
    .site-footer .footer-grid>div:first-child {
        text-align: center;
    }

    .site-footer .footer-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .site-footer .footer-description {
        text-align: center;
    }

    .site-footer .footer-social {
        justify-content: center;
    }

    .site-footer .footer-grid {
        flex-direction: column;
        text-align: center;
    }

    .site-footer .footer-column {
        text-align: center;
    }

    .site-footer .footer-column ul {
        padding: 0;
        list-style: none;
    }

    /* Footer brand - force center on mobile */
    .site-footer .footer-brand {
        text-align: center !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .site-footer .footer-brand p,
    .footer-description {
        text-align: center !important;
    }

    .site-footer .footer-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Header logo - mobile: smaller and centered */
    .site-header .nav-logo,
    .site-header .logo,
    header .nav-logo,
    header .logo {
        max-width: 50%;
        height: auto;
    }

    .site-header .nav-logo img,
    .site-header .logo img,
    header .nav-logo img,
    header .logo img {
        max-height: 25px;
        width: auto;
    }

    .site-header nav,
    header nav {
        flex-direction: column;
        align-items: center;
    }

    .site-header .nav-brand,
    header .nav-brand {
        justify-content: center;
        width: 100%;
        text-align: center;
    }
}