/*
Theme Name: Pagalworld Theme
Theme URI: https://wpcodequill.com/product/wp-pagalworld-theme/
Author: WPCodeQuill
Author URI: https://wpcodequill.com
Description: A fast, media-focused WordPress theme for music and downloads.
Version: 1.0.0
Text Domain: pagalworld-theme
*/

/* --- Base Layout --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}

.pw-container {
    max-width: 1015px; 
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
}

.pw-layout {
    display: flex;
    gap: 30px; 
    margin-top: 20px;
    align-items: flex-start;
}

.pw-main {
    flex: 1; 
    min-width: 0; 
}

.pw-sidebar {
    width: 320px; 
    flex-shrink: 0;
    position: sticky; 
    top: 20px; 
}

/* --- Pagination Styling --- */
.pw-pagination {
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: center;
}
.pw-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid #ddd;
    transition: background 0.2s;
}
.pw-pagination .page-numbers:hover {
    background: #e0e0e0;
}
.pw-pagination .current {
    background: #00c4cc; 
    color: #ffffff;
    border-color: #00c4cc;
}

/* --- Ad Banners --- */
.top-ad-banners {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}
.ad-placeholder {
    background: #e0e0e0;
    text-align: center;
    padding: 50px 0;
    font-weight: bold;
    color: #666;
}

/* --- Intro Section --- */
.intro-section {
    background: transparent;
    padding: 0 0 15px 0;
    margin-bottom: 20px;
    border: none; 
}
.intro-title {
    color: #0066cc; 
    font-size: 24px;
    margin-top: 0;
    font-weight: normal;
}
.intro-section p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}
.intro-section .note {
    color: #cc0000;
    margin-bottom: 0;
}

/* --- Section Headings --- */
.section-heading {
    background: #333333;
    color: #ffffff;
    padding: 12px 15px;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: bold;
}

