/* Journal Page Specific Styles */

/* Journal Hero */
.journal-hero {
    padding: 140px 0 80px;
    text-align: center;
    color: var(--ivory);
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(68, 70, 142, 0.2), var(--noir));
}

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

.journal-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: var(--heading-font);
}

.journal-hero p {
    font-family: var(--accent-font);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Decorative icons */
.decorative-icon {
    position: absolute;
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

.decorative-icon:hover {
    opacity: 0.3;
}

.decorative-icon img {
    width: 100%;
    height: 100%;
    filter: brightness(0) invert(1);
}

/* Icon positions */
.j-icon-1 { top: 15%; left: 8%; width: 35px; }
.j-icon-2 { top: 20%; right: 12%; width: 40px; }
.j-icon-3 { bottom: 25%; left: 15%; width: 28px; }
.j-icon-4 { bottom: 20%; right: 18%; width: 32px; }
.j-icon-5 { top: 40%; left: 45%; width: 25px; }

/* Featured Article */
.featured-article {
    padding: 80px 0;
    background-color: rgba(68, 70, 142, 0.05);
}

.featured-article-card {
    display: flex;
    flex-direction: column;
    background-color: rgba(39, 35, 34, 0.5);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.featured-article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Featured article with real image and sepia filter */
.featured-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: sepia(0.6) brightness(0.9);
}

.featured-article-card:hover .featured-article-image img {
    transform: scale(1.05);
}

.article-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--dark-purple);
    color: var(--gold);
    padding: 0.5rem 1rem;
    border-radius: 2px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--heading-font);
}

.featured-tag {
    position: static;
    display: inline-block;
    margin-bottom: 0;  /* Remove margin, using gap instead */
    align-self: flex-start;
}

.featured-article-content {
    padding: 2rem;  /* Increased from 1.5rem to 2rem */
    display: flex;
    flex-direction: column;
    gap: 1rem;  /* Add consistent spacing between elements */
    justify-content: center;
}

.featured-article-content h2 {
    color: var(--gold);
    font-size: 1.75rem;
    margin: 0;  /* Remove all margins, using gap instead */
}

.article-meta {
    color: var(--mushroom);
    font-family: var(--accent-font);
    font-size: 0.875rem;
    margin: 0;  /* Remove margin, using gap instead */
}

.featured-article-content p {
    margin: 0;  /* Remove margin, using gap instead */
    line-height: 1.6;
}

.featured-article-content .btn {
    margin-top: 0.5rem;  /* Small top margin for button */
    align-self: flex-start;
}

/* Journal Content */
.journal-content {
    padding: 80px 0;
}

.journal-grid {
    display: flex;
    flex-direction: column;
}

.journal-sidebar {
    margin-bottom: 2rem;
    order: 2;
}

.sidebar-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(133, 118, 112, 0.2);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    color: var(--gold);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: block;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.category-list a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.category-list a.active {
    color: var(--gold);
    position: relative;
    font-weight: bold;
}

.category-list a.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--gold);
}

.recent-posts {
    list-style: none;
}

.recent-posts li {
    margin-bottom: 1rem;
}

.recent-posts a {
    font-family: var(--accent-font);
    line-height: 1.4;
}

/* Articles Grid */
.articles-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    order: 1;
}

.article-card {
    background-color: rgba(39, 35, 34, 0.3);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

/* Article images (SVGs) */
.article-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
    transition: transform 0.5s ease;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    max-width: 120px;
    margin: 0 auto;
    display: block;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    color: var(--gold);
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.article-content .btn-text {
    margin-top: 0.5rem;
}

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

.page-number, .pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-family: var(--heading-font);
    border: 1px solid rgba(133, 118, 112, 0.3);
    transition: var(--transition);
}

.page-number:hover:not(.active),
.pagination-arrow:hover:not(.disabled) {
    border-color: var(--gold);
    color: var(--gold);
}

.page-number.active {
    background-color: var(--gold);
    color: var(--noir);
    border-color: var(--gold);
}

.pagination-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(39, 35, 34, 0.9);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 0;
}

.modal.show {
    display: block;
}

body.modal-open {
    overflow: hidden;
}

.modal-content {
    position: relative;
    background-color: rgba(39, 35, 34, 0.95);
    margin: 1.5rem auto;
    width: 95%;
    border-radius: var(--card-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(197, 164, 109, 0.2);
    padding: 1.5rem;
    animation: fade-in 0.3s ease-in-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--mushroom);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.close-modal:hover {
    color: var(--gold);
}

.modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(197, 164, 109, 0.2);
}

.modal-header h2 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.modal-body {
    color: var(--ivory);
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 1.5rem;
}

.modal-body h3 {
    color: var(--gold);
    margin: 2rem 0 1rem;
    font-family: var(--heading-font);
}

/* Responsive modal */
@media screen and (min-width: 768px) {
    .modal-content {
        width: 90%;
        max-width: 700px;
        padding: 2rem;
    }
}

/* Media queries */
@media screen and (min-width: 576px) {
    .featured-article-image {
        height: 250px;
    }
    
    .articles-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 768px) {
    .featured-article-card {
        flex-direction: row;
        max-height: none;  /* Remove max-height constraint */
    }
    
    .featured-article-image {
        width: 50%;
        height: auto;
        min-height: 350px;  /* Ensure minimum height */
    }
    
    .featured-article-content {
        width: 50%;
        padding: 2.5rem;  /* Increase padding for larger screens */
        justify-content: center;
    }
    
    .modal-content {
        width: 90%;
        max-width: 700px;
        padding: 2rem;
    }
}

@media screen and (min-width: 992px) {
    .journal-grid {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 3rem;
    }
    
    .journal-sidebar {
        order: 1;
        position: sticky;
        top: 100px;
    }
    
    .articles-container {
        order: 2;
    }
    
    .featured-article-content {
        padding: 3rem;
    }
}

@media screen and (min-width: 1200px) {
    .articles-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
