:root {
    /* USACH Inspired Colors */
    --primary-color: #00A499;       /* USACH Teal */
    --primary-light: #14B8AD;
    --primary-dark: #00877D;
    
    --secondary-color: #E35205;     /* USACH Orange */
    --secondary-light: #F66D25;
    
    --text-main: #253746;           /* USACH Dark Slate */
    --text-light: #5A6A78;
    --text-muted: #8A99A8;
    
    --bg-main: #F4F7F9;
    --bg-surface: #FFFFFF;
    --bg-surface-glass: rgba(255, 255, 255, 0.85);
    
    --border-light: #E2E8F0;
    --border-focus: rgba(0, 164, 153, 0.3);
    
    --shadow-sm: 0 2px 8px rgba(37, 55, 70, 0.05);
    --shadow-md: 0 4px 16px rgba(37, 55, 70, 0.08);
    --shadow-lg: 0 12px 32px rgba(37, 55, 70, 0.12);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.08);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Utilities */
.m-0 { margin: 0 !important; }
.w-100 { width: 100% !important; }

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

.top-bar-latindex {
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.top-bar-usach-logo {
    height: 35px;
    object-fit: contain;
}

.top-bar-dept-logo {
    height: 35px;
    object-fit: contain;
    border-left: 1px solid var(--border-light);
    padding-left: 15px;
}

.lang-switch {
    display: flex;
    background: var(--bg-main);
    border-radius: 20px;
    padding: 2px;
    border: 1px solid var(--border-light);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
}

.lang-btn:not(.active):hover {
    color: var(--primary-color);
}

/* Header */
.ijmst-header {
    position: relative;
    height: 480px;
    display: flex;
    align-items: flex-end;
    padding: 60px 5%;
    overflow: hidden;
    background-color: var(--text-main);
}

.header-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    mix-blend-mode: overlay;
    opacity: 0.6;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(37, 55, 70, 0.95) 0%, rgba(37, 55, 70, 0.6) 50%, rgba(37, 55, 70, 0.3) 100%);
    z-index: 1;
}

.header-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out forwards;
}

.header-info h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.header-info h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #E2E8F0;
    margin-bottom: 1.5rem;
    max-width: 800px;
    font-family: 'Open Sans', sans-serif;
}

.meta-tags {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.meta-tags span {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #FFFFFF;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header-metrics {
    display: flex;
    gap: 20px;
}

.metric-block {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 15px 25px;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 120px;
    transition: var(--transition);
}

.metric-block:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.metric-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 2px 10px rgba(227, 82, 5, 0.3);
}

.metric-name {
    font-size: 0.8rem;
    color: #E2E8F0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Main Layout */
.main-container {
    max-width: 1400px;
    margin: -40px auto 40px;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    position: relative;
    z-index: 10;
}

/* Tabs Navigation */
.tabs-container {
    display: flex;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    padding: 8px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-glass);
    border: 1px solid rgba(255,255,255,0.4);
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

.tab-btn i {
    font-size: 1.2rem;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(0, 164, 153, 0.05);
}

.tab-btn.active {
    background: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 164, 153, 0.3);
}

/* Tab Content */
.tab-content {
    display: none;
    opacity: 0;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-light), transparent);
}

/* Articles */
.article-card {
    background: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-focus);
}

.article-card:hover::before {
    transform: scaleY(1);
}

.article-meta {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

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

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

.article-authors {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-actions {
    display: flex;
    gap: 12px;
}

.btn-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-read.primary {
    background: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(0,164,153,0.2);
}

.btn-read.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,164,153,0.3);
}

.btn-read.secondary {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.btn-read.secondary:hover {
    background: #E2E8F0;
    border-color: #CBD5E1;
}

/* Scope & Guide Sections */
.scope-section {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.scope-text h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin: 30px 0 15px;
}

.scope-text h3:first-child {
    margin-top: 0;
}

.scope-text p {
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 1.05rem;
}

.styled-list {
    list-style: none;
    margin-bottom: 25px;
}

.styled-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 1.05rem;
}

.styled-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.info-box {
    background: rgba(0, 164, 153, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.info-box .box-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 2px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(227, 82, 5, 0.25);
}

.btn-download:hover {
    background: #c94600;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 82, 5, 0.35);
}

/* Editors Grid */
.editors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.editor-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.editor-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--border-focus);
}

.editor-photo-wrapper {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.editor-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
}

.editor-name {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.editor-role {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.editor-details {
    text-align: left;
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
}

.editor-details p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.editor-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

/* Search Area */
.search-input-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--text-muted);
}

#searchInput {
    width: 100%;
    padding: 18px 20px 18px 55px;
    font-size: 1.1rem;
    font-family: 'Open Sans', sans-serif;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-main);
    color: var(--text-main);
    transition: var(--transition);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(0, 164, 153, 0.1);
}

.search-stats {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 5px;
}

.search-results-container {
    margin-top: 30px;
    min-height: 200px;
}

.empty-search {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.empty-search i {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Sidebar */
.sidebar {
    padding-top: 85px; /* Align with tab content below tabs */
}

.sidebar-widget {
    background: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid var(--border-light);
}

.highlight-widget {
    background: linear-gradient(135deg, var(--text-main) 0%, #1a2732 100%);
    color: white;
    border: none;
}

.highlight-widget .widget-title {
    color: white;
    border-bottom: none;
    margin-bottom: 0;
}

.highlight-widget p {
    color: #A0AEC0;
    margin: 15px 0 20px;
}

.widget-icon-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.widget-icon-header i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary-color);
}

.btn-action {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Montserrat', sans-serif;
}

.btn-action:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 164, 153, 0.4);
}

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

.link-list li {
    margin-bottom: 12px;
}

.link-list li:last-child {
    margin-bottom: 0;
}

.link-list a {
    color: var(--text-light);
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    transition: var(--transition);
}

.link-list a:hover {
    color: var(--primary-color);
    background: rgba(0, 164, 153, 0.05);
    transform: translateX(4px);
}

.link-list.external a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Footer */
footer {
    background: var(--text-main);
    color: white;
    padding: 60px 5% 40px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info p {
    color: #A0AEC0;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-links a {
    color: white;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.issn-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary-light) !important;
    letter-spacing: 1px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .header-info h1 {
        font-size: 2.5rem;
    }
    
    .header-info h2 {
        font-size: 1.2rem;
    }
    
    .header-content-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}
