/*
Stylesheet: Seriously Scientific - News Articles Specific Styles
Description: Styles dedicated to the single-news.php template.
*/

/* --- Global Article/Comments Width & Spacing --- */
.news-article-container .entry-content {
    max-width: 1100px; /* Or adjust as needed */
    margin-left: auto;
    margin-right: auto;
    position: relative; 
    z-index: 5; 
    padding-bottom: 200px; /* <-- ADD THIS LINE */
}
.comments-wrapper {
    margin-top: 40px;
}

/* --- Typography and Meta --- */
/* Note: !important retained during consolidation to ensure visual consistency */
.entry-content h1 {
    text-align: center !important;
    margin-bottom: 10px;
    color: var(--starlight) !important; /* Ensure main title uses theme color */
}
.news-subtitle {
    font-size: 1.4em;
    font-style: italic;
    color: var(--starlight-muted); /* Use muted theme color */
    margin-top: 0px;
    margin-bottom: 35px;
    text-align: center;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.news-meta {
    text-align: left;
    color: #94A3B8; /* Consider using a theme variable if available, else a neutral gray */
    font-size: 0.9em;
    margin-top: 30px; /* Reduced margin */
    border-top: 1px solid var(--lunar-rock); /* Use theme color for border */
    padding-top: 20px;
}
.news-meta a {
    color: var(--supernova-orange); /* Use theme accent color */
    text-decoration: none;
}
.news-meta a:hover {
    color: var(--supernova-orange-light); /* Lighter accent on hover */
    text-decoration: underline;
}
.news-meta .dateline {
    font-weight: bold;
    color: var(--supernova-orange-light); /* Lighter accent for dateline */
}

/* --- Featured Image --- */
.featured-image {
    margin: 30px 0;
    text-align: center;
}
.featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border: 1px solid #404040; /* Subtle border */
}
.featured-image-caption,
.entry-content figcaption,
.entry-content .wp-caption-text {
    font-size: 0.85em; /* Slightly larger */
    color: #94A3B8; /* Muted gray */
    margin-top: 10px;
    font-style: italic;
    text-align: center;
}

/* --- Image Alignment --- */
.entry-content .alignleft { float: left; margin: 10px 25px 15px 0; }
.entry-content .alignright { float: right; margin: 10px 0 15px 25px; }
.entry-content .aligncenter { display: block; margin: 25px auto; }

/* --- Key Findings & Source Boxes --- */
.key-findings-box {
    background: rgba(221, 107, 32, 0.1); /* Supernova Orange with low opacity */
    border-left: 5px solid var(--supernova-orange); /* Solid Supernova Orange border */
    padding: 25px;
    margin: 35px 0;
    border-radius: 10px;
}
.key-findings-box h3 {
    margin-top: 0;
    color: var(--supernova-orange) !important; /* Supernova Orange for the heading */
    padding-bottom: 10px;
}
.key-findings-box ul {
   list-style: none; padding-left: 0;
}
 .key-findings-box li {
    color: var(--starlight) !important; /* Ensure text is light */
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
 }
