/*
Theme Name: RapidTagsAI Theme
Theme URI: https://rapidtagsai.com
Author: RapidTagsAI
Author URI: https://rapidtagsai.com
Description: Custom dark theme matching rapidtagsai.com — same header, footer, and blog card UI.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: rapidtagsai
*/

/* ============================================================
   BASE — matches main site exactly
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0f172a;
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

a { color: #60a5fa; text-decoration: none; }
a:hover { color: #93c5fd; }
img { max-width: 100%; height: auto; }

/* ============================================================
   GLASS CARD — same as main site
   ============================================================ */
.glass-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s, transform 0.2s;
}
.glass-card:hover { border-color: rgba(59, 130, 246, 0.5); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    border-bottom: 1px solid #1e293b;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .header-inner {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-icon {
    width: 32px; height: 32px;
    background: #dc2626;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; color: #fff; font-style: italic; font-size: 1.2rem;
}
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.05em; color: #fff; line-height: 1; }
.logo-name span { color: #ef4444; }
.logo-status { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.status-dot {
    width: 6px; height: 6px;
    background: #22c55e; border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.status-text { font-size: 8px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.1em; }

.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: #94a3b8; text-decoration: none; transition: color 0.2s; white-space: nowrap;
}
.site-nav a:hover, .site-nav a.current { color: #fff; }
.site-nav a.current { color: #ef4444; position: relative; }
.site-nav a.current::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: #ef4444;
}

@media (max-width: 1024px) { .site-nav { display: none; } }

/* Mobile burger */
.mobile-menu-btn {
    display: none; background: none; border: 1px solid #334155;
    color: #94a3b8; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 18px;
}
@media (max-width: 1024px) { .mobile-menu-btn { display: block; } }

.mobile-nav {
    display: none; flex-direction: column; gap: 0;
    background: #0f172a; border-bottom: 1px solid #1e293b;
    padding: 1rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: #94a3b8; padding: 10px 0; border-bottom: 1px solid #1e293b; text-decoration: none;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: #fff; }

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.site-main {
    flex: 1;
    max-width: 1152px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    width: 100%;
}

/* ============================================================
   PAGE HERO
   ============================================================ */
.page-hero { text-align: center; margin-bottom: 3rem; padding: 2rem 0; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #fff; margin-bottom: 0.75rem; letter-spacing: -0.03em; }
.page-hero h1 span { color: #3b82f6; }
.page-hero p { color: #94a3b8; font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ============================================================
   BLOG LIST — same glass card grid as main site
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    display: flex; flex-direction: column;
    border-radius: 1rem; overflow: hidden;
    text-decoration: none; color: inherit;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s, transform 0.15s;
    height: 100%;
}
.blog-card:hover { border-color: rgba(59, 130, 246, 0.5); transform: translateY(-2px); color: inherit; }

.blog-card-img {
    height: 192px; overflow: hidden;
    background: rgba(30, 41, 59, 0.5);
    position: relative;
}
.blog-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s; opacity: 1;
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }

.blog-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.blog-card-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #3b82f6; }
.blog-card-dot { width: 3px; height: 3px; background: #475569; border-radius: 50%; }
.blog-card-date { font-size: 11px; color: #64748b; }
.blog-card-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 0.75rem; line-height: 1.4; transition: color 0.2s; }
.blog-card:hover .blog-card-title { color: #60a5fa; }
.blog-card-excerpt { color: #94a3b8; font-size: 0.875rem; line-height: 1.6; margin-bottom: 1.5rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-read {
    margin-top: auto; display: flex; align-items: center; gap: 4px;
    font-size: 0.875rem; font-weight: 700; color: #3b82f6;
}
.blog-card-read svg { width: 16px; height: 16px; transition: transform 0.2s; }
.blog-card:hover .blog-card-read svg { transform: translateX(4px); }

/* Empty / loading states */
.blog-empty { grid-column: 1/-1; text-align: center; padding: 4rem 1rem; color: #64748b; }
.blog-spinner {
    display: inline-block; width: 32px; height: 32px;
    border: 2px solid #1e293b; border-top-color: #3b82f6;
    border-radius: 50%; animation: spin 0.6s linear infinite; margin-bottom: 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-wrapper { max-width: 800px; margin: 0 auto; }

.post-header { margin-bottom: 2rem; }
.post-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.post-cat { color: #3b82f6; }
.post-sep { color: #1e293b; }
.post-date { color: #64748b; }

.post-title { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 1.5rem; letter-spacing: -0.03em; }

.post-author { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; color: #94a3b8; }
.post-author-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: #1e293b; display: flex; align-items: center; justify-content: center;
    color: #3b82f6; font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.post-author-name { font-weight: 600; color: #fff; font-size: 0.9rem; }
.post-author-role { font-size: 0.75rem; color: #64748b; }

.post-thumbnail {
    width: 100%; height: 400px; overflow: hidden;
    border-radius: 1.5rem; margin-bottom: 3rem;
    background: #1e293b; box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.post-excerpt {
    font-size: 1.2rem; color: #cbd5e1; line-height: 1.8;
    font-style: italic; font-weight: 500; margin-bottom: 2.5rem;
    padding-left: 1.25rem; border-left: 4px solid #3b82f6;
}

/* Post content — WordPress rendered HTML */
.post-content { color: #94a3b8; line-height: 1.8; }
.post-content h1,.post-content h2,.post-content h3,.post-content h4 { color: #fff; font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem; line-height: 1.3; }
.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.6rem; color: #60a5fa; border-left: 4px solid #3b82f6; padding-left: 1rem; }
.post-content h3 { font-size: 1.25rem; color: #e2e8f0; }
.post-content h4 { font-size: 1rem; color: #e2e8f0; }
.post-content p { margin-bottom: 1.25rem; }
.post-content a { color: #60a5fa; text-decoration: underline; }
.post-content a:hover { color: #93c5fd; }
.post-content ul,.post-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.post-content blockquote { border-left: 4px solid #3b82f6; padding: 1rem 1.25rem; margin: 1.5rem 0; background: #0f172a; border-radius: 0 8px 8px 0; color: #cbd5e1; font-style: italic; }
.post-content code { background: #0f172a; color: #a5b4fc; padding: 2px 6px; border-radius: 4px; font-size: 0.875rem; font-family: 'Courier New', monospace; }
.post-content pre { background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 1.25rem; overflow-x: auto; margin-bottom: 1.25rem; }
.post-content pre code { background: none; padding: 0; }
.post-content img { max-width: 100%; border-radius: 12px; margin: 1.5rem auto; display: block; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.9rem; }
.post-content th { background: #1e293b; color: #e2e8f0; padding: 10px 14px; text-align: left; border-bottom: 2px solid #334155; }
.post-content td { padding: 10px 14px; border-bottom: 1px solid #1e293b; }
.post-content tr:hover td { background: #0f172a; }
.post-content strong,.post-content b { color: #e2e8f0; font-weight: 600; }
.post-content figure { margin: 1.5rem 0; }
.post-content figcaption { text-align: center; font-size: 0.8rem; color: #64748b; margin-top: 0.5rem; }
.post-content hr { border: none; border-top: 1px solid #334155; margin: 2rem 0; }

/* Back link */
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: #60a5fa; font-size: 0.875rem; font-weight: 600;
    text-decoration: none; margin-bottom: 2rem; transition: color 0.2s;
}
.back-link:hover { color: #93c5fd; }
.back-link svg { width: 16px; height: 16px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.pagination a,.pagination span {
    padding: 8px 16px; border-radius: 8px; font-size: 0.875rem; font-weight: 600;
    border: 1px solid #334155; color: #94a3b8; text-decoration: none; transition: all 0.2s;
}
.pagination a:hover { border-color: #3b82f6; color: #3b82f6; }
.pagination .current { background: #3b82f6; border-color: #3b82f6; color: #fff; }

/* ============================================================
   FOOTER — same as main site
   ============================================================ */
.site-footer {
    border-top: 1px solid #1e293b;
    background: rgba(15, 23, 42, 0.5);
    padding: 3rem 1rem;
    margin-top: auto;
}
.site-footer .footer-inner { max-width: 1152px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-weight: 700; color: #fff; margin-bottom: 1rem; font-size: 0.9rem; }
.footer-col p { color: #64748b; font-size: 0.875rem; line-height: 1.6; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: #64748b; font-size: 0.875rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #60a5fa; }
.footer-social { display: flex; gap: 1rem; margin-top: 1rem; }
.footer-social a { color: #64748b; transition: color 0.2s; }
.footer-social a:hover { color: #fff; }
.footer-social svg { width: 20px; height: 20px; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 2rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-copy { color: #64748b; font-size: 0.875rem; }
.footer-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #334155; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .post-thumbnail { height: 240px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
