/* 
 * BORNEWS.ID - Main Stylesheet
 * CNN-Style Clean Look (White, Burgundy, Black)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
    --primary-color: #800000;
    --secondary-color: #1d1d1d;
    --light-bg: #ffffff;
    --gray-bg: #f8f9fa;
    --text-main: #333333;
    --text-muted: #6c757d;
    --border-color: #eeeeee;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5 {
    color: var(--secondary-color);
    font-weight: 800;
    margin-bottom: 1rem;
}

a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--secondary-color);
}

a:hover {
    color: var(--primary-color);
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Header & Navigation */
.navbar-top {
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 0.85rem;
}

.navbar-brand img {
    height: 40px;
}

.navbar-brand {
    font-size: 2.2rem;
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1.8rem;
    }
}

.main-nav {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
}

.nav-link {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 1rem 1.2rem !important;
    color: var(--secondary-color) !important;
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link.active {
    border-bottom: 2px solid var(--primary-color);
}

.search-box .form-control {
    font-size: 0.85rem;
    border-radius: 4px;
    padding: 0.4rem 1rem;
}

@media (max-width: 991px) {
    .search-box .form-control { width: 100%; margin-top: 1rem; }
}

/* Ticker */
.breaking-news {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
}

.ticker-item {
    display: inline-block;
}

/* Grid Components */
.headline-container {
    padding: 2rem 0;
}

.headline-main {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.headline-main img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.headline-main:hover img {
    transform: scale(1.05);
}

.headline-content {
    padding: 1.5rem 0;
}

.category-label {
    background: var(--primary-color);
    color: #fff;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 10;
}

/* Swiper Slider Styles */
.headline-slider {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.headline-slider .swiper-slide {
    position: relative;
}

.headline-slider .headline-main {
    height: 100%;
    margin: 0;
    border-radius: 0;
}

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

.headline-slider .headline-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 1.5rem 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    z-index: 5;
}

.headline-slider .headline-content h2 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.headline-slider .category-label {
    position: absolute;
    top: 15px;
    left: 15px;
    margin-bottom: 0;
}

/* Swiper Navigation Customization */
.headline-slider .swiper-button-next,
.headline-slider .swiper-button-prev {
    color: #fff;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.headline-slider .swiper-button-next:after,
.headline-slider .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.headline-slider .swiper-button-next:hover,
.headline-slider .swiper-button-prev:hover {
    background: var(--primary-color);
}

.headline-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.headline-slider .swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
}

@media (max-width: 768px) {
    .headline-slider {
        height: 300px;
    }
    .headline-slider .headline-content h2 {
        font-size: 1.25rem;
    }
}

.news-card {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.news-card:last-child {
    border-bottom: none;
}

.news-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.news-card-thumb {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.news-card-mini {
    transition: all 0.2s ease;
}

.news-card-mini:hover {
    background: rgba(0,0,0,0.02);
}

.news-card-thumb-mini {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Weekly Popular Circular Slider */
.weekly-popular-section {
    padding: 20px 0;
}

.weekly-popular-slider {
    padding-bottom: 35px !important;
}

.popular-item-circle {
    transition: transform 0.3s ease;
}

.popular-item-circle:hover {
    transform: translateY(-3px);
}

.img-wrapper {
    flex-shrink: 0;
}

.circle-item-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.hot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: var(--primary-color);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid #eee;
    z-index: 2;
}

.popular-text h6 {
    font-size: 0.9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.weekly-popular-slider .swiper-pagination-bullet-active {
    background: var(--primary-color);
}

/* Ad Banner */
.ad-leaderboard {
    max-width: 728px;
    max-height: 90px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: inline-block;
}

/* Floating Side Ads */
.ad-floating-side {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050; /* Di atas navbar dan segalanya */
}

.btn-close-ad {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1031;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.btn-close-ad:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.ad-side-left {
    left: 15px;
}

.ad-side-right {
    right: 15px;
}

.ad-floating-side img {
    width: 160px;
    height: 600px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 2px solid #fff;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.ad-floating-side:hover img {
    transform: scale(1.02);
}

@media (max-width: 991px) {
    .ad-floating-side { display: none !important; }
}

/* Sidebar */
.sidebar-title {
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.popular-item-sidebar {
    transition: all 0.2s ease;
}

.popular-item-sidebar:hover {
    transform: translateX(5px);
}

.rank-badge {
    width: 25px;
    height: 25px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

.img-wrapper-sidebar {
    flex-shrink: 0;
}

.circle-side-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
}

/* Footer */
.site-footer {
    background: #fff;
    margin-top: 5rem;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    background-color: #ffffff;
}

.footer-brand {
    letter-spacing: -1px;
}

.footer-desc p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-social .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon.fb { background: #3b5998; }
.social-icon.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-icon.tk { background: #000000; }
.social-icon.yt { background: #ff0000; }

.footer-social .social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.footer-bottom {
    background-color: #000000; /* Deep black background */
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-links a {
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 0.8;
    color: #fff;
}

.footer-bottom .copyright {
    letter-spacing: 0.5px;
}

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Newsletter Card Styles */
.newsletter-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.newsletter-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(128, 0, 0, 0.3) !important;
}

.newsletter-card h5 {
    position: relative;
}

.newsletter-card h5::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.newsletter-card:hover h5::after {
    width: 100%;
}
