/* ========================================
   BRANDING COLORS - Budget Hub Blog
   ======================================== */
:root {
    /* Foundation Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F1F3F5;
    --bg-hover: #E9ECEF;

    --text-primary: #1A1A1D;
    --text-secondary: #2E2E32;
    --text-tertiary: #6B6B6D;
    --text-disabled: #A8A8AA;

    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-default: rgba(0, 0, 0, 0.12);
    --border-emphasis: rgba(0, 0, 0, 0.18);

    /* Accent Colors */
    --purple-primary: #7C3AED;
    --purple-dark: #6D28D9;
    --purple-light: #8B5CF6;
    --purple-ultra-light: #EDE9FE;
    --purple-glow: rgba(124, 58, 237, 0.15);

    --green-success: #10B981;
    --amber-warning: #F59E0B;
    --red-error: #EF4444;

    --blue-info: #3B82F6;

    /* Gradients */
    --gradient-purple: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
    --gradient-grey: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    --gradient-subtle: linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, rgba(124, 58, 237, 0.02) 50%, transparent 100%);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    border: 2px solid var(--border-subtle);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple-primary);
    font-size: 1.5rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--purple-primary);
}

.nav-link.active {
    color: var(--purple-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--purple-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-content {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.mobile-menu.active .mobile-menu-content {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav .nav-link {
    font-size: 1.125rem;
}

/* Footer Brand */
.footer-brand {
    max-width: 350px;
}

.footer-brand p {
    color: var(--text-tertiary);
    margin-top: 1rem;
    line-height: 1.7;
}

.footer-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3.25rem; letter-spacing: -0.02em; }
h2 { font-size: 2.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }

p { color: var(--text-tertiary); }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
}

/* Utilities */
.mb-2 { margin-bottom: 0.75rem; }

/* Hero Section */
.hero {
    background: var(--gradient-purple);
    padding: 10rem 0 5rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-icons {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-icons i {
    position: absolute;
    color: rgba(255, 255, 255, 0.07);
    animation: iconFloat 20s infinite ease-in-out;
}

.hero-icons i:nth-child(1)  { font-size: 2.5rem; top: 15%; left: 5%;  animation-delay: 0s; }
.hero-icons i:nth-child(2)  { font-size: 3.5rem; top: 60%; left: 10%; animation-delay: -3s; }
.hero-icons i:nth-child(3)  { font-size: 4rem;   top: 25%; left: 20%; animation-delay: -6s; }
.hero-icons i:nth-child(4)  { font-size: 2rem;   top: 70%; left: 30%; animation-delay: -9s; }
.hero-icons i:nth-child(5)  { font-size: 3rem;   top: 10%; left: 45%; animation-delay: -2s; }
.hero-icons i:nth-child(6)  { font-size: 2.5rem; top: 75%; left: 55%; animation-delay: -5s; }
.hero-icons i:nth-child(7)  { font-size: 3.5rem; top: 20%; left: 70%; animation-delay: -8s; }
.hero-icons i:nth-child(8)  { font-size: 2rem;   top: 65%; left: 75%; animation-delay: -11s; }
.hero-icons i:nth-child(9)  { font-size: 4rem;   top: 40%; left: 88%; animation-delay: -4s; }
.hero-icons i:nth-child(10) { font-size: 2.5rem; top: 80%; left: 90%; animation-delay: -7s; }
.hero-icons i:nth-child(11) { font-size: 3rem;   top: 50%; left: 3%;  animation-delay: -10s; }
.hero-icons i:nth-child(12) { font-size: 2rem;   top: 35%; left: 95%; animation-delay: -1s; }

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-12px) rotate(5deg); }
    50%      { transform: translateY(0) rotate(0deg); }
    75%      { transform: translateY(12px) rotate(-5deg); }
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero p {
    color: white;
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Section */
.blog-section {
    padding: 4rem 0;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-default);
    border-radius: 0.75rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.filter-tab:hover {
    border-color: var(--purple-light);
    color: var(--purple-primary);
}

.filter-tab.active {
    background: var(--purple-primary);
    border-color: var(--purple-primary);
    color: white;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Blog Card */
.blog-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.15);
}

.blog-card-image {
    width: 100%;
    height: 220px;
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blog-card-image i {
    font-size: 4rem;
    color: white;
    opacity: 0.9;
}

.blog-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    color: var(--purple-primary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.blog-card-meta i {
    margin-right: 0.5rem;
    color: var(--purple-primary);
}

.blog-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-card-excerpt {
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--purple-primary);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 0.75rem;
}

.blog-card-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.blog-card-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Featured Post */
.featured-post {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.featured-post .blog-card-image {
    height: 100%;
    min-height: 400px;
}

.featured-post .blog-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--purple-ultra-light);
    color: var(--purple-primary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-default);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: var(--purple-primary);
    color: var(--purple-primary);
}

.page-btn.active {
    background: var(--purple-primary);
    border-color: var(--purple-primary);
    color: white;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--purple-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-disabled);
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    margin: 2rem 0;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-tertiary);
}

.empty-state-full {
    grid-column: 1 / -1;
}

/* Post Detail Specific Styles */
.article-content {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 2rem auto;
}

.article-content h2,
.article-content h3 {
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--purple-primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
}

.back-link:hover {
    gap: 0.75rem;
}

.back-link-bottom {
    margin-top: 3rem;
    margin-bottom: 0;
}

/* Post Detail - Additional Styles */
.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: center;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-tertiary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.post-meta i {
    color: var(--purple-primary);
    margin-right: 0.4rem;
}

.article-meta-center {
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 1.5rem;
}

.article-container {
    padding: 4rem 2rem;
}

.related-section {
    margin-top: 4rem;
}

.related-title {
    text-align: center;
    margin-bottom: 2rem;
}

.related-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Comments Section */
.comments-section {
    margin-top: 3rem;
}

.comment-item {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
}

.comment-author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.comment-text {
    color: var(--text-secondary);
    margin: 0;
}

.comments-empty {
    text-align: center;
    color: var(--text-tertiary);
    padding: 2rem 0;
}

/* Comment Form */
.comment-form-wrapper {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
}

.comment-form-title {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-default);
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-textarea {
    width: 100%;
    min-height: 150px;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-default);
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}

.btn-submit {
    padding: 1rem 2rem;
    background: var(--purple-primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: var(--purple-dark);
}

/* Messages */
.messages-container {
    padding: 1rem 0;
    background: var(--bg-primary);
}

.message-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
}

.message-success {
    background: var(--green-success);
    color: white;
}

.message-error {
    background: var(--red-error);
    color: white;
}

.message-info {
    background: var(--purple-ultra-light);
    color: var(--purple-primary);
}

/* Footer */
.footer-text {
    color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .featured-post {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu.active {
        display: block;
    }

    .filter-tabs {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .footer-brand {
        max-width: 100%;
    }
}
