/* ================================
   BLOG PAGE STYLES
   Bento Layout with Goals Sidebar
   ================================ */

/* Main Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* ================================
   BLOG POSTS COLUMN
   ================================ */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Featured Post (with image) */
.blog-card.featured {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-card.featured:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.blog-card.featured .blog-card-image {
    height: 220px;
    overflow: hidden;
}

.blog-card.featured .blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card.featured:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card.featured .blog-card-content {
    padding: 1.5rem;
}

/* Compact Post (no image) */
.blog-card.compact {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-card.compact:hover {
    border-color: var(--accent);
    background: rgba(40, 40, 40, 0.6);
}

.blog-card.compact .blog-card-content {
    padding: 1.25rem 1.5rem;
}

.blog-card.compact .blog-card-title {
    font-size: 1.1rem;
    margin: 0.3rem 0 0.5rem;
}

.blog-card.compact .blog-card-excerpt {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Shared Card Styles */
.blog-card-date {
    font-family: 'Segoe UI', Tahoma, 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.blog-card-title {
    font-family: 'Anta', sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0.5rem 0;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--accent);
}

.blog-card-excerpt {
    font-family: 'Amaranth', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-readtime {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--accent);
}

/* ================================
   GOALS SIDEBAR
   ================================ */
.goals-sidebar {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    height: fit-content;
}

.goals-title {
    font-family: 'Anta', sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.goals-title span {
    font-style: italic;
    color: var(--accent);
}

/* Goals List */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--glass-border);
}

.goal-item:first-child {
    border-top: none;
}

.goal-marker {
    width: 14px;
    height: 14px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.goal-item.completed .goal-marker {
    background: var(--accent);
    border-color: var(--accent);
}

.goal-text {
    font-family: 'Amaranth', sans-serif;
    font-size: 1.05rem;
    color: var(--text-secondary);
    flex: 1;
}

.goal-item.completed .goal-text {
    color: var(--text-primary);
}

.goal-link {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.goal-link:hover {
    color: var(--accent-hover);
}

/* Expandable Goal */
.goal-item.expandable {
    cursor: pointer;
    position: relative;
}

.goal-item.expandable:hover .goal-text {
    color: var(--text-primary);
}

.goal-expand-icon {
    font-family: 'Amaranth', sans-serif;
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.goal-item.expandable.expanded .goal-expand-icon {
    transform: rotate(45deg);
}

/* Goal Sublist */
.goal-sublist {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-left: 1.5rem;
    border-left: 1px solid var(--glass-border);
    margin-left: 0.4rem;
}

.goal-sublist.expanded {
    max-height: 300px;
}

.goal-subitem {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.goal-subitem .goal-marker {
    width: 10px;
    height: 10px;
    border-width: 1px;
}

.goal-subitem .goal-text {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.goal-subitem.completed .goal-marker {
    background: var(--accent);
    border-color: var(--accent);
}

.goal-subitem.completed .goal-text {
    color: var(--text-secondary);
}

/* Progress Bar */
.goals-progress {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-family: 'Anta', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ================================
   BLOG MODAL
   ================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal .modal-content {
    position: relative;
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.modal-banner {
    height: 250px;
    overflow: hidden;
}

.modal-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
    font-family: 'Segoe UI', Tahoma, 'Outfit', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.modal-details {
    padding: 2.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-date {
    font-family: 'Segoe UI', Tahoma, 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.modal-readtime {
    font-family: 'Segoe UI', Tahoma, 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    background: var(--bg-tertiary);
    border-radius: 15px;
    border: 1px solid var(--accent);
}

.modal-title {
    font-family: 'Anta', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.modal-divider {
    height: 1px;
    background: var(--glass-border);
    margin-bottom: 1.5rem;
}

.modal-body {
    font-family: 'Amaranth', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-body h3 {
    font-family: 'Amaranth', sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr 280px;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .goals-sidebar {
        order: -1;
    }
    
    .modal-details {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-card.featured .blog-card-image {
        height: 180px;
    }
    
    .goals-sidebar {
        padding: 1.25rem;
    }
}
