/* =========================================
   SYSTEM STYLES (Gold Standard Wrapper)
   ========================================= */
.ioa-journal-s-tier {
    position: relative;
    width: 100%;
}

.ioa-journal-s-tier *,
.ioa-journal-s-tier *::before,
.ioa-journal-s-tier *::after {
    box-sizing: border-box;
}

/* =========================================
   TELEPORT SLOTS (Gold Standard Feature)
   ========================================= */
.ioa-teleport-slot {
    min-height: 0;
    transition: all 0.3s ease;
    margin-bottom: 0;
    width: 100%;
}

.ioa-teleport-slot.has-content {
    margin-bottom: 2rem;
    animation: ioa-fade-in 0.5s ease;
}

/* Editor Visuals - Visible only in Elementor Editor (.is-editor-mode added via PHP) */
.is-editor-mode .ioa-teleport-slot {
    min-height: 40px;
    border: 1px dashed rgba(30, 58, 138, 0.4);
    background: rgba(30, 58, 138, 0.05);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.is-editor-mode .ioa-teleport-slot::before {
    content: attr(data-label);
    font-size: 11px;
    color: #1e3a8a;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

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

/* =========================================
   ORIGINAL IOA SCIENTIFIC JOURNAL STYLES
   ========================================= */

.ea3g-journal-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ea3g-journal-container {
    /* Core Palette */
    --color-primary: #1e3a8a;
    --color-primary-dark: #1e40af;
    --color-primary-light: rgba(30, 58, 138, 0.08);
    --color-primary-ultra-light: rgba(30, 58, 138, 0.03);
    --color-surface: #ffffff;
    --color-surface-alt: #f3f4f6;
    --color-background: #f9fafb;
    --color-border: #e5e7eb;
    --color-text-primary: #111827;
    --color-text-secondary: #374151;
    --color-text-tertiary: #6b7280;
    --color-text-on-dark: #ffffff;
    --color-tertiary-accent: #10b981;
    --color-tertiary-accent-light: rgba(16, 185, 129, 0.1);

    /* Shadow System */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);

    /* Spacing System */
    --space-xs: 0.75rem;   /* 12px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 1.5rem;    /* 24px */
    --space-lg: 2.5rem;    /* 40px */
    --space-xl: 3.5rem;    /* 56px */
    --space-2xl: 4.5rem;   /* 72px */

    /* Border Radius System */
    --radius-md: 0.5rem;   /* 8px */
    --radius-lg: 0.75rem;  /* 12px */

    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--color-text-secondary);
    letter-spacing: 0.01em;

    /* RULE 3: Main Container Layout */
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md) var(--space-2xl);
    position: relative;
    background-color: var(--color-background);
    overflow-x: hidden;
}

/* --- RULE 1: Typography ("Gold Standard") --- */
.ea3g-journal-container h2,
.ea3g-journal-container h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

.ea3g-journal-container h2 {
    font-size: 32px; /* Consistent with other section titles */
    margin-bottom: var(--space-md);
}

.ea3g-journal-container h3 {
    font-size: 20px; /* Consistent with other card/sub-section titles */
    margin-bottom: var(--space-sm);
}

.ea3g-journal-container p {
    font-size: 16px; /* Standard Body Paragraph */
    margin-bottom: var(--space-md);
    line-height: 1.7;
    max-width: 720px;
}

.ea3g-lede-paragraph {
    font-size: 18px; /* Lede Paragraph */
}

.ea3g-journal-container .ea3g-metrics-item,
.ea3g-journal-container .ea3g-article-item {
    font-size: 15px; /* Secondary Text */
}

.ea3g-cover-issue,
.ea3g-cover-text,
.ea3g-paper-authors,
.ea3g-citation,
.ea3g-metric-label,
.ea3g-metric-badge,
.ea3g-article-meta {
    font-size: 12px; /* Metadata */
}
/* --- END TYPOGRAPHY --- */