/* ========================================================= */
/* --- NEW CARDS COMPONENT (Replaces the old Song Grid)      */
/* ========================================================= */
.songs_cards {
    width: 100%;
    padding: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.songs_cards .card {
    width: calc(20% - 12px); /* 5 cards per row */
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #202020;
    box-sizing: border-box;
}

.songs_cards .card .img {
    width: 100%;
    aspect-ratio: 1 / 1; /* FIXED: Forces perfect squares without stretching */
    overflow: hidden;
    border-radius: 4px;
}

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

.songs_cards .card .title {
    border: 1px solid #d9d9d9;
    background: #e8e8e8;
    width: 100%;
    box-sizing: border-box; 
    margin-top: 5px; 
    padding: 6px;
}

.songs_cards .card .title p {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin: 0;
    text-align: left;
    color: #333;
}

/* --- Buttons --- */
.view-all-btn {
    display: table;
    margin: 0 auto 30px auto;
    background: #cc0000;
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
}
.view-all-btn:hover {
    background: #aa0000;
}

/* --- Sidebar Lists --- */
.sidebar-widget {
    margin-bottom: 30px;
}
.widget-heading {
    background: #222222;
    color: #ffffff;
    padding: 12px 15px;
    margin: 0;
    font-size: 15px;
    font-weight: bold;
    border-bottom: 3px solid #00c4cc; 
}
.widget-list {
    list-style: none;
    padding: 15px;
    margin: 0;
    background: #f8f9fa; 
    border: 1px solid #ddd;
    border-top: none;
}
.widget-list li {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #ffffff; 
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
}
.widget-list li:last-child {
    margin-bottom: 0;
}
.play-btn {
    background: #000;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-right: 12px;
    flex-shrink: 0;
}
.song-info {
    overflow: hidden;
}
.song-info a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-info .meta {
    font-size: 11px;
    color: #777;
    margin-top: 4px;
    display: block;
}

/* --- Categories Grid --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}
.category-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 10px;
    text-align: center;
    text-decoration: none;
    color: #000;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.category-card .music-icon {
    font-size: 24px;
    color: #0056b3;
    margin-bottom: 10px;
}
.category-card .cat-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}
.category-card .cat-count {
    background: #e9ecef;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    color: #555;
}

/* --- Breadcrumb Navigation --- */
.pw-breadcrumb {
    background-color: #f1f1f1;
    padding: 12px 20px;
    max-width: 1000px; 
    margin: 0 auto 20px auto; 
    box-sizing: border-box; 
    font-size: 14px;
    color: #333;
}
.pw-breadcrumb a {
    color: #0056b3; 
    text-decoration: none;
}
.pw-breadcrumb a:hover {
    text-decoration: underline;
}
.pw-breadcrumb span {
    color: #333; 
}

/* --- Single Song Page Layout --- */
.single-post-page {
    max-width: 1000px; 
    margin: 0 auto 30px auto;
    background: #fff;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}
.song-box-header {
    background: #2a2a2a;
    padding: 12px 20px;
    border-bottom: 4px solid #00c4cc; 
}
.song-box-header h1, .song-box-header h2 {
    color: #ffffff;
    font-size: 20px;
    margin: 0;
    font-weight: normal;
}
.mt-20 {
    margin-top: 20px;
}
.song-details-box {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    border: 1px solid #e0e0e0;
    border-top: none;
    background: #fafafa;
}
.song-image {
    width: 300px;
    padding-left: 20px;
    flex-shrink: 0;
}
.song-image img {
    width: 100%;
    height: auto;
    border: 2px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.song-info {
    flex: 1;
    padding-right: 20px;
}
.song-info h2 {
    font-size: 22px;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
}
.song-meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}
.song-meta-table td {
    padding: 8px 0;
    font-size: 15px;
    color: #333;
}
.song-meta-table td:first-child {
    width: 35%;
    color: #555;
}
.audio-player-wrapper {
    margin-bottom: 25px;
    width: 100%;
}
.audio-player-wrapper audio {
    width: 100%;
    outline: none;
}
.download-buttons {
    display: flex;
    gap: 10px; 
    flex-wrap: wrap;
    padding: 10px 0;
    width: 90%;
}
.dl-btn {
    flex: 1;
    min-width: 70px; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    text-decoration: none;
    font-family: 'Inter', sans-serif; 
    font-size: 10px;
    letter-spacing: 0.2px;
    background: linear-gradient(135deg, #ff000d 0%, #c4000a 100%);
    padding: 16px 24px;
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(255, 0, 13, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: none;
}
.dl-btn:hover {
    background: linear-gradient(135deg, #ff1a26 0%, #ff000d 100%);
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(255, 0, 13, 0.4);
}
.dl-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 0, 13, 0.2);
}
.song-description-box {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-top: none;
    background: #fafafa;
    line-height: 1.6;
    color: #444;
    font-size: 15px;
}

/* --- Related Songs Section --- */
.related-songs-section {
    margin-top: 30px;
    margin-bottom: 30px;
}
.related-header {
    border-bottom: 4px solid #8e44ad; 
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 15px 0;
}
.related-card {
    border: 1px solid #ddd;
    background: #f0f0f0; 
    text-align: left;
    transition: box-shadow 0.2s;
}
.related-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.related-card a {
    text-decoration: none;
    color: #000;
    display: block;
}
.related-card img {
    width: 100%;
    aspect-ratio: 1/1; 
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #ddd;
}
.related-title {
    padding: 10px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #222;
}


/* ========================================================= */
/* --- FOOTER STYLES                                         */
/* ========================================================= */
.site-footer {
    background-color: #222222; /* Dark background */
    color: #dddddd;
    font-family: Arial, sans-serif;
    border-bottom: 4px solid #00c4cc; /* The Teal line at the bottom */
    margin-top: 50px; /* Pushes the footer down from the main content */
}

.footer-container {
    max-width: 1000px; /* Aligns perfectly with your header and content */
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
}

.footer-copy {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
}

.footer-nav .footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px; /* Spacing between links */
}

.footer-nav .footer-menu-list li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-nav .footer-menu-list li a:hover {
    color: #00c4cc; /* Turns teal on hover */
}

/* Mobile Responsive Footer */
@media screen and (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .footer-nav .footer-menu-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}



/* ========================================================= */
/* --- RESPONSIVE MEDIA QUERIES                              */
/* ========================================================= */
@media screen and (max-width: 992px) {
    .pw-layout {
        flex-direction: column; 
    }
    .pw-sidebar {
        width: 100%;
        position: static;
    }
    .songs_cards .card {
        width: calc(25% - 11.25px); /* Drops to 4 columns */
    }
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .top-ad-banners {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .song-details-box {
        flex-direction: column;
        align-items: center;
    }
    .song-image {
        width: 80%;
        padding-left: 0;
    }
    .song-info {
        padding: 0 20px;
        width: 100%;
        box-sizing: border-box;
    }
    .download-buttons {
        flex-direction: column;
    }
    .songs_cards .card {
        width: calc(33.33% - 10px); /* Drops to 3 columns */
    }
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .songs_cards .card {
        width: calc(50% - 7.5px); /* Drops to 2 columns on mobile */
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}