/* assets/css/post.css */

/* --- FONTS & VARS --- */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg-page: #f8fafc;        /* Slate 50 */
    --bg-card: #ffffff;        /* White */
    --accent-color: #0891b2;   /* Cyan 600 */
    --accent-hover: #0e7490;   /* Cyan 700 */
    --text-main: #1e293b;      /* Slate 800 */
    --text-body: #334155;      /* Slate 700 */
    --text-muted: #64748b;     /* Slate 500 */
    --border-color: #e2e8f0;   /* Slate 200 */
    
    --font-head: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0; padding: 0;
    line-height: 1.6;
}

/* --- MAIN CONTAINER --- */
.tech-post-main {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.tech-post-container {
    max-width: 900px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    border-radius: 16px;
    position: relative;
    overflow: hidden; /* Keeps floated images inside */
}

/* Top colored accent bar */
.tech-post-container::before {
    content: ''; 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #06b6d4);
}

/* --- HEADER SECTION --- */
.tech-article-header {
    padding: 40px 40px 30px 40px;
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
}

.tech-back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.tech-back-link:hover { color: var(--accent-color); }

.tech-title {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Meta Data */
.tech-meta {
    display: flex; 
    gap: 25px;
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.9rem;
    align-items: center;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
}
.meta-item i { margin-right: 8px; color: var(--accent-color); }

/* Author Image */
.meta-author-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tech-featured-image { margin-top: 30px; }
.tech-featured-image img {
    width: 100%; height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* --- CONTENT BODY --- */
/* This section handles the output from the Legacy Admin Editor */
.tech-content-body {
    padding: 40px;
    font-size: 1.05rem; /* Slightly larger for readability */
    line-height: 1.75;
    color: var(--text-body);
    background-color: #fff;
}

/* 1. MAP ADMIN FONT SIZES TO PIXELS (CRITICAL: DO NOT REMOVE) */
/* Admin uses <font size="1-7">, we style them here */
.tech-content-body font[size="1"] { font-size: 0.75rem !important; }
.tech-content-body font[size="2"] { font-size: 0.875rem !important; }
.tech-content-body font[size="3"] { font-size: 1.05rem !important; }
.tech-content-body font[size="4"] { font-size: 1.25rem !important; }
.tech-content-body font[size="5"] { font-size: 1.5rem !important; }
.tech-content-body font[size="6"] { font-size: 2rem !important; }
.tech-content-body font[size="7"] { font-size: 2.5rem !important; }

/* 2. MAP ADMIN IMAGE ALIGNMENTS (CRITICAL: DO NOT REMOVE) */
.tech-content-body img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 6px;
}

.tech-content-body .wrap-inline {
    display: inline; margin: 5px; vertical-align: middle;
}
.tech-content-body .wrap-square-left {
    float: left; margin: 5px 24px 10px 0; display: block;
}
.tech-content-body .wrap-square-right {
    float: right; margin: 5px 0 10px 24px; display: block;
}
.tech-content-body .wrap-top-bottom {
    display: block; margin: 30px auto; float: none;
}

/* 3. GENERAL HTML ELEMENTS */
.tech-content-body h1, 
.tech-content-body h2, 
.tech-content-body h3 {
    color: var(--text-main); 
    font-family: var(--font-head); 
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.tech-content-body p { margin-bottom: 1.5em; }

.tech-content-body a { 
    color: var(--accent-color); 
    text-decoration: underline; 
    font-weight: 500;
    transition: color 0.2s;
}
.tech-content-body a:hover { color: var(--accent-hover); }

/* Modern Blockquote */
.tech-content-body blockquote {
    border-left: 4px solid var(--accent-color);
    background-color: #f8fafc;
    padding: 16px 20px;
    margin: 30px 0;
    color: var(--text-main);
    font-style: italic;
    font-size: 1.1rem;
    border-radius: 0 8px 8px 0;
}

/* Video Handling */
.tech-content-body video { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: 30px auto; 
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

/* --- SHARE SECTION --- */
.tech-share-section {
    background-color: #f8fafc; /* Light gray footer */
    padding: 30px; 
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.tech-share-section h3 {
    font-family: var(--font-head); 
    color: var(--text-main);
    margin-bottom: 20px; 
    font-size: 1.2rem;
    font-weight: 700;
}

.tech-share-icons { 
    display: flex; 
    justify-content: center; 
    gap: 15px; 
}

.tech-share-icon {
    width: 48px; 
    height: 48px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    border: 1px solid var(--border-color); 
    color: var(--text-muted);
    text-decoration: none; 
    font-size: 1.2rem; 
    transition: all 0.2s ease;
    background: #ffffff; 
    border-radius: 50%; /* Rounded circles */
    cursor: pointer;
}

.tech-share-icon:hover {
    border-color: var(--accent-color); 
    color: #ffffff;
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(8, 145, 178, 0.25);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .tech-article-header { padding: 30px 20px; }
    .tech-content-body { padding: 30px 20px; }
    
    .tech-title { font-size: 1.75rem; }
    
    /* CRITICAL: Reset floats on mobile for readability */
    .tech-content-body .wrap-square-left,
    .tech-content-body .wrap-square-right {
        float: none; 
        display: block; 
        margin: 20px auto; 
        width: 100% !important;
    }
    
    .tech-meta { gap: 15px; }
}