/*
Theme Name: Simetris Media
Author: Tim Simetris Nuansa Nusantara
author URI: https://simetri.co.id/
Description: A fast WordPress theme using Bootstrap 5 with modern styling.
Version: 1.1
*/

/* ===== Global Styles ===== */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.8;
    color: #222;
    margin: 0;
    padding: 0;
    font-size: clamp(0.9rem, 1vw, 1rem);
    background-color: #f8f9fa;
}

a, a:link, a:visited {
    text-decoration: none;
    color: #C0392B;
    transition: color 0.3s ease-in-out;
}

a:hover, a:focus {
    color: #8B0000;
}

h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: #8B0000;
}

/* H1 hitam di single post & page agar lebih nyaman dibaca */
.single h1,
.page h1,
.single h1.text-teal,
.page h1.text-teal {
    color: #1a1a1a !important;
}

[data-bs-theme="dark"] .single h1,
[data-bs-theme="dark"] .page h1,
[data-bs-theme="dark"] .single h1.text-teal,
[data-bs-theme="dark"] .page h1.text-teal {
    color: #f0f0f0 !important;
}

/* ===== Navbar ===== */
.custom-navbar {
    background: linear-gradient(90deg, #7B0000 0%, #4a0000 100%);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
    padding: 6px 0;
}

.custom-menu .menu-item a {
    color: #ffffff;
    font-weight: 600;
    padding: 6px 12px;
    transition: all 0.3s ease-in-out;
    border-radius: 5px;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
}

.custom-menu .menu-item a:hover {
    color: #FFD700;
}

/* ===== Search Form ===== */
.search-input:focus {
    border-color: #C0392B;
    box-shadow: 0 0 0 0.2rem rgba(139, 0, 0, 0.2);
    outline: none;
}

.search-btn {
    border: 1px solid #dee2e6;
    transition: all 0.3s ease-in-out;
}

.search-btn:hover {
    background-color: #FFD700;
    color: #8B0000;
    border-color: #FFD700;
}

/* ===== Middle Menu ===== */
.middle-menu-wrapper {
    border-bottom: 2px solid rgba(139, 0, 0, 0.12) !important;
    background-color: #fff !important;
}

.middle-menu-wrapper .nav-link {
    color: #444;
    font-size: clamp(0.8rem, 1.2vw, 0.88rem);
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.25s ease-in-out;
    white-space: nowrap;
}

.middle-menu-wrapper .nav-link:hover,
.middle-menu-wrapper .nav-link:focus {
    color: #8B0000;
    background-color: rgba(139, 0, 0, 0.08);
}

.middle-menu-wrapper .nav-link.active,
.middle-menu-wrapper .current-menu-item > a {
    color: #fff !important;
    background-color: #8B0000 !important;
}

/* Dark mode - middle menu */
[data-bs-theme="dark"] .middle-menu-wrapper {
    background-color: #1a1a1a !important;
    border-bottom-color: rgba(192, 57, 43, 0.2) !important;
}

[data-bs-theme="dark"] .middle-menu-wrapper .nav-link {
    color: #ccc;
}

[data-bs-theme="dark"] .middle-menu-wrapper .nav-link:hover {
    color: #E74C3C;
    background-color: rgba(192, 57, 43, 0.12);
}

/* ===== News Carousel ===== */
.carousel-caption h5 a {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

.carousel-caption h5 a:hover {
    color: #FFA500;
}

/* ===== News Section ===== */
.sub-news img {
    width: 100%;
    max-width: 269px;
    object-fit: cover;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.bg-danger {
    background: linear-gradient(90deg, #C0392B 0%, #8B0000 100%) !important;
    color: white;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.sub-news h6 a:hover {
    color: #8B0000 !important;
}

.news-item .category {
    font-size: clamp(12px, 1.5vw, 14px);
    font-weight: bold;
    color: #8B0000;
    display: block;
    margin-bottom: 2px;
}

.news-item h6 a:hover {
    color: #C0392B;
}

/* ===== Carousel Navigation ===== */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 10px;
    transition: background-color 0.3s ease-in-out;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    background-color: rgba(139, 0, 0, 0.8);
}

.carousel-control-prev,
.carousel-control-next {
    height: 100%;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5%;
}

/* ===== Button Styles ===== */
.bg-dark-red {
    background: linear-gradient(90deg, #C0392B 0%, #8B0000 100%) !important;
    color: white !important;
    border: none;
    transition: all 0.3s ease-in-out;
}

.bg-dark-red:hover {
    background: linear-gradient(90deg, #8B0000 0%, #C0392B 100%) !important;
    color: #fff !important;
}

/* ===== Pagination ===== */
.pagination .page-numbers {
    background-color: #C0392B;
    border: 1px solid #C0392B;
    color: white;
    padding: 8px 16px;
    margin: 0 5px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: #8B0000;
    color: white;
    border-color: #8B0000;
}

.pagination .prev, .pagination .next {
    background-color: #C0392B;
    color: white;
    padding: 8px 16px;
    margin: 0 5px;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.pagination .prev:hover,
.pagination .next:hover {
    background-color: #8B0000;
    color: white;
    border-color: #8B0000;
}

/* ===== Responsive Styles ===== */
@media (max-width: 576px) {
    .carousel-caption h5 {
        font-size: 14px;
    }
    .carousel-caption p {
        font-size: 12px;
    }

    /* News list - perkecil judul di mobile */
    .news-item h6 {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    .news-item h6.line-clamp-2 {
        -webkit-line-clamp: 3;
    }

    .sub-news img {
        max-width: 128px;
        height: 72px;
    }
}

@media (min-width: 768px) {
    .sub-news img {
        max-width: 269px;
        height: 151px;
    }
}

@media (max-width: 768px) {
    .carousel-item img {
        height: 250px;
    }
}

/* ===== Custom Button Styles ===== */
.bg-tosca {
    background: linear-gradient(90deg, #C0392B 0%, #8B0000 100%) !important;
    color: white !important;
    border: none;
    padding: 10px 20px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.bg-tosca:hover {
    background: linear-gradient(90deg, #8B0000 0%, #C0392B 100%) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Modern Design Utilities ===== */
.bg-teal {
    background-color: #8B0000 !important;
}

.text-teal {
    color: #8B0000 !important;
}

.hover-teal:hover {
    color: #C0392B !important;
    transition: color 0.2s ease-in-out;
}

.bg-teal-gradient {
    background: linear-gradient(90deg, #C0392B 0%, #8B0000 100%) !important;
}

/* ===== Carousel Caption Dark Overlay ===== */
.bg-dark-gradient-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%) !important;
}

/* ===== Premium Image Zoom Hover ===== */
.hover-zoom {
    transition: transform 0.4s ease;
}

.hover-zoom:hover {
    transform: scale(1.05);
}

/* ===== Footer Styles ===== */
.site-footer {
    background: linear-gradient(to bottom, #495057, #343a40, #212529) !important;
    border-top: 4px solid #8B0000;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.35) !important;
    font-size: 0.9rem;
}

.hover-gold:hover {
    color: #FFD700 !important;
    transition: color 0.2s ease-in-out;
}

.btn-social {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-social:hover {
    background-color: #FFD700 !important;
    color: #8B0000 !important;
    border-color: #FFD700 !important;
    transform: translateY(-3px) scale(1.1);
}

/* ===== Misc Utilities ===== */
.fs-8 {
    font-size: 0.8rem;
}
.fs-7 {
    font-size: 0.875rem;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-3px);
    }
}



/* ===== Sticky Sidebar ===== */

/* ===== Reading Progress Bar ===== */
#reading-progress-bar {
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #C0392B, #FFD700);
    transition: width 0.1s linear;
}

/* ===== Dark Mode Toggle Button ===== */
#dark-mode-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #C0392B, #8B0000);
    color: #fff;
    box-shadow: 0 4px 16px rgba(139,0,0,0.4);
    transition: all 0.3s ease;
}

#dark-mode-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(139,0,0,0.6);
}

/* ===== Dark Mode Overrides ===== */
[data-bs-theme="dark"] body {
    background-color: #121212;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .news-list,
[data-bs-theme="dark"] .card {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #ddd !important;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5 {
    color: #E74C3C;
}

[data-bs-theme="dark"] .middle-menu-wrapper {
    background-color: #1a1a1a !important;
    border-color: #333 !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2a2a2a !important;
}

[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] header {
    background-color: #1a1a1a !important;
    border-bottom-color: #333 !important;
}

[data-bs-theme="dark"] a {
    color: #E74C3C;
}

[data-bs-theme="dark"] .text-muted {
    color: #999 !important;
}

@media (min-width: 992px) {
    .sticky-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 24px;
        align-self: start;
    }
}

@media (max-width: 991.98px) {
    .sticky-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

/* ===== Popular Widget Card ===== */
.popular-widget-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(139, 0, 0, 0.08);
    overflow: hidden;
}

.popular-widget-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.popular-widget-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, #C0392B, #8B0000);
    border-radius: 2px;
}

.popular-widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #8B0000;
    margin: 0;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
}

.popular-list {
    margin: 0;
    padding: 0;
}

.popular-list-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f3;
    transition: background-color 0.2s ease;
}

.popular-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-list-item:first-child {
    padding-top: 0;
}

.popular-rank {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: rgba(139, 0, 0, 0.25);
    line-height: 1;
    min-width: 32px;
    margin-top: 2px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.popular-list-item:hover .popular-rank {
    color: #C0392B;
    transform: scale(1.1);
}

.popular-list-content {
    flex: 1;
    min-width: 0;
}

.popular-list-link {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.45;
    transition: color 0.2s ease;
    margin-bottom: 5px;
}

.popular-list-link:hover {
    color: #C0392B;
}

.popular-list-date {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    align-items: center;
}

/* Dark mode support */
[data-bs-theme="dark"] .popular-widget-card {
    background: #1e1e1e !important;
    border-color: #333 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .popular-widget-header {
    border-bottom-color: #2a2a2a;
}

[data-bs-theme="dark"] .popular-list-item {
    border-bottom-color: #2a2a2a !important;
}

[data-bs-theme="dark"] .popular-list-link {
    color: #ddd;
}

[data-bs-theme="dark"] .popular-list-link:hover {
    color: #E74C3C;
}

/* ===== Animate Pulse ===== */
@keyframes pulse {
    0%   { transform: scale(1);   opacity: 1; }
    50%  { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1);   opacity: 1; }
}
.animate-pulse {
    animation: pulse 2s infinite ease-in-out;
}

/* ===== Modern Popular Widget (legacy) ===== */
.popular-item-featured {
    transition: transform 0.3s ease;
}
.popular-item-featured:hover {
    transform: translateY(-2px);
}
.popular-item-featured .featured-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
    z-index: 2;
}
.popular-item-featured img {
    z-index: 1;
    transition: transform 0.5s ease;
}
.popular-item-featured:hover img {
    transform: scale(1.05);
}
