/* Journal Tablet Styles */
.journal-hero-banner {
    width: 100%;
    height: 350px;
    background-image: url('../../assets/images/journal_hero_ai.png');
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 0;
}

.journal-hero-banner .container {
    transform: translateY(45px);
}

.j-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.4) 100%);
    z-index: 1;
}

.journal-wrapper {
    --j-bg-card: #ffffff;
    --j-bg-thumb: #f1f5f9;
    --j-primary: #0f172a;
    --j-accent: #2980b9;
    --j-text-main: #1f2937;
    --j-text-sub: #64748b;
    --j-border: #e2e8f0;
    --j-hover-bg: #f8fafc;
    font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    max-width: 100%;
    margin: 30px auto 0;
    padding-top: 0;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

/* Tablet Layout Overrides */
.j-bg-card {
    background: var(--j-bg-card);
}

.j-hero-section {
    display: flex;
    gap: 40px;
    padding: 40px;
    background: var(--j-bg-card);
    border: 1px solid var(--j-border);
    border-radius: 8px;
    margin-bottom: 50px;
    align-items: center;
}

.j-3d-stage {
    perspective: 1200px;
    width: 260px;
    height: 360px;
    flex-shrink: 0;
}

.j-cover-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 4px 10px 10px 4px;
    color: #fff;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform-style: preserve-3d;
    transform-origin: left center;
    transform: rotateY(-25deg);
    transition: transform 0.5s;
    box-shadow: 20px 20px 30px rgba(0, 0, 0, 0.25);
    position: relative;
}

.j-cover-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.j-cover-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 2.5rem;
    /* Slightly smaller than desktop 2.8rem */
    font-weight: 700;
    line-height: 0.95;
    margin-top: 10px;
}

.j-3d-stage:hover .j-cover-card {
    transform: rotateY(0deg) scale(1.02);
}

.j-info-col {
    flex: 1;
    text-align: left;
}

.j-tag {
    color: var(--j-accent);
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.j-headline {
    color: var(--j-primary);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 2rem;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.j-text {
    color: var(--j-text-sub);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.j-meta-row {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--j-border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.j-btn-row {
    display: flex;
    gap: 15px;
}

.j-btn {
    padding: 12px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.2s;
    cursor: pointer;
}

.j-btn-fill {
    background: var(--j-primary);
    color: #fff;
    border: 1px solid var(--j-primary);
}

.j-btn-outline {
    border: 1px solid var(--j-primary);
    color: var(--j-primary);
    background: transparent;
}

/* Tablet Grid Dimensions */
.j-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.j-board-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Columns for Tablet */
    gap: 30px;
    margin-top: 30px;
}

.j-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Card Styles */
.j-service-card {
    background: #fff;
    border: 1px solid var(--j-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.j-service-icon {
    font-size: 2rem;
    color: var(--j-accent);
    margin-bottom: 15px;
    display: block;
}

.j-service-title {
    font-weight: 700;
    color: var(--j-primary);
    margin-bottom: 8px;
    font-size: 1rem;
}

.j-service-desc {
    font-size: 0.8rem;
    color: var(--j-text-sub);
}

.j-card-preview {
    background: #fff;
    border: 1px solid var(--j-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.j-thumb-box {
    height: 160px;
    background: var(--j-bg-thumb);
    overflow: hidden;
}

.j-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.j-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.j-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--j-primary);
}

/* Restored Preview & TOC Styles */
.j-preview-section {
    margin-top: 40px;
    margin-bottom: 60px;
}

.j-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--j-primary);
    padding-bottom: 10px;
}

.j-issue-grid {
    display: flex !important;
    overflow-x: auto !important;
    gap: 20px;
    padding-bottom: 15px;
    /* Space for scrollbar */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.j-issue-card {
    background: white;
    border: 1px solid var(--j-border);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    gap: 15px;
    align-items: center;
    min-width: 45%;
    /* Show ~2 cards */
    box-sizing: border-box;
    scroll-snap-align: start;
}

.j-issue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--j-accent);
}

.j-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.j-toc-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 15px;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin-bottom: 4px;
}

.j-toc-item:hover {
    background: linear-gradient(to right, #ffffff, #fdfaf5);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-bottom-color: transparent;
}

.j-toc-page-num {
    font-family: 'Playfair Display', serif;
    color: #cbd5e1;
    font-size: 1.1rem;
    font-style: italic;
    width: 60px;
    flex-shrink: 0;
    text-align: center;
    padding-top: 0;
    transition: color 0.3s;
}

.j-toc-item:hover .j-toc-page-num {
    color: var(--j-accent);
}

.j-toc-info {
    flex: 1;
}

.j-article-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--j-primary);
    margin-bottom: 5px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.35;
    transition: color 0.2s;
}

