/* ============================================================
   SINGLE POST — 5G Security Cyber Theme
   Premium dark-tech design with glassmorphism & micro-animations
   ============================================================ */

/* ===============================
   1. HERO BANNER
   =============================== */
.single-hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.single-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 17, 40, 0.97) 0%,
        rgba(10, 17, 40, 0.75) 40%,
        rgba(10, 17, 40, 0.40) 100%
    );
    z-index: 1;
}

/* Animated scanline overlay */
.hero-scanline {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(120, 148, 236, 0.03) 2px,
        rgba(120, 148, 236, 0.03) 4px
    );
}

.hero-scanline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(120, 148, 236, 0.4), transparent);
    animation: heroScan 4s linear infinite;
}

@keyframes heroScan {
    0%   { top: -5%; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { top: 105%; opacity: 0; }
}

.single-hero-content {
    position: relative;
    z-index: 3;
    padding-bottom: 60px;
    padding-top: 100px;
    max-width: 860px;
}

.single-category-badge {
    display: inline-block;
    background: rgba(120, 148, 236, 0.2);
    color: #7894EC;
    padding: 6px 20px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(120, 148, 236, 0.35);
    backdrop-filter: blur(6px);
    letter-spacing: 0.5px;
}

.single-hero-title {
    font-family: 'Changa', sans-serif;
    font-size: 2.8rem;
    line-height: 1.35;
    color: #fff;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #ffffff 30%, #7894EC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.single-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.single-hero-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-hero-meta i {
    color: #7894EC;
    font-size: 1rem;
}


/* ===============================
   2. MAIN ARTICLE LAYOUT
   =============================== */
.single-post-main {
    background: var(--bg-light, #f4f7ff);
    padding: 70px 0 90px;
}

.single-post-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start;
}


/* ===============================
   3. SIDEBAR
   =============================== */
.single-sidebar {
    order: -1;            /* RTL: sidebar on right */
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Shared widget style */
.share-widget,
.info-widget {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(20, 38, 140, 0.06);
    border: 1px solid #e1e8fa;
    transition: box-shadow 0.3s;
}

.share-widget:hover,
.info-widget:hover {
    box-shadow: 0 12px 40px rgba(20, 38, 140, 0.12);
}

.share-widget h4,
.info-widget h4 {
    font-family: 'Changa', sans-serif;
    font-size: 1.05rem;
    color: var(--primary-dark, #14268C);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-widget h4 i,
.info-widget h4 i {
    color: var(--primary-light, #7894EC);
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.share-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s;
}

.share-btn:hover::after {
    background: rgba(255, 255, 255, 0.15);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.share-facebook  { background: #1877F2; }
.share-twitter   { background: #1DA1F2; }
.share-whatsapp  { background: #25D366; }
.share-linkedin  { background: #0A66C2; }

/* Info widget */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e1e8fa;
}

.info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    color: #999;
    font-weight: 600;
}

.info-value {
    color: var(--primary-dark, #14268C);
    font-weight: 700;
    text-align: left;
    max-width: 140px;
    word-break: break-word;
}


/* ===============================
   4. ARTICLE CONTENT
   =============================== */
.single-article-content {
    min-width: 0;          /* prevent grid blowout */
}

.article-body {
    background: #fff;
    border-radius: 20px;
    padding: 50px 45px;
    box-shadow: 0 10px 40px rgba(20, 38, 140, 0.06);
    border: 1px solid #e1e8fa;
    line-height: 2;
    font-size: 1.1rem;
    color: #333;
}

/* WP content elements */
.article-body h2 {
    font-family: 'Changa', sans-serif;
    font-size: 1.7rem;
    color: var(--primary-dark, #14268C);
    margin: 45px 0 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-light, #7894EC);
    display: inline-block;
}

.article-body h3 {
    font-family: 'Changa', sans-serif;
    font-size: 1.35rem;
    color: var(--primary-medium, #1C41B4);
    margin: 35px 0 15px;
}

.article-body h4 {
    font-family: 'Changa', sans-serif;
    font-size: 1.15rem;
    color: var(--primary-dark, #14268C);
    margin: 25px 0 12px;
}

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

.article-body a {
    color: var(--primary-medium, #1C41B4);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.article-body a:hover {
    border-bottom-color: var(--primary-light, #7894EC);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e8fa;
}

.article-body blockquote {
    position: relative;
    margin: 35px 0;
    padding: 25px 30px 25px 25px;
    background: linear-gradient(135deg, rgba(20, 38, 140, 0.04), rgba(120, 148, 236, 0.08));
    border-right: 5px solid var(--primary-medium, #1C41B4);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #555;
}

.article-body blockquote::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    right: 15px;
    font-size: 4rem;
    color: rgba(120, 148, 236, 0.2);
    font-family: serif;
    line-height: 1;
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-right: 25px;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.article-body ul li::marker {
    color: var(--primary-medium, #1C41B4);
}

.article-body pre {
    background: #0b1021;
    color: #d0d7f5;
    padding: 25px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.8;
    margin: 30px 0;
    border: 1px solid rgba(120, 148, 236, 0.2);
}

.article-body code {
    background: rgba(120, 148, 236, 0.1);
    color: var(--primary-dark, #14268C);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.9em;
}

.article-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.article-body thead {
    background: var(--primary-dark, #14268C);
    color: #fff;
}

.article-body th,
.article-body td {
    padding: 14px 18px;
    text-align: right;
    border-bottom: 1px solid #e1e8fa;
}

.article-body tbody tr:nth-child(even) {
    background: rgba(120, 148, 236, 0.04);
}

.article-body tbody tr:hover {
    background: rgba(120, 148, 236, 0.08);
}

/* WP gallery & caption */
.article-body .wp-caption {
    max-width: 100%;
    margin: 25px 0;
}

.article-body .wp-caption-text {
    text-align: center;
    font-size: 0.85rem;
    color: #999;
    margin-top: 8px;
}

.article-body figure {
    margin: 30px 0;
}

.article-body figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #999;
    margin-top: 10px;
}

/* Video embeds */
.article-body iframe,
.article-body .wp-block-embed {
    max-width: 100%;
    border-radius: 12px;
    margin: 30px 0;
}


/* ===============================
   5. TAGS
   =============================== */
.article-tags {
    margin-top: 40px;
    padding: 25px 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(20, 38, 140, 0.05);
    border: 1px solid #e1e8fa;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.article-tags > i {
    color: var(--primary-light, #7894EC);
    font-size: 1.1rem;
}

.tag-pill {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(120, 148, 236, 0.08);
    color: var(--primary-medium, #1C41B4);
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(120, 148, 236, 0.15);
    transition: all 0.3s ease;
}

.tag-pill:hover {
    background: var(--primary-medium, #1C41B4);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(28, 65, 180, 0.2);
}


/* ===============================
   6. POST NAVIGATION
   =============================== */
.single-post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.nav-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e1e8fa;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(20, 38, 140, 0.05);
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(28, 65, 180, 0.12);
    border-color: var(--primary-light, #7894EC);
}

.nav-card a {
    display: block;
    padding: 25px;
    text-decoration: none;
    height: 100%;
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-label i {
    color: var(--primary-light, #7894EC);
}

.nav-card:hover .nav-label {
    color: var(--primary-medium, #1C41B4);
}

.nav-title {
    display: block;
    font-family: 'Changa', sans-serif;
    font-size: 1.05rem;
    color: var(--primary-dark, #14268C);
    line-height: 1.5;
    transition: color 0.3s;
}

.nav-card:hover .nav-title {
    color: var(--primary-medium, #1C41B4);
}

.nav-next {
    text-align: left;
}


/* ===============================
   7. RELATED POSTS
   =============================== */
.related-posts-section {
    background: #0b1021;
    padding: 80px 0 90px;
    overflow: hidden;
}

.related-section-title {
    font-family: 'Changa', sans-serif;
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
}

.related-section-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.05rem;
    text-align: center;
    margin-bottom: 50px;
}

.related-grid {
    max-width: 1100px;
    margin: 0 auto;
}


/* ===============================
   8. LATEST NEWS ON FRONT PAGE
   =============================== */
.latest-news-section {
    padding: 90px 0;
    background: var(--bg-light, #f4f7ff);
}

.latest-news-section .section-subtitle {
    color: #666;
    font-size: 1.1rem;
    text-align: center;
    margin-top: -35px;
    margin-bottom: 50px;
}


/* ===============================
   9. RESPONSIVE DESIGN
   =============================== */

/* ---- Tablet ---- */
@media (max-width: 992px) {
    .single-hero {
        min-height: 45vh;
        background-attachment: scroll;
    }

    .single-hero-title {
        font-size: 2.2rem;
    }

    .single-hero-content {
        padding-bottom: 45px;
    }

    .single-post-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .single-sidebar {
        order: 0;
    }

    .sidebar-sticky {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .share-widget,
    .info-widget {
        flex: 1;
        min-width: 260px;
    }

    .article-body {
        padding: 35px 30px;
    }

    .single-post-navigation {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: right;
    }
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .single-hero {
        min-height: 40vh;
    }

    .single-hero-title {
        font-size: 1.7rem;
    }

    .single-hero-meta {
        flex-direction: column;
        gap: 10px;
    }

    .single-hero-content {
        padding-top: 80px;
        padding-bottom: 35px;
    }

    .article-body {
        padding: 25px 20px;
        font-size: 1rem;
        line-height: 1.85;
        border-radius: 14px;
    }

    .article-body h2 {
        font-size: 1.4rem;
    }

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

    .article-body blockquote {
        padding: 20px;
    }

    .sidebar-sticky {
        flex-direction: column;
    }

    .share-widget,
    .info-widget {
        min-width: 100%;
    }

    .article-tags {
        padding: 18px 20px;
    }

    .nav-card a {
        padding: 20px;
    }

    .nav-title {
        font-size: 0.95rem;
    }

    .related-section-title {
        font-size: 1.7rem;
    }

    .blog-grid.related-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Ultra Small ---- */
@media (max-width: 400px) {
    .single-hero-title {
        font-size: 1.45rem;
    }

    .single-category-badge {
        font-size: 0.8rem;
        padding: 5px 15px;
    }

    .share-buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    .article-body {
        padding: 20px 15px;
    }
}


/* ===============================
   10. ANIMATIONS & MICRO-INTERACTIONS
   =============================== */

/* Smooth scroll for hash links */
html {
    scroll-behavior: smooth;
}

/* Article body image hover */
.article-body img:hover {
    transform: scale(1.01);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
}

/* Nav card arrow animation */
.nav-prev:hover .nav-label i {
    animation: arrowBounceRight 0.6s ease infinite;
}

.nav-next:hover .nav-label i {
    animation: arrowBounceLeft 0.6s ease infinite;
}

@keyframes arrowBounceRight {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(5px); }
}

@keyframes arrowBounceLeft {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(-5px); }
}

/* Progress bar glow on hero */
.single-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-light, #7894EC), var(--primary-medium, #1C41B4), transparent);
    z-index: 4;
    animation: progressGlow 3s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

/* Selection highlight */
.article-body ::selection {
    background: rgba(120, 148, 236, 0.25);
    color: var(--primary-dark, #14268C);
}