/* reader.css - RSS Reader styling for mysitefeed.com */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f2f5;
    color: #1d1d1f;
    line-height: 1.5;
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1a73e8;
    color: #fff;
    padding: 8px 16px;
    z-index: 100;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}
.skip-link:focus {
    top: 0;
}

/* ===== HEADER ===== */
header {
    background: #fff;
    color: #1d1d1f;
    padding: 0 24px;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dadce0;
    position: sticky;
    top: 0;
    z-index: 50;
}

header .logo {
    font-size: 1.25em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

header .logo .logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #1a73e8;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
}

header .logo a {
    color: #1d1d1f;
    text-decoration: none;
}

header .logo a:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    border-radius: 2px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
}

header nav ul li a {
    color: #5f6368;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

header nav ul li a:hover {
    background: #f1f3f4;
    color: #1d1d1f;
}

header nav ul li a:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    border-radius: 20px;
}

header nav ul li a[aria-current="page"] {
    background: #e8f0fe;
    color: #1a73e8;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 10px 24px;
    background: #fff;
    font-size: 0.85em;
    border-bottom: 1px solid #e8eaed;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb li {
    color: #5f6368;
}

.breadcrumb li:not(:last-child)::after {
    content: "\203A";
    margin: 0 8px;
    color: #9aa0a6;
}

.breadcrumb a {
    color: #1a73e8;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ===== MAIN LAYOUT ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* ===== HEADINGS ===== */
h1 {
    font-size: 1.5em;
    font-weight: 600;
    color: #1d1d1f;
    border: none;
    margin: 0 0 4px 0;
    padding: 0;
}

h2 {
    font-size: 1.1em;
    font-weight: 600;
    color: #1d1d1f;
    border: none;
    margin: 0 0 12px 0;
    padding: 0;
}

/* ===== FEED HEADER (show pages) ===== */
.feed-header {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 1px solid #dadce0;
}

.feed-header p {
    margin: 4px 0 0;
    color: #5f6368;
    font-size: 0.9em;
}

.feed-header .feed-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.feed-header .feed-meta .rss-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff3e0;
    color: #e65100;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-decoration: none;
}

.feed-header .feed-meta .rss-badge:hover {
    background: #ffe0b2;
}

.feed-header .feed-meta .item-count {
    color: #5f6368;
    font-size: 0.85em;
}

.feed-header img {
    border-radius: 8px;
    margin-top: 12px;
}

/* ===== FEED LIST (show pages) ===== */
.feed-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feed-item {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.feed-item:first-child {
    border-radius: 8px 8px 2px 2px;
}

.feed-item:last-child {
    border-radius: 2px 2px 8px 8px;
}

.feed-item:only-child {
    border-radius: 8px;
}

.feed-item:hover {
    border-color: #1a73e8;
    box-shadow: 0 1px 3px rgba(26, 115, 232, 0.1);
}

.feed-item a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
}

.feed-item a:focus {
    outline: 2px solid #1a73e8;
    outline-offset: -2px;
    border-radius: 8px;
}

.feed-item .item-title {
    flex: 1;
    font-size: 0.95em;
    color: #1d1d1f;
    font-weight: 400;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-item:hover .item-title {
    color: #1a73e8;
}

.feed-item .item-source {
    font-size: 0.8em;
    color: #9aa0a6;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== HOMEPAGE LAYOUT ===== */
.home-layout {
    display: flex;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dadce0;
    overflow: hidden;
}

.sidebar-card h2 {
    padding: 16px 20px 12px;
    margin: 0;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5f6368;
    border-bottom: 1px solid #e8eaed;
}

.sidebar-card ul {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.sidebar-card li {
    margin: 0;
}

.sidebar-card li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    text-decoration: none;
    color: #1d1d1f;
    font-size: 0.9em;
    transition: background 0.12s;
}

.sidebar-card li a:hover {
    background: #f1f3f4;
}

.sidebar-card li a:focus {
    outline: 2px solid #1a73e8;
    outline-offset: -2px;
}

.sidebar-card li a[aria-current="page"] {
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 500;
}

.sidebar-card .feed-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f1f3f4;
    color: #5f6368;
    font-size: 13px;
    flex-shrink: 0;
}

.sidebar-card .cat-rss {
    margin-left: auto;
    font-size: 0.75em;
    color: #e65100;
    background: #fff3e0;
    padding: 2px 8px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
}

.sidebar-card .cat-rss:hover {
    background: #ffe0b2;
}

/* Main content area */
.main-content {
    flex: 1;
    min-width: 0;
}

.content-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dadce0;
    margin-bottom: 16px;
    overflow: hidden;
}

.content-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-card-header h2 {
    margin: 0;
    font-size: 1em;
}

.content-card-body {
    padding: 0;
}

/* Preview pane */
.preview-pane {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dadce0;
    min-height: 400px;
    overflow-y: auto;
    max-height: 600px;
}

.preview-pane-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e8eaed;
    color: #5f6368;
    font-size: 0.9em;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.preview-pane-content {
    padding: 16px 20px;
}

/* Latest feeds items on homepage */
.latest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.12s;
}

.latest-item:last-child {
    border-bottom: none;
}

.latest-item:hover {
    background: #f8f9fa;
}

.latest-item a {
    text-decoration: none;
    color: #1d1d1f;
    font-size: 0.9em;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-item a:hover {
    color: #1a73e8;
}

.latest-item a:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Other links section */
.other-links {
    padding: 16px 20px;
}

.other-links a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.9em;
}

.other-links a:hover {
    text-decoration: underline;
}

.other-links p {
    margin: 6px 0;
}

/* ===== FOOTER ===== */
footer {
    background: #fff;
    color: #5f6368;
    text-align: center;
    padding: 16px 0;
    margin-top: 24px;
    border-top: 1px solid #dadce0;
    font-size: 0.85em;
}

footer a {
    color: #1a73e8;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer a:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .home-layout {
        flex-direction: column;
        padding: 16px;
    }

    .sidebar {
        width: 100%;
    }

    .feed-item a {
        flex-direction: column;
        gap: 4px;
    }

    .feed-item .item-source {
        font-size: 0.75em;
    }

    header {
        padding: 0 16px;
    }

    main {
        padding: 16px;
    }
}
