/* ============================================
   HelpFathers.org - Medium-Inspired Stylesheet
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #212529;
    background: #fff;
    line-height: 1.6;
}
a { color: #230A4E; text-decoration: none; transition: color 0.2s; }
a:hover { color: #3D1A6E; }
img { max-width: 100%; height: auto; display: block; }

/* Navigation */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0 1.5rem;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 65px;
}
.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #230A4E;
    letter-spacing: -0.5px;
}
.site-logo:hover { color: #3D1A6E; }
.nav-links {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}
.nav-links a {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.nav-links a:hover {
    color: #230A4E;
    border-bottom-color: #230A4E;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.search-form input {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 0.875rem;
    width: 200px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8f9fa;
}
.search-form input:focus {
    border-color: #3D1A6E;
    box-shadow: 0 0 0 3px rgba(35, 10, 78, 0.1);
    background: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.menu-toggle span {
    width: 24px;
    height: 2px;
    background: #212529;
    transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Hero / Homepage Header */
.hero {
    text-align: center;
    padding: 4rem 1.5rem 3rem;
    background: linear-gradient(135deg, #230A4E 0%, #3D1A6E 100%);
    color: #fff;
}
.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.75rem;
    font-family: Georgia, 'Times New Roman', serif;
}
.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Post Cards (listing) */
.posts-grid {
    display: grid;
    gap: 2.5rem;
}
.post-card {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 1.5rem;
    align-items: start;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e9ecef;
}
.post-card:last-child { border-bottom: none; }
.post-card-content { }
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.825rem;
    color: #868e96;
    margin-bottom: 0.5rem;
}
.post-card-meta a { color: #3D1A6E; font-weight: 500; }
.post-card-meta .dot { margin: 0 0.25rem; }
.post-card h2 {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
    font-family: Georgia, 'Times New Roman', serif;
}
.post-card h2 a { color: #212529; }
.post-card h2 a:hover { color: #230A4E; }
.post-card .excerpt {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}
.post-card-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: #adb5bd;
}
.post-card-image {
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 4/3;
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Featured Post (first post, bigger) */
.featured-post {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 3rem;
    margin-bottom: 1rem;
}
.featured-post .post-card-image {
    max-width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}
.featured-post h2 {
    font-size: 2rem;
    max-width: 700px;
    margin: 0 auto 0.75rem;
}
.featured-post .excerpt {
    max-width: 600px;
    margin: 0 auto 0.75rem;
}
.featured-post .post-card-meta {
    justify-content: center;
}
.featured-post .post-card-footer {
    justify-content: center;
}

/* Single Post / Article */
.article-header {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    max-width: 720px;
    margin: 0 auto;
}
.article-header .category-tag {
    display: inline-block;
    color: #3D1A6E;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
.article-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    font-family: Georgia, 'Times New Roman', serif;
    color: #212529;
}
.article-header .subtitle {
    font-size: 1.25rem;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #868e96;
    font-size: 0.9rem;
}
.article-meta .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.article-meta .dot { margin: 0 0.25rem; }

.article-featured-image {
    max-width: 900px;
    margin: 0 auto 2.5rem;
    border-radius: 8px;
    overflow: hidden;
}
.article-featured-image img {
    width: 100%;
    height: auto;
}

/* Article body - Medium-like typography */
.article-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
    font-family: Georgia, 'Charter', 'Times New Roman', serif;
    font-size: 1.25rem;
    line-height: 1.8;
    color: #292929;
}
.article-body p {
    margin-bottom: 1.5rem;
}
.article-body h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.3px;
    color: #212529;
}
.article-body h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: #212529;
}
.article-body blockquote {
    border-left: 3px solid #230A4E;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #495057;
}
.article-body ul, .article-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}
.article-body li {
    margin-bottom: 0.5rem;
}
.article-body img {
    border-radius: 4px;
    margin: 2rem auto;
}
.article-body a {
    color: #3D1A6E;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.article-body pre {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Menlo, monospace;
    font-size: 0.9rem;
    margin: 1.5rem 0;
    line-height: 1.5;
}
.article-body code {
    background: #f8f9fa;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'SFMono-Regular', Menlo, monospace;
    font-size: 0.85em;
}
.article-body pre code {
    background: none;
    padding: 0;
}
.article-body hr {
    border: none;
    text-align: center;
    margin: 2.5rem 0;
}
.article-body hr::before {
    content: '...';
    letter-spacing: 1em;
    color: #adb5bd;
    font-size: 1.5rem;
}

/* Author bio section after article */
.author-box {
    max-width: 720px;
    margin: 3rem auto;
    padding: 2rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 1.25rem;
    align-items: start;
}
.author-box-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.author-box h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.author-box p {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.5;
}

/* Related Posts */
.related-posts {
    max-width: 720px;
    margin: 0 auto 3rem;
    padding: 2rem 1.5rem 0;
    border-top: 1px solid #e9ecef;
}
.related-posts h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #212529;
}
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.related-post-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
    line-height: 1.3;
}
.related-post-item h4 a { color: #212529; }
.related-post-item h4 a:hover { color: #230A4E; }
.related-post-item .meta {
    font-size: 0.8rem;
    color: #868e96;
    margin-top: 0.25rem;
}

/* Sidebar-like section */
.sidebar-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #495057;
    margin-bottom: 1rem;
}
.sidebar-section ul {
    list-style: none;
}
.sidebar-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}
.sidebar-section li:last-child { border-bottom: none; }
.sidebar-section li a {
    font-size: 0.9rem;
    color: #212529;
    font-weight: 500;
}
.sidebar-section li a:hover { color: #3D1A6E; }

/* Category page header */
.category-header {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}
.category-header h1 {
    font-size: 2rem;
    font-weight: 800;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 0.5rem;
}
.category-header p {
    color: #495057;
    font-size: 1.1rem;
}
.category-header .post-count {
    font-size: 0.875rem;
    color: #868e96;
    margin-top: 0.5rem;
}

/* Search */
.search-header {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
}
.search-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.search-header .search-form-large input {
    padding: 0.75rem 1.5rem;
    border: 2px solid #dee2e6;
    border-radius: 30px;
    font-size: 1.1rem;
    width: 100%;
    max-width: 500px;
    outline: none;
}
.search-header .search-form-large input:focus {
    border-color: #3D1A6E;
    box-shadow: 0 0 0 3px rgba(35, 10, 78, 0.1);
}
.search-results-count {
    color: #868e96;
    margin-bottom: 2rem;
    text-align: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.2s;
}
.pagination a:hover {
    background: #f8f9fa;
    border-color: #3D1A6E;
    color: #230A4E;
}
.pagination .current {
    background: #230A4E;
    color: #fff;
    border-color: #230A4E;
}
.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Page (static pages) */
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}
.page-content h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: -0.5px;
}
.page-content .page-body {
    font-family: Georgia, 'Charter', 'Times New Roman', serif;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #292929;
}
.page-content .page-body p { margin-bottom: 1.5rem; }

