/* Modern Scientific Journal DLE Template Style - Colored Cards Edition v3.1 */

:root {
    /* Color Palette */
    --primary-color: #0F172A;
    /* Slate 900 */
    --accent-color: #2563EB;
    /* Royal Blue */
    --text-main: #334155;
    /* Slate 700 */
    --text-light: #64748B;
    /* Slate 500 */
    --bg-body: #F8FAFC;
    /* Slate 50 */
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;
    /* Slate 200 */

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    /* For Card Titles */

    /* Spacing & Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}

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

body {
    font-family: var(--font-main);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-body);
    font-size: 15px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #1d4ed8;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75em;
}

/* Layout - WIDENED to 1360px */
.container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 {
    font-size: 1.4rem;
    margin: 0;
    color: var(--primary-color);
}

.logo span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

nav ul li a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/*/* Hero Section */
.hero-section {
    /* Путь к вашей картинке здания */
    background-image: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)), 
                      url("../images/university-bg.webp"); 
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Можно заменить на fixed для эффекта параллакса */
    color: white;
    padding: 80px 0;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 450px;
}

.hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 700px;
}

.hero-content h2 {
    color: #FFFFFF;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-hero {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-color);
}

.btn-hero:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
}

/* Hero Cover */
.hero-cover {
    width: 250px;
    flex-shrink: 0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    border: 4px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* === АДАПТИВНОСТЬ ДЛЯ СМАРТФОНОВ === */
@media (max-width: 900px) {
    .hero-section {
        padding: 50px 0;
        text-align: center;
    }

    .hero-inner {
        flex-direction: column;
        gap: 30px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-cover {
        width: 180px; /* Чуть меньше на мобильных */
        order: -1; /* Обложка будет ПЕРЕД текстом на мобиле */
    }
}

/* Grid System - Responsive 3 Column */
.main-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    /* Sidebar slightly smaller */
    gap: 30px;
    margin: 30px auto;
    flex: 1;
}

.content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    /* Min 260px allows 3 cols in ~800px space */
    gap: 24px;
    align-content: start;
}

/* Base Mobile Styles */
@media (max-width: 900px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        width: 100%;
    }

    .hero-cover {
        display: none;
    }

    /* Hide cover on mobile */
}

@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        gap: 15px;
        justify-content: center;
    }

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

    /* Single column cards */
}

.info-alert {
    grid-column: 1 / -1;
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

/* === COLORED CARD DESIGN === */
.article-preview {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-preview:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Card Header */
.card-header {
    height: 180px; /* Можно оставить 160px или сделать чуть больше */
    position: relative;
    display: block; /* Изменили с flex на block для корректного отображения ссылки-обертки */
    overflow: hidden; /* Чтобы картинка не вылезала за границы */
    background-color: #E2E8F0;
}

/* Растягиваем ссылку и картинку на всю область хедера */
.card-header a {
    display: block;
    width: 100%;
    height: 100%;
}

.photo-article {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Это заполнит всё пространство без искажения пропорций */
    object-position: center; /* Центрирует изображение */
    display: block;
    transition: transform 0.3s ease;
}

/* Эффект при наведении (опционально) */
.article-preview:hover .photo-article {
    transform: scale(1.05);
}

/* CATEGORY COLORS (Based on ID) */
.cat-id-1 .card-header {
    background-color: #E0E7FF;
}

/* Indigo */
.cat-id-1 .card-badge {
    background-color: #4338CA;
}

.cat-id-2 .card-header {
    background-color: #DCFCE7;
}

/* Green */
.cat-id-2 .card-badge {
    background-color: #059669;
}

.cat-id-3 .card-header {
    background-color: #F3E8FF;
}

/* Purple */
.cat-id-3 .card-badge {
    background-color: #7C3AED;
}

.cat-id-4 .card-header {
    background-color: #FEE2E2;
}

/* Red */
.cat-id-4 .card-badge {
    background-color: #DC2626;
}

.cat-id-5 .card-header {
    background-color: #FEF3C7;
}

/* Amber */
.cat-id-5 .card-badge {
    background-color: #D97706;
}

.cat-id-6 .card-header {
    background-color: #E0F2FE;
}

/* Sky */
.cat-id-6 .card-badge {
    background-color: #0284C7;
}

/* Fallback / Cycling if no cat-id class */
.article-preview:not([class*="cat-id-"]):nth-child(3n+1) .card-header {
    background-color: #E0E7FF;
}

.article-preview:not([class*="cat-id-"]):nth-child(3n+1) .card-badge {
    background-color: #4338CA;
}

.article-preview:not([class*="cat-id-"]):nth-child(3n+2) .card-header {
    background-color: #DCFCE7;
}

.article-preview:not([class*="cat-id-"]):nth-child(3n+2) .card-badge {
    background-color: #059669;
}

.article-preview:not([class*="cat-id-"]):nth-child(3n+3) .card-header {
    background-color: #F3E8FF;
}

.article-preview:not([class*="cat-id-"]):nth-child(3n+3) .card-badge {
    background-color: #7C3AED;
}

/* Badge */
.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5; /* Добавьте это, чтобы текст не пропал под картинкой */
    background: #64748B;
    color: white;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Icon */
.card-icon svg {
    width: 64px;
    height: 64px;
    opacity: 0.3;
    color: var(--primary-color);
}

/* Card Body */
.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.article-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 12px;
    font-weight: 700;
}

.article-title a {
    color: var(--primary-color);
}

.article-title a:hover {
    color: var(--accent-color);
}

/* Abstract Truncation */
.article-abstract {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 20px;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 4.5em;
}

/* Card Footer */
.card-footer {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.doi-text {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-light);
}

.btn-pdf {
    color: #059669;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
}

.btn-pdf:hover {
    text-decoration: underline;
}

/* Full Story */
.full-article {
    background: white;
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    grid-column: 1 / -1;
}

.full-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.full-header h1 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
}

