@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc; /* Tailwind slate-50 - off white */
    color: #0f172a; /* Tailwind slate-900 */
}

h1, h2, h3, h4, .serif-font {
    font-family: 'Playfair Display', serif;
}

/* Template D: Priority News Portrait Card Hover Effects */
.priority-card {
    overflow: hidden;
    position: relative;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.priority-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.priority-card img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.priority-card:hover img {
    transform: scale(1.05);
}

.priority-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: white;
}

.priority-card .category-badge {
    align-self: flex-start;
    background-color: #dc2626; /* red-600 */
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Template A: Important News Feature Style */
.important-feature {
    cursor: pointer;
}

.important-feature img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.important-feature:hover img {
    filter: brightness(0.9);
}

.important-feature h2 {
    transition: color 0.2s ease;
}

.important-feature:hover h2 {
    color: #2563eb; /* blue-600 */
}

/* Template B: Daily News List Style */
.daily-list-item {
    border-bottom: 1px solid #e2e8f0; /* slate-200 */
    padding: 1.5rem 0;
    transition: background-color 0.2s ease;
}

.daily-list-item:hover {
    background-color: #f1f5f9; /* slate-100 */
    border-radius: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-bottom-color: transparent;
}

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

/* Nav links hover */
.nav-link {
    position: relative;
    color: #475569; /* slate-600 */
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: #0f172a; /* slate-900 */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #dc2626; /* red-600 */
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* ============================================================
   Header chrome: hamburger + category bar + slide-in sidebar
   (all injected at runtime by script.js)
   ============================================================ */

/* Hamburger toggle button (row 1, far left) */
.hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border-radius: 0.375rem;
    color: #0f172a; /* slate-900 */
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.hamburger-btn:hover {
    background-color: #f1f5f9; /* slate-100 */
}

/* Second header row: horizontal, scrollable category tabs */
.category-bar {
    scrollbar-width: thin;
    -ms-overflow-style: none;
}

.category-bar::-webkit-scrollbar {
    height: 4px;
}

.category-bar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1; /* slate-300 */
    border-radius: 9999px;
}

.cat-tab {
    flex-shrink: 0;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Dim overlay behind the open sidebar */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.5); /* slate-900 / 50% */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 60;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* The slide-in panel itself */
.category-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 300px;
    max-width: 85vw;
    background-color: #ffffff;
    box-shadow: 4px 0 24px -4px rgba(0, 0, 0, 0.25);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 70;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.category-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0; /* slate-200 */
    position: sticky;
    top: 0;
    background-color: #ffffff;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.sidebar-close {
    font-size: 1.75rem;
    line-height: 1;
    color: #64748b; /* slate-500 */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 0.25rem;
    transition: color 0.2s ease;
}

.sidebar-close:hover {
    color: #0f172a;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}

.sidebar-link {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155; /* slate-700 */
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-link:hover {
    background-color: #f1f5f9; /* slate-100 */
    color: #0f172a;
}

.sidebar-link.active {
    background-color: #fef2f2; /* red-50 */
    color: #dc2626; /* red-600 */
    border-left-color: #dc2626;
}

.sidebar-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 0.5rem 1.5rem;
}
