/*
Theme Name: Newsrublik
Theme URI: https://newsrublik.com
Author: Ara
Description: Theme berita lokal bergaya koran klasik — norak tapi elegan.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: newsrublik
Tags: news, newspaper, custom-logo, custom-menu, featured-images
*/

/* ==========================================
   BACKGROUND
========================================== */
body {
    background-color: #e8e0cc;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.paper-bg {
    background-color: #f5f0e1;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 4px 4px 15px rgba(0,0,0,0.15), -2px -2px 10px rgba(0,0,0,0.03);
}

/* ==========================================
   TYPOGRAPHY
========================================== */
.font-headline { font-family: 'Playfair Display', serif; }
.font-body { font-family: 'Libre Baskerville', serif; }
.font-gothic { font-family: 'UnifrakturMaguntia', cursive; }
.font-sans { font-family: 'Manrope', sans-serif; }

.drop-cap::first-letter {
    font-family: 'Playfair Display', serif;
    float: left;
    font-size: 4.5rem;
    line-height: 0.75;
    padding-right: 0.5rem;
    padding-top: 0.25rem;
    font-weight: 700;
    color: #c0392b;
}

.headline-glow { text-shadow: 1px 1px 0px rgba(0,0,0,0.1); }

/* ==========================================
   RULES & BORDERS
========================================== */
.rule-thick { border-top: 3px solid #1a1a1a; }
.rule-thin { border-top: 1px solid #1a1a1a; }
.rule-double { border-top: 3px double #1a1a1a; }
.rule-gold { border-top: 2px solid #b8860b; }
.rule-red { border-top: 2px solid #c0392b; }
.rule-bottom { border-bottom: 1px solid #1a1a1a; }
.rule-top { border-top: 1px solid #1a1a1a; }
.ornament-left { border-left: 4px double #b8860b; }

/* ==========================================
   LOGO
========================================== */
.logo-text {
    background: linear-gradient(180deg, #1a1a1a 0%, #3a3a3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dot-com { color: #c0392b; -webkit-text-fill-color: #c0392b; }
.custom-logo-link img { max-height: 100px; width: auto; }

/* ==========================================
   TICKER
========================================== */
.ticker-wrap { overflow: hidden; }
.ticker {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================
   EFFECTS
========================================== */
.badge-flashy {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(192,57,43,0.3); }
    50% { box-shadow: 0 0 15px rgba(192,57,43,0.6); }
}

.gold-shimmer {
    background: linear-gradient(90deg, #b8860b, #daa520, #b8860b);
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@keyframes shimmer { to { background-position: 200% center; } }

/* ==========================================
   IMAGES
========================================== */
.img-sepia { filter: sepia(40%) contrast(1.1) brightness(0.95); }
.img-vintage { filter: sepia(60%) contrast(1.05) brightness(0.9); }

/* ==========================================
   NEWSPAPER COLUMNS
========================================== */
.newspaper-columns {
    column-count: 2;
    column-gap: 2rem;
    column-rule: 1px solid #ccc;
}
@media (min-width: 768px) {
    .newspaper-columns { column-count: 3; }
}

/* ==========================================
   HOVER EFFECTS
========================================== */
.hover-lift, .related-card, .share-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover, .related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==========================================
   ARTICLE BODY
========================================== */
.article-body p {
    margin-bottom: 1.25rem;
    text-align: justify;
    hyphens: auto;
}
.article-body h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; }
.article-body h3 { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 0.75rem; }
.article-body ul, .article-body ol { margin: 1rem 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body blockquote { margin: 0; }
.article-body figure { margin: 0; }
.article-body img { max-width: 100%; height: auto; }

.pull-quote {
    border-top: 3px solid #b8860b;
    border-bottom: 3px solid #b8860b;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: rgba(184, 134, 11, 0.04);
}

/* ==========================================
   PROGRESS BAR
========================================== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #c0392b, #e74c3c);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ==========================================
   BACK TO TOP
========================================== */
#backToTop {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 50;
}
#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   MOBILE MENU
========================================== */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid #1a1a1a;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.menu-toggle:hover {
    background: #1a1a1a;
    color: #f5f0e1;
}
.menu-toggle svg { width: 18px; height: 18px; }

.mobile-nav {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.mobile-nav.open {
    display: block;
    max-height: 400px;
    padding: 0.5rem 0;
}
.mobile-nav a {
    display: block;
    padding: 0.6rem 0;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #3a3a3a;
    border-bottom: 1px solid #ddd;
    transition: color 0.15s ease, padding-left 0.15s ease;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover {
    color: #c0392b;
    padding-left: 0.5rem;
}

@media (max-width: 767px) {
    .menu-toggle { display: flex; align-items: center; gap: 0.4rem; }
    .desktop-nav { display: none !important; }
}
@media (min-width: 768px) {
    .menu-toggle { display: none !important; }
    .mobile-nav { display: none !important; }
}

/* ==========================================
   MOBILE TWEAKS
========================================== */
@media (max-width: 374px) {
    .logo-text-gothic { font-size: 2.5rem !important; }
    .dot-com-mobile { font-size: 0.875rem !important; }
}

/* ==========================================
   PAGINATION
========================================== */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 2rem 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.15s ease;
}
.pagination a:hover { background: #c0392b; color: #fff; border-color: #c0392b; }
.pagination .current { background: #1a1a1a; color: #f5f0e1; }

/* ==========================================
   COMMENTS
========================================== */
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .comment { padding: 1.5rem 0; border-bottom: 1px solid #ccc; }
.comment-author { font-family: 'Playfair Display', serif; font-weight: 700; }
.comment-content p { font-family: 'Libre Baskerville', serif; font-size: 0.875rem; line-height: 1.625; }
#respond .comment-form input,
#respond .comment-form textarea {
    font-family: 'Libre Baskerville', serif;
    border: 1px solid #1a1a1a;
    background: #ebe4d0;
    padding: 0.75rem;
    width: 100%;
}
#respond .comment-form input[type="submit"] {
    background: #c0392b;
    color: #fff;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}
#respond .comment-form input[type="submit"]:hover { background: #a93226; }

/* ==========================================
   WIDGETS
========================================== */
.widget { margin-bottom: 1.5rem; }
.widget-title {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: #b8860b;
    margin-bottom: 1rem;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 0.5rem 0; border-bottom: 1px solid #ddd; font-size: 0.875rem; }
.widget ul li a { color: #3a3a3a; text-decoration: none; transition: color 0.15s; }
.widget ul li a:hover { color: #c0392b; }
.widget_search .search-form { display: flex; }
.widget_search .search-form input[type="search"] {
    flex: 1; padding: 0.5rem; border: 1px solid #1a1a1a; background: #ebe4d0;
    font-family: 'Libre Baskerville', serif; font-size: 0.875rem;
}
.widget_search .search-form button {
    padding: 0.5rem 1rem; background: #1a1a1a; color: #f5f0e1; border: 1px solid #1a1a1a;
    font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 0.75rem;
    text-transform: uppercase; cursor: pointer;
}

/* ==========================================
   404
========================================== */
.error-404 .gothic-big {
    font-family: 'UnifrakturMaguntia', cursive;
    font-size: 8rem;
    color: rgba(26,26,26,0.15);
    line-height: 1;
}

/* ==========================================
   SCROLLBAR
========================================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #e8e0cc; }
::-webkit-scrollbar-thumb { background: #b8860b; border-radius: 4px; }