/* ============================================
   APEIRON Custom Facebook Feed Styles
   ============================================ */
.aff-container {
    max-width: 100%;
    margin: 20px 0;
}

.aff-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.aff-post {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e8e8e8;
}

.aff-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.aff-post-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
}

.aff-page-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1877F2, #0D65D9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
    margin-right: 12px;
}

.aff-page-name {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 15px;
}

.aff-post-time {
    font-size: 12px;
    color: #8a8a8a;
    margin-top: 2px;
}

.aff-post-content {
    padding: 18px 20px;
    color: #1a1a2e;
    line-height: 1.6;
    font-size: 14px;
}

.aff-post-content p {
    margin: 0 0 12px 0;
}

.aff-post-content p:last-child {
    margin-bottom: 0;
}

.aff-post-image {
    width: 100%;
    display: block;
    background: #f0f2f5;
}

.aff-post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.aff-post-actions {
    padding: 12px 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #5d6f7e;
}

.aff-post-actions span {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
}

.aff-post-actions .aff-icon {
    font-size: 16px;
}

.aff-footer {
    text-align: center;
    margin-top: 25px;
    padding: 15px;
}

.aff-footer a {
    display: inline-block;
    background: #1877F2;
    color: white;
    padding: 10px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s ease;
}

.aff-footer a:hover {
    background: #0D65D9;
}

.aff-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    color: #856404;
    text-align: center;
}

.aff-loading {
    text-align: center;
    padding: 40px 0;
    color: #8a8a8a;
}

.aff-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f0f2f5;
    border-top: 4px solid #1877F2;
    border-radius: 50%;
    animation: aff-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes aff-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.aff-no-posts {
    text-align: center;
    padding: 40px 20px;
    color: #8a8a8a;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .aff-feed {
        grid-template-columns: 1fr;
    }
    
    .aff-post-header {
        padding: 12px 16px;
    }
    
    .aff-post-content {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .aff-post-actions {
        padding: 10px 16px;
        font-size: 13px;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .aff-container {
        padding: 0 10px;
    }
    
    .aff-post-actions {
        gap: 15px;
    }
}