/* style.css - Centralized CSS for BBNews */
/* ====================================== */

:root {
    /* Color Palette */
    --blue: #0b1d3a;
    --red: #c1121f;
    --bg: #f4f6fa;
    --primary: #0066cc;
    --primary-dark: #0052a3;
    --secondary: #ff6600;
    
    /* Gray Scale */
    --gray-50: #f9fafb;
    --gray-100: #f4f6fa;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: #1d4ed8;
    transition: color 0.2s ease;
}

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

/* ==================== */
/* HEADER & NAVIGATION */
/* ==================== */
header {
    background: linear-gradient(90deg, var(--blue), #1e3a8a, var(--red));
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-wrap {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
}

.header-wrap img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
}

.header-wrap h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: .5px;
    font-weight: 700;
}

nav {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

nav ul {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    list-style: none;
    padding: 14px 18px;
}

nav li {
    font-weight: 600;
    color: var(--gray-900);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

nav li:hover {
    color: var(--red);
    background: var(--gray-50);
}

/* ==================== */
/* MAIN CONTAINERS */
/* ==================== */
.wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

.article-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* ==================== */
/* GRID & CARDS */
/* ==================== */
.grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
}

.card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.card h3 {
    padding: 16px;
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
}

/* ==================== */
/* ARTICLE CONTENT */
/* ==================== */
.article-content {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.source-tag {
    background: var(--gray-50);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--gray-200);
}

.article-title {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2.4rem;
    line-height: 1.3;
    color: var(--blue);
    border-bottom: 3px solid var(--red);
    padding-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 32px 0 18px;
    font-size: 22px;
    font-weight: 700;
}

.section-title::before {
    content: "";
    width: 6px;
    height: 26px;
    background: var(--red);
    border-radius: 3px;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 25px;
}

.article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    display: block;
}

/* ==================== */
/* BUTTONS */
/* ==================== */
.btn-container {
    text-align: center;
    margin: 40px 0 30px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-200);
}

.continue-btn {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(90deg, var(--blue), var(--primary));
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(11, 29, 58, 0.3);
    border: none;
    cursor: pointer;
    min-width: 280px;
}

.continue-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(11, 29, 58, 0.4);
    background: linear-gradient(90deg, #1a2d4d, var(--primary-dark));
}

.btn-note {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 12px;
    font-style: italic;
}

/* ==================== */
/* SIDEBAR */
/* ==================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 120px;
}

/* ==================== */
/* ADVERTISEMENTS - DIPERBAIKI */
/* ==================== */
.ad-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.ad-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.ad-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
    display: block;
}

.ad-content {
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* FIX UNTUK BANNER 320x50 - DIPERBAIKI */
.banner-320x50-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 0;
}

.banner-320x50-container iframe {
    width: 320px !important;
    height: 50px !important;
    max-width: 100%;
    border: none;
    display: block;
    margin: 0 auto;
}

/* SMARTLINK STYLES */
.smartlink-container {
    background: linear-gradient(135deg, #f8faff 0%, #e6f0ff 100%);
    border: 2px solid var(--primary);
    padding: 25px;
}

.smartlink-title {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.smartlink-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(90deg, var(--red), #d64545);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 700;
    transition: all 0.3s;
    margin-top: 15px;
    box-shadow: 0 6px 20px rgba(193, 18, 31, 0.3);
}

.smartlink-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, #d64545, #b8121f);
}

/* BANNER SIZES - DIPERBAIKI */
.banner-responsive {
    width: 100%;
    max-width: 728px;
    margin: 30px auto;
    text-align: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.desktop-banner {
    display: block;
    width: 100%;
    text-align: center;
}

.desktop-banner iframe {
    width: 728px !important;
    height: 90px !important;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

.mobile-banner {
    display: none;
    width: 100%;
    text-align: center;
}

.mobile-banner iframe {
    width: 320px !important;
    height: 50px !important;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

.banner-300x250 {
    width: 300px;
    height: 250px;
    margin: 0 auto;
}

.banner-300x250 iframe {
    width: 300px !important;
    height: 250px !important;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* ==================== */
/* MODAL STYLES - BARU */
/* ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s ease;
    position: relative;
}

.modal-header {
    background: linear-gradient(90deg, var(--blue), var(--primary));
    color: white;
    padding: 20px 30px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 30px;
    color: var(--gray-800);
    line-height: 1.7;
}

.modal-body h3 {
    color: var(--blue);
    margin: 20px 0 10px;
    font-size: 1.2rem;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin: 10px 0 20px 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.contact-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.modal-footer {
    padding: 20px 30px;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    text-align: center;
    border-top: 1px solid var(--gray-200);
}

.submit-btn {
    background: linear-gradient(90deg, var(--blue), var(--primary));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.submit-btn:hover {
    background: linear-gradient(90deg, #1a2d4d, var(--primary-dark));
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== */
/* FOOTER */
/* ==================== */
footer {
    background: var(--blue);
    color: #c7d2fe;
    margin-top: 60px;
}

.footer-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 50px 20px;
    display: grid;
    gap: 30px;
}

footer h4 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

footer a {
    color: #c7d2fe;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    transition: color 0.3s;
}

footer a:hover {
    text-decoration: underline;
    color: #fff;
}

footer p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* ==================== */
/* RESPONSIVE DESIGN */
/* ==================== */
@media (max-width: 1024px) {
    .article-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .article-content {
        padding: 30px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .modal-content {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    /* Banner Responsif untuk Mobile */
    .desktop-banner {
        display: none;
    }
    
    .mobile-banner {
        display: block;
        margin: 20px auto;
    }
    
    .mobile-banner iframe {
        width: 100% !important;
        max-width: 320px;
    }
    
    .banner-responsive {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .header-wrap {
        padding: 15px;
    }
    
    .article-container {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .article-content {
        padding: 25px;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .continue-btn {
        width: 100%;
        max-width: 300px;
        padding: 16px 30px;
        min-width: auto;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .banner-300x250,
    .banner-320x50-container {
        width: 100%;
        max-width: 300px;
    }
    
    .banner-300x250 iframe {
        width: 100% !important;
        max-width: 300px;
    }
    
    .ad-box {
        padding: 20px;
    }
    
    nav ul {
        overflow-x: auto;
        padding: 12px 15px;
        -webkit-overflow-scrolling: touch;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-wrap {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 20px;
    }
    
    .article-title {
        font-size: 1.6rem;
        padding-bottom: 15px;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .continue-btn {
        font-size: 1rem;
        padding: 14px 25px;
    }
    
    .header-wrap h1 {
        font-size: 22px;
    }
    
    .mobile-banner iframe {
        max-width: 100%;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    nav ul {
        gap: 15px;
        font-size: 14px;
    }
    
    .article-image {
        height: 250px;
    }
    
    .banner-320x50-container iframe {
        width: 100% !important;
        max-width: 320px;
    }
}