/* CSS Mobile-First Personal Branding Web */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-muted: #6b7280;
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Header & Navigation */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    max-height: 42px;
    max-width: 140px;
    object-fit: contain;
    border-radius: 6px;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.4rem;
}

.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.site-nav.active {
    display: block;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-nav a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: block;
}

.site-nav a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Desktop Header Responsive */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        display: block !important;
        position: static;
        border: none;
        padding: 0;
        box-shadow: none;
    }

    .site-nav ul {
        flex-direction: row;
        gap: 1.5rem;
    }
}

/* Marquee Running Text */
.marquee-container {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    padding: 0.6rem 0;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.1);
}

.marquee-wrapper {
    display: flex;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.marquee-badge {
    background-color: var(--accent);
    color: #000000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    margin-right: 1rem;
    white-space: nowrap;
}

.marquee-content {
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
    font-size: 0.9rem;
    font-weight: 500;
}

.marquee-text:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Main Layout & Cards */
.main-container {
    max-width: 1100px;
    width: 100%;
    margin: 1.5rem auto;
    padding: 0 1rem;
    flex: 1;
}

/* Search Bar */
.search-section {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 0.85rem 1.25rem 0.85rem 2.8rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 30px;
    outline: none;
    transition: var(--transition);
    background-color: #ffffff;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Cards Grid */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Card Styling */
.post-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-card-img-wrap {
    width: 100%;
    background-color: #f1f5f9;
    overflow: hidden;
}

/* Ensure full image is visible, fully responsive without being cut off */
.post-card-img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.post-card:hover .post-card-img {
    transform: scale(1.03);
}

.post-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.post-card-title a {
    color: var(--text);
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex: 1;
}

.btn-readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--primary);
}

/* Post Detail Single View */
.single-post {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .single-post {
        padding: 2.5rem;
    }
}

.single-post-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.single-post-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.single-post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Image on detail page: full width responsive, non-cropped */
.single-post-featured-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background-color: #f8fafc;
}

.single-post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
}

.single-post-content p {
    margin-bottom: 1.25rem;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary);
}

/* Footer */
.site-footer {
    background-color: #1e293b;
    color: #94a3b8;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #334155;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-copyright {
    font-size: 0.85rem;
}

/* Alert Box */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.no-posts {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
