/* assets/css/style.css - NEWS PORTAL PROFESSIONAL DESIGN */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;600;700&family=Playfair+Display:wght@700;800&display=swap');

:root {
  --primary: #2563eb;
  --secondary: #0f172a;
  --accent: #ef4444; /* News Red */
  --bg-main: #ffffff;
  --bg-soft: #f1f5f9;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg-soft); color: var(--text-dark); line-height: 1.6; padding-bottom: 70px; }
a { text-decoration:none; color:inherit; transition: 0.3s; }
img { max-width:100%; height:auto; display:block; border-radius: 8px; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* --- Top Bar & Header --- */
.top-bar { background: var(--secondary); color: #94a3b8; padding: 8px 0; font-size: 0.75rem; font-weight: 600; }
.top-bar .container { display:flex; justify-content:space-between; align-items:center; }

header { background: #fff; padding: 25px 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
header .container { display:flex; justify-content:space-between; align-items:center; }

.logo { font-family: 'Outfit', sans-serif; font-size: 2.2rem; font-weight: 800; color: var(--secondary); letter-spacing: -1.5px; }
.logo span { color: var(--primary); }

.main-nav { display:flex; gap: 30px; list-style:none; align-items: center; }
.main-nav li { position: relative; }
.main-nav a { font-weight: 700; font-size: 0.85rem; color: var(--text-dark); text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 0; display: block; }
.main-nav a:hover { color: var(--primary); }

/* --- Dropdown Menu (Premium) --- */
.dropdown-menu {
  position: absolute; top: 100%; left: 0; width: 220px; background: #fff;
  border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--border);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: 0.3s; padding: 15px 0; z-index: 1001;
}
.main-nav li:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
  padding: 10px 25px; text-transform: none; font-size: 0.95rem; font-weight: 600; color: var(--text-dark);
  display: block; letter-spacing: 0;
}
.dropdown-menu a:hover { background: var(--bg-soft); color: var(--primary); }
.dropdown-menu i { float: right; margin-top: 5px; font-size: 0.8rem; opacity: 0.5; }

@media (max-width: 991px) { .main-nav { display:none; } }

/* --- News Layout --- */
.news-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 991px) { .news-grid { grid-template-columns: 1fr; } }

.hero-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 40px; }
@media (max-width: 768px) { .hero-dual { grid-template-columns: 1fr; } }