.abstract-box {
    background: #F8FAFC;
    padding: 20px;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 30px;
    font-style: italic;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.block {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.block-title {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

/* Login Panel Styles */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
}

.login-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-menu li a {
    display: block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
}

.login-menu li a:hover {
    background: var(--bg-body);
    color: var(--accent-color);
}

.pm-count {
    background: #DC2626;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.btn-login {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.btn-login:hover {
    background: #1d4ed8;
}

.login-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding-top: 5px;
}

/* Informative Footer */
footer {
    background-color: var(--primary-color);
    color: #94a3b8;
    padding: 60px 0 30px;
    margin-top: auto;
    font-size: 0.95rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-widget h4 {
    color: white;
    font-size: 1.2rem;
    font-family: var(--font-serif);
    margin-bottom: 20px;
}

/* Footer Logo Col */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
}

.footer-logo-icon {
    background: white;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 900;
}

.footer-desc {
    margin-bottom: 25px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: background 0.2s;
}

.social-btn:hover {
    background: var(--accent-color);
}

/* Contacts Col */
.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-icon {
    color: #10B981;
    margin-top: 4px;
    flex-shrink: 0;
}

/* Green Icons */

/* Newsletter Col */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.newsletter-form input {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: white;
}

.newsletter-form input::placeholder {
    color: #64748B;
}

.btn-subscribe {
    background: #10B981;
    color: white;
    font-weight: 700;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-subscribe:hover {
    background: #059669;
}

/* Copyright */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Sidebar Widgets - Modernized */

/* Category Menu */
.cat-menu,
.cat-menu ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.cat-menu li {
    list-style: none !important;
    margin-bottom: 8px;
}

.cat-menu li::before {
    content: none !important;
    /* Force remove any potential pseudo-element dots */
}

.cat-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background-color: var(--bg-body);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.cat-menu li a:hover {
    background-color: white;
    color: var(--accent-color);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.cat-count {
    background-color: #E2E8F0;
    color: var(--text-light);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.cat-menu li a:hover .cat-count {
    background-color: var(--accent-color);
    color: white;
}

/* Top News (Popular) Refined */
.top-news-list {
    counter-reset: topnews;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-news-item {
    position: relative;
    padding: 12px 12px 12px 45px;
    /* Indent for number */
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.top-news-item::before {
    counter-increment: topnews;
    content: counter(topnews);
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--border-color);
    line-height: 1;
    font-style: italic;
}

/* Rank Highlights */
.top-news-item:nth-child(1) {
    background-color: #FEFCE8;
}

/* Light Yellow */
.top-news-item:nth-child(1)::before {
    color: #EAB308;
}

/* Gold */

.top-news-item:nth-child(2) {
    background-color: #F8FAFC;
}

.top-news-item:nth-child(2)::before {
    color: #94A3B8;
}

/* Silver */

.top-news-item:nth-child(3) {
    background-color: #FFF7ED;
}

.top-news-item:nth-child(3)::before {
    color: #EA580C;
}

/* Bronze */

.top-news-link {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.35;
    margin-bottom: 8px;
}

.top-news-link:hover {
    color: var(--accent-color);
}

.btn-read-xs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    background: transparent;
    padding: 0;
}

.btn-read-xs:hover {
    text-decoration: underline;
}


/* Search Widget */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-main);
    transition: all 0.2s;
}

.search-form input[type="text"]:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-form button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.search-form button:hover {
    background-color: #1d4ed8;
}

/* Editorial Board Page Styles */
.ed-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .ed-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.ed-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    flex-shrink: 0;
}


.ed-photo {
    width: 100%;
    max-width: 200px;
    height: auto;
    /* Allow natural aspect ratio */
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 3px;
    background: white;
    margin-bottom: 0;
    object-fit: cover;
}

/* Button removed */

.ed-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ed-role {
    color: #0088FF;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.4;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.ed-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text-main);
}

.ed-icon {
    color: #0088FF;
    flex-shrink: 0;
    margin-top: 3px;
    width: 20px;
}

.ed-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}


