/* Dark mode Hebrew news style */

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

body {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    background: #1a1a1a;
    color: #e0e0e0;
    direction: rtl;
}

/* Header */
header {
    background: #2d2d2d;
    padding: 2px 4px;
    border-bottom: 1px solid #ff6600;
}

header nav.main-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    max-width: 85%;
    margin: 0 auto;
    padding: 2px 0;
}

.logo {
    background: #ff6600;
    color: #1a1a1a;
    font-weight: bold;
    padding: 0 3px;
    text-decoration: none;
    border: 1px solid #ff6600;
}

.site-name {
    color: #e0e0e0;
    font-weight: bold;
    text-decoration: none;
}

.nav-separator {
    color: #666;
}

.nav-site {
    color: #b0b0b0;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 500;
}

.nav-site:hover {
    background: rgba(255,255,255,0.1);
    color: #e0e0e0;
}

.nav-site.active {
    background: #ff6600;
    color: #1a1a1a;
    font-weight: bold;
}

/* Second level navigation */
.sub-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    max-width: 85%;
    margin: 0 auto;
    padding: 6px 0;
    border-top: 1px solid #444;
}

.nav-feed {
    color: #999;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 14px;
}

.nav-feed:hover {
    background: rgba(255,255,255,0.1);
    color: #e0e0e0;
}

.nav-feed.active {
    background: #444;
    color: #fff;
}

/* Source header */
.source-header {
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
}

.source-header h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    display: inline;
    color: #e0e0e0;
}

.source-header .article-count {
    color: #888;
    font-size: 14px;
    margin-right: 10px;
}

/* Main content */
main {
    max-width: 85%;
    margin: 0 auto;
    padding: 10px 0;
}

.container {
    background: #1a1a1a;
}

/* Article list */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-item {
    display: flex;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: none;
}

.article-rank {
    color: #666;
    min-width: 35px;
    text-align: left;
    padding-left: 5px;
    font-size: 14px;
}

.article-content {
    flex: 1;
}

.article-title {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 16px;
}

.article-title:visited {
    color: #666;
}

.article-title:hover {
    text-decoration: underline;
    color: #ff6600;
}

.article-domain {
    color: #666;
    font-size: 13px;
    margin-right: 5px;
}

.article-summary {
    color: #888;
    font-size: 14px;
    margin-top: 4px;
    line-height: 1.4;
}

.article-meta {
    color: #666;
    font-size: 13px;
    margin-top: 2px;
}

.article-meta span {
    margin-left: 8px;
}

.article-meta span::after {
    content: " |";
    margin-right: 8px;
}

.article-meta span:last-child::after {
    content: "";
}

/* More link */
.more-link {
    padding: 15px 35px;
}

.more-link a {
    color: #ff6600;
    text-decoration: none;
}

.more-link a:hover {
    text-decoration: underline;
}

/* Article view overlay */
.article-view {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: #121212;
    box-shadow: -2px 0 10px rgba(0,0,0,0.5);
    overflow-y: auto;
    z-index: 100;
    -webkit-overflow-scrolling: touch;
}

.article-detail {
    padding: 20px;
    max-width: 680px;
    margin: 0 auto;
}

.close-btn {
    position: fixed;
    top: 12px;
    left: 12px;
    font-size: 28px;
    width: 40px;
    height: 40px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 50%;
    cursor: pointer;
    color: #888;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.close-btn:hover {
    color: #ff6600;
    border-color: #ff6600;
}

.article-detail h1 {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.35;
    color: #e0e0e0;
}

.article-detail-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.article-detail-meta span {
    margin-left: 12px;
}

/* Article images */
.article-hero-image {
    margin: 0 0 24px 0;
}

.article-hero-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    background: #2d2d2d;
}

.article-inline-image,
.article-body figure {
    margin: 20px 0;
}

.article-inline-image img,
.article-body img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    background: #2d2d2d;
}

.article-body {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    line-height: 1.75;
    color: #d0d0d0;
}

.article-body p {
    margin-bottom: 1.4em;
}

.article-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.original-link {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #ff6600;
    text-decoration: none;
    font-size: 15px;
    display: inline-block;
    padding: 10px 0;
}

.original-link:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    max-width: 85%;
    margin: 20px auto;
    padding: 10px 0;
    border-top: 1px solid #333;
    color: #666;
    font-size: 13px;
    text-align: center;
}

/* Responsive - Mobile first, then desktop adjustments */
@media (max-width: 768px) {
    main, header nav.main-nav, .sub-nav, footer {
        max-width: 95%;
    }

    .article-detail h1 {
        font-size: 22px;
        margin-top: 30px;
    }

    .article-body {
        font-size: 18px;
    }

    .article-detail-meta {
        font-size: 13px;
    }
}

/* Desktop - show article as side panel */
@media (min-width: 1024px) {
    .article-view {
        width: 55%;
        max-width: 750px;
    }

    .article-detail {
        padding: 30px 40px;
    }

    .article-detail h1 {
        font-size: 28px;
    }

    .close-btn {
        position: absolute;
    }
}
