/* ============================================================
   OPENGATE MEDIA — Public Styles
   Editorial Magazine Aesthetic
   ============================================================ */

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }

:root {
    --ink:          #0f1117;
    --ink-light:    #3a3d45;
    --ink-muted:    #6b7280;
    --paper:        #f8f7f4;
    --paper-warm:   #eeebe5;
    --paper-card:   #ffffff;
    --accent:       #c8a84b;
    --accent-deep:  #a07d2e;
    --accent-glow:  rgba(200,168,75,.25);
    --red-tag:      #dc2626;
    --blue-tag:     #2563eb;
    --radius:       6px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,.1);
    --shadow-lg:    0 12px 40px rgba(0,0,0,.15);
    --transition:   .25s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior:smooth; }
body {
    font-family:'Inter',sans-serif;
    background:var(--paper);
    color:var(--ink);
    line-height:1.6;
    -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
}
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }
button { cursor:pointer; border:none; background:none; font-family:inherit; }
input, textarea { font-family:inherit; }

/* ── Utility ── */
.container { width:100%; max-width:1200px; margin:0 auto; padding:0 24px; }

/* ── TOP BAR ── */
.topbar {
    background:var(--ink);
    color:#aab0bc;
    font-size:12px;
    letter-spacing:.6px;
    text-transform:uppercase;
    padding:6px 0;
    overflow:hidden;
    white-space:nowrap;
}
.topbar-inner { display:flex; align-items:center; justify-content:center; gap:12px; }
.topbar-date { flex-shrink:0; color:#fff; font-weight:500; }
.topbar-divider { width:1px; height:12px; background:#333; flex-shrink:0; }
.topbar-ticker { flex:1; overflow:hidden; color:#aab0bc; animation:tickerScroll 30s linear infinite; display:inline-block; }
@keyframes tickerScroll { 0%{transform:translateX(100%)} 100%{transform:translateX(-100%)} }

/* ── HEADER ── */
.site-header {
    position:sticky;
    top:0;
    z-index:100;
    background:rgba(248,247,244,.95);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    border-bottom:1px solid #e5e2da;
    transition:box-shadow var(--transition);
}
.site-header.scrolled { box-shadow:var(--shadow-md); }
.header-inner {
    display:flex;
    align-items:center;
    height:64px;
    gap:20px;
    position:relative;
}

/* Logo */
.logo { display:flex; align-items:center; gap:10px; text-decoration:none; flex-shrink:0; }
.logo-icon { color:var(--accent); font-size:22px; }
.logo-text {
    font-family:'Inter',sans-serif;
    font-weight:600;
    font-size:18px;
    letter-spacing:3px;
    color:var(--ink);
    line-height:1;
}
.logo-sub { display:block; font-size:9px; letter-spacing:4px; color:var(--ink-muted); font-weight:400; margin-top:1px; }

/* Nav */
.main-nav { display:flex; gap:4px; flex-wrap:wrap; justify-content:center; flex:1; }
.nav-link {
    font-size:13px;
    font-weight:500;
    color:var(--ink-light);
    padding:6px 14px;
    border-radius:20px;
    transition:var(--transition);
    letter-spacing:.3px;
    white-space:nowrap;
}
.nav-link:hover { background:var(--paper-warm); color:var(--ink); }
.nav-link.active { background:var(--ink); color:#fff; }

/* Mobile Menu */
.mobile-menu-btn { display:none; flex-direction:column; gap:5px; padding:8px; }
.mobile-menu-btn span { width:22px; height:2px; background:var(--ink); border-radius:2px; transition:var(--transition); }
.mobile-menu-btn.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2){ opacity:0; }
.mobile-menu-btn.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* Search */
.search-toggle-btn { display:none; padding:8px; color:var(--ink-light); }
.search-bar-wrap {
    position:absolute; top:100%; left:0; right:0;
    padding:12px 24px 16px;
    background:#fff;
    border-bottom:1px solid #e5e2da;
    box-shadow:var(--shadow-md);
    display:none;
    animation:slideDown .2s ease;
}
.search-bar-wrap.open { display:block; }
@keyframes slideDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
.search-bar { display:flex; max-width:520px; margin:0 auto; gap:8px; }
.search-input {
    flex:1; padding:10px 16px; border:1.5px solid #ddd; border-radius:24px;
    font-size:14px; outline:none; transition:var(--transition);
}
.search-input:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow); }
.search-btn {
    background:var(--ink); color:#fff; padding:10px 20px; border-radius:24px;
    display:flex; align-items:center; transition:var(--transition);
}
.search-btn:hover { background:var(--ink-light); }

/* ── HERO ── */
.hero {
    position:relative;
    height:520px;
    min-height:380px;
    display:flex;
    align-items:flex-end;
    overflow:hidden;
}
.hero-bg {
    position:absolute; inset:0;
    background:linear-gradient(135deg,#1a1e2e 0%,#2c3344 50%,#1f2333 100%);
    background-size:cover;
    background-position:center;
    transition:opacity 1s;
}
.hero-overlay {
    position:absolute; inset:0;
    background:linear-gradient(to top, rgba(15,17,23,.92) 0%, rgba(15,17,23,.4) 50%, transparent 100%);
}
.hero-content {
    position:relative; z-index:2;
    width:100%; max-width:760px;
    padding:48px 48px 52px;
}
.hero-category {
    display:inline-block;
    background:var(--accent);
    color:#fff;
    font-size:11px;
    font-weight:600;
    letter-spacing:1.5px;
    text-transform:uppercase;
    padding:4px 12px;
    border-radius:3px;
    margin-bottom:16px;
}
.hero-title {
    font-family:'Playfair Display',serif;
    font-size:42px;
    font-weight:700;
    color:#fff;
    line-height:1.15;
    margin-bottom:14px;
    text-shadow:0 2px 12px rgba(0,0,0,.3);
}
.hero-excerpt { color:rgba(255,255,255,.78); font-size:16px; line-height:1.6; margin-bottom:18px; max-width:600px; }
.hero-meta { color:rgba(255,255,255,.55); font-size:13px; margin-bottom:22px; }
.hero-dot { margin:0 8px; opacity:.5; }
.hero-btn {
    display:inline-block;
    background:var(--accent);
    color:#fff;
    font-weight:600;
    font-size:14px;
    padding:12px 28px;
    border-radius:4px;
    transition:var(--transition);
    letter-spacing:.5px;
}
.hero-btn:hover { background:var(--accent-deep); transform:translateY(-1px); box-shadow:var(--shadow-md); }

/* ── TAG BAR ── */
.tag-bar-section { padding:18px 0 4px; }
.tag-bar { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.tag-chip {
    font-size:13px;
    font-weight:500;
    color:var(--ink-muted);
    padding:6px 16px;
    border:1.5px solid #e0ddd6;
    border-radius:20px;
    background:#fff;
    transition:var(--transition);
}
.tag-chip:hover { border-color:var(--accent); color:var(--ink); }
.tag-chip.active { background:var(--ink); color:#fff; border-color:var(--ink); }

/* ── CONTENT LAYOUT ── */
.content-section { padding:32px 0 60px; }
.content-layout { display:grid; grid-template-columns:1fr 340px; gap:48px; align-items:start; }

/* Section Header */
.section-header { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:24px; border-bottom:2px solid var(--ink); padding-bottom:10px; }
.section-title { font-family:'Playfair Display',serif; font-size:26px; font-weight:700; }
.section-count { font-size:13px; color:var(--ink-muted); }

/* ── ARTICLES GRID ── */
.articles-grid { display:grid; grid-template-columns:1fr 1fr; gap:28px; }

.article-card {
    background:var(--paper-card);
    border-radius:8px;
    overflow:hidden;
    box-shadow:var(--shadow-sm);
    transition:var(--transition);
    display:flex;
    flex-direction:column;
}
.article-card:hover { box-shadow:var(--shadow-md); transform:translateY(-3px); }

.article-card-img {
    height:180px;
    background:linear-gradient(135deg,#2c3344,#1a1e2e);
    background-size:cover;
    background-position:center;
    position:relative;
}
.article-card-img .card-category {
    position:absolute; top:12px; left:12px;
    background:var(--accent); color:#fff;
    font-size:10px; font-weight:600; letter-spacing:1px; text-transform:uppercase;
    padding:3px 10px; border-radius:3px;
}
.article-card-body { padding:18px; flex:1; display:flex; flex-direction:column; }
.article-card-tags { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
.article-tag {
    font-size:10px; font-weight:600; letter-spacing:.8px; text-transform:uppercase;
    padding:2px 8px; border-radius:3px; background:#f0eee8; color:var(--ink-muted);
}
.article-tag.breaking { background:#fef2f2; color:var(--red-tag); }
.article-tag.trending { background:#eff6ff; color:var(--blue-tag); }
.article-card-title {
    font-family:'Playfair Display',serif;
    font-size:18px; font-weight:700; line-height:1.3;
    margin-bottom:8px; color:var(--ink);
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.article-card-excerpt {
    font-size:13px; color:var(--ink-muted); line-height:1.55;
    flex:1; margin-bottom:14px;
    display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.article-card-meta { font-size:12px; color:#9ca3af; display:flex; align-items:center; gap:6px; margin-top:auto; }
.article-card-meta .meta-dot { width:3px; height:3px; background:#ccc; border-radius:50%; }

/* ── PAGINATION ── */
.pagination { display:flex; justify-content:center; gap:6px; margin-top:36px; flex-wrap:wrap; }
.page-btn {
    width:38px; height:38px; border-radius:6px;
    border:1.5px solid #e5e2da; background:#fff;
    font-size:14px; font-weight:500; color:var(--ink-light);
    display:flex; align-items:center; justify-content:center;
    transition:var(--transition);
}
.page-btn:hover { border-color:var(--accent); color:var(--accent); }
.page-btn.active { background:var(--ink); color:#fff; border-color:var(--ink); }
.page-btn.nav-btn { width:auto; padding:0 14px; }

/* ── SIDEBAR ── */
.sidebar { display:flex; flex-direction:column; gap:28px; }
.sidebar-widget {
    background:#fff;
    border-radius:8px;
    padding:22px;
    box-shadow:var(--shadow-sm);
    border:1px solid #eae8e2;
}
.widget-title {
    font-family:'Playfair Display',serif;
    font-size:18px; font-weight:700;
    margin-bottom:16px;
    position:relative; padding-bottom:10px;
}
.widget-title span {
    position:relative; z-index:1;
}
.widget-title::after {
    content:''; position:absolute; bottom:0; left:0;
    width:36px; height:2px; background:var(--accent);
}

/* Trending */
.trending-list { display:flex; flex-direction:column; gap:14px; }
.trending-item { display:flex; gap:14px; align-items:flex-start; cursor:pointer; }
.trending-item:hover .trending-item-title { color:var(--accent-deep); }
.trending-rank {
    font-family:'Playfair Display',serif;
    font-size:28px; font-weight:700; color:#e8e5dd;
    line-height:1; flex-shrink:0; width:30px;
}
.trending-item-title { font-size:14px; font-weight:600; line-height:1.4; color:var(--ink); transition:var(--transition); }
.trending-item-meta { font-size:11px; color:#9ca3af; margin-top:3px; }

/* Sidebar Categories */
.category-list { display:flex; flex-direction:column; gap:2px; }
.category-item {
    display:flex; align-items:center; justify-content:space-between;
    padding:8px 10px; border-radius:6px;
    cursor:pointer; transition:var(--transition);
    font-size:14px;
}
.category-item:hover { background:var(--paper-warm); }
.category-item-left { display:flex; align-items:center; gap:10px; }
.category-item-icon { font-size:18px; }
.category-item-count { font-size:12px; color:#9ca3af; background:#f0eee8; padding:2px 8px; border-radius:10px; }

/* Newsletter */
.newsletter-widget { background:var(--ink); color:#fff; }
.newsletter-widget .widget-title { color:#fff; }
.newsletter-widget .widget-title::after { background:var(--accent); }
.newsletter-text { font-size:13px; color:#aab0bc; margin-bottom:16px; line-height:1.5; }
.newsletter-form { display:flex; flex-direction:column; gap:8px; }
.newsletter-input {
    padding:10px 14px; border-radius:6px; border:1.5px solid #333;
    background:#1e2130; color:#fff; font-size:13px; outline:none;
    transition:var(--transition);
}
.newsletter-input:focus { border-color:var(--accent); }
.newsletter-input::placeholder { color:#666; }
.newsletter-btn {
    background:var(--accent); color:#fff; font-weight:600; font-size:13px;
    padding:10px; border-radius:6px; transition:var(--transition);
}
.newsletter-btn:hover { background:var(--accent-deep); }

/* ── FOOTER ── */
.site-footer {
    background:var(--ink);
    color:#aab0bc;
    padding:56px 0 28px;
    margin-top:0;
}
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px; }
.footer-logo { font-size:18px; font-weight:600; color:#fff; letter-spacing:3px; margin-bottom:12px; display:block; }
.footer-logo span { color:var(--accent); }
.footer-desc { font-size:13px; line-height:1.6; color:#6b7280; max-width:280px; }
.footer-col h4 { color:#fff; font-size:13px; letter-spacing:1.5px; text-transform:uppercase; margin-bottom:18px; font-weight:600; }
.footer-col ul { list-style:none; display:flex; flex-direction:column; gap:10px; }
.footer-col a { font-size:14px; color:#6b7280; transition:var(--transition); }
.footer-col a:hover { color:var(--accent); }
.footer-bottom { margin-top:40px; padding-top:24px; border-top:1px solid #2a2d35; text-align:center; font-size:13px; color:#4a4d55; }

/* ── RESPONSIVE ── */
@media (max-width:900px) {
    .content-layout { grid-template-columns:1fr; }
    .sidebar { grid-row:1; }
}
@media (max-width:680px) {
    .hero { height:420px; }
    .hero-content { padding:32px 24px 40px; }
    .hero-title { font-size:28px; }
    .articles-grid { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr 1fr; }
    .main-nav { display:none; }
    .mobile-menu-btn { display:flex; }
    .search-toggle-btn { display:flex; }
    .main-nav.open { display:flex; flex-direction:column; position:absolute; top:64px; left:0; right:0; background:#fff; border-bottom:1px solid #e5e2da; padding:12px 20px; gap:2px; box-shadow:var(--shadow-md); z-index:50; }
}
@media (max-width:420px) {
    .hero { height:380px; }
    .hero-title { font-size:22px; }
    .hero-excerpt { font-size:14px; }
    .footer-grid { grid-template-columns:1fr; }
}