.hero-card { position: relative; border-radius: 4px; overflow: hidden; }
.hero-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero-card .cat { color: #84cc16; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin: 15px 0 8px; display: block; }
.hero-card h2 { font-size: 1.4rem; font-weight: 800; line-height: 1.25; color: #111; margin-bottom: 10px; }
.hero-card .date { font-size: 0.8rem; color: #94a3b8; font-weight: 500; }

.news-feed-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 991px) { .news-feed-container { grid-template-columns: 1fr; } }

.news-item-horizontal { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid #f1f5f9; align-items: flex-start; }
.news-item-content { flex: 1; }
.news-item-content .cat { color: #84cc16; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; display: block; }
.news-item-content h3 { font-size: 1.1rem; font-weight: 800; line-height: 1.3; color: #111; margin-bottom: 8px; }
.news-item-content .date { font-size: 0.75rem; color: #94a3b8; font-weight: 500; }
.news-item-thumb { width: 110px; height: 110px; flex-shrink: 0; }
.news-item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

/* Sidebar Widgets */
.sidebar-widget { background: #fff; padding: 25px; border-radius: 12px; margin-bottom: 25px; border: 1px solid var(--border); }
.widget-title { font-size: 1rem; font-weight: 800; margin-bottom: 20px; text-transform: uppercase; border-left: 4px solid var(--primary); padding-left: 12px; color: var(--secondary); }

.trending-item { display:flex; gap: 15px; margin-bottom: 15px; align-items: center; padding-bottom: 15px; border-bottom: 1px dashed var(--border); }
.trending-item:last-child { border: none; margin-bottom: 0; padding-bottom: 0; }
.trending-num { font-size: 1.5rem; font-weight: 800; color: #e2e8f0; font-family: 'Outfit'; }
.trending-content h4 { font-size: 0.9rem; font-weight: 700; color: var(--secondary); line-height: 1.3; }

/* 🛍️ MARKETPLACE STYLES */
.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #edf2f7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.premium-ribbon {
    position: absolute;
    top: 15px;
    left: -35px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    padding: 5px 40px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    transform: rotate(-45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.author-info {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-top: 1px solid #f1f5f9;
}

.author-avatar {
    width: 24px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 50%;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #475569;
}

.price-tag {
    background: #f1f0ff;
    color: #6366f1;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    display: inline-block;
}

.card-footer-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.metric-item {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

.metric-item i {
    margin-right: 5px;
}

/* Footer */
footer { background: var(--secondary); color: #94a3b8; padding: 80px 0 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-logo { font-family: 'Outfit'; font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 20px; display: block; }
.footer-links h4 { color: #fff; margin-bottom: 20px; font-size: 1rem; }
.footer-links ul li { list-style:none; margin-bottom: 12px; font-size: 0.9rem; }

/* Bottom Nav (Mobile Only) */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 65px; background: #fff; border-top: 1px solid var(--border); display: none; justify-content: space-around; align-items: center; z-index: 2000; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); font-size: 0.65rem; font-weight: 700; flex: 1; }
.nav-item i { font-size: 1.3rem; margin-bottom: 2px; }
.nav-item.active { color: var(--primary); }

@media (max-width: 768px) { .bottom-nav { display: flex; } }

/* --- Admin Panel --- */
.admin-card { background: #fff; border-radius: 12px; padding: 25px; margin-bottom: 25px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.btn { padding: 10px 20px; border-radius: 6px; font-weight: 700; cursor: pointer; border: none; transition: 0.2s; display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-danger { background: var(--accent); color: #fff; }

.form-control { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 0.9rem; }
.form-control:focus { outline: none; border-color: var(--primary); }

/* --- Category Sections (Updated to Reference Image) --- */
.category-section { margin-bottom: 60px; }
.section-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    padding-bottom: 12px; 
    border-bottom: 2px solid #e2e8f0;
}
.section-header h2 { 
    font-size: 1.6rem; 
    font-weight: 800; 
    color: var(--secondary); 
    position: relative;
    font-family: 'Outfit';
    text-transform: uppercase;
    letter-spacing: -0.5px;
}
.section-header h2::after {
    content: "";
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #84cc16; /* Professional Green Accent */
}
.section-header a { 
    font-size: 0.8rem; 
    font-weight: 800; 
    color: var(--primary); 
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 18px;
    background: #fff;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
}
.section-header a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.category-grid-horizontal { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
}

@media (max-width: 850px) {
    .category-grid-horizontal { grid-template-columns: 1fr; gap: 30px; }
}

.post-item-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    transition: 0.3s;
}

.post-item-horizontal:hover {
    transform: translateX(5px);
}

.post-item-info {
    flex: 1;
}

.post-item-info .cat-label {
    color: #84cc16;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
    letter-spacing: 0.5px;
}

.post-item-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 12px;
}

/* --- Market Data Ticker (100% Pixel Perfect) --- */
.wrap-market-data {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: stretch;
    margin: 15px 0;
    overflow: hidden;
    height: 52px;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

.market-index {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 0 15px;
    border-right: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.market-index .val { color: #ef4444; font-weight: 800; font-size: 0.85rem; line-height: 1; }
.market-index .pct { color: #ef4444; font-weight: 700; font-size: 0.75rem; margin-top: 2px; }

.market-ticker-container {
    flex: 1;
    overflow: hidden;
    display: flex;
}

.market-ticker-scroll {
    display: flex;
    animation: tickerScroll 45s linear infinite;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.market-item {
    display: grid;
    grid-template-columns: minmax(60px, auto) auto;
    column-gap: 20px;
    padding: 0 20px;
    border-right: 1px solid #e2e8f0;
    align-content: center;
    flex-shrink: 0;
}

.m-symbol { grid-row: 1; grid-column: 1; font-weight: 800; color: #111; font-size: 0.82rem; text-align: left; }
.m-price { grid-row: 2; grid-column: 1; font-weight: 500; color: #475569; font-size: 0.78rem; text-align: left; }
.m-change-val { grid-row: 1; grid-column: 2; font-weight: 700; font-size: 0.78rem; text-align: right; }
.m-change-pct { grid-row: 2; grid-column: 2; font-weight: 600; font-size: 0.72rem; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }

.up { color: #22c55e; }
.down { color: #ef4444; }

.market-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 1px solid #e2e8f0;
    padding: 0 15px;
    flex-shrink: 0;
    background: #fff;
}

.market-time-box { text-align: right; font-size: 0.72rem; color: #94a3b8; font-weight: 600; line-height: 1.25; }
.market-time-box span { display: block; color: #475569; }

.btn-market-link {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e40af;
    border: 1.5px solid #1e40af;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: 0.2s;
    background: #fff;
    white-space: nowrap;
}
.btn-market-link:hover { background: #1e40af; color: #fff; }

@media (max-width: 1024px) {
    .market-meta { display: none; }
}

.post-item-info .date-label {
    font-size: 0.95rem;
    color: #94a3b8;
    font-weight: 500;
}

.post-item-thumb-square {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.post-item-thumb-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.post-item-horizontal:hover .post-item-thumb-square img {
    transform: scale(1.1);
}
