/* ============================================================
   Nakama Adsensei - main.css
   Additional responsive + utility styles
============================================================ */

/* === TOPBAR === */
.topbar {
    background: #0055aa;
    color: #ddeeff;
    font-size: 0.78rem;
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar a { color: #cce4ff; }
.topbar a:hover { color: #fff; }

/* === HERO / FEATURED POST === */
.hero-post {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    background: #1a1a2e;
}
.hero-post img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}
.hero-post-content {
    position: relative;
    z-index: 1;
    padding: 30px;
    color: #fff;
}
.hero-post-content .post-card-category { margin-bottom: 10px; }
.hero-post-content h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 10px; line-height: 1.3; }
.hero-post-content h2 a { color: #fff; }
.hero-post-content .hero-meta { font-size: 0.82rem; color: #ddd; }

/* === LAZY LOAD IMAGES === */
img[data-src] { opacity: 0; transition: opacity 0.3s; }
img.loaded { opacity: 1; }

/* === AD ZONES RESPONSIVE === */
.ad-zone ins.adsbygoogle { display: block; }

/* Header Ad - leaderboard */
.ad-zone-header ins.adsbygoogle {
    min-width: 320px;
    max-width: 970px;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

/* In-content - fluid */
.ad-in-content ins.adsbygoogle {
    display: block;
    text-align: center;
    min-height: 100px;
}

/* Sidebar - 300x250 */
.ad-zone-sidebar ins.adsbygoogle {
    width: 300px;
    height: 250px;
    max-width: 100%;
}

/* Mobile: stack sidebar ad */
@media (max-width: 992px) {
    .ad-zone-sidebar ins.adsbygoogle {
        width: 100%;
        height: auto;
    }
}

/* === READING TIME BADGE === */
.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f4ff;
    color: #0066cc;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* === POST META ICONS === */
.post-meta-bar span svg,
.post-card-meta span svg { vertical-align: middle; margin-right: 3px; }

/* === SOCIAL SHARE BUTTONS === */
.social-share {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}
.social-share a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}
.social-share a:hover { opacity: 0.85; text-decoration: none; color: #fff; }
.social-share .share-fb { background: #1877F2; }
.social-share .share-tw { background: #1DA1F2; }
.social-share .share-wa { background: #25D366; }
.social-share .share-tg { background: #0088CC; }
.social-share .share-copy { background: #6c757d; cursor: pointer; border: none; font-family: inherit; }

/* === NEWSLETTER BOX === */
.newsletter-box {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin: 2rem 0;
}
.newsletter-box h3 { font-size: 1.3rem; margin-bottom: 8px; }
.newsletter-box p { font-size: 0.9rem; opacity: 0.9; margin-bottom: 16px; }
.newsletter-box form { display: flex; gap: 8px; max-width: 400px; margin: 0 auto; }
.newsletter-box input { flex: 1; padding: 10px 14px; border: none; border-radius: 4px; font-size: 0.9rem; }
.newsletter-box button { background: #fff; color: #0066cc; border: none; padding: 10px 20px; border-radius: 4px; font-weight: 700; cursor: pointer; }
@media (max-width: 480px) { .newsletter-box form { flex-direction: column; } }

/* === NOTICE / ALERT BOX === */
.notice-box {
    padding: 14px 18px;
    border-radius: 6px;
    margin: 1.2rem 0;
    font-size: 0.9rem;
    border-left: 4px solid;
}
.notice-info    { background: #e8f4fd; border-color: #3498db; color: #1a5276; }
.notice-warning { background: #fef9e7; border-color: #f39c12; color: #7d6608; }
.notice-success { background: #eafaf1; border-color: #2ecc71; color: #1e8449; }
.notice-danger  { background: #fdedec; border-color: #e74c3c; color: #922b21; }

/* === PRINT STYLES === */
@media print {
    .site-header, .sidebar, .ad-zone, .related-posts,
    .social-share, #back-to-top, .sticky-ad-bottom,
    .main-navigation, .breadcrumb-wrap, .post-navigation,
    .site-footer { display: none !important; }
    .content-area { grid-template-columns: 1fr; }
    .entry-content { font-size: 12pt; line-height: 1.6; }
    a { color: #000; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; }
}

/* === RESPONSIVE UTILITIES === */
@media (max-width: 768px) {
    .hero-post { min-height: 250px; }
    .hero-post-content h2 { font-size: 1.3rem; }
    .footer-widgets { grid-template-columns: 1fr 1fr; }
    .post-navigation { flex-direction: column; }
    .social-share { gap: 6px; }
    .social-share a { padding: 7px 12px; font-size: 0.8rem; }
}
@media (max-width: 480px) {
    .footer-widgets { grid-template-columns: 1fr; }
    .related-posts-grid { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }
    .header-inner { flex-wrap: wrap; gap: 10px; }
}

/* === DARK MODE (prefers-color-scheme) === */
@media (prefers-color-scheme: dark) {
    /* Only if user hasn't set a custom color */
    body.no-custom-color {
        background: #121212;
        color: #e0e0e0;
    }
    body.no-custom-color .site-header { background: #1e1e1e; }
    body.no-custom-color .post-card { background: #1e1e1e; }
    body.no-custom-color .widget { background: #1e1e1e; }
    body.no-custom-color .entry-content h2 { color: #e0e0e0; }
}

/* === LOADING SKELETON === */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === TOOLTIP === */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 9999;
}
[data-tooltip]:hover::after { opacity: 1; }

/* === SMOOTH IMAGE LOAD === */
img { transition: opacity 0.3s ease; }
img:not([src]) { opacity: 0; }

/* === AD LABEL === */
.ad-zone { position: relative; }
.ad-label-small {
    display: block;
    text-align: center;
    font-size: 0.65rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}

/* === HIGHLIGHT BOX === */
.highlight-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 1.5rem 0;
}
.highlight-box strong { color: #92400e; }

/* === VIDEO EMBED RESPONSIVE === */
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; margin: 1.5rem 0; }
.video-wrap iframe, .video-wrap video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* === CATEGORY PAGE HEADER === */
.category-header {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 24px;
}
.category-header h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.category-header p { opacity: 0.85; font-size: 0.95rem; }