.key-findings-box li::before {
    content: '\\2713'; /* Checkmark */
    color: var(--supernova-orange);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.source-citation-box.primary-source {
    background: rgba(56, 178, 172, 0.1); /* Nebula Turquoise with low opacity */
    border-left: 5px solid var(--nebula-turquoise); /* Solid Nebula Turquoise border */
    padding: 25px;
    margin: 35px 0;
    border-radius: 10px;
}
.source-citation-box.primary-source h3 {
    margin-top: 0;
    color: var(--nebula-turquoise) !important; /* Nebula Turquoise for the heading */
    padding-bottom: 10px;
}
.source-citation-box.primary-source p {
    margin-bottom: 10px !important;
    color: var(--starlight) !important; /* Ensure text is light */
}
.source-citation-box.primary-source a {
    color: var(--nebula-turquoise) !important; /* Use turquoise for link */
}
.source-citation-box.primary-source a:hover {
    color: #64d8d0 !important; /* Lighter turquoise */
}

/* --- Related Content Box --- */
.related-content-box {
    background: var(--lunar-rock); /* Use theme variable */
    padding: 25px;
    margin-top: 40px;
    border-radius: 12px;
    border: 1px solid #404040; /* Subtle border */
}
.related-content-box h3 {
    margin-top: 0;
    color: var(--supernova-orange) !important; /* Use theme accent */
    border-bottom: 2px solid var(--supernova-orange); /* Use theme accent */
    padding-bottom: 10px;
}
 .related-content-box p {
     color: var(--starlight-muted); /* Muted text */
     margin-bottom: 20px;
 }
.related-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.related-video-card {
    display: block;
    text-decoration: none;
    background: var(--deep-space); /* Use theme variable for contrast */
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #404040; /* Consistent border */
}
.related-video-card:hover {
    transform: translateY(-5px) scale(1.03); /* Hover effect */
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.related-video-thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block; /* Remove potential whitespace */
}
.related-video-card h4 {
    padding: 12px;
    font-size: 0.9em;
    color: var(--starlight); /* Light text */
    margin: 0 !important;
    line-height: 1.4;
}
.related-video-card h4:hover {
    color: var(--supernova-orange); /* Accent color on title hover */
}


/* --- SHARE FUNCTIONALITY STYLES --- */
.share-article-section {
    text-align: center;
    margin: 20px 0 30px 0; /* Adjusted margin */
    padding-top: 15px; /* Adjusted padding */
    border-top: 1px solid var(--lunar-rock); /* Use theme color */
    position: relative; /* <-- ADD THIS */
    z-index: 5;         /* <-- AND ADD THIS */
}
.share-article-section h3 {
    color: var(--supernova-orange) !important; /* Use theme accent */
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}
.share-btn-wrapper {
    position: relative;
    display: inline-block;
}
.share-trigger-btn {
    background: linear-gradient(45deg, var(--supernova-orange), var(--supernova-orange-light)); /* Use theme accents */
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.share-trigger-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(221, 107, 32, 0.4); /* Use theme accent for shadow */
}
.share-trigger-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}
#shareIcons {
    display: none;
    position: absolute;
    top: calc(100% + 10px); /* Changed from 'bottom' to pop DOWN */
    left: 50%;
    transform: translateX(-50%);
    background: #222; /* Matched video page background */
    border: 1px solid #444; /* Matched video page border */
    padding: 18px 25px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.6); /* Matched video page shadow */
    z-index: 1000;
    width: min(850px, 90vw); /* WIDENED to match video page */
    flex-direction: column;
    box-sizing: border-box;
}
#shareIcons.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    /* Changed animation to fade in from top */
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.social-icons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}
.social-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--starlight); /* Light text */
    width: 70px;
    text-align: center;
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.1);
}
.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 8px;
    transition: box-shadow 0.2s ease;
}
.icon-circle svg {
    width: 24px;
    height: 24px;
    fill: white;
}
.platform-name {
    font-size: 10px;
    margin-top: 2px;
    color: var(--starlight-muted); /* Muted text */
}
.share-divider {
    height: 1px;
    background: #404040; /* Consistent border color */
    margin: 15px 0;
}
.url-box {
    display: flex;
    background: var(--deep-space); /* Theme background */
    border-radius: 25px;
    overflow: hidden;
    margin-top: 15px;
    border: 1px solid #404040; /* Consistent border */
}
.url-text {
    flex-grow: 1;
    padding: 10px 15px;
    color: var(--starlight); /* Light text */
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.copy-btn {
    background: var(--nebula-turquoise); /* Use theme accent */
    color: var(--deep-space); /* Dark text for contrast */
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    min-width: 80px;
    border-radius: 0 25px 25px 0;
    transition: background-color 0.3s ease;
}
.copy-btn:hover {
    background: var(--nebula-turquoise-hover); /* Darker turquoise */
}
.copy-btn.copied {
    background: #52d47b; /* Keep success green */
    color: #000;
}
#shareIcons::before { /* Arrow pointing UP */
    content: "";
    position: absolute;
    bottom: 100%; /* Sits on top of the panel */
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #222; /* Match new panel background */
}

/* --- ADDED: More Seriously Scientific Links Box --- */
.more-ss-links-box {
    background: var(--lunar-rock); /* Consistent box background */
    padding: 25px;
    margin-top: 40px;
    border-radius: 12px;
    border: 1px solid #404040; /* Consistent border */
}
.more-ss-links-box h4 {
    color: var(--supernova-orange) !important; /* Theme accent */
    margin-top: 0;
    margin-bottom: 15px !important;
    font-size: 1.5em !important;
    border-bottom: 2px solid var(--supernova-orange); /* Theme accent */
    padding-bottom: 8px;
}
.more-ss-links-box p {
    color: var(--starlight-muted) !important; /* Muted text */
    margin-bottom: 10px !important;
    line-height: 1.6 !important;
    font-size: 1.1em !important;
}
.more-ss-links-box a {
    color: var(--supernova-orange) !important; /* Theme accent */
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.2s ease;
}
.more-ss-links-box a:hover {
    color: var(--supernova-orange-light) !important; /* Lighter accent */
    border-bottom: 1px solid var(--supernova-orange-light);
}