/* anewsapp/static/anewsapp/css/style.css */

/* You can add app-specific global styles here if needed. */
/* Much of the styling is currently embedded in base.html for simplicity */
/* or comes from Bootstrap. */

.navbar-brand {
    font-weight: bold;
    font-size: 1.75rem;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
    transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
}

.card-title a {
    text-decoration: none;
    color: inherit;
}

.card-title a:hover {
    color: #0056b3; /* Darker blue on hover */
}

/* Underline only the source text within source badges on hover/focus */
.sources-list a { text-decoration: none; }
.sources-list a .source-text { text-decoration: none; font-weight: 500; }
.sources-list a:hover .source-text,
.sources-list a:focus .source-text { text-decoration: underline; }

/* Prevent underline under icon glyphs inside source badges */
.sources-list a .paywall-icon,
.sources-list a .favorite-icon {
    display: inline-block;
    text-decoration: none;
}

.sources-list a:hover .paywall-icon,
.sources-list a:focus .paywall-icon,
.sources-list a:hover .favorite-icon,
.sources-list a:focus .favorite-icon {
    text-decoration: none;
}

/* Make hero source links bolder */
.sources-list a.hero-source .source-text {
    font-weight: 750;
}
.sources-list a.hero-source {
    border-color: #b5bcc3; /* slightly darker border for emphasis */
}

/* Emphasize the favorite (hero) star icon */
.sources-list a .favorite-icon {
    color: #ffb300; /* brighter gold */
    font-size: 1.15rem;
    line-height: 1;
    vertical-align: -1px;
    text-shadow: 0 0 1px rgba(0,0,0,.25);
}
.sources-list a.hero-source .favorite-icon {
    color: #ff9800; /* stronger for hero */
    font-size: 1.2rem;
    text-shadow: 0 0 1px rgba(0,0,0,.35);
}

/* Monochrome paywall lock */
.sources-list a .paywall-icon {
    color: #6c757d; /* neutral gray */
    font-variant-emoji: text; /* prefer text presentation if supported */
    -webkit-text-fill-color: currentColor; /* ensure WebKit uses current color */
    filter: grayscale(100%) saturate(0%); /* fallback to force monochrome */
    font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans Symbols", "Apple Symbols", sans-serif; /* prefer symbol fonts */
}

/* Box for external content (image, attribution, title) */
.external-content-box {
    background-color: #e0e0e0;
    border: 1px solid black;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
    overflow: hidden;
}

/* General summary media container */
.summary-media {
    position: relative;
}

.external-content-box .summary-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.external-content-box .summary-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Attribution text: overlay on image */
.image-credit {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.25);
    color: #212529;
    font-size: 0.7rem;
    padding: 2px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    z-index: 5;
}

/* Source line: similar constraint for consistency */
.external-content-box .source-line {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0.1rem !important; /* Minimal padding above the border */
    color: #6c757d;
}

/* Title: fixed height (approx 3 lines), truncated */
.external-content-box .summary-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 5rem; /* Adjust based on font-size + padding */
    margin-bottom: 0.25rem !important;
    padding-top: 4px !important;
}
