
/*
Theme Name: Bahasa Sunda NET
Description: Platform digital untuk belajar dan mengenal Bahasa Sunda dengan Bootstrap 5
Version: 1.0.0
Author: RBP Media
*/

:root {
    --primary-color: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #81c784;
    --accent-color: #ffc107;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.main-content {
    flex: 1;
    min-height: 70vh;
}

.navbar {
    background-color: var(--primary-color) !important;
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

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

.language-selector {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    border-radius: 6px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
    cursor: pointer;
}

.language-selector option {
    color: #333;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 20px 20px;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card:hover:not(.card-disabled) {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-body {
    padding: 2rem 1.5rem;
}

.card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.card-disabled:hover {
    transform: none;
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.news-card {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.news-card .card-img-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.news-card .card-title {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.news-card .card-text {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.news-card .btn {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.news-card img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    transition: transform 0.3s ease;
}

.news-card:hover img {
    transform: scale(1.05);
}

body > footer {
  background-color: var(--primary-color);
  color: white;
  padding-top: 3rem;
  padding-bottom: 1.5rem;
  margin-top: 4rem;
}


.footer-donate {
    background-color: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.donate-btn {
    white-space: nowrap;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    transition: all 0.3s ease;
}

.donate-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: translateY(-2px);
}

.btn-paypal:hover {
    background: #0070ba;
}

.btn-saweria:hover {
    background: #ff6b35;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary-light);
    border-radius: 2px;
}

.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-light);
    color: #fff;
    border-color: var(--primary-light);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.flag-icon {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    display: inline-block;
    background-size: cover;
    vertical-align: middle;
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
        border-radius: 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .news-card {
        height: 250px;
    }

    .card-body {
        padding: 1.5rem 1rem;
    }

    .footer-donate .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
}

/* === DARK MODE === */
body.dark-mode {
    background-color: #121212;
    color: #f1f1f1;
}

body.dark-mode .card {
    background-color: #1e1e1e;
    color: #ddd;
}

body.dark-mode .card-body {
    color: #e0e0e0;
}

body.dark-mode .navbar,
body.dark-mode .footer-donate {
    background-color: #1a1a1a !important;
}

body.dark-mode .navbar-brand,
body.dark-mode .nav-link,
body.dark-mode .text-white {
    color: #f1f1f1 !important;
}

body.dark-mode .card-text,
body.dark-mode .card-title {
    color: #eee;
}

body.dark-mode .card p,
body.dark-mode .card small {
    color: #cfcfcf;
}

body.dark-mode .hero-section {
    background: linear-gradient(135deg, #212121 0%, #101010 100%);
    color: #f1f1f1;
}

body.dark-mode .card:hover {
    box-shadow: 0 10px 20px rgba(255,255,255,0.05) !important;
}

body.dark-mode .text-muted,
body.dark-mode .card-text.text-muted,
body.dark-mode small.text-muted {
    color: #ccc !important;
}

body.dark-mode .pagination .page-link {
    background-color: #1e1e1e;
    color: #f1f1f1;
    border-color: #333;
}

body.dark-mode .pagination .page-item.active .page-link {
    background-color: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

body.dark-mode .pagination .page-link:hover {
    background-color: #333;
    color: #fff;
}

body.dark-mode .text-success {
    color: #4caf50 !important;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Add these to your existing CSS */

/* Visitor Counter */
.visitor-counter {
    display: inline-flex;
    align-items: center;
    background: rgba(0,0,0,0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

body.dark-mode .visitor-counter {
    background: rgba(255,255,255,0.1);
}

/* Post Meta Improvements */
.post-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

.post-meta i {
    font-size: 0.9em;
}

/* Featured Image */
.featured-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.featured-image {
    transition: transform 0.3s ease;
}

.featured-image:hover {
    transform: scale(1.02);
}

.image-caption {
    text-align: center;
    color: #6c757d;
}

/* Tags Improvements */
.tag-badge {
    transition: all 0.2s ease;
    padding: 0.5em 0.8em;
}

.tag-badge:hover {
    background-color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Share Buttons */
.share-buttons {
    flex-wrap: wrap;
}

.share-button {
    transition: all 0.2s ease;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Author Bio */
.author-bio {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    background-color: rgba(var(--primary-color), 0.03);
}

.author-avatar {
    border: 2px solid var(--primary-light);
}

.author-name {
    color: var(--primary-dark);
}

.author-description {
    line-height: 1.6;
}

/* Post Navigation */
.post-nav-card {
    border: none;
    background-color: rgba(var(--primary-color), 0.03);
    transition: all 0.3s ease;
}

.post-nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.post-nav-link {
    color: var(--primary-dark);
    transition: color 0.2s ease;
}

.post-nav-link:hover {
    color: var(--primary-color);
}

/* Related Posts */
.related-posts-title {
    position: relative;
    padding-bottom: 0.5rem;
}

.related-posts-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-light);
}

.related-post-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.related-post-image {
    display: block;
    overflow: hidden;
}

.related-post-image img {
    transition: transform 0.3s ease;
}

.related-post-image:hover img {
    transform: scale(1.05);
}

.related-post-title {
    font-size: 1rem;
    transition: color 0.2s ease;
}

.related-post-title:hover {
    color: var(--primary-color);
}

.related-post-excerpt {
    line-height: 1.5;
}

/* Copy Link Button */
.copy-link {
    position: relative;
}

.copy-link::after {
    content: 'Tersalin!';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-link.copied::after {
    opacity: 1;
}

/* Dark Mode Adjustments */
body.dark-mode .author-bio,
body.dark-mode .post-nav-card,
body.dark-mode .related-post-card {
    background-color: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

body.dark-mode .post-nav-link,
body.dark-mode .related-post-title {
    color: #e0e0e0;
}

body.dark-mode .post-nav-link:hover,
body.dark-mode .related-post-title:hover {
    color: var(--primary-light);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation for elements */
.article-title,
.post-meta,
.featured-image-container,
.entry-content,
.entry-footer,
.author-bio,
.post-navigation,
.related-posts,
.comments-section {
    animation: fadeInUp 0.6s ease-out;
}

.article-title { animation-delay: 0.1s; }
.post-meta { animation-delay: 0.2s; }
.featured-image-container { animation-delay: 0.3s; }
.entry-content { animation-delay: 0.4s; }
.entry-footer { animation-delay: 0.5s; }
.author-bio { animation-delay: 0.6s; }
.post-navigation { animation-delay: 0.7s; }
.related-posts { animation-delay: 0.8s; }
.comments-section { animation-delay: 0.9s; }

/* Footer Dark Mode Compatibility */
.site-footer {
    background-color: var(--primary-color);
    color: white;
    padding-top: 3rem;
    padding-bottom: 1.5rem;
    margin-top: 4rem;
}

body.dark-mode .site-footer {
    background-color: #1a1a1a !important;
    border-top: 1px solid #333;
}

body.dark-mode .footer-donate {
    background-color: rgba(255,255,255,0.05);
    border-bottom-color: rgba(255,255,255,0.1);
}

body.dark-mode .donate-btn {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .donate-btn:hover {
    background: rgba(255,255,255,0.1);
}

body.dark-mode .footer-bottom {
    border-top-color: rgba(255,255,255,0.1);
}

.site-footer a {
    color: white;
}

.site-footer a:hover {
    color: var(--accent-color); /* atau warna lain saat hover */
}


.comment-content pre,
.comment-content code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

.comment-content {
  overflow-wrap: break-word;
}


.comment-author img,
.comment-avatar {
  max-width: 100%;
  height: auto;
}

.comment-form input,
.comment-form textarea {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Article container */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Article title */
    .article-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    /* Post meta */
    .post-meta {
        font-size: 0.8rem;
    }
    
    /* Featured image */
    .featured-image-container {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }
    
    .featured-image {
        border-radius: 0 !important;
    }
    
    /* Content padding */
    .entry-content {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* Share buttons */
    .share-buttons .btn {
        flex: 1 0 calc(50% - 0.5rem);
        margin-bottom: 0.5rem;
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Author bio */
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    /* Related posts */
    .related-posts .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Post navigation */
    .post-nav-card {
        margin-bottom: 1rem;
    }
    
    /* Comments section */
    .comments-section {
        padding: 0 10px;
    }
    
}

/* Additional spacing for very small screens */
@media (max-width: 480px) {
    .post-meta span {
        margin-bottom: 0.25rem;
    }
    
    .share-buttons .btn {
        flex: 1 0 100%;
    }
    
    .entry-content p,
    .entry-content ul,
    .entry-content ol {
        margin-bottom: 1rem;
    }
}

/* Better typography for mobile */
@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    h1, .h1 { font-size: 1.8rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.3rem; }
    h4, .h4 { font-size: 1.1rem; }
    h5, .h5 { font-size: 1rem; }
    h6, .h6 { font-size: 0.9rem; }
    
    .entry-content img {
        max-width: 100%;
        height: auto;
    }
}

