/* 
 * Najibul Post Type - Frontend Styles
 * Version: 1.0.0
 * Author: Najibul
 */

/* ============================================
   GLOBAL STYLES FOR ALL POST TYPES
   ============================================ */

/* Container for all custom post types */
.najibul-cpt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Card design for all post items */
.najibul-cpt-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
}

.najibul-cpt-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Title styles */
.najibul-cpt-title {
    color: #2c3e50;
    font-size: 1.75rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.najibul-cpt-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.najibul-cpt-title a:hover {
    color: #3498db;
}

/* Meta information */
.najibul-cpt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    align-items: center;
}

.najibul-cpt-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.najibul-cpt-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Content styles */
.najibul-cpt-content {
    line-height: 1.8;
    color: #34495e;
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Read more button */
.najibul-read-more {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.najibul-read-more:hover {
    background: linear-gradient(135deg, #2980b9, #1c5a7a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    color: white;
}

/* ============================================
   GRID LAYOUTS FOR ARCHIVE PAGES
   ============================================ */

/* Grid for archive pages */
.najibul-cpt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.najibul-cpt-grid .najibul-cpt-item {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Thumbnail styles */
.najibul-cpt-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* ============================================
   CATEGORY & TAXONOMY STYLES
   ============================================ */

/* Category tags */
.najibul-cpt-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.najibul-cpt-category {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #bdc3c7;
}

.najibul-cpt-category:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* ============================================
   SINGLE POST STYLES
   ============================================ */

/* Single post page */
.najibul-single-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.najibul-single-header {
    text-align: center;
    margin-bottom: 40px;
}

.najibul-single-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 800;
}

.najibul-single-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #7f8c8d;
    font-size: 1rem;
}

.najibul-single-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
}

.najibul-single-content p {
    margin-bottom: 1.5em;
}

.najibul-single-content h2 {
    color: #2c3e50;
    margin: 2em 0 1em 0;
    font-size: 1.8rem;
}

.najibul-single-content h3 {
    color: #34495e;
    margin: 1.5em 0 1em 0;
    font-size: 1.5rem;
}

/* Featured image on single post */
.najibul-single-featured-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet devices */
@media (max-width: 992px) {
    .najibul-cpt-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .najibul-single-title {
        font-size: 2rem;
    }
    
    .najibul-cpt-title {
        font-size: 1.5rem;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .najibul-cpt-container {
        padding: 0 15px;
    }
    
    .najibul-cpt-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .najibul-cpt-item {
        padding: 20px;
    }
    
    .najibul-cpt-title {
        font-size: 1.4rem;
    }
    
    .najibul-single-title {
        font-size: 1.8rem;
    }
    
    .najibul-single-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .najibul-cpt-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .najibul-cpt-item {
        padding: 15px;
    }
    
    .najibul-cpt-title {
        font-size: 1.3rem;
    }
    
    .najibul-single-title {
        font-size: 1.6rem;
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

/* Fade in animation for post items */
@keyframes najibulFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.najibul-cpt-item {
    animation: najibulFadeIn 0.6s ease forwards;
}

/* Stagger animation for grid items */
.najibul-cpt-grid .najibul-cpt-item:nth-child(1) { animation-delay: 0.1s; }
.najibul-cpt-grid .najibul-cpt-item:nth-child(2) { animation-delay: 0.2s; }
.najibul-cpt-grid .najibul-cpt-item:nth-child(3) { animation-delay: 0.3s; }
.najibul-cpt-grid .najibul-cpt-item:nth-child(4) { animation-delay: 0.4s; }
.najibul-cpt-grid .najibul-cpt-item:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text alignment */
.najibul-text-center { text-align: center; }
.najibul-text-left { text-align: left; }
.najibul-text-right { text-align: right; }

/* Margin utilities */
.najibul-mt-0 { margin-top: 0 !important; }
.najibul-mt-10 { margin-top: 10px !important; }
.najibul-mt-20 { margin-top: 20px !important; }
.najibul-mt-30 { margin-top: 30px !important; }
.najibul-mt-40 { margin-top: 40px !important; }

.najibul-mb-0 { margin-bottom: 0 !important; }
.najibul-mb-10 { margin-bottom: 10px !important; }
.najibul-mb-20 { margin-bottom: 20px !important; }
.najibul-mb-30 { margin-bottom: 30px !important; }
.najibul-mb-40 { margin-bottom: 40px !important; }

/* Flex utilities */
.najibul-flex { display: flex; }
.najibul-flex-column { flex-direction: column; }
.najibul-flex-wrap { flex-wrap: wrap; }
.najibul-justify-center { justify-content: center; }
.najibul-justify-between { justify-content: space-between; }
.najibul-align-center { align-items: center; }

/* ============================================
   LOADING STATES
   ============================================ */

.najibul-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: najibulSpin 1s linear infinite;
}

@keyframes najibulSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.najibul-loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    min-height: 200px;
}

/* ============================================
   NO RESULTS MESSAGE
   ============================================ */

.najibul-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 1.2rem;
}

.najibul-no-results-icon {
    font-size: 60px;
    color: #bdc3c7;
    margin-bottom: 20px;
}

/* ============================================
   CUSTOM SCROLLBAR (Webkit browsers)
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1c5a7a);
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .najibul-read-more,
    .najibul-cpt-meta .dashicons,
    .najibul-cpt-categories {
        display: none !important;
    }
    
    .najibul-cpt-item {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
    
    .najibul-cpt-title {
        color: #000 !important;
    }
    
    .najibul-cpt-content {
        color: #333 !important;
    }
}