/*
Theme Name: Science Journal Theme
Theme URI: http://example.com
Author: Antigravity
Author URI: http://example.com
Description: Official precise replica of ScienceDirect Journals. Optimized for reading research papers.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sciencejournal-theme
*/

:root {
    --sd-bg-green: #50b07a;
    --sd-dark-green: #3a8a5b;
    --sd-text-main: #111111;
    --sd-text-light: #555555;
    --sd-link-blue: #007398;
    --sd-link-hover: #005670;
    --sd-orange: #e56020;
    --sd-border-color: #e0e0e0;
    --sd-bg-grey: #f5f5f5;
    --sd-card-bg: #ffffff;
    --sd-container-width: 1400px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "NexusSans", "Roboto", "Segoe UI", Arial, sans-serif;
    color: var(--sd-text-main);
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--sd-link-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: var(--sd-link-hover);
}

/* Global Container */
.container {
    max-width: var(--sd-container-width);
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

/* ------------------------------------- */
/* 1. Global ScienceDirect Header        */
/* ------------------------------------- */
.global-header {
    background: #ffffff;
    border-bottom: 1px solid var(--sd-border-color);
    height: 60px;
    display: flex;
    align-items: center;
}

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

.global-logo {
    display: flex;
    align-items: center;
    font-size: 21px;
    color: var(--sd-orange);
    font-weight: 500;
}

.global-logo svg {
    height: 24px;
    margin-right: 8px;
    fill: var(--sd-orange);
}

.global-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.global-nav a {
    color: var(--sd-text-main);
    font-size: 15px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

.global-nav a svg {
    width: 18px;
    fill: var(--sd-text-main);
}

.global-nav a:hover {
    color: var(--sd-link-blue);
}

/* ------------------------------------- */
/* 2. Hero Green Banner                  */
/* ------------------------------------- */
.hero-banner {
    background-color: var(--sd-bg-green);
    position: relative;
    padding-top: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.hero-inner {
    display: flex;
    align-items: center;
}

.journal-cover {
    width: 160px;
    height: 220px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    background: #e0e0e0;
    flex-shrink: 0;
    margin-bottom: -70px;
    /* Offset for replica overlap effect */
    z-index: 10;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.journal-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    flex: 1;
    padding-left: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-text h1 {
    font-size: 42px;
    font-weight: 400;
    margin-bottom: 8px;
    color: #111;
    letter-spacing: -0.5px;
}

.hero-text p {
    font-size: 16px;
    color: #111;
    font-weight: 500;
}

.hero-metrics {
    display: flex;
    gap: 40px;
    padding-left: 40px;
    border-left: 1px solid rgba(0, 0, 0, 0.15);
}

.metric h3 {
    font-size: 22px;
    font-weight: 500;
    color: #111;
}

.metric span {
    font-size: 14px;
    color: #111;
}

/* ------------------------------------- */
/* 3. Main Navigation Bar                */
/* ------------------------------------- */
.journal-nav-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--sd-border-color);
}

.journal-nav-bar .container {
    display: flex;
    padding-left: 240px;
    /* Offset to clear the hanging cover art */
    height: 60px;
}

.nav-menu {
    display: flex;
    flex: 1;
    border-right: 1px solid var(--sd-border-color);
}

.nav-menu a {
    color: var(--sd-text-main);
    font-size: 15px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--sd-border-color);
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: var(--sd-bg-grey);
    text-decoration: none;
    box-shadow: inset 0 -3px 0 var(--sd-link-blue);
}

.nav-search {
    flex: 1;
    padding: 0 24px;
    display: flex;
    align-items: center;
    color: var(--sd-text-light);
    font-size: 15px;
}

.nav-actions {
    display: flex;
    background-color: var(--sd-bg-grey);
}

.nav-actions .guide-link {
    display: flex;
    align-items: center;
    padding: 0 24px;
    color: var(--sd-text-main);
    font-size: 15px;
    border-left: 1px solid var(--sd-border-color);
}

/* ------------------------------------- */
/* 4. Homepage: About Section            */
/* ------------------------------------- */
.about-section {
    padding: 70px 0 60px 0;
    border-bottom: 1px solid var(--sd-border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.about-box {
    background-color: #ededed;
    padding: 50px;
}

.about-box h2 {
    font-size: 32px;
    font-weight: 300;
    margin-bottom: 25px;
}

.about-box p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #222;
}

.publishing-box {
    padding: 20px 0;
}

.publishing-box h2 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 30px;
}

.pub-option {
    margin-bottom: 35px;
}

.pub-option h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 15px;
}

/* ------------------------------------- */
/* 5. Homepage: Articles Grid            */
/* ------------------------------------- */
.articles-wrapper {
    background-color: #ffffff;
    padding: 60px 0;
}

.section-heading {
    border-top: 5px solid var(--sd-bg-green);
    padding-top: 15px;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    display: inline-block;
}

.article-tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
    margin-bottom: 40px;
    gap: 30px;
}

.article-tabs span {
    font-size: 18px;
    color: var(--sd-text-main);
    padding-bottom: 15px;
    cursor: pointer;
    position: relative;
}

