/* ==================================================================
   WayronX Blog / News — Public styles
   ================================================================== */

:root {
    --midnight: #050816;
    --blue: #2563FF;
    --purple: #7C3AED;
    --cyan: #22D3EE;
    --light: #F7F8FC;
    --ink: #0B1026;
    --ink-mute: #5A6180;
    --line: rgba(11,16,38,0.10);
    --grad: linear-gradient(120deg, #2563FF, #7C3AED);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

/* ---------- HERO ---------- */
.blog-hero {
    background: linear-gradient(135deg, #050816 0%, #0B1026 100%);
    color: #fff;
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(37,99,255,0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.blog-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 32px;
    text-align: center;
}
.blog-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
}
.blog-hero h1 .accent {
    background: linear-gradient(120deg, #22D3EE, #7C3AED);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.blog-hero p {
    color: rgba(255,255,255,0.6);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto 28px;
}
.blog-search {
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}
.blog-search input {
    width: 100%;
    padding: 16px 22px 16px 52px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}
.blog-search input::placeholder { color: rgba(255,255,255,0.5); }
.blog-search input:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37,99,255,0.15);
}
.blog-search .search-icon {
    position: absolute;
    left: 20px; top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    pointer-events: none;
    font-size: 1.1rem;
}

/* ---------- CONTAINER ---------- */
.blog-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 32px;
}
.blog-section { padding: 48px 0; }
.blog-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.blog-section-header h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.015em;
}
.blog-section-header .link {
    font-size: 0.9rem;
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.2s;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.blog-section-header .link:hover { gap: 12px; }

/* ---------- CATEGORY CHIPS ---------- */
.category-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0 32px;
}
.category-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: #fff;
    border: 1.5px solid var(--line);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--ink-mute);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.category-chip:hover {
    border-color: var(--blue);
    color: var(--blue);
    transform: translateY(-1px);
}
.category-chip.active {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,255,0.25);
}

/* ---------- FEATURED POST ---------- */
.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    margin-bottom: 40px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s;
}
.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.featured-image {
    background: var(--light);
    min-height: 320px;
    overflow: hidden;
    position: relative;
}
.featured-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.featured-card:hover .featured-image img { transform: scale(1.04); }
.featured-image .featured-badge {
    position: absolute;
    top: 16px; left: 16px;
    background: var(--grad);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.featured-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.featured-body .category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.featured-body h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 800;
    color: var(--ink);
    line-height: 1.25;
    margin-bottom: 14px;
    letter-spacing: -0.015em;
}
.featured-body p {
    font-size: 0.95rem;
    color: var(--ink-mute);
    line-height: 1.7;
    margin-bottom: 20px;
}
.featured-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 0.82rem;
    color: var(--ink-mute);
    font-weight: 600;
}
.featured-meta .dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--ink-mute);
}

/* ---------- POST GRID ---------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.08);
    border-color: transparent;
}
.post-card-image {
    aspect-ratio: 16 / 10;
    background: var(--light);
    overflow: hidden;
    position: relative;
}
.post-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.post-card:hover .post-card-image img { transform: scale(1.06); }
.post-card-image .placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(11,16,38,0.1);
}
.post-card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-card-cat {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.post-card-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-excerpt {
    font-size: 0.88rem;
    color: var(--ink-mute);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--ink-mute);
    font-weight: 600;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    gap: 10px;
}
.post-card-meta .read-time {
    color: var(--blue);
    font-weight: 700;
}

/* ---------- SIDEBAR (trending, tags) ---------- */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}
.sidebar-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 24px 26px;
    margin-bottom: 24px;
}
.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.trending-item {
    display: flex;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s;
}
.trending-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.trending-item:hover { transform: translateX(3px); }
.trending-num {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 8px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--ink-mute);
}
.trending-item:nth-child(1) .trending-num { background: var(--grad); color: #fff; }
.trending-item:nth-child(2) .trending-num { background: rgba(37,99,255,0.1); color: var(--blue); }
.trending-item:nth-child(3) .trending-num { background: rgba(245,158,11,0.1); color: var(--warning); }
.trending-body { flex: 1; min-width: 0; }
.trending-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.trending-meta {
    font-size: 0.72rem;
    color: var(--ink-mute);
    font-weight: 600;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-pill {
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--light);
    color: var(--ink-mute);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
}
.tag-pill:hover {
    background: var(--grad);
    color: #fff;
}
.tag-pill .count {
    opacity: 0.6;
    font-weight: 600;
    margin-left: 4px;
}

/* ---------- EMPTY ---------- */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 20px;
    border: 1px dashed var(--line);
}
.blog-empty .icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
    line-height: 1;
}
.blog-empty h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 10px;
}
.blog-empty p {
    font-size: 0.95rem;
    color: var(--ink-mute);
    line-height: 1.6;
    max-width: 40ch;
    margin: 0 auto;
}