.static-staty {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    border: 1px solid var(--border-color);
    grid-column: 1 / -1;
}

.static-staty h2 {
  margin-bottom: 0px;
}

/* Static Page Header Card */
.static-header-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    grid-column: 1 / -1;
    /* SPAN FULL WIDTH */
}

.static-header-card h1 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    /* Large and clear */
    color: var(--primary-color);
    margin: 0;
    font-weight: 700;
}

/* Static Content Stack */
.static-content-stack {
    grid-column: 1 / -1;
    /* SPAN FULL WIDTH */
    display: flex;
    flex-direction: column;
}

/* Recent Volumes Section - Poster Style */
.volumes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
    gap: 20px;
}

.volume-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 2 / 3;
    display: block;
    box-shadow: var(--shadow-sm);
    text-decoration: none !important;
    background: #000;
}

.volume-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.vol-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    margin: 0;
    border-radius: 0;
    display: block;
}

.volume-card:hover .vol-cover {
    transform: scale(1.05);
    /* Zoom effect */
}

.vol-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0) 100%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 60%;
    align-items: center;
    text-align: center;
}

.vol-number {
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-card:hover .vol-number {
    color: white;
}

/* Keep white on hover */

.vol-year {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}


/* === MOBILE OPTIMIZATION === */

/* Tablet & Mobile (under 900px) */
@media (max-width: 900px) {
    .full-article {
        padding: 30px;
    }

    .full-header h1 {
        font-size: 1.8rem;
    }
}

/* Mobile (under 768px) */
@media (max-width: 768px) {

    /* Layout */
    .container {
        padding: 0 15px;
    }

    .main-wrapper {
        margin: 20px auto;
        gap: 20px;
    }

    /* Full Story */
    .full-article {
        padding: 20px;
        /* Reduced padding */
        border-radius: var(--radius-sm);
    }

    .full-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .full-header h1 {
        font-size: 1.5rem;
        /* Smaller title */
        line-height: 1.3;
    }

    .full-meta {
        font-size: 0.8rem;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Article Body */
    .article-body {
        font-size: 1rem;
        line-height: 1.6;
    }

    .article-body img {
        max-width: 100%;
        height: auto !important;
        border-radius: var(--radius-sm);
    }

    /* Table Overflow Handling */
    .article-body table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-collapse: collapse;
    }

    /* Comments */
    .comments-section {
        padding-top: 20px;
    }

    .comment-item {
        padding: 15px;
    }

    /* Abstract Box */
    .abstract-box {
        padding: 15px;
        font-size: 0.9rem;
    }

    /* Footer Columns to Stack */
    .footer-columns {
        grid-template-columns: 1fr;
        /* Stack vertically */
        gap: 30px;
    }

    /* Static Pages */
    .static-header-card {
        padding: 25px;
    }

    .static-header-card h1 {
        font-size: 1.6rem;
    }

    .ed-card {
        padding: 20px;
    }
}

/* Small Mobile (under 480px) */
@media (max-width: 480px) {

    /* Header */
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    /* Search Form */
    .search-form button {
        width: 100%;
        /* Ensure full width button */
    }

    /* Volumes Grid */
    .volumes-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        /* Smaller cards */
        gap: 12px;
    }

    /* Full Story Adjustments */
    .full-header h1 {
        font-size: 1.3rem;
    }
}