/* Background decorations (Static) */
.ea3g-bg-decorations {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.ea3g-molecules-pattern {
    position: absolute; top: 5%; right: -5%;
    width: 300px; height: 300px; opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Ccircle cx='10' cy='10' r='2' fill='%231e3a8a' fill-opacity='0.5'/%3E%3Ccircle cx='30' cy='5' r='1' fill='%231e3a8a' fill-opacity='0.3'/%3E%3Ccircle cx='5' cy='35' r='1.5' fill='%231e3a8a' fill-opacity='0.4'/%3E%3Ccircle cx='40' cy='40' r='2.5' fill='%231e3a8a' fill-opacity='0.6'/%3E%3C/svg%3E");
    background-size: 100px 100px;
}
.ea3g-dot-pattern {
    position: absolute; bottom: 10%; left: 5%;
    width: 200px; height: 200px; opacity: 0.2;
    background-image: radial-gradient(var(--color-primary-light) 1px, transparent 1.5px);
    background-size: 16px 16px; border-radius: 50%;
}

/* Main layout */
.ea3g-journal-visual {
    display: flex; gap: var(--space-lg);
    margin: var(--space-lg) 0 var(--space-xl); position: relative;
    z-index: 1;
}

/* --- RULE 2: Non-interactive Elements Made Static --- */
.ea3g-journal-display {
    position: relative; flex: 0 0 350px;
    background-color: var(--color-surface-alt);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: visible;
}
.ea3g-journal-stack { position: relative; width: 100%; height: 420px; }
.ea3g-journal-cover {
    position: absolute; width: 250px; height: 340px;
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: 6px; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; padding: var(--space-sm);
}

/* Image cover styling */
.ea3g-journal-cover.ea3g-cover-image {
    padding: 0;
    overflow: hidden;
}

.ea3g-cover-image .elementor-image {
    width: 100%;
    height: 100%;
}

.ea3g-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.ea3g-cover-1 { top: 30px; left: 50px; z-index: 3; transform: rotate(-3deg); }
.ea3g-cover-2 { top: 25px; left: 60px; z-index: 2; transform: rotate(2deg); }
.ea3g-cover-3 { top: 35px; left: 40px; z-index: 1; transform: rotate(-6deg); }

.ea3g-citation {
    position: absolute; bottom: var(--space-md); left: 50%;
    transform: translateX(-50%); background-color: var(--color-surface);
    padding: 8px var(--space-sm); border-radius: 6px;
    box-shadow: var(--shadow-md); color: var(--color-text-secondary);
    border: 1px solid var(--color-border); text-align: center;
    white-space: nowrap; font-size: 12px; font-weight: 500;
}

.ea3g-metrics-card {
    background-color: var(--color-surface); border-radius: var(--radius-md);
    padding: var(--space-lg); border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    height: 100%; /* For Diplomat height sync */
}
.ea3g-metrics-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 4px; height: 100%; background-color: var(--color-primary-light);
}
/* --- END STATIC ELEMENT STYLING --- */

/* Journal cover content */
.ea3g-cover-header { border-bottom: 2px solid var(--color-primary); padding-bottom: var(--space-xs); margin-bottom: var(--space-sm); }
.ea3g-cover-title { font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 600; color: var(--color-primary); text-align: center; margin-bottom: 8px; }
.ea3g-cover-subtitle { font-family: 'Inter', sans-serif; font-size: 13px; font-style: italic; text-align: center; color: var(--color-text-secondary); margin-bottom: 8px; }
.ea3g-cover-issue { font-family: 'Inter', sans-serif; text-align: center; color: var(--color-text-tertiary); }
.ea3g-cover-content { flex: 1; display: flex; flex-direction: column; }
.ea3g-cover-lines { flex: 1; display: flex; flex-direction: column; gap: 3px; margin-top: var(--space-sm); }
.ea3g-cover-line { height: 2px; background-color: var(--color-border); border-radius: 1px; }
.ea3g-cover-line-1 { width: 100%; } .ea3g-cover-line-2 { width: 85%; } .ea3g-cover-line-3 { width: 90%; }

/* Journal Info & Links */
.ea3g-journal-info { flex: 1; }
.ea3g-info-section { margin-bottom: var(--space-lg); }
.ea3g-member-note {
    display: inline-block; font-family: 'Inter', sans-serif; font-weight: 500;
    color: var(--color-primary); margin-bottom: var(--space-md);
}

