:root {
    --primary: #4f46e5;
    --primary-light: #eef2ff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f1f5f9;
    color: var(--text-dark);
}

.container-p {
    max-width: 100%;
    margin: 0;
    padding: 0 40px;
}

/* Main Layout */
.ca-layout {
    display: grid;
    grid-template-columns: 330px 1fr 200px;
    gap: 30px;
    margin-top: 20px;
    padding-bottom: 20px;
    height: calc(100vh - 100px);
    overflow: hidden;
}

.sidebar-left {
    width: 330px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
    padding: 10px 10px 10px 0;
    height: 100%;
    flex-shrink: 0;
}

.ca-card {
    background: #fff;
    border-radius: 24px;
    padding: 25px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.ca-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.ca-content {
    background: var(--white);
    border-radius: 24px;
    padding: 35px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Calendar */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header h4 {
    font-size: 14px;
    font-weight: 800;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.cal-day-label {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 10px;
}

.cal-date {
    font-size: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.cal-date:hover {
    background: var(--bg-light);
}

.cal-date.active {
    background: var(--primary);
    color: #fff;
}

.cal-date.today {
    color: var(--primary);
    font-weight: 800;
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 15px;
    margin-top: 20px;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cat-icon {
    width: 50px;
    height: 50px;
    background: #f8fafc;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #64748b;
    border: 1.5px solid #f1f5f9;
    transition: all 0.3s ease;
}

.cat-item span {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 24px;
}

.cat-item:hover .cat-icon {
    transform: translateY(-3px);
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.cat-item.active .cat-icon {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* Subscribe Card */
.sub-card {
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    border: 1px solid #c7d2fe;
    transition: 0.3s;
}

.sub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.1);
}

.sub-card h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

.sub-card p {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.4;
}

.input-group-p {
    background: #fff;
    border-radius: 12px;
    padding: 4px;
    display: flex;
    margin-bottom: 10px;
}

.input-group-p input {
    border: none;
    padding: 10px;
    flex: 1;
    font-size: 12px;
    outline: none;
}

.sub-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 15px;
    outline: none;
    transition: 0.3s;
    background: #f8fafc;
}

.sub-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.btn-sub {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 12px;
    width: 100%;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-sub:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-view-more {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-view-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
    filter: brightness(1.1);
}

.btn-view-more:active {
    transform: translateY(0);
}

.btn-view-more i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.expanded .btn-view-more i {
    transform: rotate(180deg);
}

.article-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.article-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.article-scroll-area::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.tag-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.tag-badge-combined {
    background: #f1f5f9;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 8px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

#news-category-icon img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}


.date-text {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.source-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-source-view {
    font-size: 10px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.btn-source-view:hover {
    background: var(--primary);
    color: #fff;
}

.ca-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 20px;
}

.ca-image-box {
    width: 100%;
    height: 520px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ca-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Expandable System - Removed Fade/Blur */
.article-wrapper {
    position: relative;
}

.article-wrapper:not(.expanded) .ca-article {
    max-height: 200px;
    overflow: hidden;
}

/* View more overlay now purely for spacing or removed if no fade needed */
.view-more-overlay {
    display: none;
    /* Removed blur/fade */
}

.ca-article p {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 15px;
}

.highlights-box {
    background: #f8faff;
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
}

.highlights-box h5 {
    margin-bottom: 15px;
    font-weight: 800;
    color: var(--primary);
}

.highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.h-item {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #475569;
}

.h-item i {
    color: var(--primary);
    font-size: 14px;
    margin-top: 2px;
}

.ca-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn-share {
    background: none;
    border: none;
    color: var(--text-light);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.source-p {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 700;
}

/* Right Sidebar Navigation Cards */
.sidebar-right {
    width: 200px;
    height: 100%; /* Matches ca-layout height */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px; 
    overflow: hidden; /* Prevent sidebar scroll, let timeline scroll internally */
}

.nav-control-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 25px 20px;
    background: var(--white);
    border-radius: 28px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.nav-btn-p {
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
}

.nav-btn-p h6 {
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 2px;
}

.nav-btn-p p {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 700;
}

.nav-btn-p .icon-circ {
    width: 45px;
    height: 45px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 16px;
    color: var(--text-light);
    transition: 0.3s;
}

.nav-btn-p:hover .icon-circ {
    background: var(--primary);
    color: #fff;
}

.timeline-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

/* Middle Visual Reel */
.timeline-reel-container {
    flex: 1;
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.timeline-scroll {
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
}

.timeline-scroll::-webkit-scrollbar {
    display: none;
}

.timeline-item {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    transition: 0.4s;
    opacity: 0.4;
    filter: blur(1px);
    border: 2px solid transparent;
}

.timeline-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-item.active {
    width: 75px;
    height: 75px;
    opacity: 1;
    filter: blur(0);
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

.news-counter-pill {
    background: var(--bg-light);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dark);
}
/* Premium Bookmark Button */
.btn-bookmark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.05);
}

.btn-bookmark:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(79, 70, 229, 0.15);
}

.btn-bookmark.saved {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.btn-bookmark i {
    transition: transform 0.3s ease;
}

.btn-bookmark:active i {
    transform: scale(0.8);
}