/* ---------- DETAIL PAGE ---------- */
.article-hero {
    background: linear-gradient(135deg, #050816 0%, #0B1026 100%);
    color: #fff;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}
.article-hero .cover-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.article-hero .cover-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.22;
}
.article-hero .cover-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5,8,22,0.95) 0%, rgba(11,16,38,0.95) 100%);
}
.article-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 32px;
}
.article-breadcrumb {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 22px;
}
.article-breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}
.article-breadcrumb a:hover { color: #fff; }
.article-breadcrumb span { margin: 0 8px; opacity: 0.5; }

.article-meta-top {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.article-category {
    display: inline-block;
    padding: 6px 14px;
    background: var(--grad);
    color: #fff;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.article-category.plain {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
}
.article-meta-top .meta-item {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
}
.article-title {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 20px;
}
.article-author {
    display: flex;
    gap: 12px;
    align-items: center;
}
.article-author .avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}
.article-author .info {
    line-height: 1.3;
}
.article-author .name {
    font-weight: 800;
    font-size: 0.92rem;
    color: #fff;
}
.article-author .role {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
}

/* ---------- ARTICLE BODY CARD ---------- */
.article-body-wrap {
    background: var(--light);
    padding: 60px 0 80px;
}
.article-body-grid {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}
.article-card {
    background: #fff;
    border-radius: 20px;
    padding: 44px 48px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ink);
}
.article-content p {
    margin: 0 0 1.4em;
}
.article-content p:last-child { margin-bottom: 0; }
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.015em;
    margin: 1.8em 0 0.6em;
    line-height: 1.3;
}
.article-content h2 { font-size: 1.6rem; }
.article-content h3 { font-size: 1.25rem; }
.article-content h4 { font-size: 1.05rem; }
.article-content h2:first-child,
.article-content h3:first-child { margin-top: 0; }

.article-content strong { font-weight: 800; color: var(--ink); }
.article-content em { font-style: italic; }
.article-content a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    word-break: break-word;
}
.article-content ul,
.article-content ol {
    margin: 0 0 1.4em 1.4em;
    padding: 0;
}
.article-content li {
    margin-bottom: 0.5em;
    line-height: 1.75;
}
.article-content blockquote {
    border-left: 4px solid var(--blue);
    background: var(--light);
    padding: 16px 24px;
    margin: 1.5em 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--ink);
}
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
    display: block;
}
.article-content figure { margin: 1.5em 0; }
.article-content figcaption {
    font-size: 0.85rem;
    color: var(--ink-mute);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}
.article-content hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 2em 0;
}
.article-content code {
    background: var(--light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--purple);
}
.article-content pre {
    background: var(--midnight);
    color: #e5e7eb;
    padding: 20px 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.9rem;
    line-height: 1.6;
}
.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ---------- ARTICLE FOOTER ---------- */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}
.article-tags .label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-mute);
    margin-right: 4px;
    align-self: center;
}

/* ---------- SHARE ---------- */
.share-section {
    margin-top: 32px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.share-section h3 {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    margin-bottom: 16px;
}
.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.share-btn.linkedin:hover  { background: #0A66C2; color: #fff; border-color: transparent; }
.share-btn.facebook:hover  { background: #1877F2; color: #fff; border-color: transparent; }
.share-btn.x:hover         { background: #000;    color: #fff; border-color: transparent; }
.share-btn.whatsapp:hover  { background: #25D366; color: #fff; border-color: transparent; }
.share-btn.telegram:hover  { background: #229ED9; color: #fff; border-color: transparent; }
.share-btn.copy {
    width: auto;
    padding: 0 18px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
}
.share-btn.copied {
    background: var(--success);
    color: #fff;
    border-color: transparent;
}

/* ---------- RELATED ---------- */
.related-section {
    background: #fff;
    padding: 60px 0;
    border-top: 1px solid var(--line);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 24px;
}
.related-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.related-image {
    aspect-ratio: 16 / 10;
    background: var(--light);
    overflow: hidden;
    position: relative;
}
.related-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.related-card:hover .related-image img { transform: scale(1.06); }
.related-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.related-cat {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.related-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-meta {
    font-size: 0.75rem;
    color: var(--ink-mute);
    font-weight: 600;
    margin-top: auto;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .blog-layout { grid-template-columns: 1fr; }
    .article-body-grid { grid-template-columns: 1fr; }
    .featured-card { grid-template-columns: 1fr; }
    .featured-image { min-height: 220px; }
    .featured-body { padding: 28px 24px; }
}
@media (max-width: 640px) {
    .blog-hero { padding: 80px 0 50px; }
    .blog-hero-inner,
    .blog-container,
    .article-hero-inner,
    .article-body-grid { padding: 0 20px; }
    .article-body-wrap { padding: 40px 0; }
    .article-card { padding: 28px 22px; border-radius: 16px; }
    .article-content { font-size: 1rem; line-height: 1.75; }
    .article-content h2 { font-size: 1.35rem; }
    .article-content h3 { font-size: 1.15rem; }
    .post-grid { grid-template-columns: 1fr; gap: 18px; }
    .related-grid { grid-template-columns: 1fr; }
    .share-buttons { justify-content: space-between; }
    .share-btn { flex: 1; }
    .share-btn.copy { flex: 2; }
}
@media (max-width: 400px) {
    .category-strip { padding: 8px 0 20px; }
    .category-chip { padding: 6px 12px; font-size: 0.8rem; }
}