.article-tabs span.active {
    font-weight: 500;
}

.article-tabs span.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--sd-text-main);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.article-card {
    display: flex;
    flex-direction: column;
}

.article-card .a-type {
    font-size: 14px;
    color: var(--sd-text-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.circle-open {
    color: var(--sd-bg-green);
    font-size: 16px;
}

.circle-abstract {
    color: var(--sd-text-light);
    font-size: 16px;
}

.article-card .a-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 12px;
}

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

.article-card .a-title a:hover {
    color: var(--sd-link-blue);
}

.article-card .a-meta {
    font-size: 14px;
    color: var(--sd-text-light);
    margin-top: auto;
}

/* ------------------------------------- */
/* 6. Single Article (Post) Styling      */
/* ------------------------------------- */
.single-paper-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    padding: 60px 0;
}

.paper-content-area {
    background: #fff;
}

.paper-type {
    font-size: 14px;
    color: var(--sd-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paper-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 32px;
    line-height: 1.3;
    font-weight: 400;
    color: #111;
    margin-bottom: 25px;
}

.paper-authors {
    font-size: 18px;
    color: var(--sd-link-blue);
    margin-bottom: 10px;
}

.paper-date {
    font-size: 14px;
    color: var(--sd-text-light);
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sd-border-color);
}

/* Typography for the actual research paper content */
.paper-body {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

.paper-body h2 {
    font-family: "Merriweather", Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    margin: 40px 0 20px;
    color: #111;
}

.paper-body h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 30px 0 15px;
}

.paper-body p {
    margin-bottom: 20px;
}

.paper-body figure,
.paper-body img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    border: 1px solid var(--sd-border-color);
}

/* Sidebar for Single Article */
.paper-sidebar {
    background: var(--sd-bg-grey);
    padding: 30px;
    border-radius: 4px;
    height: max-content;
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #111;
}

.btn-primary,
.btn-secondary {
    display: block;
    width: 100%;
    padding: 12px 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--sd-link-blue);
    color: #fff;
    border: 1px solid var(--sd-link-blue);
}

.btn-primary:hover {
    background-color: var(--sd-link-hover);
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--sd-link-blue);
    border: 1px solid var(--sd-link-blue);
}

.btn-secondary:hover {
    background-color: #f0f8fa;
    text-decoration: none;
}

/* ------------------------------------- */
/* 7. Footer                             */
/* ------------------------------------- */
.site-footer {
    background-color: #0f172a;
    /* Dark sleek footer */
    color: #f1f5f9;
    padding: 80px 0 40px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-col h4 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 24px;
    color: #fff;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 16px;
}

.footer-col ul li a {
    color: #cbd5e1;
    font-size: 15px;
}

.footer-col ul li a:hover {
    color: #fff;
}

/* ------------------------------------- */
/* 8. Editor-in-Chief                    */
/* ------------------------------------- */
.eic-section {
    background-color: var(--sd-bg-grey);
    padding: 50px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--sd-border-color);
}

.eic-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.eic-header h2 {
    font-size: 24px;
    font-weight: 500;
    color: #111;
}

.eic-header span {
    color: #111;
    font-weight: 300;
    font-size: 22px;
}

.eic-header a {
    font-size: 16px;
    color: var(--sd-link-blue);
}

.eic-profile {
    display: flex;
    align-items: center;
    gap: 24px;
}

.eic-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sd-border-color);
}

.eic-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eic-info h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #111;
}

.eic-info p {
    font-size: 15px;
    color: var(--sd-text-light);
}

/* Sidebar Specific EIC */
.sidebar-eic .eic-avatar {
    width: 50px;
    height: 50px;
}

.sidebar-eic .eic-profile {
    gap: 15px;
}

/* ------------------------------------- */
/* 9. Call for Papers Pattern            */
/* ------------------------------------- */
.cfp-section {
    background-color: #f8fafc;
    /* subtle blueish grey */
    padding: 60px 0;
    border-top: 1px solid var(--sd-border-color);
}

.cfp-card {
    background: #fff;
    border: 1px solid var(--sd-border-color);
    border-left: 4px solid var(--sd-orange);
    padding: 24px 30px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.cfp-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cfp-badge {
    display: inline-block;
    background-color: #0f172a;
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 15px;
}

.cfp-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 12px;
}

.cfp-meta p {
    font-size: 15px;
    color: var(--sd-text-light);
    margin-bottom: 5px;
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .journal-nav-bar .container {
        padding-left: 200px;
    }
}

@media screen and (max-width: 900px) {

    .about-grid,
    .single-paper-layout {
        grid-template-columns: 1fr;
    }

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .hero-metrics {
        padding-left: 0;
        border-left: none;
    }

    .journal-nav-bar .container {
        padding-left: 40px;
        height: auto;
        flex-wrap: wrap;
    }

    .journal-cover {
        margin-bottom: 20px;
    }
}

@media screen and (max-width: 600px) {

    .article-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .global-nav {
        display: none;
    }
}