/*
Theme Name: Afromusic
Theme URI: https://yatosha.com
Author: Yatosha Web Services
Author URI: https://yatosha.com
Description: A music sharing blog theme by Webline Africa Limited.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: afromusic
Tags: blog, music, entertainment, custom-colors, custom-menu, featured-images
*/

/* 
 * Company Name: Webline Africa Limited
 * Author: Yatosha Web Services
 * Description: Custom styles for the Music Sharing Blog.
 */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    --primary-color: #1a1a1a; /* Dark charcoal */
    --secondary-color: #f8f9fa; /* Light gray */
    --accent-color: #d4af37; /* Gold accent for elegance */
    --text-color: #333333;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --footer-bg: #111111;
    --footer-text: #cccccc;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--secondary-color); /* Light background, NOT purple */
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
}

/* Navbar Customization */
.navbar {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-color) !important;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

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

.navbar-nav {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

/* Submenu Support */
.navbar-nav .menu-item {
    position: relative;
}

.navbar-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0.75rem 0;
    background-color: var(--bg-color);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
    min-width: 220px;
    display: none;
    z-index: 50;
}

.navbar-nav .sub-menu li {
    list-style: none;
}

.navbar-nav .sub-menu .nav-link {
    display: block;
    margin: 0;
    padding: 0.45rem 1.25rem;
    font-weight: 500;
    color: var(--primary-color) !important;
}

.navbar-nav .sub-menu .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.035);
}

.navbar-nav .submenu-open > .sub-menu {
    display: block;
}

.submenu-toggle {
    border: none;
    background: transparent;
    color: var(--primary-color);
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    margin-left: 0.35rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    border-radius: 50%;
}

.submenu-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}

.submenu-toggle::before {
    content: '\25BC';
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.submenu-open > .submenu-toggle::before {
    transform: rotate(180deg);
}

@media (min-width: 992px) {
    .navbar-nav .sub-menu {
        position: absolute;
        top: calc(100% + 2px);
        left: 0;
        display: block;
        opacity: 0;
        pointer-events: none;
        transform: translateY(10px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .navbar-nav .menu-item-has-children:hover > .sub-menu,
    .navbar-nav .menu-item-has-children:focus-within > .sub-menu {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .submenu-toggle {
        display: none !important;
    }

    .navbar-nav .sub-menu .sub-menu {
        top: 0;
        left: calc(100% + 12px);
    }
}

@media (max-width: 991px) {
    .navbar-nav .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 0;
        padding-right: 0;
        border-radius: 0;
        background-color: transparent;
    }

    .navbar-nav .sub-menu .nav-link {
        padding-left: 1.75rem;
        border-left: 2px solid rgba(0,0,0,0.05);
    }

    .submenu-toggle {
        display: inline-flex;
    }
}

/* Buttons */
.btn-custom {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    color: var(--primary-color);
}

/* Featured Section */
.featured-section {
    background-color: var(--secondary-color);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scroll-container::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.scroll-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.featured-card {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-height: 250px; /* Ensure a consistent height for visual balance */
}

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

.featured-card .card-img {
    transition: transform 0.5s ease;
    filter: brightness(0.7);
}

.featured-card:hover .card-img {
    transform: scale(1.05);
    filter: brightness(0.5);
}

.featured-card .card-img-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.featured-card .card-title {
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.category-tag-overlay {
    background-color: var(--accent-color);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Featured Section */
.section-title {
    position: relative;
    margin-bottom: 2rem;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin-top: 10px;
}

/* Music Card */
.music-card {
    background-color: var(--card-bg);
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.music-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-meta {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

.category-tag {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.thumb-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 54px;
    height: 54px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d34037;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    border: none;
    cursor: pointer;
}

.thumb-play-btn i {
    font-size: 1.4rem;
    margin-left: 4px;
}

.thumb-play-btn.playing i {
    margin-left: 0;
    margin-right: 1px;
}

.thumb-play-btn.playing i::before {
    content: "\f04c";
}

.thumb-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1) !important;
    background: #fff;
    color: #b3362f;
}

.thumb-box:hover .thumb-play-btn,
.thumb-play-btn.playing {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.post-featured {
    overflow: hidden;
    border-radius: 10px;
}

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

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

.post-placement {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.post-placement > * {
    max-width: 100%;
}

.top-ad-placement {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px 0;
    width: 100%;
}

.top-ad-placement > * {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Sidebar */
.sidebar-widget {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.list-group-item {
    border: none;
    padding: 0.75rem 0;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

.list-group-item:hover {
    color: var(--accent-color);
    background-color: transparent;
}

.afromusic-related-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-post {
    text-decoration: none;
    color: var(--text-color);
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.related-post:hover {
    background-color: var(--secondary-color);
}

.related-post-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 12px;
}

.related-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary-color);
}

.related-post-meta {
    font-size: 0.75rem;
    color: #999;
}

/* Pagination */
.pagination .page-link {
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    margin: 0 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.pagination .page-item.active .page-link {
    background-color: var(--accent-color);
    color: white;
}

.pagination .page-link:hover {
    background-color: #eee;
    color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
}

footer a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent-color);
}

.footer-links li {
    margin-bottom: 0;
}

.footer-brand-title {
    color: var(--accent-color);
}

.footer-social a {
    color: white;
    background-color: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* Sticky Player */
.sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1050;
}

.player-close-btn {
    pointer-events: auto;
    touch-action: manipulation;
    z-index: 2000;
}

.sticky-player .close-wrap {
    pointer-events: auto;
    z-index: 2000;
}

.sticky-player.visible {
    transform: translateY(0);
}

.sticky-player {
    border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(110%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.sticky-player.visible {
    transform: translateY(0);
}

.hover-white:hover { color: #fff !important; }

.bg-white-20 { background: rgba(255,255,255,0.1); }

#player-play-toggle:active { transform: scale(0.95); }

/* Visualizer Bars */
.v-bar {
    width: 4px;
    background: var(--accent-color);
    border-radius: 1px;
    transition: height 0.1s linear;
    min-height: 2px;
}

/* Page Transition */
.transition-fade {
    transition: opacity 0.3s;
    opacity: 1;
}

html.is-animating .transition-fade {
    opacity: 0;
}