.ea3g-team-links { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin: var(--space-md) 0; }
.ea3g-team-link {
    display: inline-flex; align-items: center; padding: 8px var(--space-sm);
    background-color: var(--color-primary-light); color: var(--color-primary);
    border-radius: var(--radius-md); font-size: 14px; font-weight: 500; text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.ea3g-team-link:hover {
    background-color: var(--color-primary); color: var(--color-text-on-dark);
    transform: translateY(-3px);
}
.ea3g-team-icon { width: 16px; height: 16px; margin-right: 8px; fill: currentColor; }

.ea3g-access-links { margin-top: var(--space-lg); }
.ea3g-access-link {
    display: flex; align-items: center; color: var(--color-primary); text-decoration: none;
    margin-bottom: var(--space-md); font-size: 15px; font-weight: 500;
    padding-left: 28px; position: relative; transition: color 0.2s ease;
}
.ea3g-access-link.elementor-widget-heading { margin: 0 0 var(--space-md); }
.ea3g-access-link::before {
    content: "→"; position: absolute; left: 0; font-size: 1.2em; color: var(--color-primary);
    transition: color 0.2s ease;
}
.ea3g-access-link:hover {
    color: var(--color-primary-dark); text-decoration: underline;
}
.ea3g-access-link:hover::before { color: var(--color-primary-dark); }
.ea3g-access-link p { margin: 0; }

/* Metrics section */
.ea3g-metrics-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg); margin-top: var(--space-xl);
}
.ea3g-metrics-title { display: flex; align-items: center; margin-bottom: var(--space-md); }
.ea3g-metrics-icon { width: 20px; height: 20px; margin-right: var(--space-xs); fill: var(--color-primary); }
.ea3g-metrics-list { list-style: none; }
.ea3g-metrics-item {
    margin-bottom: var(--space-sm); padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border); display: flex;
    flex-direction: column; gap: 4px;
}
.ea3g-metrics-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.ea3g-metric-label { color: var(--color-text-secondary); font-weight: 500; }
.ea3g-metric-value {
    font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 500;
    color: var(--color-text-primary); display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.ea3g-metric-badge {
    display: inline-block; padding: 4px 8px; background-color: var(--color-tertiary-accent-light);
    color: var(--color-tertiary-accent); border-radius: 4px; font-weight: 500; font-size: 11px;
}

/* Articles section */
.ea3g-articles-section { margin-top: var(--space-xl); }
.ea3g-section-title { display: flex; align-items: center; margin-bottom: var(--space-lg); }
.ea3g-section-icon { width: 24px; height: 24px; margin-right: var(--space-xs); fill: var(--color-primary); }
.ea3g-articles-list { list-style: none; }
.ea3g-article-item {
    position: relative; margin-bottom: var(--space-lg); padding-bottom: var(--space-lg);
    border-bottom: 1px dashed var(--color-border); padding-left: var(--space-md);
}
.ea3g-article-item:last-child { border-bottom: none; }
.ea3g-article-item::before {
    content: ""; position: absolute; left: 0; top: 9px;
    width: 8px; height: 8px; border-radius: 50%;
    background-color: var(--color-primary-light);
}
.ea3g-article-authors {
    margin-bottom: var(--space-xs); font-size: 14px;
    color: var(--color-text-secondary); font-weight: 500;
}
.ea3g-article-title {
    font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 500;
    color: var(--color-primary); text-decoration: none;
    transition: color 0.2s ease; display: inline-block; line-height: 1.4;
    margin-bottom: 8px;
}
.ea3g-article-title:hover {
    color: var(--color-primary-dark); text-decoration: underline;
}
.ea3g-article-meta { color: var(--color-text-tertiary); font-weight: 500; }

/* General Link Style */
.ea3g-link {
    color: var(--color-primary); text-decoration: none; position: relative;
    font-weight: 500; transition: color 0.2s ease;
}
.ea3g-link:hover {
    color: var(--color-primary-dark); text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 1100px) {
    .ea3g-journal-visual { flex-direction: column; align-items: center; }
    .ea3g-journal-display { max-width: 320px; height: auto; margin-bottom: var(--space-lg); }
    .ea3g-journal-stack { height: 380px; }
    .ea3g-metrics-container { grid-template-columns: 1fr; }
    .ea3g-molecules-pattern { display: none; }
}
@media (max-width: 768px) {
    .ea3g-journal-container { padding: var(--space-lg) var(--space-sm) var(--space-xl); }
    .ea3g-dot-pattern { display: none; }
    .ea3g-journal-stack { height: 350px; }
    .ea3g-journal-cover { width: 200px; height: 280px; padding: var(--space-xs); }
    .ea3g-cover-title { font-size: 14px; } .ea3g-cover-subtitle, .ea3g-cover-issue { font-size: 12px; }
    .ea3g-cover-image { flex-basis: 100px; } .ea3g-cover-image svg { width: 60px; height: 60px; }
    .ea3g-cover-section-title, .ea3g-cover-text { font-size: 12px; }
    .ea3g-access-link { font-size: 14px; }
    .ea3g-citation { font-size: 11px; padding: 6px 8px; }
}
@media (max-width: 480px) {
    .ea3g-article-item { padding-left: var(--space-sm); margin-bottom: var(--space-md); padding-bottom: var(--space-md);}
    .ea3g-article-item::before { top: 8px; width: 6px; height: 6px; }
    .ea3g-team-links { flex-direction: column; align-items: flex-start; }
    .ea3g-journal-display { flex-basis: auto; width: 100%; max-width: 280px; }
    .ea3g-journal-stack { height: 320px; }
    .ea3g-journal-cover { width: 180px; height: 250px; }
    .ea3g-citation { font-size: 10px; padding: 4px 6px; }
}