/* ============================================
   style.css - AGC Business Insight
   Design: Modern, Professional, Mobile Responsive
   Update: Agustus 2026 - Dark Mode, TOC, Pagination, SVG Share Buttons
   ============================================ */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a73e8;
    --secondary-color: #1557b0;
    --accent-color: #fbbc04;
    --text-dark: #202124;
    --text-medium: #5f6368;
    --text-light: #80868b;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a2e;
    --border-color: #e0e0e0;
    --success-color: #34a853;
    --danger-color: #ea4335;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #4a9eff;
    --secondary-color: #3a7fd4;
    --text-dark: #e0e0e0;
    --text-medium: #b0b0b0;
    --text-light: #808080;
    --bg-white: #1a1a2e;
    --bg-light: #16213e;
    --border-color: #333;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    --box-shadow-hover: 0 4px 16px rgba(0,0,0,0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER STYLES
   ============================================ */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
    transition: background-color 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.logo-text:hover {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 5px 10px;
    border-radius: 50%;
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    background: var(--bg-light);
}

/* ============================================
   BREAKING NEWS BAR
   ============================================ */
.breaking-news {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    padding: 12px 20px;
    margin: 20px 0;
    overflow: hidden;
}

.breaking-label {
    background: var(--danger-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    margin-right: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.breaking-ticker {
    flex: 1;
    overflow: hidden;
}

.breaking-ticker a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
    animation: ticker 20s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ============================================
   FEATURED ARTICLE
   ============================================ */
.featured-section {
    margin-bottom: 40px;
}

.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.featured-article:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-2px);
}

.featured-image {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-article:hover .featured-image img {
    transform: scale(1.05);
}

.featured-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.article-date,
.article-category {
    color: var(--text-light);
    font-size: 14px;
}

.featured-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.featured-title a:hover {
    color: var(--primary-color);
}

.featured-excerpt {
    color: var(--text-medium);
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.7;
}

.read-more-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    align-self: flex-start;
}

.read-more-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    color: white;
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================
   AD CONTAINER
   ============================================ */
.ad-container {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   LATEST ARTICLES
   ============================================ */
.latest-section {
    margin: 40px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.article-card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-4px);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-excerpt {
    color: var(--text-medium);
    font-size: 15px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.card-link:hover {
    color: var(--secondary-color);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc-wrapper {
    margin: 30px 0;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.toc-container {
    max-width: 100%;
}

.toc-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list li.toc-h2 {
    font-weight: 600;
    padding-left: 0;
}

.toc-list li.toc-h3 {
    padding-left: 20px;
    font-weight: 400;
}

.toc-list a {
    color: var(--text-medium);
    text-decoration: none;
    transition: var(--transition);
}

.toc-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* ============================================
   SHARE BUTTONS - WITH SVG ICONS
   ============================================ */
.share-section {
    margin: 40px 0;
    padding: 25px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.share-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    color: white;
    text-decoration: none;
}

.share-btn svg {
    flex-shrink: 0;
}

.share-btn span {
    line-height: 1;
}

/* Twitter/X */
.share-twitter {
    background: #000000;
}
.share-twitter:hover {
    background: #1a1a1a;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Facebook */
.share-facebook {
    background: #1877f2;
}
.share-facebook:hover {
    background: #0d65d9;
    box-shadow: 0 6px 20px rgba(24,119,242,0.3);
}

/* WhatsApp */
.share-whatsapp {
    background: #25d366;
}
.share-whatsapp:hover {
    background: #1ebe5b;
    box-shadow: 0 6px 20px rgba(37,211,102,0.3);
}

/* LinkedIn */
.share-linkedin {
    background: #0a66c2;
}
.share-linkedin:hover {
    background: #0858a8;
    box-shadow: 0 6px 20px rgba(10,102,194,0.3);
}

/* Telegram */
.share-telegram {
    background: #0088cc;
}
.share-telegram:hover {
    background: #0077b3;
    box-shadow: 0 6px 20px rgba(0,136,204,0.3);
}

/* Email */
.share-email {
    background: #6c757d;
}
.share-email:hover {
    background: #5a6268;
    box-shadow: 0 6px 20px rgba(108,117,125,0.3);
}

/* ============================================
   ARTICLE TAGS
   ============================================ */
.article-tags {
    margin: 30px 0;
}

.tag-label {
    font-weight: 600;
    margin-right: 10px;
    color: var(--text-dark);
}

.tag-link {
    display: inline-block;
    padding: 5px 15px;
    margin: 5px;
    background: var(--bg-light);
    color: var(--text-medium);
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: var(--transition);
}

.tag-link:hover {
    background: var(--primary-color);
    color: white;
}

/* ============================================
   RELATED ARTICLES
   ============================================ */
.related-section {
    margin: 40px 0;
}

.related-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.related-card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-2px);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-card-content {
    padding: 15px;
}

.related-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.related-card-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.related-card-title a:hover {
    color: var(--primary-color);
}

/* ============================================
   SEARCH PAGE STYLES
   ============================================ */
.search-result {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.search-result:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-2px);
}

.search-result h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.search-result h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.search-result h3 a:hover {
    color: var(--primary-color);
}

.search-result p {
    color: var(--text-medium);
    margin-bottom: 10px;
}

.search-result .result-meta {
    font-size: 14px;
    color: var(--text-light);
}

/* ============================================
   FOOTER STYLES
   ============================================ */
.site-footer {
    background: var(--bg-dark);
    color: #ffffff;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-about h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.footer-about p {
    color: #b0b0b0;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ffffff;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #b0b0b0;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #b0b0b0;
    font-size: 14px;
}

/* ============================================
   404 PAGE STYLES
   ============================================ */
.error-container {
    text-align: center;
    padding: 100px 20px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-code {
    font-size: 100px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.error-title {
    font-size: 32px;
    font-weight: 700;
    margin: 20px 0;
    color: var(--text-dark);
}

.error-message {
    font-size: 18px;
    color: var(--text-medium);
    margin-bottom: 30px;
    max-width: 500px;
}

.error-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.error-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    color: white;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        min-height: 300px;
    }
    
    .featured-title {
        font-size: 28px;
    }
    
    .article-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--box-shadow);
        display: none;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
    }
    
    .breaking-news {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .breaking-ticker a {
        animation: none;
        white-space: normal;
    }
    
    .featured-title {
        font-size: 24px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .share-buttons {
        gap: 8px;
    }
    
    .share-btn {
        padding: 8px 14px;
        font-size: 13px;
        gap: 6px;
    }
    
    .share-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 20px;
    }
    
    .logo-icon {
        font-size: 28px;
    }
    
    .featured-content {
        padding: 20px;
    }
    
    .featured-title {
        font-size: 20px;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}