/* Footer */
.site-footer {
    background: #230A4E;
    color: #EBE8FF;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
    gap: 2rem;
}
.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 0.5rem;
}
.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.8;
    max-width: 300px;
}
.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: #EBE8FF;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 1; color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: #868e96;
}
.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}
.empty-state p {
    font-size: 1rem;
}

/* Flash Messages */
.flash {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.flash-success {
    background: #EBE8FF;
    color: #230A4E;
    border: 1px solid #c2FF24;
}
.flash-error {
    background: #FFF5F5;
    color: #C53030;
    border: 1px solid #FEB2B2;
}

/* ==================
   ADMIN PANEL STYLES
   ================== */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}
.admin-sidebar {
    background: #230A4E;
    color: #EBE8FF;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar-logo {
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}
.admin-sidebar-logo a {
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
}
.admin-sidebar-logo small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.25rem;
}
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: #EBE8FF;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.admin-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.admin-nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-left-color: #c2FF24;
    font-weight: 600;
}
.admin-nav .nav-divider {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 0.75rem 0;
}

.admin-main {
    background: #f8f9fa;
    padding: 2rem;
    min-height: 100vh;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}
.admin-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}
.admin-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #212529;
}

/* Admin Stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #230A4E;
    margin-top: 0.25rem;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #868e96;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}
.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f3f5;
    font-size: 0.9rem;
    vertical-align: middle;
}
.admin-table tr:hover td {
    background: #f8f9fa;
}
.admin-table .actions {
    white-space: nowrap;
}
.admin-table .actions a {
    margin-right: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
}
.admin-table .actions a.delete { color: #e03131; }
.admin-table .actions a.delete:hover { color: #c92a2a; }
.admin-table .status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.admin-table .status-published { background: #EBE8FF; color: #230A4E; }
.admin-table .status-draft { background: #FFF3BF; color: #915600; }

/* Admin Forms */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.35rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3D1A6E;
    box-shadow: 0 0 0 3px rgba(35, 10, 78, 0.1);
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.form-group .help-text {
    font-size: 0.8rem;
    color: #868e96;
    margin-top: 0.25rem;
}

