/* Posts Relacionados */
.gac-related-posts {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.post-entry h3.gac-related-title, gac-related-title {
    margin: 0 0 20px 0;
    font-size: 1.2em;
    color: #333;
}

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

.gac-related-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 15px;
    margin-bottom: 20px !important;
}

.gac-related-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.gac-related-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.gac-related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.gac-related-content {
    flex: 1;
}

.gac-related-post-title {
    margin: 0 0 8px 0;
    font-size: 1em;
    line-height: 1.4;
}

.gac-related-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.gac-related-post-title a:hover {
    color: #0073aa;
}

.gac-related-excerpt {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* Barra de similaridade */
.gac-similarity-score {
    position: relative;
    height: 20px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.gac-similarity-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to right, #388575, #388575);
    transition: width 0.3s ease;
}

.post-entry ul li span.gac-similarity-text, .gac-similarity-text {
    position: relative;
    display: block;
    text-align: center;
    line-height: 20px;
    font-size: 0.8em;
    color: #fff;
    font-weight: 500;
    z-index: 1;
    font-size: 12px !important;
}

/* Posts do Cluster */
.gac-cluster-posts {
    margin: 30px 0;
}

.gac-cluster-title {
    margin: 0 0 20px 0;
    font-size: 1.4em;
    color: #333;
}

/* Layout de Lista */
.gac-layout-list .gac-posts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gac-layout-list .gac-post-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: box-shadow 0.3s;
}

.gac-layout-list .gac-post-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.gac-layout-list .gac-post-thumbnail {
    flex-shrink: 0;
    width: 150px;
}

.gac-layout-list .gac-post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Layout de Grid */
.gac-layout-grid .gac-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gac-layout-grid .gac-post-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gac-layout-grid .gac-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.gac-layout-grid .gac-post-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.gac-layout-grid .gac-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gac-layout-grid .gac-post-content {
    padding: 20px;
}

/* Layout de Carousel */
.gac-layout-carousel {
    position: relative;
}

.gac-layout-carousel .gac-posts-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.gac-layout-carousel .gac-post-item {
    flex: 0 0 300px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.gac-carousel-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.gac-carousel-controls button {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.gac-carousel-controls button:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Elementos comuns dos posts */
.gac-post-content {
    padding: 15px;
}

.gac-post-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    line-height: 1.3;
}

.gac-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.gac-post-title a:hover {
    color: #0073aa;
}

.gac-post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.gac-post-date::before {
    content: "📅 ";
}

.gac-post-author::before {
    content: "✍️ ";
}

.gac-post-excerpt {
    font-size: 0.95em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.gac-read-more {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.gac-read-more:hover {
    color: #005a87;
}

/* Widget de Posts Relacionados */
.widget .gac-related-posts {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.widget .gac-related-list {
    font-size: 0.9em;
}

.gac-related-list {
    padding-left: 0;
}

.widget .gac-related-item {
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.widget .gac-related-post-title {
    font-size: 0.95em;
}

.widget .gac-similarity-score {
    height: 16px;
    margin-top: 5px;
}

.widget .gac-similarity-text {
    line-height: 16px;
    font-size: 0.75em;
}

body.pcdm-enable.pcdark-mode .gac-related-excerpt {
color: #fff;
}


.gac-related-posts .gac-related-thumbnail a, .gac-related-posts .gac-related-post-title a {
    background: transparent !important;
}
/* Responsividade */
@media (max-width: 768px) {
    .gac-related-item {
        flex-direction: column;
    }
    
    .gac-related-thumbnail {
        display: none;
    }
    
    .gac-layout-list .gac-post-item {
        flex-direction: column;
    }
    
    .gac-layout-list .gac-post-thumbnail {
        width: 100%;
    }
    
    .gac-layout-grid .gac-posts-container {
        grid-template-columns: 1fr;
    }
    
    .gac-layout-carousel .gac-post-item {
        flex: 0 0 250px;
    }
}

@media (max-width: 480px) {
    .gac-related-posts {
        padding: 15px;
    }
    
    .gac-post-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gac-related-item,
.gac-post-item {
    animation: fadeIn 0.5s ease-out;
}

/* Loading */
.gac-loading {
    text-align: center;
    padding: 20px;
}

.gac-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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