.j-article-title:hover {
    color: var(--j-accent);
}

.j-article-authors {
    font-size: 0.85rem;
    color: #64748b;
    font-style: normal;
    font-weight: 500;
}

.j-toc-actions {
    display: flex;
    align-items: center;
}

.j-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 15px;
    border: 1px solid var(--j-border);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--j-text-sub);
    text-decoration: none;
    font-weight: 600;
    background: #fff;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.j-pdf-btn:hover {
    border-color: var(--j-accent);
    background: var(--j-accent);
    color: #fff;
    box-shadow: 0 3px 8px rgba(41, 128, 185, 0.2);
    transform: translateY(-1px);
}

.j-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--j-border);
}

.j-page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--j-border);
    background: #fff;
    color: var(--j-text-main);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.j-page-btn:hover:not(.disabled) {
    border-color: var(--j-primary);
    color: var(--j-primary);
}

.j-page-btn.active {
    background: var(--j-primary);
    color: #fff;
    border-color: var(--j-primary);
}

.j-page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
}

/* General Components - Premium Redesign */
.j-editorial-section,
.j-toc-container {
    background: #fff;
    border: none;
    border-top: 4px solid var(--j-accent);
    border-radius: 4px;
    padding: 40px;
    margin-bottom: 50px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

.j-toc-header {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--j-primary);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    letter-spacing: -0.5px;
}

.j-toc-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--j-accent);
}

.j-board-member {
    text-align: left;
}

.j-member-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--j-accent);
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.j-member-name {
    font-weight: 700;
    color: var(--j-primary);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.j-member-inst {
    font-size: 0.85rem;
    color: var(--j-text-sub);
}

/* Subscribe Banner */
.j-subscribe-banner {
    background-color: #f8fafc;
    border: 1px solid var(--j-border);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
}

.j-sub-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.8rem;
    color: var(--j-primary);
    margin-bottom: 10px;
}

.j-sub-text {
    color: var(--j-text-sub);
    margin-bottom: 25px;
}

.j-sub-btn {
    padding: 14px 40px;
    font-size: 1.1rem;
    background-color: var(--j-accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.j-sub-btn:hover {
    background-color: #1a5276;
}

/* Modals */
.j-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.j-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.j-modal-card {
    background: #fff;
    width: 70%;
    /* Responsive width for tablet */
    max-width: 600px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s;
}

.j-modal-overlay.active .j-modal-card {
    transform: translateY(0);
}

.j-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.j-close-btn:hover {
    color: var(--j-primary);
}

.j-modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.j-modal-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.6rem;
    color: var(--j-primary);
    margin-bottom: 5px;
}

.j-modal-desc {
    font-size: 0.9rem;
    color: var(--j-text-sub);
}

.j-form-group {
    margin-bottom: 15px;
    text-align: left;
}

.j-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--j-primary);
    margin-bottom: 5px;
}

.j-input,
.j-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.j-input:focus,
.j-select:focus {
    outline: none;
    border-color: var(--j-accent);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

.j-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--j-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.j-submit-btn:hover {
    background: #1a252f;
}