/* Content editor textarea (larger) */
.form-group textarea.content-editor {
    min-height: 400px;
    font-family: Georgia, 'Charter', 'Times New Roman', serif;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
}
.btn-primary {
    background: #230A4E;
    color: #fff;
    border-color: #230A4E;
}
.btn-primary:hover {
    background: #3D1A6E;
    border-color: #3D1A6E;
    color: #fff;
}
.btn-secondary {
    background: #fff;
    color: #495057;
    border-color: #dee2e6;
}
.btn-secondary:hover {
    background: #f8f9fa;
    color: #212529;
}
.btn-danger {
    background: #fff;
    color: #e03131;
    border-color: #ffc9c9;
}
.btn-danger:hover {
    background: #FFF5F5;
}
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Admin Login */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}
.login-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 400px;
}
.login-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #230A4E;
}
.login-card p {
    text-align: center;
    color: #868e96;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}
.login-card .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
}

/* File upload */
.file-upload {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}
.file-upload:hover {
    border-color: #3D1A6E;
}
.file-upload input[type="file"] {
    display: none;
}
.file-upload label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #495057;
}
.current-image {
    margin-top: 1rem;
}
.current-image img {
    max-width: 200px;
    border-radius: 6px;
}

/* Media grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}
.media-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f8f9fa;
}
.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-item .media-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.media-item:hover .media-actions {
    opacity: 1;
}
.media-item .media-actions a {
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}
.media-item .media-actions a.delete { background: #e03131; }
.media-item .media-actions a.copy { background: #3D1A6E; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #e9ecef;
        gap: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
    .nav-links.active { display: flex; }
    .nav-links a { padding: 0.75rem 0; border-bottom: 1px solid #f1f3f5; }
    .menu-toggle { display: flex; }
    .search-form input { width: 140px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .post-card { grid-template-columns: 1fr; }
    .post-card-image { aspect-ratio: 16/9; order: -1; }
    .featured-post h2 { font-size: 1.5rem; }
    .article-header h1 { font-size: 1.75rem; }
    .article-body { font-size: 1.1rem; }
    .related-posts-grid { grid-template-columns: 1fr; }
    .footer-top { flex-direction: column; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: fixed;
        left: -240px;
        transition: left 0.3s;
        z-index: 200;
    }
    .admin-sidebar.active { left: 0; }
    .admin-main { padding: 1rem; }
    .admin-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .container { padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
    .hero { padding: 2.5rem 1rem 2rem; }
    .hero h1 { font-size: 1.75rem; }
    .article-header h1 { font-size: 1.5rem; }
    .pagination a, .pagination span { min-width: 35px; height: 35px; }
    .search-form { display: none; }
}

/* ==================
   HOMEPAGE SECTIONS
   ================== */

/* Nav logo with image */
.site-logo { display: flex; align-items: center; }
.site-logo-img { height: 40px; width: auto; }

/* Hero */
.hff-hero {
    background: #230A4E;
    color: #fff;
    padding: 5rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}
