/* ====== Global Reset ====== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #e0e0ff;
    background: linear-gradient(180deg, #0d0d1a 0%, #1a1a33 100%);
}

/* ====== Links ====== */
a, a:link, a:visited, a:active {
    color: #80d0ff;
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover, a:focus {
    color: #00ffff;
    text-shadow: 0 0 6px #00bfff;
}

/* ====== Header ====== */
.site-header {
    text-align: center;
    padding: 2rem 1rem;
    color: white;
    background: 
        linear-gradient(to right, rgba(0,0,50,0.7) 0%, rgba(0,0,50,0.3) 50%, rgba(0,0,50,0.7) 100%),
        url('/assets/images/future-science-cosmos-header-rev2.jpg') center/cover no-repeat;
    border-bottom: 2px solid #4b0082;
}

.site-header h1 {
    font-size: 2rem;
    color: #f0e6ff;
    text-shadow: 0 0 6px #7f00ff;
}

.site-header p {
    font-size: 1rem;
    color: #ccc;
}

/* ====== Navigation ====== */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    background: #111;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid #4b0082;
}

.site-nav a:hover {
    background: #4b0082;
    border-radius: 4px;
    box-shadow: 0 0 8px #7f00ff;
}

/* ====== Main Content Layout ====== */
main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* center content */
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
    gap: 2rem;
}

/* ====== Left Column (Articles, Pages, RSS) ====== */
.main-left {
    flex: 0 1 70%;            /* take ~70% of main on desktop */
    min-width: 300px;
    display: flex;
    flex-direction: column;   /* stack articles/pages/rss */
    align-items: center;
    gap: 2rem;
}

/* ----- Article / Page Content Styling ----- */
.main-left article,
.page-article {
    width: 100%;
    max-width: 800px;         /* same as pages/articles */
    background: linear-gradient(135deg, #1a1a33 0%, #0d0d50 100%);
    color: #e0e0ff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(100, 150, 255, 0.3);
    line-height: 1.7;
}

.main-left article h2,
.page-article h2 {
    color: #7f00ff;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 6px rgba(127,0,255,0.5);
}

.main-left article p,
.page-article p {
    color: #d0d0ff;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.main-left article a,
.page-article a {
    color: #80d0ff;
    text-decoration: underline;
}

.main-left article a:hover,
.page-article a:hover {
    color: #00ffff;
    text-shadow: 0 0 6px #00bfff;
}


/* ----- Right Sidebar ----- */
.main-right {
    flex: 0 1 25%;           /* keep ~25% on desktop */
    min-width: 200px;
    background: linear-gradient(135deg, #1a1a33 0%, #0d0d50 100%);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(100, 150, 255, 0.2);
}

.sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #c0a0ff;
    border-bottom: 1px solid #4b0082;
    padding-bottom: 0.25rem;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    color: #b0d0ff;
}

.sidebar a:hover {
    color: #80ffff;
    text-shadow: 0 0 5px #00bfff;
}

.sidebar-image img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1rem;
    border-radius: 8px;
}

/* ====== Page Content Only ====== */
.page-article {
    max-width: 800px;
    margin: 2rem auto;
    background: linear-gradient(135deg, #1a1a33 0%, #0d0d50 100%);
    color: #e0e0ff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(100, 150, 255, 0.3);
    line-height: 1.7;
}

.page-article h2 {
    color: #7f00ff;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 6px rgba(127,0,255,0.5);
}

.page-article p {
    color: #d0d0ff;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.page-article a {
    color: #80d0ff;
    text-decoration: underline;
}

.page-article a:hover {
    color: #00ffff;
    text-shadow: 0 0 6px #00bfff;
}

/* ====== Footer ====== */
.site-footer {
    text-align: center;
    padding: 1rem;
    background-color: #111;
    color: #ccc;
    border-top: 2px solid #4b0082;
    margin-top: 2rem;
}

.site-footer a {
    color: #8fbfff;
}

.site-footer a:hover {
    color: #00ffff;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }

    .main-left, .main-right {
        flex: 1 1 100%;
        margin: 1rem auto;
    }

    .site-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media print {
    header,
    nav,
    footer,
    .main-right,
    .ads,
    .buttons,
    .widget-area {
        display: none !important;
    }

    .main-left {
        width: 100% !important;
        margin: 1in auto;
        padding: 0;
        font-family: 'Times New Roman', serif;
        font-size: 12pt;
        line-height: 1.4;
        color: black;
    }

    .main-left a {
        color: black;
        text-decoration: none;
    }

    .main-left h1,
    .main-left h2,
    .main-left h3 {
        font-weight: normal;
        page-break-after: avoid;
    }

    .main-left p {
        page-break-inside: avoid;
    }
}


/* ----- RSS Widget ----- */
.rss-widget {
    width: 100%;
}

.rss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 800px; /* fits inside main-left */
}

.rss-item {
    border-radius: 10px;
    padding: 12px;
    background: rgba(26, 26, 51, 0.85);
    border: 1px solid rgba(127,0,255,0.5);
    box-shadow: 0 0 12px rgba(127,0,255,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rss-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 25px rgba(127,0,255,0.7);
}

.rss-item img {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(127,0,255,0.4);
}

.rss-item h4 {
    font-size: 1rem;
    margin: 0 0 6px 0;
    color: #d1b3ff;
    text-align: center;
}

.rss-item h4 a {
    color: #b0d0ff;
}

.rss-item h4 a:hover {
    color: #80ffff;
    text-shadow: 0 0 6px #00bfff;
}

.rss-item small {
    color: #aaa;
    display: block;
    margin-top: 3px;
    text-align: center;
}

/* ====== Responsive Adjustments ====== */
@media (max-width: 1024px) {
    .rss-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    main {
        flex-direction: column; /* stack left + right on mobile */
    }

    .main-left, .main-right {
        flex: 1 1 100%;
        margin: 1rem auto;
    }

    .rss-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}