/* style.css (Frontend) */

:root {
    --bg-color: #fdfdfd;
    --text-color: #2d2d2d;
    --primary-color: #3b82f6;
    /* Modern Blue */
    --link-color: #2563eb;
    --heading-color: #111827;
    --border-color: #e5e7eb;
    --nav-bg: #fff;
    --card-bg: #fff;
    --container-width: 900px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.75;
    font-size: 1.125rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Accessibility Focus */
*:focus {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -9999px;
    left: 0;
    z-index: 1000;
    background: #fff;
    color: var(--primary-color);
    padding: 10px 20px;
    font-weight: bold;
    border: 2px solid var(--primary-color);
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Screen Reader Only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
header {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    text-decoration: none;
}

.tagline {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 2px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

nav ul li a {
    font-weight: 500;
    color: #4b5563;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero / Main Content */
main {
    padding: 40px 0;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.post-meta {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.post-title a {
    color: var(--heading-color);
    text-decoration: none;
    font-size: 1.75rem;
}

.post-title a:hover {
    color: var(--primary-color);
}

/* Block Styles */
.block-image {
    margin: 2rem 0;
    text-align: center;
}

.block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.block-image .caption {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Button Block */
.block-button {
    margin: 2rem 0;
    text-align: center;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: white;
}

/* footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Single Post Content Styling */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}

.entry-content pre {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
}

/* Table Block */
.table-responsive {
    overflow-x: auto;
    margin: 2rem 0;
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.content-table th,
.content-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.content-table th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.content-table tr:last-child td {
    border-bottom: none;
}

.content-table tr:hover {
    background-color: #f9f9f9;
}

/* Quote Block */
.block-quote {
    margin: 2.5rem 0;
    padding: 20px 30px;
    border-left: 5px solid var(--primary-color);
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}

.block-quote p {
    font-size: 1.25rem;
    font-style: italic;
    color: #334155;
    margin: 0;
}

.block-quote cite {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    color: #64748b;
    font-style: normal;
}

/* Video Block */
.block-video {
    margin: 2.5rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

/* Divider Block */
.block-divider {
    border: 0;
    border-top: 2px solid var(--border-color);
    margin: 3rem auto;
    width: 50%;
}

.btn-readmore {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
}

/* New Blocks (CTA, Alert, Code) */
.block-cta {
    background: #f8fafc;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}
.block-cta h3 { margin-top: 0; }
.btn-cta {
    display: inline-block;
    background: var(--heading-color);
    color: #fff;
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 15px;
    font-weight: 600;
}
.btn-cta:hover { background: #000; color: #fff; }

.block-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.alert-icon { font-size: 1.5rem; line-height: 1; }
.alert-content { flex: 1; }

.alert-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.block-code {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 2rem 0;
}