.hff-hero-bg-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 60%;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    filter: brightness(10);
}
.hff-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hff-hero-tagline {
    font-size: 0.85rem;
    color: #c2FF24;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 1rem;
}
.hff-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 1.5rem;
}
.hff-accent { color: #c2FF24; }
.hff-hero-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 520px;
}
.hff-hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.btn-accent {
    background: #c2FF24;
    color: #230A4E;
    border-color: #c2FF24;
    font-weight: 700;
}
.btn-accent:hover {
    background: #d4ff5e;
    color: #230A4E;
}
.btn-outline-light {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.btn-outline-dark {
    background: transparent;
    color: #230A4E;
    border: 2px solid #230A4E;
}
.btn-outline-dark:hover {
    background: #230A4E;
    color: #fff;
}

/* Pillars */
.hff-pillars {
    background: #EBE8FF;
    padding: 4rem 2rem;
}
.hff-pillars-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    text-align: center;
}
.hff-pillar-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: #230A4E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hff-pillar p {
    font-size: 1rem;
    color: #230A4E;
    font-weight: 600;
    line-height: 1.5;
}

/* Stats */
.hff-stats {
    background: #230A4E;
    color: #fff;
    padding: 5rem 2rem;
}
.hff-stats-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.hff-stats h2 {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 3rem;
    letter-spacing: -1px;
}
.hff-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}
.hff-stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: #c2FF24;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.hff-stat-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.hff-stat p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}
.hff-stats-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* About */
.hff-about {
    padding: 5rem 2rem;
    background: #f8f9fa;
}
.hff-about-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hff-about-logo {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    display: block;
}
.hff-about-text h2 {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: Georgia, 'Times New Roman', serif;
    color: #230A4E;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}
.hff-about-text p {
    font-size: 1rem;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 1.5rem;
}
.hff-small {
    font-size: 0.85rem;
    color: #868e96;
    margin-top: -0.5rem;
}

/* Partners */
.hff-partners {
    padding: 4rem 2rem;
    background: #EBE8FF;
}
.hff-partners-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.hff-partners h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #230A4E;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 2.5rem;
}
.hff-partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.hff-partner {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    font-weight: 700;
    color: #230A4E;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.hff-partner:hover { transform: translateY(-2px); }
.hff-partner span {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    color: #868e96;
    margin-top: 0.25rem;
}

/* Contact */
.hff-contact {
    padding: 4rem 2rem;
    text-align: center;
    background: #fff;
}
.hff-contact-inner {
    max-width: 600px;
    margin: 0 auto;
}
.hff-contact h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #230A4E;
    margin: 1rem 0 0.75rem;
    font-family: Georgia, 'Times New Roman', serif;
}
.hff-contact p {
    font-size: 1.1rem;
    color: #495057;
}
.hff-contact a {
    color: #230A4E;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Section title for blog */
.hff-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: Georgia, 'Times New Roman', serif;
    color: #230A4E;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #EBE8FF;
}

/* Homepage responsive */
@media (max-width: 768px) {
    .hff-hero-bg-badge {
        left: 0;
        transform: translate(-30%, -50%);
        width: 400px;
        max-width: 80%;
        opacity: 0.08;
    }
    .hff-hero h1 { font-size: 2.25rem; }
    .hff-pillars-inner { grid-template-columns: 1fr; gap: 2rem; }
    .hff-stats h2 { font-size: 1.75rem; }
    .hff-stats-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hff-stats-buttons { flex-direction: column; }
    .hff-about-inner { grid-template-columns: 1fr; gap: 2rem; }
    .hff-about-badge { text-align: center; }
    .hff-about-logo { max-width: 200px; }
    .hff-partners-grid { grid-template-columns: 1fr; }
    .hff-hero-buttons { flex-direction: column; }
}

/* Print */
@media print {
    .site-nav, .site-footer, .search-form, .pagination, .related-posts { display: none; }
    .hff-hero, .hff-pillars, .hff-stats, .hff-about, .hff-partners, .hff-contact { display: none; }
    .article-body { font-size: 12pt; }
    body { color: #000; }
    a { color: #000; text-decoration: underline; }
}
