/* Posts Layout with Sidebar Styles */
/*.augusto-posts-layout {*/
/*    max-width: 1200px;*/
/*    margin: 0 auto;*/
/*    padding: 20px;*/
/*}*/

.posts-layout-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Sidebar Styles */
.posts-sidebar {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    order: 1;
}

/* Desktop: Sidebar on left */
@media (min-width: 992px) {
    .posts-layout-container {
        flex-direction: row;
        gap: 40px;
        align-items: flex-start;
    }
    
    .posts-sidebar {
        flex: 0 0 320px;
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        order: 1;
    }
    
    .posts-main-content {
        order: 2;
    }
}

/* Override case-studies-grid for posts layout */
.augusto-posts-layout .case-studies-grid {
    margin: 0 !important;
}

.augusto-blog-sidebar h3 {
    color: #0e1e2b;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.blog-category-section {
    margin-bottom: 25px;
}
.blog-category-section ul{
    list-style: none;
}
.blog-category-section:last-child {
    margin-bottom: 0;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 8px;
    margin-left: 0 !important;
}

.category-link {
    display: block;
    padding: 10px;
    color:#0e1e2b !important;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 16px;
    /*border-left: 3px solid transparent;*/
}

.category-link:hover {
    background-color: #22b161;
    color: #ffffff !important;
    transform: translateX(5px);
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .category-link:hover {
        transform: none;
    }
    
    .category-link:active {
        background-color:#22b161;
        color: #ffffff;
        transform: scale(0.98);
    }
}

.category-link.active {
    background-color: #22b161;
    color: #ffffff !important;
    font-weight: 500;
}

.category-link .count {
    color:#0e1e2b !important;
    font-size: 14px;
    font-weight: normal;
}
.category-link:hover  .count{
    color: #ffffff !important;
}
.category-link.active .count {
    color: #ffffff !important;
}

/* Main Content Area */
.posts-main-content {
    flex: 1;
    min-width: 0;
    order: 2;
}

.posts-container {
    min-height: 400px;
}

/* Dropdown functionality for mobile/tablet */
@media (max-width: 991px) {
    .posts-sidebar {
        position: relative;
        margin-bottom: 15px;
        padding: 15px;
        padding-bottom: 0;
    }
    .posts-layout-container{
        padding: 30px 0;
    }
    .blog-category-section {
        margin-bottom: 0;
    }
    
    .blog-category-section h3 {
        cursor: pointer;
        user-select: none;
        position: relative;
        padding-right: 30px;
        margin-bottom: 0;
    }

    .blog-category-section h3::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2322B161' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat center;
        background-size: contain;
    }




    .blog-category-section.collapsed h3::after {
        transform: translateY(-50%) rotate(-90deg);
    }
    
    .blog-category-section .category-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        margin-top: 0;
    }
    .blog-category-section h3{
        border: none;
        padding-bottom: 0;
    }
    /*!* Default: all sections collapsed on initial load *!*/
    /*.blog-category-section {*/
    /*    margin-bottom: 20px;*/
    /*}*/
    
    .blog-category-section .category-list {
        max-height: 0;
        margin-top: 0;
    }
    
    .blog-category-section h3::after {
        transform: translateY(-50%) rotate(-90deg);
    }
    
    /* Only expand when not collapsed */
    .blog-category-section:not(.collapsed) .category-list {
        max-height: 500px;
    }
    .blog-category-section .category-list{
        margin-top: 15px;
    }
    
    .blog-category-section:not(.collapsed) h3::after {
        transform: translateY(-50%) rotate(0deg);
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Responsive loading state */
@media (max-width: 767px) {
    .loading {
        padding: 40px 15px;
        font-size: 14px;
        min-height: 150px;
    }
}

@media (max-width: 480px) {
    .loading {
        padding: 30px 10px;
        font-size: 13px;
        min-height: 120px;
    }
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (max-width: 1439px) and (min-width: 992px){
    .posts-sidebar {
        flex: 0 0 270px;
    }
    .posts-layout-container{
        padding-top: 40px;
    }
}
/* Tablet Styles (up to 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    /*.augusto-posts-layout {*/
    /*    padding: 20px 15px;*/
    /*}*/

    
    .augusto-posts-layout .case-studies-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }
    
    .category-link {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .category-link .count {
        font-size: 11px;
    }
}
/*@media (max-width: 991px) {*/
/*    .augusto-posts-layout {*/
/*        padding: 15px;*/
/*    }*/
/*}*/
/* Mobile Landscape */
@media (max-width: 767px) {

    .augusto-posts-layout .case-studies-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    
    .category-link {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .category-link .count {
        font-size: 11px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .posts-layout-container {
        gap: 15px;
    }

    .augusto-posts-layout .case-studies-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .category-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .category-link .count {
        font-size: 10px;
    }
    
    .augusto-blog-sidebar h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .blog-category-section {
        margin-bottom: 20px;
    }
}

/* Small Mobile Devices */
@media (max-width: 360px) {
    .category-link {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .augusto-blog-sidebar h3 {
        font-size: 15px;
    }
}

/* Accessibility Improvements */
/*.category-link:focus {*/
/*    outline: 2px solid #1976d2;*/
/*    outline-offset: 2px;*/
/*}*/

/*.blog-post-item:focus-within {*/
/*    outline: 2px solid #1976d2;*/
/*    outline-offset: 2px;*/
/*}*/

/* Print Styles */
/*@media print {*/
/*    .posts-sidebar {*/
/*        display: none;*/
/*    }*/
/*    */
/*    .posts-layout-container {*/
/*        flex-direction: column;*/
/*    }*/
/*    */
/*    .augusto-posts-layout .case-studies-grid {*/
/*        grid-template-columns: 1fr !important;*/
/*    }*/
/*}*/
